1

i have made one project on E-Commerce using JSP technology of JEE, in that i have assigned a page named as home.jsp as a welcome page of my project. The page is located in the home_page folder of the Web Contents folder of my project. But when i run the project the contents of home.jsp don't get loaded in the browser page. I am attaching the code of the welcome page and the screenshot of the default welcome page in the browser apart from that i am also attaching the screenshot of the welcome page which is expected to come when the project executes.

<welcome-file-list>
    <welcome-file>/home_page/home.jsp</welcome-file>
</welcome-file-list>

default welcome page

Actual desired welcome page

Atul Mittal
  • 111
  • 1
  • 4
  • 15
  • you are giving `absolute path` try with `relative path` – Prashant Apr 24 '15 at 10:34
  • What is the URL you're using? – Steve C Apr 24 '15 at 14:21
  • @Prashant What is the difference between absolute path and relative path? Please clear it up using some kind of example. Thank you. – Atul Mittal Apr 24 '15 at 15:02
  • @AtulMittal : suppose you are giving `home.jsp` with respect to `C or D drive` in windows or `/home/` in unix then it will be `absolute path` but if you are passing something like `../home.jsp` or `home.jsp` then it will be `relative path` to your current directory. – Prashant Apr 24 '15 at 17:06
  • First off - trailing or leading `/` are not allowed in the ``. What exactly is the URL you're requesting @AtulMittal ? – kolossus Apr 26 '15 at 18:56

1 Answers1

0

Try adding "/" at the end of the URL you're trying to access. It should fix it if you have servlets mapped in your web.xml.

Dagriel
  • 574
  • 2
  • 12