Kate Head

Ranch Hand
+ Follow
since Oct 31, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Kate Head

Hi there,
I use the <%@ page session="false" %> command in my .jsp files mainly to check that there is a valid session (created at the start of the users login into the system).
All the best,
Kate!!
20 years ago
Well done Joyce - AND you beat me to finish JDBC on the Cattledrive as well!
Double congratulations!
All the best,
Kate!!
20 years ago
...and if you don't use the Style Guide for your code in the Cattle Drive assignments, you get nit-picked (as I've found out!).
All the best,
Kate!!
20 years ago
Hi there,
I've just sent JDBC-2 2nd attempt (using Tomcat rather than Orion).
All the best,
Kate!!
20 years ago
Hi there,
Thanks for that advice Marilyn - I've downloaded the jr.jar and will have a go at amending the classpath later on today. I was wondering if it matters whereabouts in the classpath the jr.jar bit goes as I've got loads of Oracle classpath commands from another program that I installed that seem to be at the end of command?
All the best,
Kate!!
20 years ago
Hi there,
Marilyn; Yes, JavaRanchCommon.jar is in orion/lib, but the date of the file is very out of date - is it worth downloading again?
Carol; I don't remember unzipping the .zip file, but I could be wrong - if you have any further info. I'm all ears!
All the best,
Kate!!
20 years ago
Hi there,
I thought I'd check my Servlet 2 program before sending if off for nitpicking and got a 500 Internal Server Error java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet followed by lots of lines of errors that don't quite match Juliane Gross's errors (May 11 2003).
If I run a program that doesn't use JavaRanchCommon.zip/.jar then the program runs OK, so I'm supposing that it might be a problem with either my version of JavaRanchCommon.zip/.jar or a classpath problem (XP Home, service pack 2 applied) - the only thing that happened between my sending Servlets 1 to be nitpicked and checking Servlets 2, was that I installed a program that uses Oracle 10i Lite and that amended the classpath settings so that it's settings appear at the end of the command.
I set up a new user and still the non-Javaranch prog works OK and the others fail with the error - the Orion DateServlet runs without any problems.
Sorry for the length of the message - this is with trying the various programs supplied by Orion:

http://localhost - works OK
http://localhost/servlet/DateServlet - works OK

http://localhost/servlet/BeeServlet and JDBC 2 both give this error:
500 Internal Server Error
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at com.evermind[Orion/2.0.2 (build 11157)]._as.findClass(.:276)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at com.evermind[Orion/2.0.2 (build 11157)]._as.findClass(.:276)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.evermind[Orion/2.0.2 (build 11157)]._ay._lke(.:1607)
at com.evermind[Orion/2.0.2 (build 11157)]._ay._bxd(.:3976)
at com.evermind[Orion/2.0.2 (build 11157)]._ay._nlc(.:1847)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:501)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)

http://localhost/servlet/LinkCheckerServlet
500 Internal Server Error
java.lang.NullPointerException
at LinkCheckerServlet.doGet(LinkCheckerServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._pod(.:521)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._bmc(.:177)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:666)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)

http://localhost/servlet/FingerServlet
500 Internal Server Error
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at FingerServlet.finger(FingerServlet.java:102)
at FingerServlet.doGet(FingerServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._pod(.:521)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._bmc(.:177)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:666)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)

I ended up unintalling J2EE and Orion and reinstalling them and checking the Classpath, but I still get the same error - any suggestions will be gratefully received - my next step is to try running under Tomcat instead of Orion to see if that will work!
All the best,
Kate!!
20 years ago
Well done Joyce!
I'll never catch you up now!
Kate!!
20 years ago
Hi there Laura,
I'm not a nitpicker, but I would say that you should be OK with Java 1.5 (the new additions may not be included yet in the Cattledrive, but I'm sure they will come in at some point), although you might have problems finding the exact page numbers in the latest version of Just Java 2!
Hope to see you on the trail - I've learnt a lot and still have lots to learn!
All the best,
Kate!!
20 years ago
...and, of course, many thanks to Pauline, and Joyce, and all of the other Cattle Drive Nitpickers, and fellow Cattle Drive Members for keeping me going when I kept thinking it would be easier to give up.
Thank you everyone for the encouragement!
All the best,
Kate!!
20 years ago
Hi there,
I know that the Windows installation is rather large at 51Mb but you need to download this one " Windows Offline Installation, Multi-language (j2sdk-1_4_2_05-windows-i586-p.exe, 51.09 MB)" to your hard disk and then install it - the other option works like IE download in that a "starter" is downloaded to your hard disk and then that starts the main program download so you need an internet connection for that to complete.
Or it might be worth copying your original CD to a new one at a slower speed?
hth
All the best,
Kate!!
[ August 06, 2004: Message edited by: Kate Head ]
20 years ago
Oooh I like the orange!

I've just spent half an hour trying to get some xml code to appear in a posting in the CattleDrive forum - I couldn't get the code to appear even using the "CODE" brackets, but then suddenly remembered that it might be possible to use the HTML "<" and ">" and that did the trick (I had to turn off "show smilies" as the oracle command was appearing with a smiley in the middle!)
All the best,
Kate!!
20 years ago
Hi there,
Just as an addition to your brilliant work on how to get MySQL working, if you want to add -user and -password to the MySQL login/connection in a single command then it is as follows:

where you had the connection, user and password separately
Connection con = DriverManager.getConnection( "jdbc:mysql://localhost/soup" , "root" , null );

you can enter them like this
Connection con = DriverManager.getConnection( "jdbc:mysql://localhost/soup?user=root&password=null" );
or like this
Connection con = DriverManager.getConnection( "jdbc:mysql://localhost/soup?user=root&null" );
or like this
Connection con = DriverManager.getConnection( "jdbc:mysql://localhost/soup?user=root" );

If you're going to use the web.xml <context-parameter> tags in orion\default-web-app\WEB-INF then this is the one that works (null at the end confuses it!)


I have only been able to get it to work with the javax.servlet.* classes rather than com.javaranch.common.* ones - you use the following to access the parameters


When I wrote my techvalley.co.uk/khead project I used MySQL on my PC, and Oracle on the server, so had to keep switching the drivers, but using a different web.xml file on my PC and the server was a lot easier than recompiling each time!
The Oracle command format is of course different from the MySQL one!


where tcpipaddress was the server tcp/ip address e.g. 127.0.0.1 and the servername was the server name e.g. localhost

Many thanks for all your hard work - hope this will be of interest to you.
All the best,
Kate!!
[ August 06, 2004: Message edited by: Kate Head ]
20 years ago
Thanks for that Joyce.
After reading the thread, and relooking at the error message, I thought I'd do a check and see what .java files I had in my "working" directory - and there was LogServlet.java (I'd extracted it while doing Servlets 5 and hadn't removed it)
I deleted it and now everything compiles without problem - and runs OK as well. Phew!
All the best,
Kate!!
20 years ago
Hi there,
I've upgraded my existing version of MySQL and can run Test.java, and TestServlet.java extends HttpServlet, but when I try TestServlet.java extends LogServlet I get the following errors:
"C:\javaranch>javac TestServlet.java
.\LogServlet.java:7: package LocalSystem does not exist
import LocalSystem.* ;
^
TestServlet.java:5: cannot access LogServlet
bad class file: .\LogServlet.java
file does not contain class LogServlet
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class TestServlet extends LogServlet
^
2 errors"
I've tried adding c:\javaranch\JavaRanchCommon.zip; to the classpath, but it makes no difference; JavaRanchCommon.zip is in c:\javaranch and it does have LocalSystem.class in the root.
Does anyone have any suggestions?
LogServlet certainly used to work OK
All the best,
Kate!!
20 years ago