Bookmark Topic Watch Topic
  • New Topic

Make Links when Data is retrieved from Database

 
Parth Mittal
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All,
How all doing. I am new to JSP and struck with the issue,

I Have one JSP which is used to retrieve the data from database.
The three columns is fetched from the database lets say the name of three columns are A, B and C
A--B--C
1--2--3
4--5--6

The data present in column C is very big So I am thinking to make it as a link, If anybody click that link then only data is displayed
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64180
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
That sounds like something that would better be handled with JavaScript. You can hide the data initially, and reveal it upon the button click.
 
Parth Mittal
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Any Idea, How to write the java scripts.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64180
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Yes.

But I'll let you make the first stab at it. Post back with your code.
 
Parth Mittal
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Here it is(JSP PAGE)
 
Parth Mittal
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
AND HERE IT IS THE DATABASE CONNECTIVITY JAVA FILE


I want to make link for rs.getString(3) in JSP page
 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Parth Mittal wrote:AND HERE IT IS THE DATABASE CONNECTIVITY JAVA FILE

And where is the Javascript.
Parth Mittal wrote:I want to make link for rs.getString(3) in JSP page

Using scriplets in JSP is like buying a steam engine for your new car. Get rid of it, JSP in itself has much better and efficient ways.
Anyways, to make that a hyperlink, surround it with the anchor tag.
 
Parth Mittal
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am new so this might me the stupid question but any way i am asking
How to make the link, Then clicking on that link how data will be displayed.
 
Parth Mittal
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have resolved the issue. Now my question is

I am one page one.jsp now I want to move to Second.jsp with pass some values
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64180
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please start a new topic for new questions.
 
    Bookmark Topic Watch Topic
  • New Topic