aspose file tools*
The moose likes Tomcat and the fly likes Deploying a web application in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deploying a web application in Tomcat " Watch "Deploying a web application in Tomcat " New topic
Author

Deploying a web application in Tomcat

Chris Donald
Greenhorn

Joined: Jul 15, 2008
Posts: 23
Hello,
I have been trying to deploy a web application(spring-based) in Tomcat.I keep getting the error "The requested resource (/springbanking/) is not available".I tried deploying it in the exploded fashion as well as using the war.But the error persists.I know this is a simple problem but I have been able to resolve it.Please help.

Regards
Chris
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Perhaps some clues on how you are deploying it might help...


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Chris Donald
Greenhorn

Joined: Jul 15, 2008
Posts: 23
Thanks for your quick reply Bear.I deployed the application(springbanking) in two ways:

1)Drop the entire folder(with the right directory structure )under the webapps folder.I then opened up Tomcat manager and found that the application has been deployed.Now when I try to bring up the application,I get the error
"The requested resource (/springbanking/) is not available".

2)I created a war and deployed it only to get the same error.

Obviously something is wrong.I wonder why Tomcat console doesn't display any errors.Also,I could not find any logs.Looks like the issue is with the DispatchServlet(this being a Spring app) not being found.

Hope this helps.

Thanks Bear once again.

Regards
Chris
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

More info please. Is springbanking the context name? Is the WEB-INF folder in the springbanking folder? Do you have a valid web.xml? Is there an index.html or index.jsp in the springbaking folder?
[ July 16, 2008: Message edited by: Bear Bibeault ]
Chris Donald
Greenhorn

Joined: Jul 15, 2008
Posts: 23
Thanks Bear for your reply.I have a valid web.xml and an index.jsp in the WEB-INF folder.Where should I specify the context name(This I know is a basic question,but I am not sure).I am guessing in the web.xml.Also I don't think I need to add anything to server.xml correct??

Please advise.

Thanks
Chris
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
The context name is the name of the directory in the webapps directory. If that's named "springbanking" you should be good to go. You don't need to change server.xml.

The index.jsp file should be in the springbanking directory, not inside of WEB-INF. The web.xml goes into WEB-INF, though.

The log files should be in the "logs" directory that's in the same directory as the webapps directory. Look for a file named catalina.out.


Ping & DNS - my free Android networking tools app
Chris Donald
Greenhorn

Joined: Jul 15, 2008
Posts: 23
Thank you Ulf.Let me go back and retry.

Thanks
Chris
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploying a web application in Tomcat