Meaningless Drivel is fun!
The moose likes IDEs, Version Control and other tools and the fly likes Tomcat Netbeans Deployment Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Tomcat Netbeans Deployment Problem" Watch "Tomcat Netbeans Deployment Problem" New topic

Tomcat Netbeans Deployment Problem

Peter Jansen

Joined: Oct 30, 2006
Posts: 3
I'm trying to deploy a web application that I developed using Netbeans (5.5/6)

Everything was working fine with the bundled Tomcat. Netbeans has written a web.xml that works fine with netbeans and the bundled Tomcat. Unfortunately, when I tried to copy everything to my Java Server there seems to be something different with the expected directory structure.

The system doesn't find my servlets and my JSPs are found only when I change the URL. Example: Under the bundled Tomcat a JSP uses this URL: Application/index.jsp
On the Tomcat on the server it requires this URL to be found: Application/web/index.jsp

The latter resembles the physical directory hierarchy, because the JSP ist actually under web. But when I try to put the JSP one step higher up on the production server, i.e. when I put it physically under Application/index.jsp the server doesn't find the file. What's wrong in the setup of my production server? Again: JSPs work after when I use a different URL with the /web/ directory in between, but servlets don't work and I don't even know whether the production server even finds my web.xml generated by netbeans.

Thanks a lot

Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi Peter,

Netbeans (aka Ant) builds a .war file (it's in the dist folder of your webapplication).
Have a look in there, that's the real structure of you webapplication.

The "web" folder is on the developer's PC only, and could have any name.

[ November 25, 2007: Message edited by: Herman Scheltinga ]
Peter Jansen

Joined: Oct 30, 2006
Posts: 3
Thanks for your quick reply. I had been looking for this .war file on my laptop. It seems netbeans didn't generate it. Fortunately I had it on my second computer that has the same project checked in. It was in the dist directory that doesn't exist on my laptop. Apparently this did the trick although I'm now getting an error (UnsupportedClassVersionError) which is probably due to the fact that I'm using Tomcat 6/Java 1.6 on my local systems and Tomcat 5.5 with Java 1.5 on the production server.

I'll have to upgrade.

Thanks again for your answer!!

[ November 25, 2007: Message edited by: Peter Jansen ]
I agree. Here's the link:
subject: Tomcat Netbeans Deployment Problem
It's not a secret anymore!