List Info

Thread: Sun Forums Update Notice: Sun Java Studio Enterprise: "JSE8 not recognising url's"




Sun Forums Update Notice: Sun Java Studio Enterprise: "JSE8 not recognising url's"
user name
2006-08-16 03:44:09
David bond,

You are watching the forum "Sun Java Studio
Enterprise", which was updated Aug 15, 2006 8:34:13
PM.


To view the forum, visit:
http
://forum.sun.com/jive/forum.jspa?forumID=122

Topic "JSE8 not recognising url's" was updated
by kepha with the following message: 
Thanks for your response,

The file layout is about the same as is diagramed in the
provided url. My file layout looks like this.

   
Root file ==> src folder==> Java folder==>WxComp
folder (contains servlet and .java files)
    
Root file ==>Web  folder (contains my html, jsp and .jpg
files)

2 issues with url's 

The first has to do with pulling in a .jpg file.  I
origionally had my .jpg files in a folder named image at the
web folder level, but I moved it to be in the web folder and
I was able to get it to display ok.  However another .jpg
file in the exact same folder won't display.  If I use an
html editor they will both display fine.  

The html code looks like this

         <tr>
           <td><img src="\WxComp.jpg" 
                     alt="Weather logo"
width="25%" height="100"
hspace="0" vspace="0">
           <td><img
src="\weather_header.jpg" 
                     alt="Weather Verify"
width="75%" height="100"
hspace="0" vspace="0">
 
The file "\weather_header.jpg" is rendered by
the jsp but the file "\WxComp.jpg"  which is in
the same root isn't. 

The second issue is in doing a forward to my jsp from the
servlet.  I've done this in WSAD but I'm not sure what
I'm doing wrong here.

The servlet resides with the rest of the .java files and has
been added to the web.xml file. The code for this is....

      String url="/web/Wx-Compare.jsp";
      ServletContext sc = getServletContext();
      RequestDispatcher rd = sc.getRequestDispatcher(url);
      rd.forward(request, response); 

This should be correct (at least I hope, I still find myself
making nubee mistakes).  The first "/"
designates the root file so I'm confused.

Again thanks for your response.

To view the topic, visit:
http://forum.sun.com/jive/thread.jspa?foru
mID=122&threadID=104430.

If you need to update your forum watch settings, please log
in to the forums and go to "Your Watches"
settings.

Thank you for your interest in Sun software technologies and
products and for your participation in the Sun Developer
Forums.  For a comprehensive listing of developer resources,
please go to: http://developers.sun.com
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )