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

Create Web pages Dynamically

 
Anuj Kalra
Greenhorn
Posts: 10
Java Oracle Tomcat Server
  • 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]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
Java Oracle Tomcat Server
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic