You shouldn't be doing this in your servlet.  I very good design is a
combination of the Jakarta Struts JSP iterator and bean:write tags.  Your
servlet gets the data from a command object and stores it in a JavaBean.
The Struts tags then display the results (with hyperlinks) directly on the
JSP.  See:

http://jakarta.apache.org/struts/struts-html.html

for more info.

Mark

-----Original Message-----
From: Bob Prah [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 9:13 AM

Hi Everyone,

I have a servlet that makes a connection to a table say NewsTable in a mysql
database News.
Table NewsTable  has the ff. columns Id, Nsummary and Detail. I am able to
access table
NewsTable and display the contents in the various columns namely Id,
Nsummary and Detail in  a
servlet.

My objective is to display each item in column Nsummary in hyperlink format
so that when it is
clicked upon, its corresponding Detail content will be displayed. Id is the
index and unique.

I have been able to transformed each content of Summary into a hyperlink on
display in my
servlet, however when I click on the link, it leads me to the index page my
web. appl.

I suppose I am doing something terribly wrong. getting this result. I used
a  code segment
like this :


      for (int i=1; i <= Nsummary.length; i++){

      out.println("<tr><td width =\"300\"><div><p><a href=\"\">" +
                   Nsummary[i] +
                  "</a></p><p></p></div></td></tr>");

      }

I Would appreciate any suggestion that anyone has to the above. Thank you.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to