• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Probelm with creating virtual hosting with tomcat

 
karicheti sandya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have a domain called mysite.com
i have the web application and place the all the jsp files in
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\mysite

Now i run my jsp files as http://11.22.33.44:8080/mysite/index.jsp

When i run like this it worked fine.Now i have to create the virtual hosting with tomcat to my application.

like http://www.mysite.com/index.jsp

For that i changed the server.xml in conf/server.xml

server.xml

<Host name="www.mysite.com" appBase="webapps/mysite"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

And also changed the conf/catelina/mysite/ROOT.xml

<Context displayName="sayhi" docBase="" path=""
workDir="work/Catalina/sayhi/_">
</Context>

i changed like that but it didn't work.Please suggest can i made any other changes.
 
Rob Spoor
Sheriff
Pie
Posts: 20555
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a special forum for Tomcat issues. Let's go there instead.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The appBase attribute must be an absolute file system path because you are creating a new application context.

Bill
 
karicheti sandya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i give the url as

http://www.mysite.com:8080/mysite/index.jsp


it worked fine.But my requirement is to change the url as


http://www.mysite.com/index.jsp

For that requirement what changes i have to made.please suggest
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried to replace the appBase attribute as William suggested??

He wrote that you need to use an absolute file system path.

e.g.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic