File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Problem while virtual hosting in Tomcat 5.0.28 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem while virtual hosting in Tomcat 5.0.28" Watch "Problem while virtual hosting in Tomcat 5.0.28" New topic

Problem while virtual hosting in Tomcat 5.0.28

ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208

I am using Tomcat 5.0.28 and want to do Virtual Hosting on that.

I have written the code in server.xml

but when i try to run my server , its gives an error Error Listener Start.

Please tell me that where i am wrong
Kaustabh Singha Roy
Ranch Hand

Joined: Oct 04, 2005
Posts: 43
I cant see any major error in those lines. I still like to suggest a couple of ideas. They may help.

1. Create a new directory inside the CATALINA_HOME and specify that as the appBase for your host. As the webapps folder is the appBase for the default host there remains scope for a mix up if the application base for a new host is inside the webapps directory.

2. Insted of specifying a . as the document base for the <Context> create a directory and place the path here. Your app directory can be enywhere in your file system. I am not sure that a . will not mean that the CATALINA_HOME itself is the document base.

Hope this produce some benefit for you.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13027
appBase="webapps\ myApplication”

Is that space really in your xml file? Also that trailing quote after myApplication looks like one of those nasty MS Word smart quotes, the parser may be choking on it.

On my system I have appBase set to an absolute file path.

I agree. Here's the link:
subject: Problem while virtual hosting in Tomcat 5.0.28
It's not a secret anymore!