Two Laptop Bag*
The moose likes Cattle Drive and the fly likes Orion/Tomcat servlet example? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Orion/Tomcat servlet example?" Watch "Orion/Tomcat servlet example?" New topic

Orion/Tomcat servlet example?

Jack Moore Iii
Ranch Hand

Joined: Jun 07, 2012
Posts: 76
I'm trying to prepare for the servlet portion of the assignments, and since Orion is history, I downloaded Tomcat 7 and it's installed and running. But for the life of me, I cannot create any kind of example servlet. I'm just wanting to make sure I understand the basics of deploying a webapp servlet when the time comes. But there's just nothing that works? Every tutorial I go over fails in some way.

This one here, for example, does NOT work. I compile the .java file just fine, move it to the directory, enter the correct URL, and I get a bad request page. And that's really my best attempt. I mean, I dunno, do you just need an IDE until you get used to this or what? It's like beating my head against a brick wall trying to do this manually, and nothing has worked yet...
Jack Moore Iii
Ranch Hand

Joined: Jun 07, 2012
Posts: 76
So, anyway, I tried and it finally worked. I guess you need a web.xml for every servlet and any servlet that goes in the webapps directory has to be included in the url unless it's in the ROOT directory. Kinda took all day to figure out something so simple, ugh. And NOW, I can write "Hello World"! Technical ignorance is painful, that was like taking a brain dump ...
I agree. Here's the link:
subject: Orion/Tomcat servlet example?
Similar Threads
unable to access LogServlet...not the same error that Juliane had
Unable to display local image in servlet
Questions about Servlets-3b
Servlet action is not available
Need help getting servlet software working