Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deployment error with tomcat 7

 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am deploying my web application in tomcat 7, and got this error in bold and these are not servlet name, but servlet name and class name.. help

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18025
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have improperly configure the WEB-INF/web.xml file for the webapp Refer.Me:


The servlets named [RUpload] and [Refer.Servlet.ResumeUpload] are both mapped to the url-pattern [/resumeA]
 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello tim thanks for considering the problem..

Here is my web.xml ..

 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and Moreover my project is working fine with Netbeans..

don't know the issue with tomcat 7
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18025
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no doubt that when it comes time to make this webapp a full-fledged Internet capable application running on a production server that your superiors will be comforted by the fact that it runs in NetBeans.

No, I don't think they will. Just because something "works" doesn't mean it really works. That's why there's a published standard for JEE. I can name a number of things that "work" in Tomcat, but I'd fire people for doing them. Because they not only work despite being non-compliant with the standard, they also carry severe support costs.

If that is the sum total of your web.xml file, then I suspect you have annotated the servlet java code itself, thus causing 2 servlet definitions to be constructed, one for the web.xml and one based on the servlet annotations. Without seeing the servlet source, I can only suspect certain things, but at a minimum, it appears that you are in violation of package naming standards, as only the classname should carry an initial uppercase character. Package name components should begin with lower-case letters. I.e., refer.servlet.ResumeUpload.
 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okey,, i have corrected my mistake of package naming convention..

still same error persist?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18025
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us the top of the servlet source code? I'm interested in the package and import statements as well as the statements and annotations that begin the class definition.
 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have resolved the issue..

Thanks Tim for helping..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic