This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Deployment error with tomcat 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deployment error with tomcat 7" Watch "Deployment error with tomcat 7" New topic
Author

Deployment error with tomcat 7

shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 223

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

Joined: Jun 25, 2001
Posts: 15961
    
  19

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]


Customer surveys are for companies who didn't pay proper attention to begin with.
shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 223

hello tim thanks for considering the problem..

Here is my web.xml ..

shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 223

and Moreover my project is working fine with Netbeans..

don't know the issue with tomcat 7
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19

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

Joined: Jul 15, 2012
Posts: 223

okey,, i have corrected my mistake of package naming convention..

still same error persist?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19

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

Joined: Jul 15, 2012
Posts: 223

i have resolved the issue..

Thanks Tim for helping..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deployment error with tomcat 7
 
Similar Threads
Can't start tomcat
Tomcat server - Unable to create directory [C:\Program Files (x86)\tomcat\conf\Catalina\localhost]
SEVERE errors when starting tomcat on a mac
can't seem to get my java servlet to work
Errors in Tomcat startup