Here i want to display 3rows of mysql table in output. it shows 7errors how to solve this error? pls tell
<%@page import = "java.sql.DriverManager,java.sql.Connection,java.s ql.Statement,java.sql.ResultSet,java.sql.SQLExcept ion, java.util.Vector" %>
<%
Statement stmt = null;
Connection con = null;
ResultSet rsT = null;
boolean errFlag = false;
String str = null;
String sdbName, sregion,sregion1,sregion2,
sdbName = request.getParameter("scaleup");
sregion = request.getParameter("region");
sregion1 = request.getParameter("region1");
sregion2 = request.getParameter("region2");
int result=0;
try
{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/" + sdbName,"root","");
stmt = con.createStatement();
//System.out.println("select * from scaleupdata where sregion= '" + region + "' and sregion1='" + region1 + "' and sregion2='" + region2 + "'");
rsT = stmt.executeQuery("select * from scaleupdata where sregion= '" + region + "' and sregion1='" + region1 + "' and sregion2='" + region2 + "'");
if(rsT.next())
{
result=0;
result= rsT.getInt(1);
result= rsT.getInt(2);
result= rsT.getInt(3);
<table border='1'>
<tr>
<th>region</th>
<th>region1</th>
<th>region2</th>
</tr>
<tr>
<td><%result=rst.getInt(1);%></td>
<td><%result=rst.getInt(2);%></td>
<td><%result=rst.getInt(3);%></td>
</tr>
</table>
}
rsT.close();
System.out.println("result "+result);
if(result==1)
{
str = "<center><h2>You Have Entered Invalid details</h2></center>";
}
else
{
%><jsp:forward page="Login.jsp"/>;<%
}
stmt = null;
con = null;
rsT = null;
}
catch(SQLException sqle)
{
str = "<h2>Error : " + sqle + "</h2>";
errFlag = true;
}
%>
<p><%=str%></p>
Error:
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\Program Files (x86)\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\SCALEUP\report_jsp .java:91: illegal start of expression
[javac]
[javac] ^
[javac] C:\Program Files (x86)\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\SCALEUP\report_jsp .java:68: sdbName is already defined in _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
[javac] sdbName = request.getParameter("scaleup");
[javac] ^
[javac] C:\Program Files (x86)\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\SCALEUP\report_jsp .java:82: cannot resolve symbol
[javac] symbol : variable region
[javac] location: class org.apache.jsp.report_jsp
[javac] rsT = stmt.executeQuery("select * from scaleupdata where sregion= '" + region + "' and sregion1='" + region1 + "' and sregion2='" + region2 + "'");
[javac] ^
[javac] C:\Program Files (x86)\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\SCALEUP\report_jsp .java:82: cannot resolve symbol
[javac] symbol : variable region1
[javac] location: class org.apache.jsp.report_jsp
[javac] rsT = stmt.executeQuery("select * from scaleupdata where sregion= '" + region + "' and sregion1='" + region1 + "' and sregion2='" + region2 + "'");
[javac] ^
[javac] C:\Program Files (x86)\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\SCALEUP\report_jsp .java:82: cannot resolve symbol
[javac] symbol : variable region2
[javac] location: class org.apache.jsp.report_jsp
[javac] rsT = stmt.executeQuery("select * from scaleupdata where sregion= '" + region + "' and sregion1='" + region1 + "' and sregion2='" + region2 + "'");
[javac] ^
[javac] C:\Program Files (x86)\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\SCALEUP\report_jsp .java:101: cannot resolve symbol
[javac] symbol : variable rst
[javac] location: class org.apache.jsp.report_jsp
[javac] result=rst.getInt(2);
[javac] ^
[javac] C:\Program Files (x86)\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\SCALEUP\report_jsp .java:104: cannot resolve symbol
[javac] symbol : variable rst
[javac] location: class org.apache.jsp.report_jsp
[javac] result=rst.getInt(3);
[javac] ^
[javac] 7 errors