love your job and not your company;
...because you never know when your company will stop loving you!
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
ps.setString(9, strFrequency);
for (int i=0; i < strTutors.length; i++){
ps.setString(10, strTutors[i]);
}
ps.setString(11, strBudget);
ps.setString(12, strRemarks);
ps.executeUpdate();
response.setContentType("text/html");
out.println("Member account has been created"); [/code]
Do you know why this cup is useful? Because it is empty.
Are you aware that you are overwriting the 10th parameter each time? You might as well write "ps.setString(10, strTutors[strTutors.length - 1]);"tangara goh wrote:
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Hongli Li wrote:in your form are you using POST or GET, and which method did you implement in your servlet, doPost or doGet?
Rob Prime wrote:
Are you aware that you are overwriting the 10th parameter each time? You might as well write "ps.setString(10, strTutors[strTutors.length - 1]);"tangara goh wrote:
tangara goh wrote:Is the codes wrong?
tangara goh wrote:In my servlet, I have used the overriding method over do Get and do Post, because I was told that this way works. Is it wrong?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
tangara goh wrote:
In my servlet, I have used the overriding method over do Get and do Post, because I was told that this way works. Is it wrong?
Do you know why this cup is useful? Because it is empty.
tangara goh wrote:Also, is it foolish to jump to Hibernate when I haven't even really grasp the basic JDBC using Tomcat?
William Brogden wrote:Just to repeat myself, study the examples that Tomcat comes with.
I heartily recommend using the FireFox browser with the plugins such as FireBug and LiveHTTPHeaders - they will show you what is really going on if you get a "blank page" or any other mystery on the client side.
Bill
tangara goh wrote:I searched for the examples inside my IDE but can't find the examples.
love your job and not your company;
...because you never know when your company will stop loving you!
manoj r patil wrote:
tangara goh wrote:I searched for the examples inside my IDE but can't find the examples.
Why are you checking in IDE? Its been clearly told that the examples are distributed along with Tomcat. Run tomcat as a standalone server and visit its home page, you should be able to see those examples unless you have custom installation.
David Newton wrote:In the Tomcat download.
That aside, there are hundreds, if not thousands, of Java web application tutorials and examples on the web, including Sun's (Oracle's) own tutorials.
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/WebApp.html
It'll be really, really, *really* important to learn how to learn about these things, how to find examples, how to read forums to find solutions, etc. It's also very important to have strong fundamentals: without them, little else will make sense, and when things go cow's legs up, not knowing how to examine the various layers involved will make it literally impossible to figure out what's gone wrong.
William Brogden wrote:And THAT is why I do not recommend that beginners start learning servlets with an IDE.
Bill (the old curmudgeon)
tangara goh wrote:But, is there any other way to execute the servlet without IDE? I don't think notepad ++ can allow servlet to run right?
Prabhat Shankar Consumer Court,Consumer Court India,Consumer Complaints,Complaint India, Web Value
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |