Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting data from the database with the non mandatory fields

 
pasham sukumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to get the data into the jsp by using jsp,servlet and oracle
I have a form in jsp in that 6 fields are there in that only one field is mandatory and
rest of five fields are not mandatory for this how to write the code for generating the report after submit button
how can i write the conditions for the non mandatory fields. Can you suggest me for this.
 
Pongsakorn Semsuwan
Ranch Hand
Posts: 34
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Servlet, get all the input parameters from your form and check if user put something in those optional fields or not.

If user does, you add an additional condition to your query. If not, go with you simplest mandatory query.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic