• 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

Can we edit Tomcat default home page?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
can we edit tomcat default page (to place user defined applications )? if so can any body tell me how to do this..




thanks in advance.
rrk
 
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
Why would you edit an existing page rather than create your own web application?

Or are you really asking how to make your own application the root application?
 
ravi kanth
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Bear Bibeault,

just i want add some links to default page that is to already existing links like Administration,Documentation etc.i want to add myownlinks tab.



thanks,
rrk
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can co this. Just be aware that the ROOT web app is set up in a strange way by default. The index.jsp page isn't used, but instead there's a JSP/servlet mapped to index.jsp (which you can find in a jar file in WEB-INF/lib).
 
ravi kanth
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thnaks Ulf Dittmer ,

can you provide some more clarity on the post..





thanks,
rrk.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which part is confusing you? Have you looked at the ROOT web app, its web.xml file, the index.jsp file and the contents of the jar file?
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ulf Dittmer:
Which part is confusing you? Have you looked at the ROOT web app, its web.xml file, the index.jsp file and the contents of the jar file?



In Tomcat 6.0.18 - which is the one I current have installed - there are no classes nor lib folder i WEB-INF. This means that changes to index.jsp will be made available automatically.

I will however give Ulf right, that in earlier versions of Tomcat it was as he described.
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravi,

I faced the same problem with tomcat earlier version and tried to change the index.jsp more than 10-15 times to see the changes.

So for your web application please follow the following steps.

1. create a new dir <test> under webapps
2. create WEB-INF dir under <test> dir
3. create web.xml (OR copy the web.xml from tomcat-docs\WEB-INF\web.xml) in newly created WEB-INF dir
4. create a index.jsp in <test> dir
5. start tomcat
6. http://localhost:8080/test
7. you will get index.jsp displayed.
8. you are done now....start exploring from here.

Thanks,
Mats.
 
ravi kanth
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thnaks Ulf Dittmer ,

can you provide some more clarity on the post..





thanks,
rrk.
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is it that you want info about??

Which version of Tomcat do you have??
 
ravi kanth
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Mathews ,

i have created structure like that,but i am not getting .
its status code it showing is 404.
 
ravi kanth
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using tomcat 5.0.28 version..
please explain me.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For Tomcat 5 what I wrote would apply, in other words, you'd alter the ROOT web app.
 
Mathews P Srampikal
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravi,

do you have a index.jsp in test dir.if not create one and test.

Thanks,
Mats.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mathews P Srampikal wrote:Ravi,

I faced the same problem with tomcat earlier version and tried to change the index.jsp more than 10-15 times to see the changes.

So for your web application please follow the following steps.

1. create a new dir <test> under webapps
2. create WEB-INF dir under <test> dir
3. create web.xml (OR copy the web.xml from tomcat-docs\WEB-INF\web.xml) in newly created WEB-INF dir
4. create a index.jsp in <test> dir
5. start tomcat
6. http://localhost:8080/test
7. you will get index.jsp displayed.
8. you are done now....start exploring from here.

Thanks,
Mats.



I'm a newbie with tomcat and am facing the same (or similar) problem here using Tomcat 6.0.18. I followed all your steps with two exceptions. In step 3., my copy of tomcat does not have a tomcat-docs directory. However, there is a conf directory containing a web.xml file which I tried copying to the location you suggested. In step 6, I just typed 'http://localhost:8080/test' in as the url. All I get are 404 errors. I would like to have the user redirected to my existing index.jsp file.

Thanks!

Edit: Copying the web.xml file over caused every webpage (including my index.jsp) to return a 404 error.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic