• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Index page not getting loaded by default

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have developed an application in Eclipse and Tomcat. This project has 'welcome.jsp' file which is outside WEB-INF folder and has been declared as index page in web.xml file :-


While running this project from eclipse using Tomcat server, the welcome.jsp page gets displayed as the default index page.
But when I making a war file and deploying on glassfish, the welcome.jsp page doest get displayed by default.
How should I fix this one.
please suggest.
 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
Please give your suggestion to go head here.....!
 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have added the Galssfish specific (i.e. container-specific) deployment file, sun-web.xml inside WEB-INF folder with the following contents:-

<?xml version="1.0" encoding="UTF-8"?>
<sun-web-app>
<context-root>/ContactManagement</context-root>
<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>
</sun-web-app>


Still it is not able to display the welcome.jsp file at context path call , like: http://localhost:8080/ContactManagement
It gives 404 Error.

Any input please ?
 
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you able to view the file when opened directly by typing the address in address bar example :


this was the code related to glassfish specific as you said...
can you give the contents of only "web.xml"
 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ashish,
of course it is accessible by typing jsp name directly like:- http://serverip:port/ContactManagement/welcome.jsp .
But, then the purpose of defining <welcome-file> is not met.

Here is the code of web.xml :


please suggest.
reply
    Bookmark Topic Watch Topic
  • New Topic