Dave Kinkead

Greenhorn
+ Follow
since Feb 22, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dave Kinkead

I am trying to send a form's data to different pages based on what submit button is pressed.
How can I add the value of a button to the action part of a form? Basically, I want to have the following result, where ButtonValue is one of the 3 button options a user can select.....
<form action="/Servlet/ButtonValue">
My javascript is a bit rusty so I would love it if someone could show me the solution in code.
Thanks
Dave
I want to be able to process form data dynamically based on what selection a user makes but am unsure of whih approach to take.
Basically, I want to have a form with 2 or 3 submit options. On submit, the form data is forwarded to the appropriate servlet depending on which submit button was clicked.
How would I do this - can I add some variable to the <form action="/servlet/???"> tag or is it possible to have the individual button forward the form data to a location based on the button's value?
Thanks in advance
Dave
20 years ago
JSP
I downloaded the Blazix server 2 weeks ago to start learning JSP. The most frustrating thing I have found is that Blazix has different requirements for their classpaths than the J2EE spec. It took me a LONG time to workout where everything had to sit so hopefully this can help you.....
The only way I can have both servlets and normal java class files working together is with the following layout.
Edit your classpath in autoexec to include
classpath=.;C:\Blazix\classes\myProjectDir
keep JSPs in C:\Blazix\webfiles\myProjectDir
keep servlets and class files in C:\Blazix\classes\myProjectDir and not in myProjectDir\WEB-INF\
and finally, edit the web.ini file in C:\Blazix to change the default app dir from C:\Blazix\webfiles to C:\Blazix\webfiles\myProjectDir
This last thing is the trick to getting servlets to work with normal class files of the same package.
Hope this helps
20 years ago
JSP
Solved this one....
The calling jsp was calling "\Modify" instead of "/Modify"
I have no idea why this blew the stack and even initiated the Modify servlet though!?!
20 years ago
A bit more info
The server log says
End of init
java.lang.StackOverflowError at
server.servlets.Request<init>
server.servlets.HttpReqest<init>
so I'm guessing the problem is writing to the Request object but having never encountered this Error before I'm stumped
20 years ago
I've recently moved code from a JSP to a servlet and am now getting the above error.
Code is below.
the servelt**************

Previously the getAllCruises() call was in the JSP and it worked fine, but now that I am trying to write it to the Request object, my stack explodes!! why why why when the vector is only 7 objects long. What can I do to prevent this happening.
Thanks
Dave
20 years ago
I'm having a problem getting my JSP working on Blazix. I think the problem is with the location of the supporting resources.
I've writen an example (writen for Tomcat) word for word that has the following structure:
/SERVER_DIR
/webfiles
welcome.jsp
/WEB-INF
errorPage.jsp
web.xml
footer.jspf
/classes
questions.class
questions.java
The welcome page loads but can't read class files in that location. So far, I've worked out that all class files have to sit in /Blazix/classes, not my own class dir but still I can't get the deplyment descriptor to work (ie typing the url dir, not welcome.jsp, just gives a 404).
Can anyone help show where the web.xml should sit and how to get the WAR packaging tool working properly (had no luck after reading the docs)
Hope I've made this clear enough
Dave
20 years ago
JSP
I am trying to time stamp an object when sending it to a MS Access database but am struggling to format the date object correctly. When the date component of my statement is removed, the excecuteStatement() method works just fine so Im sure it is the date format.
How do I format it correctly to MS Access format so I don't get anymore 30 line SQLExceptions!?!
Thanks in advance
Dave
20 years ago
Well done Pete,
For all those still studying, I just want to back up what Pete said. I too am very new to programing - Dec 2002, and got 88% on the exam. I owe this all (Except for the many hours of study) to Kathy and Berts book. If you know the book inside out, can pass the mock exams (and then restudy the areas you are weak in), then the exam isn't that hard. To give you an indication of the time I spent, I put in 8 hrs study a week for 2 months and I learn pretty quick.
Once again, well done Pete.
Dave
20 years ago
I passed yesterday with 88%. Actually the test was harder than I expected - maybe 20% harderd than the practice questions in Kathy and Berts book - and much more on threads than I would have liked (62%)
Observations:
I have been learning Java (self taught) for 5 months and studying Kathy's book for 3 months. No real IT experience other than HTML. The book makes it very easy to pass IF you learn everything in it.
Do I know Java - yes.
Can I develop a decent app - no. That is the next thing for me to move on with.
Before I get flamed for not having 2y exp with java before getting my cert - I did this to get a foot in the door with an IT job. I don't think that SCJP should be used as a measure of one IT prowess - simply that one knows the core fundimentals. To me it is like learning German grammer - I can now speak the language but that doesn't mean I can write poetry.
Dave,
SCJP
20 years ago
Thanks for your prompt answers - I didn't even think about that posibility. I'm getting the impression that the exam is rather, well, anal but when I pass it will definately give me confidence that I know the fundimentals of the language.
Lots of questions today.
In the self test in ch4 of Kathy's JCP exam prep book, a question asks the effect of a do while loop. The code in question is:
do while(x>y)
My understanding is that this wouldn't compile due to the absence of the ; after the while(x>y) but I'm wrong according to the book. Can someone explain.
Thanks
I've just finished CH 4 in Kathy's JCP book and have a few questions:
1. Do I need to declare that a method throws an exception if I have caught it in a try catch block. I pretty sure I don't (catch OR declare) but just want conformation.
2. For the exam, do I need to know which exceptions are checked (ie all subclasses of exception except Runtime) and which are unchecked or are we required to know that only checked HAVE to be caught or declared.
3. What is the effect of java -esa. I know this enables assertions on system files but what does that actually mean/do.
Thanks in advance