Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Tobin Jackson

+ Follow
since Sep 01, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tobin Jackson

Hello everyone,

I placed the following "Valve" tag in my manager.xml context file.

However, when I try to access the manager app locally i get the big "403:forbidden"... Comment it out and I'm in

I'm using Tomcat 5.0.27/linux. Any ideas?

17 years ago

checkout the earlier thread "Command line arguements".


For each change in the servlet, you need to restart tomcat to reflect the change. I'm not sure whether there's any other work-around for this .. !!!

For Tomcat 5, create a file named <web-app-name>.xml. In that file put this:

place this file in $TOMCAT/conf/Catalina/localhost/

For Tomcat 4: I think you can do the above for some of the later versions of tomcat 4. You can also set a Context tag in the server.xml file. try to google the specifics if need be.

hope this helps some folks..

you probably already know this but.. changes to the web.xml will only take effect after you shutdown and restart tomcat. This is true even when reloadable="true" is set in your context.

Hey there. I'm 90% confident in what i'm about to add. Someone please correct me if I'm wrong.

I was at the /BeerV1 level when I compiled, and I'd like to stay there to actually run the test class.

Unlike 'javac', executing a class with 'java' requires you to be in the directory just above the package specified in the class. For example, if you have a class with 'package com.example.mypackage;' then you must run the class from the directory just above com.

Big thanks to Bryan, Kathy, and Bert for an outstanding book. My goal was to score above 90% and I HF Servlets & JSP was a huge help.

For those interested let me testify

I had spent three weeks studying for the WCD1.3 exam when I found copy of the book after which I decided on 1.4 certification. I studied the HF book exclusively for a week, took the mock exam (got 46 out 69 correct), then studied the three specs: Servlet2.4, JSP2.0 and JSTL1.1 for two days prior to taking the exam. I also took the free mock exams at JDiscuss never making more than 85%. Of course, I also spent alot of time playing with Tomcat 5, "Hey, I wonder what would happen if I did this.."

One thing I thought was very considerate of the HF authors was the annotated mock exam answers complete with cross-references to the specs. nice..

Good luck to everyone preparing.. Study hard, you can do it


I'm stumped on why removing ":classes:." would cause that type of error. If you're thinking of ":classes:." as a command/flag tho that would be wrong. It's just more path info for the -classpath flag. Make sure there are no spaces between ":classes:." and the path info preceding it ".../servlet-api.jar". I say that because if you're thinking of it as a command you might have put a space there

I'll second that. Anything more than a text editor (i'm partial to vi ) and command line is overkill for the sample code you'll write in preperation for the exam.. IMO.. And not only is it overkill, it might undermine your understanding of the nuts and bolts that you'll be tested on.

hmm.. i have both 4 and 5 on my linux box and they both have and scripts for for *nix and startup.bat, shutdown.bat for Windows.

When i switched from 4 to 5 a couple of weeks ago the only problem I had was figuring out how to make 5 automatically reload/reinstantiate newly compiled servlet classes.

Here's a suggestion if you're on Windows. Try downloading the .zip version. Unzip it.. goto the /bin directory at a dos prompt.. type startup.bat.. and see what happens


My opinion is this: if you're just starting out and itching to write some basic servlets I would go ahead with 4.0. But keep trying to get 5 up and running.. Eventually, you will want a JSP2.0 and Servlet2.4 compliant container to help iron out the details in your mind.

One BIG diff tho. EL scripting is disabled by default in tomcat4.

yea, i said originally i was trying to get weird with the [] operator. I would never do that 'cept as an experiment studying for the exam I should have known to look at the BNF in the spec tho.. the answer was right there. Thanks for everyone's input. I feel so EnLightened.

ok.. been thinking about it some more and I understand that once the translator hits a '${' the rules probably change and there is no scripting allowed but i still can't find anywhere in the JSP 2.0 spec where it says this can't be done. Maybe it's just supposed to be obvious
Hello all, I've been trying to get weird with the [] operator. I have the following code in a servlet:

where foodList is an ArrayList with four items. The servlet then forwards the request to a JSP containing the following code:

I thought this should be equivelent to

but i get the following error:

javax.servlet.ServletException: The "[]" operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.

Any ideas?