portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scott <sc...@macrisolutions.com>
Subject Re: AW: relative link
Date Sat, 20 Mar 2004 22:34:24 GMT
excellent, thanks!!!

On Saturday 20 March 2004 03:47 pm, Roshan G wrote:
> Hi Scott,
>
> Put your images in a images directory at the web root. e.g
>
> webapp/images/1.jpg
>
> then in your template (.jsp or .vm) put a relative link like
>
> <img src="images/1.jpg" />
>
> that should work.
>
>
> The reasoning behind this is .jsp and .vm files in WEB_INF are served via a
> Servlet. But images etc served by HTTP server. Serlvet specification says
> that WEB-INF is a special directory that is not served directly by HTTP
> Server. That's why if you ask for http://localhost:8080/jetspeed/WEB-INF
> you will get a 404. Because as far the HTTP server is concerned there is no
> such directory.
>
> Though your template files lives inside WEB-INF when they get served by the
> servlet they will be appear to coming from the URL the servlet is mapped
> to.
>
>
> HTH
> Roshan
>
> From: scott <scott@macrisolutions.com>
>
> >Reply-To: scott@macrisolutions.com
> >To: "Jetspeed Developers List" <jetspeed-dev@jakarta.apache.org>
> >Subject: Re: AW: relative link
> >Date: Sat, 20 Mar 2004 12:24:21 -0500
> >
> >Then how am I supposed to make a link to a relative file or image?
> >
> >On Friday 19 March 2004 04:30 am, Danny wrote:
> > > I think it isn't possible to reference files in the WEB-INF directory
> >
> >due
> >
> > > to security reasons.
> > >
> > > > -----Ursprungliche Nachricht-----
> > > > Von: scott [mailto:scott@macrisolutions.com]
> > > > Gesendet: Freitag, 19. Marz 2004 01:29
> > > > An: Jetspeed Developer Group
> > > > Betreff: relative link
> > > >
> > > >
> > > > I am trying to make an image show up in an html portlet as a
> > > > relative img
> > > > reference.  If I put the image in a location relative to the
> > > > htlm file, the
> > > > image doesn't show up in the page.  If I put the image in a
> > > > folder in the
> > > > jetspeed webapp directory, under tomcat,  and reference it
> > > > here it works
> > > > fine.  Is it possible to make make the image reference
> > > > relative to the html
> > > > file in an html portlet?
> > > >
> > > > works:
> > > > tomcat/webapps/jetspeed/images/imagename.jpg
> > > > reference in html is images/imagename.jpg
> > > >
> > > > doesn't work:
> > > > tomcat/webapps/jetspeed/WEB-INF/mystuff/html/images/imagename.jpg
> > > > reference in html is WEB-INF/mystuff/html/images/imagename.jpg
> > > > or
> > > > reference in html is images/imagename.jpg
> > > > Neither works.
> > > >
> > > > Thanks!!!
> > > >
> > > > --
> > > > Scott A. Macri
> > > > Software Engineer/Director
> > > > Macri Solutions, LLC
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
> >
> >--
> >Scott A. Macri
> >Software Engineer/Director
> >Macri Solutions, LLC
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
> _________________________________________________________________
> Tired of 56k? Get a FREE BT Broadband connection
> http://www.msn.co.uk/specials/btbroadband
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org

-- 
Scott A. Macri
Software Engineer/Director
Macri Solutions, LLC



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message