File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes new on struts.query about ActionServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "new on struts.query about ActionServlet" Watch "new on struts.query about ActionServlet" New topic
Author

new on struts.query about ActionServlet

Ritesh raushan
Ranch Hand

Joined: Aug 29, 2012
Posts: 100
i am new on struts framework i have a doubt for following query.

1-why we configure ActionServlet in web.xml file (ActionServlet is predefined controller then why need to configure)

2-why struts given seperate web.xml file and struts-config(userdefined name) file.can we mixed

3-if we create form page with jsp then why need to write <load-on-startup>tag in web.xml
but if we create form page with html then no need of <load-on-startup>

please help me i want deeply concept.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

Ritesh raushan wrote:
1-why we configure ActionServlet in web.xml file (ActionServlet is predefined controller then why need to configure)

It is necessary to tell the servlet container what servlet to run for a particular context.

Ritesh raushan wrote:
2-why struts given seperate web.xml file and struts-config(userdefined name) file.can we mixed

web.xml is a standard servlet configuration file. struts-config.xml is specific to Struts applications. The configuration elements cannot be interchanged.

Ritesh raushan wrote:
3-if we create form page with jsp then why need to write <load-on-startup>tag in web.xml but if we create form page with html then no need of <load-on-startup>


I have never noticed this.
By the way, if it is at all possible, use Struts 2. Struts 1 has many problems that newer frameworks have long since fixed.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
jQuery in Action, 2nd edition
 
subject: new on struts.query about ActionServlet