Title may sound a little vague but I'll give it a go. I have 2 servlets:
- one.java: Extends the
Action class
forwards the page to success or failure based on the inputs atindex.jsp
- two.java: Extends the
ActionForm class
, Has getters and setters method
I have 3 jsp files:
- index.jsp: Is the welcome pages and asks for a username combination
- success.jsp: Is called if the combination is correct
- failure.jsp: Is called if the combination is false
I have 2 xml files:
- web.xml: DD
- struts-config.xml: Struts config file
I understand how web.xml works. My only doubt is, which one of the, one.java /two.java is called first from the struts.xml?
I tried to debug and found out that the ActionForm
class i.e two.java
is called first, then it returns the value to the Action
i.e one.java
.
But isn't Action class is supposed to execute first,and then the action form ? I mean This is what MVC architecture follows.
Please explain. Links to a very highly detailed workflow would be really helpful.