A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
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:
subject: to .do or not to .do?
Filter Mappings - URL Pattern
Mapping for a normal servlet? Mandatory in struts?
STRUTS + WEBLOGIC 8.1
Problem occuring in calling servlet
Struts jsps in WEB-INF
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014