This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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 | 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 "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://aspose.com/file-tools
 
subject: What is the difference between action_name.do and /action_name.do?