File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Problem in inserting data into oracle db from jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in inserting data into oracle db from jsp" Watch "Problem in inserting data into oracle db from jsp" New topic
Author

Problem in inserting data into oracle db from jsp

lisy jessica
Ranch Hand

Joined: Oct 27, 2010
Posts: 47
Hi

I am trying to insert data into Oracle database, when i click add button it does'nt perform action...This is my code...Please help me



I dont knw where is the problem, but when i enter the values and click add it doen't perform action=cmasterlist.jsp command. Please help me.


Thanks in advance
Lissy.


David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459


This button doesn't do anything. did you mean to make the type 'submit'?
lisy jessica
Ranch Hand

Joined: Oct 27, 2010
Posts: 47
Yes, add button means submit.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

then you need to change the type to 'submit' instead of type="button"
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
If you've read any posts in this forum you know that writing scriptlet code in a JSP is not the way to go.
Java code belongs in a java class.

Potential problems spotted in your code:

> if (material_number != "" && material_desc != "" && partno != "" ) {
This line of code doesn't do what you think it does.
When comparing string values, you should use the .equals method.






Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Listen to Stefan, for he speaks wisely. The time for putting Java code in a JSP has passed. In fact, it passed long ago (about 9 years now).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
lisy jessica
Ranch Hand

Joined: Oct 27, 2010
Posts: 47
Thank you so much it worked.
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

neelima mullapudi,
Your post was moved to a new topic.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in inserting data into oracle db from jsp
 
Similar Threads
JSP form with four inputs and one submit button
How to Export web page(jsp page) to excel using jsp or servlets
Error comes whilke compiling the jsp page
Problem in updating the fields to database
Doubts in jsp