Why won't <BR> stick in out statement ?
From: Andrew Rich (vk4tec_at_hotmail.com)
Date: 02/18/05
- Next message: Andrew Rich: "Re: Why won't <BR> stick in out statement ?"
- Previous message: Rico: "Re: Hibernate and log4j config under Tomcat."
- Next in thread: Andrew Rich: "Re: Why won't <BR> stick in out statement ?"
- Reply: Andrew Rich: "Re: Why won't <BR> stick in out statement ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 18 Feb 2005 21:39:18 +1000
My java keeps saying that the <BR> is unterminated
Why ?
It is just a string
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<jsp:directive.page import="java.sql.*" />
<HTML>
<HEAD>
<TITLE>JDBC scriptlet example</TITLE>
</HEAD>
<BODY>
<jsp:scriptlet>
Class.forName("com.mysql.jdbc.Driver");
Connection connection =
DriverManager.getConnection("jdbc:mysql://localhost:3306/smtrack", "", "");
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery("select region from
sm04022005");
int numCols = rs.getMetaData().getColumnCount ();
while (rs.next())
{
out.print(" Region=" + rs.getString("region") + "<br>");
}
statement.close();
connection.close();
</jsp:scriptlet>
<jsp:expression>numCols</jsp:expression>
</BODY>
</HTML>
- Next message: Andrew Rich: "Re: Why won't <BR> stick in out statement ?"
- Previous message: Rico: "Re: Hibernate and log4j config under Tomcat."
- Next in thread: Andrew Rich: "Re: Why won't <BR> stick in out statement ?"
- Reply: Andrew Rich: "Re: Why won't <BR> stick in out statement ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|