• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Name for Action servlet at web.xml

 
siva prakash
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to struts, I have following doubt.

Can we change name mentioned to Action servlet at web.xml, because, in most books I found it as "Action".




Thanks,
Prakash.
 
RoshaniG Gopal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Siva,
Im not quite sure of what your question is. In the web.xml, you cant change the name of the Action class(org.apache.action...Action). This is the class the framework will be using to render certain functionalities which you dont have to write yourself. All the changes to the class name/mappings will be done in the struts-config.xml.
Hope it helps.
Regards,
Roshani
 
siva prakash
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gopal,


i mean, can i change the name of specified at <servlet-name> tag for Action servlet other than "Action" in web.xml




Thanks,
Prakash
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name used in the servlet definition in the web.xml file is completely up to you and doesn't matter. The only thing that matters is that the name you refer to in the <servlet-mapping> stanza is the same as the one you used to define the struts Action Servlet in the <servlet> stanza.
 
siva prakash
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Higginson
 
RoshaniG Gopal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Siva,
Just an addtion to what Merrill said, this link would give you info on how to do it.
http://www.allapplabs.com/struts/configuring_struts.htm
Regards,
Roshani
 
siva prakash
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Roshani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic