My experience is the same as yours. That while the ".do" can be omitted
in the action definition, it may not be omitted in the forward. FWIW, I
think this is proper behavior. Certainly if you html:link to the forward
your html pages will be do-less. Also, you can change to another scheme
(e.g., "/action/login") simply by modifying the structs-config.



-----Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 6:00 PM
To: [EMAIL PROTECTED]
Subject: Is this a bug with struts config file?

 

Short version:

I would think that I could do this then <forward name="home"
path="/home"/>
and Struts

would know to add the .do for me.  When a <html:link forward="home"> is
rendered it does not

have the .do on it.  I have to make it <forward name="home"
path="/home.do"/> 

 

Is that a bug?

 

Since Struts determines extensions on the fly (at Servlet startup based
on
URL pattern in web.xml)

it just seems defeating that you would have to hard code an extension
anywhere in the system.

 

 

Longer version: 

In my crusade to wipe out all hard coded ".do" extensions in the app for
future upgradability

(for instance all my links are like this <html:link action="/login"...>
instead of "login.do" 

 

I found that (unless something is not right) the global-forwardS don't
act
as I would expect.

It implies in the struts config dtd that if contextRelative not true
then
the path is module relative.

 

It seems minor but if I need to change the extension to ".go" or
something
else,

say, because if a hacker doesn't know you are using Struts because the
extension is ".poo" then

it may help the system.  But in order to make the change I would have to
go
into all my many

struts config files and globally replace ".do".  Not too bad if I am
doing
it but when someone else

in the group with less experience does it then it could be a pain.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to