Nagendra,
 
After posting the question, I realized that I haven't included <html:base/> in .jsp 
file.
 
I included that and it worked fine.
 
Thanks.
Sriram

-----Original Message-----
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 25, 2003 12:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Missing images & style sheet in welcome file



hi,
have u looked in to the the final url after the page is rendered.??
have u tried using the <html:base/> in ur jsp??
 
-- nagi
 
-------Original Message-------
 
From: Struts Users Mailing  <mailto:[EMAIL PROTECTED]> List
Date: Monday, August 25, 2003 12:12:56 PM
To: 'Struts Users Mailing  <mailto:[EMAIL PROTECTED]> List'
Subject: Missing images & style sheet in welcome file
 
Hi,

In my web application (using struts), I have login.jsp as welcome file.

I've defined the welcome file in web.xml as follows:

<welcome-file-list>
<welcome-file>/jsp/login.jsp</welcome-file>
</welcome-file-list>

And in login.jsp, I'm using relative path to load images and style sheet.

My directory structure is as follows:

---web
|
|--css
|
|--jsp
|
|--images
|
|--WEB-INF

login.jsp is located in /web/jsp folder.

In login.jsp, I'm including style sheet as follows:
<link href="../css/style.css" rel="stylesheet" type="text/css">

"../css/style.css" --> the style sheet is located in /web/css folder.

Now, when I browse http://localhost:8080/myApp, login.jsp is displayed as welcome 
page, but the style sheet is not found. Same is the case with images on login.jsp. 
(this problem is occurring on Linux)

But when I use http://localhost:8080/myApp/jsp/login.jsp, 
<http://localhost:8080/myApp/jsp/login.jsp,>  then it is displaying everything 
perfectly.

And http://localhost:8080/myApp displays the login page correctly on Windows.

Any idea what could be the problem? 

Sriram



                        
____________________________________________________
 <http://www.incredimail.com/redir.asp?ad_id=309&lang=9>   IncrediMail - Email has 
finally evolved -  <http://www.incredimail.com/redir.asp?ad_id=309&lang=9> Click Here 

Reply via email to