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 Dynamically adding new information to jsp without scriplets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Dynamically adding new information to jsp without scriplets" Watch "Dynamically adding new information to jsp without scriplets" New topic
Author

Dynamically adding new information to jsp without scriplets

prm aditya
Greenhorn

Joined: Feb 09, 2012
Posts: 5
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

Joined: Jan 22, 2007
Posts: 196
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

Joined: Jan 29, 2007
Posts: 313

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.


Palak Mathur | My Blog | TechJaunt | What is JavaRanch? | List of All FAQs
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamically adding new information to jsp without scriplets