my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Orion/Tomcat servlet example?" Watch "Orion/Tomcat servlet example?" New topic
Author

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.

http://cs.calstatela.edu/~abbott/Courses/CS_320b/Running%20a%20Servlet%20under%20Tomcat.html

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 http://www.devmanuals.com/tutorials/java/servlet/configuringservletintotomcat6.html 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 ...
 
Don't get me started about those stupid light bulbs.
 
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