
To view a copy of this license, visit or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. Import .This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. So, how does this determine where to go? TestAction.java package test Otherwise, the request gets forwarded to 'failure' via mapping.findForward("failure"). If the parameter is present, the request gets forwarded on to 'success' via mapping.findForward("success"). In the TestAction class, we look for the presence of the 'success' parameter. In our Action class, we can perform some data processing or other tasks, and then decide where to go from there. If we examine our struts-config.xml file, we can see that the myTest.do action maps this time to the TestAction class, as seen here. The next things to notice in start.jsp are the href links, href="myTest.do?success=ok" and href="myTest.do". # This properties file holds resouces for the struts demo We can see that this file is a standard Java S W properties file, and that the my.message key is associated with the 'This is my message' value. The StrutsDemoResources.properties file is shown below. start.jsp start.jsp Message: Go to myTest Success Go to myTest Failure

Struts W knows about this file because we have a mapping to this file in struts-config.xml, as seen here. Where is this value coming from? It comes from the StrutsDemoResource.properties file located at the root level of our src/ directory. In the screen capture, we can see that this tag produces the text 'This is my message'.

Ignore the jsessionid for now (it is used for sessions).

Notice that the URL contains the action name, 'myStart.do', although the start.jsp is being hit, which we can see by the page title. The index.jsp file forwards on to 'howdy', which goes to our 'myStart' action, which brings up our start.jsp, as shown below. After starting the struts-demo application in Eclipse S W, we can open a browser window and go to Remember that index.jsp is our welcome-file, so hitting will go to index.jsp.

Let's fire up our application and try this.
