File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Probelm with creating virtual hosting with tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Probelm with creating virtual hosting with tomcat" Watch "Probelm with creating virtual hosting with tomcat" New topic
Author

Probelm with creating virtual hosting with tomcat

karicheti sandya
Greenhorn

Joined: Dec 29, 2008
Posts: 5
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

Joined: Oct 27, 2005
Posts: 19791
    
  20

We have a special forum for Tomcat issues. Let's go there instead.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
The appBase attribute must be an absolute file system path because you are creating a new application context.

Bill
karicheti sandya
Greenhorn

Joined: Dec 29, 2008
Posts: 5
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

Joined: Oct 12, 2001
Posts: 1179

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.


Regards, Rene Larsen
Dropbox Invite
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Probelm with creating virtual hosting with tomcat