• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Create Web pages Dynamically

 
Greenhorn
Posts: 10
Oracle Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a random list of links whose title I am getting from the database
I'd like to catch one of these links when the user clicks one of them and process it from a single jsp file.
Possible?



For eg: when user clicks one of these links, can I dynamically call a web page that fetches information from the click and gets values from a database and insert it on JSP page
bestsellers.JPG
[Thumbnail for bestsellers.JPG]
 
Marshal
Posts: 67389
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but not with JSP. Interacting with the page after it's displayed in the browser is the realm of JavaScript. You'd use Ajax to do what you are asking about.

Please read this article to understand JSP and why it won't help you with this.
 
Bear Bibeault
Marshal
Posts: 67389
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also please read this JspFaq entry about your use of script lets in your JSPs.
 
Anuj Kalra
Greenhorn
Posts: 10
Oracle Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Also please read this JspFaq entry about your use of script lets in your JSPs.



Thanks for your quick reply.

I started learning servlets and JSPs over a month ago so I have only the basic knowledge of servlets.
I want to read, understand and start writing my code using JSTL and EL but these were not explained to us when I took a course for Java.

In fact, the instructor coded the whole JSP with scriplets.(Though she did tell us it was a bad practice)

I started reading Head First Servlets and JSP by Kathy Seirra by honestly, I was a bit intimidated by the book - its really tough.

It would be so kind of you to prescribe some reading material??

I went to tutorials point (for JSTL) but I just cannot seem to install the jar files that are required.

Thanks for your help!
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic