Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem getting Resin to recognize servlets under ROOT

 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic