This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet-JDBC

 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone i'm using JSDK 2.0, JCreator and servletrunner as a server to run my servlet program and the program is getting compiled and .class file is also generated. I have copied that file into the examples folder of JSDK 2.0(That's the way i run servlet programs) and now am trying to run the program but it doesn't display "Record Is Saved" this message. Here is the code---

Client side code


Server side code


please help me!! Thanks!!!
 
Rob Spoor
Sheriff
Pie
Posts: 20492
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranit Sonawane wrote:

Don't ever ignore exceptions like this. You probably get an exception that you're ignoring. Change that line into the following, and you'll see what goes wrong in your browser window:

Also, please UseCodeTags from now on.
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:
Pranit Sonawane wrote:

Don't ever ignore exceptions like this. You probably get an exception that you're ignoring. Change that line into the following, and you'll see what goes wrong in your browser window:

Also, please UseCodeTags from now on.


gave me an error "Cannnot find symbol
 
Pete Nelson
Ranch Hand
Posts: 147
Debian Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a reason you're using a version of servlets from 1998? Are you trying examples from an older book?

You might find there are a lot more difficulties in running such an old version of the Servlet environment, including a lot less support. At the same time, many modern IDEs (NetBeans, Eclipse, JDeveloper, etc) come with their own built-in Servlet container for testing. You should at least consider a more modern environment for learning Java & Servlets. You may get a lot more help.

Also, your previous post cuts the error message off at "Cannot find symbol". If we don't know what it's missing, it's hard to tell where your problem may be.

Unless ...

Is that space between "jdbc:" and "odbc" supposed to be there?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic