I am following the struts 2 framework and using the JBoss server to deploy my application.
I came through this strange behaviour. Please explain it.
i have the following mapping in my struts.xml
<action name="Request" class="InboxAction">
<result name="success">/jsp/requestinbox.jsp</result>
<result name="none">/jsp/requestoutbox.jsp</result>
</action>
On my local machine when i run my application. If the result name is “success” the respective requestinbox.jsp is invoked and if the result is “none” the requestoutbox.jsp is invoked.
But when i deploy it in my JBoss server, requestinbox.jsp is displayed when the result is “success”. But if the result is “none” I am getting a blank page.
I removed the content from the requestoutput.jsp page and replaced with the following line “This is a test” and then I ran my application i was able to see the above line “This is a test”.
I tried restarting the JBoss server but no luck. Please tell me the problem and a possible solution.
Thanks in advance..
If you can see the “test” text then your configuration must be right.
I’d say there could be some problems with your values on
valuestack. Make sure you have provided proper getters and setters for your action and also check the tags in your page to see if values being referred are actually exposed. That’s what I would check first.Edit for comment
You need to expose the
listToDisplaywith a getter method like: