A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
to .do or not to .do?
Joined: Jul 07, 2007
Jan 15, 2008 09:54:00
I get confused sometimes where to put the .do extension.
is setup to handle all the *.do extension:
Is it safe to assume all the abcs.do in jsp pages will be treated like /abcs ? Can't we just not put .do extention at all? Because sometimes I see places with .do, sometimes I don't.
I know some places if you put .do it may actually crash the program. Such as in Struts-config.xml in the action mapping area...
Joined: Feb 15, 2005
Jan 15, 2008 11:37:00
The rule of thumb that I follow is:
If it's in a Struts tag, don't use .do. If it's not a Struts tag, you must use .do. Examples:
<html:form action="/myAction" > <form action="/myAction.do" > <html:link action="/myAction" >click here</html:link> <a href="/myAction.do">click here</a>
While Struts tags will generally accept .do, it's generally less confusing if you leave it out.
I agree. Here's the link:
- it saves me about five hours per week
subject: to .do or not to .do?
STRUTS + WEBLOGIC 8.1
Problem occuring in calling servlet
Mapping for a normal servlet? Mandatory in struts?
Struts jsps in WEB-INF
Filter Mappings - URL Pattern
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013