WebSphere Portal Server - Link to a html page in a jsp

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > April 2004 > Link to a html page in a jsp





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Link to a html page in a jsp
prasad

2004-04-28, 5:34 am

Hi All,

I have a jsp page and I want to give a hyper link on that page which
will point to a gif image or any other resource.I have deployed this
in the Portal Server..


How can I do this?
I gave <a href="<%= request.getContextPath()%>/demo.gif".Is this
correct?
I placed the gif file under Web-Inf/jsp as well as Web-Inf/jsp/html
and Im not able to access it.Where should I place the demo.gif in the
deployed location.

Thanks
Prasad
Michael Harris

2004-04-28, 9:33 am

Beginning with WAS 5.x/WPS 5.x the WEB-INF folder is protected from direct
web (browser) access. It can only be accessed from the server itself
through a request dispatcher or other internal J2EE or Portal API. Move
your graphic file to a directory in your .war that is a sibling to WEB-INF
(off of the .war docroot) and then use the encodeURI/L API or JSP tag to
build the full URL to the image... just like you would for any other image
in your JSP.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com