permaculture playing cards*
The moose likes JSP and the fly likes Make Links when Data is retrieved from Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Make Links when Data is retrieved from Database

Parth Mittal
Greenhorn

Joined: Nov 25, 2012
Posts: 6
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

Joined: Jan 10, 2002
Posts: 60782
    
  65

That sounds like something that would better be handled with JavaScript. You can hide the data initially, and reveal it upon the button click.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Parth Mittal
Greenhorn

Joined: Nov 25, 2012
Posts: 6
Any Idea, How to write the java scripts.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Yes.

But I'll let you make the first stab at it. Post back with your code.
Parth Mittal
Greenhorn

Joined: Nov 25, 2012
Posts: 6
Here it is(JSP PAGE)
Parth Mittal
Greenhorn

Joined: Nov 25, 2012
Posts: 6
AND HERE IT IS THE DATABASE CONNECTIVITY JAVA FILE


I want to make link for rs.getString(3) in JSP page
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

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.


SCJP, SCWCD.
|Asking Good Questions|
Parth Mittal
Greenhorn

Joined: Nov 25, 2012
Posts: 6
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

Joined: Nov 25, 2012
Posts: 6
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

Joined: Jan 10, 2002
Posts: 60782
    
  65

Please start a new topic for new questions.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Make Links when Data is retrieved from Database
 
Similar Threads
nullpointerexception in a bean
How i write the code so that at on submit as well as at onload we call same servlet i
Can i search for item by giving three items to compare in the query?
Lates Timestamp record from 3 tables.
how to insert