This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the difference between action_name.do and /action_name.do?

 
kumaraswamy dapa
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I'm new to struts can any one tel me the difference between the subject cited above?

1) Is it necessary to write the action name attribute in JSP preceded with slash.
Ex:

<form action="/action_name.do">

2)if I write the action_name not followed by the ".do" then is this is mapped properly in the struts-config.xml ?
 
Mohan rvscas
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. Not necessary to write the action name attribute in JSP preceded with slash.

2. Actually action name does not suffixed with .do in struts-confix.xml. you will be identify the action with .do suffixed action name.
.do suffixed action name will be filtered by the Filter Class.In which Filter class is defined in web.xml file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic