I think my head is about to explode (Java Servlets)

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

I think my head is about to explode (Java Servlets)

Post by Chris Corbyn »

What ever possesed me to take some time out tonight to start learning java? This is driving me nuts. I've managed to copy and paste examples all fine just to prove my apache/tomcat setup is working but OMFG for the past hour I've been trying to write my own Hello World script without luck.

Maybe I'm being stupid, do I really need to restart tomcat and apache if I make changes to web.xml etc?

All I can see to get is a page which initially says "Temporarily Unavailable" followed by a page which has a Tomcat 404 error for each subsequent refresh.

Gahhh.... why do they have to make it so tricky to do just a simple two words? :(
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

tomcat can compile on the fly (but it is a LOT less efficient,) so you don't need to javac everytime you make an update to any JSP pages, and don't need to restart everytime afaik. Look for 'dynamic deployment' in tomcat docs, such as here: http://tomcat.apache.org/tomcat-5.5-doc ... t%20server
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

In my experience it's easier to get resin up and running... ;)

(The first difficulty with servlets is that you not only need to write the acutal servlet, but probably will need to add to a web.xml file that couples your servlet to an url pattern. A Hello, World Servlet)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Yeah I think it's writing the web.xml part that I'm getting wrong. I always just end up with a 404. I gave up last night. I'll take another shot at it tonight and seek help on where I'm going wrong if I keep faling :(

The appeal with tomcat was that I can just use mod_jk and have it run alongside PHP.
Post Reply