File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes Problem getting Resin to recognize servlets under ROOT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Problem getting Resin to recognize servlets under ROOT" Watch "Problem getting Resin to recognize servlets under ROOT" New topic
Author

Problem getting Resin to recognize servlets under ROOT

jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
I've been doing everything that I've read and done before, but for some reason I can not get any servlets to work now. Here's a directory structure:
C:\resin\webapps\ROOT\
C:\resin\webapps\ROOT\WEB-INF\classes\
Under the WEB-INF directory, I put a web.xml that has:
<servlet> <servlet-name>TestServlet</servlet-name> <servlet-class>TestServlet</servlet-class> </servlet>
I have a TestServlet.java and TestServlet.class file under WEB-INF/classes
When I do http://localhost:6969/servlet/TestServlet, I get a 404 error stating that path doesn't exist (have Tomcat running on 8080).
I had servlets working previously, but it seems once I stuck a ROOT.war into webapps, I can't get any servlet to work. Any suggestions where I need to start looking?
Thanks!
Jason
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Ok, got servlets working. I needed a servlet mapping, not just the servlet tags. So that's taken care of.

Now at another problem. My servlets and jsps use beans (like all good jsp/servlets should), but I can't get the servlets that are working now to recognize the beans. Unfortunately, I haven't gotten this to work once, so I'm not sure what's wrong. I tried placing the bean class files in all sorts of directories, even in the work directory Resin creates, but it doesn't like them.
Anyone used beans with Resin, and know where I should be sticking the darn things?
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
I love answering my own questions. All it takes is removing yourself from the problem for a little bit, and you come back all refreshed.
Conflicting web-app directories and web.xml files don't help matters at all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem getting Resin to recognize servlets under ROOT