Forums Register Login

Tomcat: The requested resource () is not available.

+Pie Number of slices to send: Send
Hi!! I'm looking for an answer to my problem, and I'm going to explain what I mean.

I've created a .jar named yuhuuTunnel.jar that has the following structure:

yuhuuTunnel.jar:
--> web (contains the servlets)
--> *.class
--> HelloWorldServlet.class
--> META-INF
--> MANIFEST.MF
--> SimpleClient.class

The code of HelloWorldServlet.java is this:



then, using a .war file (created with ANT), I've created into /../tomcat/webapps/ a directory call yuhuuTunnel that has this structure:


The content of web.xml is the following:



Tomcat works correctly ( http://localhost:8080 return me the page of tomcat ) but when I try to use the HelloWoldServlet typing http://localhost:8080/yuhuuTunnel/HelloWorld into a browser, this one returns me the HTTP Status 404 - The requested resource () is not available.

What is wrong? The address that I type into the browser or there's an error into web.xml?


[BPSouther: Added code tags]
[ November 05, 2008: Message edited by: Ben Souther ]
+Pie Number of slices to send: Send
For a better view, I've re-write the structures of the yuhuuTunnel.jar and the structur of my web application in tomcat


yuhuuTunnel.jar:



+Pie Number of slices to send: Send
Try doing a out.flush() and out.close() in your servlet.
+Pie Number of slices to send: Send
Try changing:


to




See section: SRV.11.2 in the servlet spec (link in my signature) if you are unsure about the syntax for servlet mapping url-patterns.
[ November 05, 2008: Message edited by: Ben Souther ]
+Pie Number of slices to send: Send
I've changed

<url-pattern>HelloWorld</url-pattern>

to:
<url-pattern>/HelloWorld</url-pattern>

Stopped and re-started Tomcat, but I still get the 404. Isn't a problem of flush or close!
+Pie Number of slices to send: Send
Something interesting: If I type

http://localhost:8080/yuhuuTunnel/HelloWorld

the message given back is: "The requested resource () is not available."

but if I type

http://localhost:8080/HelloWorld the message is different:

"The requested resource (/HelloWorld) is not available."
+Pie Number of slices to send: Send
I sounds like the application itself isn't being deployed.
Have you looked at any of the server logs to see if there are errors being logged at startup?
+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
Hi Diego Braga,

The question was:

Have you looked at any of the server logs to see if there are errors being logged at startup?



I can see from reading it that there is an exception being thrown when Tomcat tries to parse something....
Can you see what that 'something' is?
+Pie Number of slices to send: Send
My eyes caught this line

java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name SetutentiOnline



Now what is SetutentiOnline? And why is it present in your web.xml?
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 13075 times.
Similar Threads
Deploying Servlet in Tomcat 5.0
getting error while running servlet in tomcat
A problem in executing the servlet
Head fisrt servlets and jsp:- unable to run the first example
Servlet delivery in Tomcat
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:22:50.