Hi Chaps, I tried to deploy a servlet I have created to Glassfish application server, and I seem to have hit a bit of a stumbling block. The code deploys fine to the auto deploy folder, and once it's deployed the following is written to the log file:
[#|2009-03-16T13:41:29.303+0000|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Timer-7;|[AutoDeploy] Selecting file /opt/glassfish-2.1.b60e/domains/imageTransformer/autodeploy/image-transformer.war for autodeployment.|#]
[#|2009-03-16T13:41:29.304+0000|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Timer-7;|Autoundeploying application :image-transformer|#]
[#|2009-03-16T13:41:29.360+0000|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=23;_ThreadName=Timer-7;|
classLoader = WebappClassLoader
delegate: true
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
EJBClassLoader :
urlSet = []
doneCalled = false
Parent -> java.net.URLClassLoader@39cf701c
|#]
[#|2009-03-16T13:41:29.361+0000|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=23;_ThreadName=Timer-7;|
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@5e7408d9|#]
[#|2009-03-16T13:41:29.487+0000|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Timer-7;|[AutoDeploy] Successfully autoundeployed : /opt/glassfish-2.1.b60e/domains/imageTransformer/autodeploy/image-transformer.war.|#]
[#|2009-03-16T13:41:29.612+0000|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Timer-7;|deployed with moduleid = image-transformer|#]
[#|2009-03-16T13:41:29.783+0000|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Timer-7;|[AutoDeploy] Successfully autodeployed : /opt/glassfish-2.1.b60e/domains/imageTransformer/autodeploy/image-transformer.war.|#]
So no obvious errors, but after that I get a 404 from accessing the path that the servlet should be bound to. Is there another step that I need to go through?
the web.xml in my WAR file looks like this:
<web-app>
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>my.servlet.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>