I am sorry if I post this thread in the wrong forum, but i really dont know where to put it ! How can we build a direct link to the content of the database. For example,when i click a link on a HTML page, let's say a employee name, it goes to a page which displays the particular information stored in database of that employee without hard-code a HTML page for that employee. Thank you for your help in advance!
Well you can't do what you ask with HTML directly, since HTML is client side and static. However you can build your HTML using a JSP, as Niki Nono suggests. What you would need is some JSP/Servlet code which queries the database (using JDBC) and displays a list of employees available. Each employee could be a link to go to another JSP which displays the employee detail. Do you follow?
Thank you very much Paul Sturrock. Getting the list of the available employee is not the problem, but to make "Each employee could be a link to go to another JSP which displays the employee detail" (According to your previous post) is my problem. I am not really sure how to do it! Thank you for your help in advance.
Joined: Mar 20, 2005
when you read the database rows in your jsp, you do it in a loop. and the link you set it in the loop itself. so i believe you can do that in the loop.
i hope this is what you were asking. [ September 09, 2005: Message edited by: Niki Nono ]
Joined: Sep 06, 2005
Thank you for your help, but I have the problem in how to send the parameter from 1 servlet to another servlet just becuase in the second servlet i will do another database connection to get further informtion.
Davie, It sounds like you're getting ahead of yourself a bit. If you are going to work with Servlets and JSP, why not pick up a good book or follow some JSP tutorials so that you have a better understanding of the various building blocks provided by the technology. Once you have that understanding, you'll see all kinds of ways to do these things and only have to worry about which is best for your needs.
If you search on this and the servlets forum with keywords "book" and "books" you'll find plenty of good recommendations.