jQuery in Action, 2nd edition
The moose likes Struts and the fly likes Request Handler Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Request Handler" Watch "Request Handler" New topic
Author

Request Handler

Alan Amin
Greenhorn

Joined: Jun 20, 2008
Posts: 7
Hi,

I have some doubt..

If i am using Struts as MVC in my application..

so every time a request comes, It will be handled by our ActionServlet that is controller ..

if i have my welcome page as welcome.html, whether requesting for this ..
my request will go to Controller ..

Can you give me basic idea about this ..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56224
    
  13

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
If i am using Struts as MVC in my application..


Struts is only used for V and C. It does not handle the M.

The Struts ActionServlet is the main part of the Controller. URLS are mapped to this servlet in the web.xml file. See below for example.



if i have my welcome page as welcome.html, whether requesting for this ..my request will go to Controller ..


Only URLS that match the pattern specified in the web.xml file will be handled by the Controller. For the example above, intro.xyz will be handled by Controller. intro.html will not be handled by Controller.
Alan Amin
Greenhorn

Joined: Jun 20, 2008
Posts: 7
Thanks for your reply...

I want to know how other files will be handled other then action type..
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Other files than those mapped to the Controller are handled by the web server directly.

A Java servlet is an extension of a Java-based web server.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Request Handler
 
Similar Threads
GUI design, MVC question
Front Controller and Application Controller
Need Help
Controller servlet gets messy
Need Help getting Referrer IP in Servlet