File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Servlet-JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet-JDBC" Watch "Servlet-JDBC" New topic
Author

Servlet-JDBC

Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 155

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

Joined: Oct 27, 2005
Posts: 19670
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 155

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

Joined: Aug 30, 2010
Posts: 147

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?


OCPJP
In preparing for battle I have always found that plans are useless, but planning is indispensable. -- Dwight D. Eisenhower
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet-JDBC