Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Content - Crying for help ...... Urgent 1

Status
Not open for further replies.

Selemani

Programmer
Apr 18, 2007
6
0
0
IE
Hello

I am new to this forum, maybe this issue has been resolved already. Please Help!

I have been asked to build a small system that will do certain things. I am using Tomcat with JSP. The connection and the interaction to the database are great. The only issue I am having is that I don't know how to link/convert the result of the query displayed on the screen to a clickable content i.e. a link.
Eg: When the user wants to view all the European cities, he will click on view all cities on a web page. The code behind the "view" button is a select query that will be run and display back all the cities from a database. My problem is that I don't know how to make the result of that query a link. Let say, if the user wants to click on one of the cities, example Dublin, how can i generate a link from a dynamic page?

I hope it makes sense!
 
If it's jsp then you have a controller. If you have a controller then the controller needs to be called something like this you can then add parameters to that url like this ?parametername=value for example ?query=allfields

in your get or post method for the servlet(controller) you would then do a getParameter on the request object looking for a parameter with the name query. something like this request.getParameter("query").

And now tell me what this has to do with javascript?

Christiaan Baes
Belgium

"My old site" - Me
 
Thank you Chrissie1 for replying to my post.
I should have mentioned earlier that I am new to the JSP business. Your reply is so advanced that I didn't know what to do.
Like I said, I need some codes that will activate a new query from whatever result the user would have on their screen.
E.g. If the user wants to view all the branches starting with B from a database, they can run the query and when the result is displayed example BLANCHARD, they should then be able to click on BLANCHARD and a new select query should be run again in order to display all the relevant information regarding BLANCHARD.

I am using JSP (JSTL) with Tomcat. I am looking for the full working codes to do this, please! Thank you for you help
 
omfg, did chrissie just get a legitamite javascript star?

-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
uncle_rico_thumb.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top