• 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

How to display index.html

 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an index.html page. I put this file in Project1Web\resource and I added the following to web.xml within <web-app> tag:
<welcome-file-list>
<welcome-file>resource/index.html</welcome-file>
</welcome-file-list>

Project1Web is my context root. How can I see index.html?
I tried going to http://localhost:7777/Project1Web
And
http://localhost:7777/Project1Web/resources.
Both didn�t work. Any suggestions? I use WebLogic server.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For most containers, I believe that index.html is on the default list of welcome files. So you might try just removing the entry from your web.xml completely and see if it works.

Otherwise, I believe that the leading "/" may be causing you problems.
[ November 16, 2005: Message edited by: Bear Bibeault ]
 
PradeepPillai Pradeep
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I deleted the <welcome-file-list> tag and restarted the server.But unfortunately it didn't work.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


This makes no sense. The welcome file list declares file names (not paths) to look for in a referenced folder. It makes no sense to have the resource/ folder defined.

If you are trying to redirect to the resource folder when the root of the web app is referenced, you can't do it with the welcome file mechanism. You'd need to put in index.html at the root that redirected into the resources/ folder.

See here.
[ November 16, 2005: Message edited by: Bear Bibeault ]
 
PradeepPillai Pradeep
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't know too much about this. I am just a beginner. It make sense after reading your reply. I got rid off "/resources" and it works.
Thank you very much
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic