I have retrieved the url link from the database in a text box .Now I want to make the retrived url to be a href link . How can I achieve it.
My code is below:
My code is below:
Code:
<%@page language="java"%>
<%@page import="java.sql.*"%>
<table border="1">
<%
try {
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection con = DriverManager.getConnection(
"jdbc:oracle:thin:@10.1.2.51:1521:ECPROD","SMUSER","password");
String query = "select * from TEST_LINKS where ID='224'";
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(query);
if(rs.next()){
%>
<tr>
<tr><td>URL</td><td><input type="text" name="name" value="<%=rs.getString("URL")%>"></td></tr>
<%
}
}
catch(Exception e){}
%>
</table>
Comment