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 Need to stop start twice to have my app instead of manager app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Need to stop start twice to have my app instead of manager app " Watch "Need to stop start twice to have my app instead of manager app " New topic
Author

Need to stop start twice to have my app instead of manager app

igor bolsovitch
Greenhorn

Joined: Feb 22, 2009
Posts: 12
Hi,

The first time I deploy, when I enter the url of my website (let's say : www.mysite.com) on my web browser, it takes me the tomcat manager application.
the next time when I stop/start tomcat, www.mysite.com goes to my application.

This is the scenario from beginning :
- stop tomcat
- delete mysite.war , delete mysite directory (under webapps)
- scp the new version of mysite.war from my pc to the server (under webapps)
- start tomcat
- tape : www.mysite.com ----------> it goes to the manager application of tomcat.
- stop/start tomcat
- tape : www.mysite.com ----------> OK it show up my site.
- any stop/start : no problems www.mysite.com shows my site.

Can somebody explain that to me please ?

Thanks for the help.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I would expect you to see the default 404 page if you hit the server before your app was deployed. Not the manager application.

Are you really seeing the app at: http://localhost:8080/manager/html
?

igor bolsovitch
Greenhorn

Joined: Feb 22, 2009
Posts: 12
Hi Ben,

My application completely deployed and I still reach the manager even 5 minutes after tomcat start.

And yes I'm seeing the manager application at : http://myip:8080/manager/html

Thanks.

ps 1
I'm running tomcat behind apache (proxy http).

ps 2
I made some change to my $CATALINA_BASE/conf/server.xml so that I don't have to add /appname at the end of the url


Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I would try to duplicate the issue hitting Tomcat directly (not through the proxy).

If you don't still see this issue when hitting it directly the the issue is most likely in the proxy.
igor bolsovitch
Greenhorn

Joined: Feb 22, 2009
Posts: 12
ok Ben, I'll give it a try and come back in few minutes ;)
igor bolsovitch
Greenhorn

Joined: Feb 22, 2009
Posts: 12
I made the test and this is what i get :

http://myip:8080/ ----> hit the manager
http://www.mysite.com ----> hit the manager
http://myip:8080/myapp ----> hit my application
http://www.mysite.com/myapp -----> hit my application

I restarted apache but it doesn't help but when I restart tomcat then it is ok.

So I think the problem is at tomcat level and isn't at the proxy one, isn't it ?

Thanks for your help as I'm really stuck with this.
igor bolsovitch
Greenhorn

Joined: Feb 22, 2009
Posts: 12
any one to help please ?
igor bolsovitch
Greenhorn

Joined: Feb 22, 2009
Posts: 12
Hi everybody,

After a hard work, I solved my problem.

My solution is : whenever you want to run multiple application with tomcat and you want to access each application without its name at the end of URL, then you must put each app in its folder under CATALINA_BASE and rename it to ROOT.

You need to follow this howTo : http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

and then apache configuration goes easy :



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to stop start twice to have my app instead of manager app
 
Similar Threads
Tomcat WebApp Deployment
Tomcat 5.5.23 - Code Compilation - Tomcat Stop/Re-Start
Apache Monitor for starting a service but the Services window does not
HFS: Problem with deploying and testing Beer-v1 App
How many sites are on one tomcat