File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we edit Tomcat default home page?

 
ravi kanth
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64186
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thnaks Ulf Dittmer ,

can you provide some more clarity on the post..





thanks,
rrk.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Mathews P Srampikal
Ranch Hand
Posts: 211
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using tomcat 5.0.28 version..
please explain me.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,

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

Thanks,
Mats.
 
Joel Sander
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic