• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to see my own home page instead of the Tomcat one?

 
Guos Hu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Apache1.3.23 and Tomcat3.3.
When I type "Http://localhost:8080" in the URL address, what I see is the tomcat welcome page. When I configured my own app in "apps-myapp.xml" by using
<Context path=""
docBase="webapps/myapp"
crossContent="true"
debug="0"
reloadable="true"
trusted="false">
</Context>
, and type "Http://localhost:8080" again, my file directories under "myapp" are listed. I can only get my home page by typing
"Http://localhost:8080/myapp/jsp/index.jsp".
How to config the tomcat so that I can get my home page just by typing ""Http://localhost:8080"?
Similar problems in Apache1.3.23. When I start apache and type into "local host", I see the apache's default page which told me that the apache web server installed successfully. How to config so that I can see "/myapp/jsp/index.jsp" page when just type "localhost"?
Thanks very much!
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat displays the index.html file in the ROOT directory under webapps as the default page. Simply change that page to whatever you want. You can override which is the default directory by changing the server.xml file found in the conf directory.
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
<your tomcat directory>\webapps\ROOT\index.html
Just do redirect in this index.html page to wherever u want to sent the user.
 
Guos Hu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all!
 
Rashid Darvesh
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to set the default context in server.xml instead of redirecting from index.html file
please let me know
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at your server.xml file to see how the application in the ROOT directory was configured.

path=""... etc...
Do the same for your app and remove the references to ROOT.

It's been years since I've touched version 3x so I'm not up on the particulars but everything you need should already be in server.xml.
 
Rashid Darvesh
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i got some more issue now.
basically when i type http://localhost:8080 it goes into the manager context and list the files which are located under catalina_home\server\webapps\manager. So what i did was i created a index.jsp page. so that when i type http://localhost:8080 it goes to index.jsp page and from there i redirect it whichever context i want.
i hope this is the best solution.
BTW, i am a bit puzzled why does typing http://localhost:8080 went inside the manager context instead of the regular root context which displays the welcome Catalina page. Moreover when i type is it coz i have loaded tomcat on unix.

Let me know.
Thanks
Rashid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic