This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes What is the difference between action_name.do and /action_name.do? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "What is the difference between action_name.do and /action_name.do?" Watch "What is the difference between action_name.do and /action_name.do?" New topic
Author

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

kumaraswamy dapa
Greenhorn

Joined: Feb 26, 2010
Posts: 11
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

Joined: Jul 03, 2010
Posts: 39

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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: What is the difference between action_name.do and /action_name.do?
 
Similar Threads
Struts - Action Based Framework
httpServlet and action servlet
Diggerence in action
dispatcher Vs action dispatcher
.tld files