최근에 struts2의 'S2-045' 문제가 해결되었습니다. 모두 업데이트되었습니다. struts2
과 관련된 jar 파일은 freemarker
, ognl
, xWork
등입니다. 동적 웹 프로젝트를 배포하려면 tomcat8
을 사용합니다. tomcat-server를 시작하는 동안 Exceptions
이 없습니다. 그러나 일부 문제이 발생했습니다. db30에서 가져온 일부 값은 페이지가 나타나지 않아야합니다.. 던진 Exceptions
가 없다. Action Classes
에 이미 정확하게 객체가 있음을 볼 수도 있습니다. struts2를 2.3.16에서 2.3.32로 업데이트 한 후 (S2-045 수정) JSP 파일에서 일부 객체 필드를 확인할 수 없음
다음이 아마 원인이 내가 생각하는 ralated 필드 ID를
// News.java (**just some ralated fields**)
class News{
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@Column(name = "f_uuid", length = 32, unique = true)
private String UUID;
@Column(name = "f_title", length = 200)
private String fTitle;
@Transient
private String fCreatetime_s;
public String getUUID() {
return UUID;
}
public void setUUID(String uuid) {
UUID = uuid;
}
public String getFTitle() {
return fTitle;
}
public void setFTitle(String title) {
fTitle = title;
}
public String getFCreatetime_s() {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
return formatter.format(Long.valueOf(fCreatetime));
}
public void setFCreatetime_s(String createtime_s) {
fCreatetime_s = createtime_s;
}
}
News.java
다음GetarcList.java
//GetarcList.java (just include some related fields)
class GetarcList{
private List list;
public void setList(List list) {
this.list = list;
}
//!!!!!!$$$$$$$$--- Attention -----$$$$$$$$$!!!!!!!!!!!
// this method returns a List<News> , I can successfully get every value of 'News' in the list
public List getList() throws AuctionException{
String orderby_str = (String) OrderByMap.get(String.valueOf(orderby));
list = webTagManager.getArcList(row, typeid, titlelen, infolen, orderby_str + " " + orderway);
return list;
}
}
되어 다음 몇 가지 예
// index.jsp ----- here is the list I want to show on the page.
// the list is the type of List<News> (Class News is my bussiness Class).
// I want to get the 'fTitle' and 'fCreatetime_s' from 'News' but they
// do not show up! (This used to be working very well.)
<s:bean name="org.ulibrary.web.Getarclist">
<s:iterator value="list">
<li>
<span class="listTitle">
<a target="_blank" href="ViewArc.action? uuid=${UUID}">${fTitle}</a>
</span>
<span class="listDate">${fCreatetime_s}</span>
</li>
</s:iterator>
</s:bean>
//=================================================================
입니다 OGNL 또는 JSP에 의한 ted jar-files. 내 index.jsp
또는 java-files에서 문제를 찾지 못했습니다.
'UUID'필드가 페이지에서 해결 될 수 있음을 잊어 버렸습니다. –
https://struts.apache.org/docs/struts-23-to-25-migration.html –