You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Callaghan <ch...@vsl.co.nz> on 2001/07/17 01:03:51 UTC
URL mapping
Hey all,
I want to be able to map a URL to certain JSPs which may or may not have
an action involved with them e.g
map /logon to logon.jsp which also has as action also called logon
also /tour to tour.jsp which has no associated action.
How can I do this with struts?
Cheers
Chris
Re: Unable to run both Ant & Tomcat (set classpath)
Posted by Chuck Amadi <ch...@breconbeacons.org>.
Hi,all
I have just installed and configured the ant's build and thus ran a few
examples and it running ok.Albeit on trying to run the tomcat container i have
recieved a bad command on startup.
I have still got the set TOMCAT_HOME=C:\jakarta-tomcat-3.2.2 in my classpath.
If this is the case i assume i can't set both Tomcat and Ant within the same
classpath.I if i require to run the tomact container i must reset the set
classpath and rem the set ANT_HOME=C:\ant
Cheers Chuck Pls Confirm.
Gregor Rayman wrote:
> "Chris Callaghan" <ch...@vsl.co.nz> asks:
>
> > Hey all,
> >
> > I want to be able to map a URL to certain JSPs which may or may not have
> > an action involved with them e.g
> > map /logon to logon.jsp which also has as action also called logon
> > also /tour to tour.jsp which has no associated action.
> >
> > How can I do this with struts?
> >
> > Cheers
> > Chris
>
> You can do it with your http server, not with struts.
>
> --
> gR
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at it@breconbeacons.org) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn it@breconbeacons.org) ac yna dilëwch bob copi.
Re: URL mapping
Posted by Aapo Laakkonen <aa...@projectcast.com>.
> > I want to be able to map a URL to certain JSPs which may or may not have
> > an action involved with them e.g map /logon to logon.jsp which also has
as
> > action also called logon also /tour to tour.jsp which has no associated
action.
> >
> > How can I do this with struts?
<action path="/logon" forward="/logon.jsp"/>
Re: URL mapping
Posted by Gregor Rayman <gr...@gmx.net>.
"Chris Callaghan" <ch...@vsl.co.nz> asks:
> Hey all,
>
> I want to be able to map a URL to certain JSPs which may or may not have
> an action involved with them e.g
> map /logon to logon.jsp which also has as action also called logon
> also /tour to tour.jsp which has no associated action.
>
> How can I do this with struts?
>
> Cheers
> Chris
You can do it with your http server, not with struts.
--
gR
Re: URL mapping
Posted by Chris Callaghan <ch...@vsl.co.nz>.
Thanks Ted (and everyone else!)
I was using <html:link href="logon" /> rather than forward="logon"
Cheers
Chris
Ted Husted wrote:
>Struts doesn't map URLS per se, that's up to the container and Web
>server.
>
>You can use the html:link tag to code logical names into your JSP's, and
>then have Struts insert the appropriate path at runtime
>
> <forward name="logon" path="/logon.jsp"/>
> <forward name="tour" path="/tour.jps"/>
>
>Which in a JSP would be referenced with
>
> <html:link forward="logon"> ...
> <html:link forward="tour"> ...
>
>Otherwise, you would have to create tour/ and logon/ directories, and
>then name your JSP's
>
>tour/index.jsp
>logon/index.jsp
>
>which would be handled by the Web server normally.
>
>
>-- Ted Husted, Husted dot Com, Fairport NY USA.
>-- Custom Software ~ Technical Services.
>-- Tel 716 737-3463.
>-- http://www.husted.com/about/struts/
>
>
>Chris Callaghan wrote:
>
>>Hey all,
>>
>>I want to be able to map a URL to certain JSPs which may or may not have
>>an action involved with them e.g
>>map /logon to logon.jsp which also has as action also called logon
>>also /tour to tour.jsp which has no associated action.
>>
>>How can I do this with struts?
>>
>>Cheers
>>Chris
>>
>
Re: URL mapping
Posted by Ted Husted <hu...@apache.org>.
Struts doesn't map URLS per se, that's up to the container and Web
server.
You can use the html:link tag to code logical names into your JSP's, and
then have Struts insert the appropriate path at runtime
<forward name="logon" path="/logon.jsp"/>
<forward name="tour" path="/tour.jps"/>
Which in a JSP would be referenced with
<html:link forward="logon"> ...
<html:link forward="tour"> ...
Otherwise, you would have to create tour/ and logon/ directories, and
then name your JSP's
tour/index.jsp
logon/index.jsp
which would be handled by the Web server normally.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/
Chris Callaghan wrote:
>
> Hey all,
>
> I want to be able to map a URL to certain JSPs which may or may not have
> an action involved with them e.g
> map /logon to logon.jsp which also has as action also called logon
> also /tour to tour.jsp which has no associated action.
>
> How can I do this with struts?
>
> Cheers
> Chris
Struts Deployment
Posted by Aaron Ravenberg <ar...@benefitsxml.com>.
Hello all,
I have just started using struts and I was wondering what is the best way to
deploy struts for development, so I can avoid using a war file until it is
ready to deploy in test or production? The documentation seems mostly
geared toward deployment as a war file and the ActionServlet seems to need
the action mapping described in the web.xml.
I am using weblogic 5.1 sp 9
Thank you,
Aaron Ravenberg