This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How control goes from jsp page to web.xml

 
Rajendra Prakash
Ranch Hand
Posts: 293
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i click submit button, how the control goes from jsp page to Deployment Descriptor ( web.xml)
 
Prasad Krishnegowda
Ranch Hand
Posts: 665
4
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you click submit, control does not go to web.xml, it goes to the resource specified in the attribute action in form tag.
 
Rajendra Prakash
Ranch Hand
Posts: 293
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok i specified like this


then how control goes to web.xml
(from this deployment descriptor control goes to ActionServlet right?)
 
Prasad Krishnegowda
Ranch Hand
Posts: 665
4
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This means, the controller has to go to url /searchTutorial, any URL are resolved by web.xml.. so controller examines the web.xml and forwards to the appropriate servlet, mapped to url /searchTutorial..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really; since this is apparently a Struts 1 application, the html:form tag will transform the action name into its full Struts 1 name, "/searchTutorial.action".

That is mapped in the web.xml to the Struts 1 action servlet, which normally handles all "/*.action" requests.

The action servlet maps the action name to the implementing code via the request processor.

(Exact details depend on which version of Struts you're using.)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic