hi!
thanks for that michael.
i am running Tomcat 4.1.24 and using struts 1,1
the url is reasonable and what i expect it to be. It incudes the jsessionid string, but then it includes the same for the first link, which works fine.
I have had this problem for a while on my hosting service'e webserver. At home on my Tomcat5.0, the apps works fine. However when i upload them to the account, some of the apps work and others dont.
this happens with the .do links.
I have installed the app under the context root /test-struts
and within this context, i have only the application described before. ii'm getting the Multiple Choices error only because i also have a file called tour.htm which both links are supposed to forward to and so i get an error saying


The document name you requested (/test-struts/tour.do) could not be found on this server. However, we found documents with names similar to the one you requested.

Available documents:

* /test-struts/tour.htm (common basename)

if i change the path to /testing, and change the link to testing.do, i get a file not found error.
MenuAction consists only of
public final class MenuAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws IOException
{
return mapping.findForward("success");
}
}


and thus forwards regardless. I wrote this as a test application to find out what was causing the problem. as it is, i'm nowhere near finding out.

any more ideas would be excellent
my app is at
www.ajaybrar.net/test-struts

thanks
cheers
ajay




From: "Michael D. Norman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: action class for more than one mapping
Date: Thu, 9 Oct 2003 00:35:08 -0500

Ajay,

Yes, you can definitely have multiple action mappings defined for a
particular action class.  The snippet of struts-config.xml you give below
appears correct, as do the html:link tags on the page.

I would try a few things:

A) Make sure the URL that is getting written to the browser is reasonable.
It should be, but double-check.  That will remove any doubts about the
html:link tags.

B) Find out what happens if you change the action path for /tour. If it
fixes your problem there is something else mapped to xxx/tour.do, either in
your web.xml or in your server configuration (are you in the default context
and there is another web application defined at /tour?).


C) Finally, if the logic is different inside MenuAction for "/menu" vs.
"/tour", make sure the logic isn't causing the problem, (e.g. is it
forwarding to somewhere else that has a potential duplicate context issue as
described above?) Also, check out your app server or web server logs and
find out what resource is actually giving the 300 server error.


It would help to know what application server you're running, as well as the
version of Struts.


-- Michael D. Norman
   ProbuSoft - Custom Software Development
   http://www.probusoft.com/
   913-390-6951
   [EMAIL PROTECTED]

----- Original Message -----
From: "ajay brar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 11:33 PM
Subject: action class for more than one mapping


> hi! > can i have an Action class for more than one action mapping. > that is can i do > <action-mappings> > > <action path="/menu" > type="MenuAction" > scope="request"> > <forward name="success" path="/tour.htm" /> > </action> > <action path="/tour" > type="MenuAction" > scope="request"> > <forward name="success" path="/tour.htm" /> > </action> > > </action-mappings> > if i can have that, then why isn't it working. i have in my index.jsp > <html:link page="/menu.do"> menu </html:link><br> > <html:link page="/tour.do"> tour </html:link><br> > the first link 'menu' works fine, however for the second link, 'tour' i get > a HTTP 300 multiple choices error. > > thanks > ajay > > _________________________________________________________________ > E-mail just got a whole lot better. New ninemsn Premium. Click here > http://ninemsn.com.au/premium/landing.asp > > > --------------------------------------------------------------------- > 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]


_________________________________________________________________
Get less junk mail with ninemsn Premium. Click here http://ninemsn.com.au/premium/landing.asp



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



Reply via email to