The name may seem a little vague, but I'll give it away. I have 2 servlets:
- one.java: Extends the
Action class redirects the page to success or failure based on index.jsp inputs - two.java: Extends the
ActionForm class method, Has getters and seters
I have 3 jsp files:
- index.jsp: Welcome pages and request a username combination
- success.jsp: Called if the combination is correct.
- failure.jsp: Called if the combination is false
I have 2 xml files:
- web.xml: DD
- struts-config.xml: Struts configuration file
I understand how web.xml works. My only doubt is that one of <, b> one.java/two.java is called first from struts.xml?
I tried to debug and found out that the ActionForm ie two.java class is ActionForm two.java , then it returns the value in Action ie one.java .
But shouldn't the Action class be executed first, and then the action form? I mean, this is what follows the MVC architecture.
Please explain. Links to a very detailed workflow will be really helpful.
java struts-1 struts struts-config
Punjan sudhar
source share