On 1/3/2018 10:47 AM, sreekanth wrote:
> I have a view page for displaying some already persisted data, this page most
> of the time loads without any error (with the same set of data) and rarely
> throws the exception which i have shared here. 75% time i've experienced
> this exception when there is class reload happens (as a part of hot
> deployment)
OK, let's see what news here and finish it :)
Could you please add following conf to your current conf ...
package me.zamani.yasser.ww_convention.actions;
import org.apache.struts2.json.JSONWriter;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
public class ReflectionAction {
private String result;
public String getResult() {
return result;
}
public String execute(){
try {
Field f =
JSONWriter.class.getDeclaredField("ENUM_AS_BEAN_DEFAULT");
result = Modifier.toString(f.getModifiers());
} catch (NoSuchFieldException e) {
result = e.getMessage();
}
return "success";
}
}
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>hello</title>
<s:head />
</head>
<body>
<h1><s:property value="result"/></h1>
</body>
</html>
<action name="reflection"
class="me.zamani.yasser.ww_convention.actions.ReflectionAction">
<result name="success">WEB-INF/content/reflection-success.jsp</result>
</action>
Then when this issue occurred, browse
http://yourIp:yourPort/yourContextPath/reflection and tell me what you
see, please?