wood burning stoves 2.0*
The moose likes Servlets and the fly likes problem with @webservlet 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 "problem with @webservlet" Watch "problem with @webservlet" New topic

problem with @webservlet

Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239
I have this for my servlet:

my jsp is displayed just fine, but when submitting a form (the form is in this jsp) calling myservlet, tomcat said it's not found. what's wrong?
Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239
never mind, solved it. case sensitive problem. coming from VB, case sensitivity in Java really is a hindrance.
Singh Harmeet
Ranch Hand

Joined: Aug 05, 2011
Posts: 115

the default attribute of @webServlet() is url-pattren if you write one attribute then it is mandatory to define url-pattrent also. so the correct syntax is @webServlet(name="" , urlpattrens={})

With Regards :-
Harmeet Singh
I agree. Here's the link: http://aspose.com/file-tools
subject: problem with @webservlet
Similar Threads
getting error when deploying web app in weblogic 10.0
java.lang.NullPointerException on a jsp page
Problems getting Tomcat to work without Eclipse IDE
Getting error while upgrading my running application from jboss-4.2.1.GA to jboss-6.0.0.Final.
HTTP 404 error problem