I'm trying to learn struts...and I have some confusion that I'm hoping someone can shed some light on...
We have a web applicatoin and in the struts config file - there are different forwards depending on if the operation was sucessful or not. There are two different types of paths that we have in the file...
When there is a path = *.page then it appears that the application then looks in the tiles-def file and finds what JSP page to view. But with there is a *.do then I'm not sure what happens. How does the application know where it is supposed to look for the next operation?
But with there is a *.do then I'm not sure what happens. How does the application know where it is supposed to look for the next operation?
web.xml ... servlet-mapping maps the the url-pattern to a servlet-name which in turn maps to the 'ActionServlet'... a .do request then go through ActionServlet which looks at your struts-config.xml to figure out where to go...either that or voodoo.
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Joined: Mar 04, 2005
so if it goes to the struts-config file - should there be an entry for the success.do?
Joined: Apr 14, 2005
it depends...if your forward is defined to point to 'success.do' then absolutely! then again, why would you? just forward it to a tile, unless you want to forward it to something that does more (set values from backend call) after forwarding.