Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in inserting data into oracle db from jsp

 
lisy jessica
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This button doesn't do anything. did you mean to make the type 'submit'?
 
lisy jessica
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, add button means submit.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then you need to change the type to 'submit' instead of type="button"
 
Stefan Evans
Bartender
Pie
Posts: 1670
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
lisy jessica
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much it worked.
 
Wendy Gibbons
Bartender
Posts: 1110
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
neelima mullapudi,
Your post was moved to a new topic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic