wood burning stoves 2.0*
The moose likes Servlets and the fly likes HTTP Status 503 - This application is not currently available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP Status 503 - This application is not currently available" Watch "HTTP Status 503 - This application is not currently available" New topic
Author

HTTP Status 503 - This application is not currently available

Madhurt Telang
Greenhorn

Joined: Apr 30, 2011
Posts: 10
i have created a servlet with the directory structure as follow

C:\Program Files\apache-tomcat-6.0.32\webapps\myworld\WEB-INF\classes\HelloWorld.java

code:

xml file
C:\Program Files\apache-tomcat-6.0.32\webapps\myworld\WEB-INF\web.xml

mapping:

after starting apache tomcat 6.0.32
in the browser:
http://localhost:8080/myworld/HelloWorld

error:
HTTP Status 503 - This application is not currently available
Christian Ludt
Greenhorn

Joined: Apr 07, 2009
Posts: 11
Hi Madhurt,

I am not familiar with tomcat, but usually, the WEB-INF\classes folder needs to contain the compiled classes, not the source code. Everything else looks fine.

Best regards
Christian
Madhurt Telang
Greenhorn

Joined: Apr 30, 2011
Posts: 10
yes it contains the .class file in the classes folder
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Check your Tomcat logs. If the entire application is not available then something must have gone wrong while deploying, and your log files should tell you what.

And can you please UseCodeTags next time? Thanks.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Madhurt Telang
Greenhorn

Joined: Apr 30, 2011
Posts: 10
<log>

Mar 19, 2012 5:27:10 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 19, 2012 5:27:10 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 19, 2012 5:27:56 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Mar 19, 2012 5:27:56 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()

</log>

i have tried jsp they are woking fine...
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 823
    
  13

Your code works. I agree with Rob; something went wrong with the deployment or your tomcat setup. The catalina.out log file should give you a clue as to what went wrong.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Madhurt Telang
Greenhorn

Joined: Apr 30, 2011
Posts: 10
here's the log file...
<catalina log>

Mar 19, 2012 7:15:32 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\apache-tomcat-6.0.32\lib\servlet-api.jar;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\apache-tomcat-6.0.32\lib\catalina.jar;C:\Program Files\apache-tomcat-6.0.32\lib\jasper.jar;
Mar 19, 2012 7:15:33 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 19, 2012 7:15:33 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1251 ms
Mar 19, 2012 7:15:33 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 19, 2012 7:15:33 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Mar 19, 2012 7:15:33 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Mar 19, 2012 7:15:34 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Mar 19, 2012 7:15:35 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Mar 19, 2012 7:15:35 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Mar 19, 2012 7:15:35 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory r1
Mar 19, 2012 7:15:35 AM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/r1,J2EEApplication=none,J2EEServer=none
Mar 19, 2012 7:15:35 AM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory r1
java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class Hello)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2822)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:108)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:58)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1078)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4611)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Mar 19, 2012 7:15:35 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Mar 19, 2012 7:15:35 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 19, 2012 7:15:35 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 19, 2012 7:15:35 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/50 config=null
Mar 19, 2012 7:15:35 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2332 ms
Mar 19, 2012 7:15:51 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080

</catalina log>
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1447
    
    6

Bad version number in .class file


Swastik
Madhurt Telang
Greenhorn

Joined: Apr 30, 2011
Posts: 10
thank you its working now.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HTTP Status 503 - This application is not currently available
 
Similar Threads
Apache 2 and Tomcat 7 on Ubuntu 10.04 in VirtualBox 4.06xxx
Unable to execute Servlet
Problem invoking a servlet directly from FireFox browser
The requested resource (/review/HelloServlet) is not available
unable to run servlet in tomcat