Marco, You should use the html:link tag.  Use the page instead of href.
Page will prepend the correct context path for you.  Html:rewrite does
this as well so you can use that for linking to images and what not.
Here is an example:

<html:link page="/Login.do">Login</html:link>

So what Struts will actually output would be:

<a href="/xml-op/Login.do">Login</a>

Given that xml-op is your context. 

Hth,

Carl

-----Original Message-----
From: Tony Tahbaz [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 16, 2003 4:16 PM
To: Struts Users Mailing List
Subject: RE: [NEWBIE]A very stupid question


How are you creating your link? Are you using the struts-html taglib or
are you just using html?

-----Original Message-----
From: Marco Tedone [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2003 2:07 PM
To: Struts-user-list
Subject: [NEWBIE]A very stupid question


I have my application under the context /xml-op/

In my struts-config.xml file, I define an action with the path=/Login

Anyway, when I want to invoke the Login action as a forward, let's say
by means of a ForwardAction action mapping, in my jsp page, as href I
have to indicate the following: /xml-op/Login.do

If I want to invoke the same action from within a form, then I have to
omit the /xml-op/ prefix.

Anyone of you does know why?

TIA, Marco


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


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

Reply via email to