Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Deployment error with tomcat 7

 
Ranch Hand
Posts: 231
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Saloon Keeper
Posts: 24330
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello tim thanks for considering the problem..

Here is my web.xml ..

 
shivam singhal
Ranch Hand
Posts: 231
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24330
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okey,, i have corrected my mistake of package naming convention..

still same error persist?
 
Tim Holloway
Saloon Keeper
Posts: 24330
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have resolved the issue..

Thanks Tim for helping..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic