aspose file tools*
The moose likes Servlets and the fly likes Unable to sent data from jsp to oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to sent data from jsp to oracle database" Watch "Unable to sent data from jsp to oracle database" New topic
Author

Unable to sent data from jsp to oracle database

kanna kancharla
Greenhorn

Joined: Aug 23, 2012
Posts: 14

i'm creating a web application for that. i want to create a registration page for that i've used the following code.but unable to send data.

form data


Servlet data



i'm using oracle 11g database scott scheme... and created a table named registration using sql developer

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
What does "unable" mean? What, exactly, does the code do now, and what did you expect it to do instead?


Ping & DNS - my free Android networking tools app
kanna kancharla
Greenhorn

Joined: Aug 23, 2012
Posts: 14

unable means data submitted from the form is not storing in database.

i'm getting the below error while trying to send the data

The requested resource (/test/InsertRegtodb) is not available.

here test is project name and InsertRegtodb is servlet name.

i'm expecting this code to store data into registration table in database
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
Seems like the URL you're trying to submit the form to doesn't exist. At first glance the servlet accepts GET requests, whereas the form submits a POST - so that wouldn't work right off the bat. Servlet code that writes ot the DB should never be accessed via GET - so the form does the right thing, but the servlet isn't set up properly.
kanna kancharla
Greenhorn

Joined: Aug 23, 2012
Posts: 14

no actually the servlet is present is the mentioned address. but it is not connecting to it

there is one more servlet in the same folder and which is accessible from another jsp. but tis servlet is not accessible even though i have used same code as it is used for the servlet which worked for me previously
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
no actually the servlet is present is the mentioned address.

How do you know? The evidence suggests that it is not, yes? Maybe the web.xml is set up incorrectly? Maybe there's an error during initialization?
kanna kancharla
Greenhorn

Joined: Aug 23, 2012
Posts: 14


Maybe the web.xml is set up incorrectly?


xml is file the problem i think
ok i will see the web.xml and get back to you..
kanna kancharla
Greenhorn

Joined: Aug 23, 2012
Posts: 14

got it.

jsp to servlet connection is working.

but now i'm getting class not found exception while connecting to DB
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
That exception tells you which class is missing - add it to WEB/classes or WEB-INF/lib and you should be good to go.
kanna kancharla
Greenhorn

Joined: Aug 23, 2012
Posts: 14

thank you Dittmer its working
 
Don't get me started about those stupid light bulbs.
 
subject: Unable to sent data from jsp to oracle database