Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

new on struts.query about ActionServlet

 
Ritesh raushan
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic