struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From João Guilherme Del Valle <j...@visionnaire.com.br>
Subject Re: changing from *.do to /do/* screws up everything?
Date Wed, 27 Feb 2002 19:57:49 GMT
In my opinion, this is a good solution. rewriting is too, but this seems to
be easy. You put a plain:

<base href="/contextName">

In your JSPages, does this have any other unwanted side effect?

João.


 Joao Guilherme Del Valle
 joao@visionnaire.com.br
 Visionnaire Informática SA
 http://www.visionnaire.com.br
 Tel/Fax: +55 41 373-7400 r: 221
 Curitiba / PR / Brasil
----- Original Message -----
From: "Bryan Field-Elliot" <bryan_lists@netmeme.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Wednesday, February 27, 2002 3:17 PM
Subject: Re: changing from *.do to /do/* screws up everything?


> Then perhaps you can insert your own plain-jane <base> tag (not a
> JSP-rendered base tag) to point to the root of your web?
>
> Bryan
>
> On Wed, 2002-02-27 at 10:58, Rob Breeds wrote:
> >
> > Thanks for suggestion but I can't use <html:base> because all my JSPs
are
> > under WEB-INF\pages
> >
> > Putting <html:base/> in will cause images (and any relative urls) to
have
> > URLs of
> > <img src="WEB-INF/pages/images/find_obj.gif">
> >
> > which is even worse (doesn't work at all) and defeats the point of
putting
> > pages under WEB-INF!
> >
> >
> > Rob
> >
> >
> >
> >
> > |--------+------------------------->
> > |        |          Bryan          |
> > |        |          Field-Elliot   |
> > |        |          <bryan_lists@ne|
> > |        |          tmeme.org>     |
> > |        |                         |
> > |        |          27/02/2002     |
> > |        |          17:49          |
> > |        |          Please respond |
> > |        |          to "Struts     |
> > |        |          Users Mailing  |
> > |        |          List"          |
> > |        |                         |
> > |--------+------------------------->
> >
>---------------------------------------------------------------------------
--------------------------------------------|
> >   |
|
> >   |      To:     Struts Users Mailing List
<struts-user@jakarta.apache.org>
|
> >   |      cc:
|
> >   |      Subject:     Re: changing from *.do to /do/* screws up
everything?                                               |
> >   |
|
> >   |
|
> >
>---------------------------------------------------------------------------
--------------------------------------------|
> >
> >
> >
> >
> > Put this inside the <head> block of all your JSP pages:
> >
> > <html:base/>
> >
> > Here is a URL to the docs for this tag:
> >
> > http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base
> >
> > It solves exactly this problem.
> >
> > Bryan
> >
> > On Wed, 2002-02-27 at 10:39, Rob Breeds wrote:
> > > Hi
> > >
> > > I hope this is me being dumb but I have a working Struts application
that
> > > uses a *.do servlet mapping for ActionServlet
> > >
> > > Because I found that the servlet spec doesn't allow partial URL
mappings
> > > for security (eg. I can't specify a url-mapping of '/pub*'), I must
now
> > > change my app to use /do/*
> > >
> > > Seems like a fine idea, and Ted says its cool :)
> > >
> > > So, I changed the servlet mapping to '/do/*' and references to '*.do'
in
> > my
> > > JSPs.
> > >
> > > Now my app sort of works but all relative links are now broken - CSS,
> > > images, JavaScript files
> > >
> > > e.g. I have a URL of '<rest of path>/do/header' and this is specified
in
> > > the config  file as:
> > >
> > >           <action path="/header" forward="/WEB-INF/pages/header.jsp"/>
> > >
> > > The page loads OK but the JSP references images like this:
> > >
> > > <img src="images/find_obj.gif">
> > >
> > > This used to work because images was a directory directly under the
war
> > > directory, but now, the image has a path of <img src
> > > ="/do/images/find_obj.gif"> which isn't found. Simarly for references
to
> > > CSS files and JS files.
> > >
> > > why is the /do/ prefix being added?
> > >
> > >
> > > Please could anyone tell me what I have to do to get my JS, CSS and
> > images
> > > to load without changing every reference  to them in every JSP to
include
> > a
> > > /do/?
> > >
> > > Thanks
> > >
> > > Rob
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <
> > mailto:struts-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail: <
> > mailto:struts-user-help@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   <
> > mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <
> > mailto:struts-user-help@jakarta.apache.org>
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message