Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically adding new information to jsp without scriplets

 
prm aditya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to write an application wherein i want to update part of jsp with details form database, after receiving input from the same page without reloading.
I have read about ajax and googled it, i find xmlhttprequest and links to another jsp / servlet. Is there any other way to get data on the fly without using servlets
 
Piyush Mangal
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to fire a request to server no other option. Putting database access in JSP would not be a good idea so you will have to live with Servlet only.
 
Palak Mathur
Ranch Hand
Posts: 342
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prm aditya wrote:I am trying to write an application wherein i want to update part of jsp with details form database, after receiving input from the same page without reloading.
I have read about ajax and googled it, i find xmlhttprequest and links to another jsp / servlet. Is there any other way to get data on the fly without using servlets


There is no way out. You will have to make a call to a Servlet. Do not do database call from JSP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic