You need to create static field variables for those constants in your Action class:
public static final String READ = "read"; public static final String WRITE = "write"; Don On 12/13/06, red phoenix <[EMAIL PROTECTED]> wrote:
I am puzzled with struts2.0 action file,my files are follows: configure file is follows <action name="createRoom" class="crudRoomAction" method="create"> <result name="read">/chat/read.jsp</result> <result name="write">/chat/write.jsp</result> </action> action file is follows: public String execute() throws Exception { String flag=request.getParameter("flag"); if("1".equals(flag)) return SUCCESS; else if("2".equals(flag)) return READ; else return WRITE; } when I compile my action file,it raise error,say READ and WRITE don't define.I am puzzled with it. Why SUCCESS is define,READ and WRITE don't define? I don't find anywhere to define SUCCESS! How to do it? if return SUCCESS,it will go to which page,read.jsp or write.jsp? Anyone could get rid of my puzzled? Thanks
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]