tags:

views:

65

answers:

1

Hello, If i browse my site using http://localhost:8080/abc/Login/index.jsf, everything works fine. But if browse it using simply http://localhost:8080/abc, the page is shown but all its images and css files are missing. What can be the problem?

I have this in my web.xml :-

 <form-login-config>
            <form-login-page>/Login/index.jsf</form-login-page>
            <form-error-page>/Login/index.jsf</form-error-page>
        </form-login-config>

Probably, images are not getting referenced correctly. Can anybody help me?

I have referenced css file as follows :-

<link href="./Css/MainStyleSheet.css" rel="stylesheet" type="text/css" />

where Css is folder in Login

+1  A: 

Your problem (as you guessed) comes from how you have referenced the CSS.

Probably the easiest way to fix it is to be more specific with your reference:

<link href="/abc/Login/Css/MainStyleSheet.css" rel="stylesheet" type="text/css" />

This reference should work regardless of where the calling file is in your directory structure.

Stargazer712
Real quick! Thanks
Ankit Rathod