This is a lot of errors with JSP code-------Edit a forum page

Source: Internet
Author: User
Tags reset
js| Error | Page <title>my the Guestbook</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body bgcolor= "#ccccFF" vlink= "#000000" alink= "#666666" >

<div align= "center" >
<p><font size= "7" ><b><font size= "+6" >jsp aguestbook</font></b></font> </p>

<form method= "POST" action= "index1.jsp" >
<table width= "75%" align= "center" border=1>
<tr>
&LT;TD width= "30%" >
<div align= "right" name:</div>
</td>
&LT;TD width= ">"
<input type= "text" name= "name" >00000
</td>
</tr>
<tr>
&LT;TD width= "30%" >
<div align= "right" > e-mail:</div>
</td>
&LT;TD width= "70%" >
<input type= "text" name= "email" >
</td>
</tr>
<tr>
&LT;TD width= "30%" >
<div align= "right" >site >
</td>
&LT;TD width= "70%" >
<input type= "text" name= "url" value= "http://" >
</td>
</tr>
<tr>
&LT;TD width= "30%" >
<p>what Do you want to</p>
<p>say?</p>
</td>
&LT;TD width= "70%" >
<textarea name= "Body" rows= "5" cols= "></textarea>"
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
&LT;TD width= "70%" > </td>
&LT;TD width= "70%" >
<table width= "75%" >
<tr>
<td>
<input type= "Submit" name= "send" value= "send" >
</td>
<td>
<input type= "reset" name= "reset" value= "reset" >
</td>
</tr>
</table>
</td>
</tr>
</table></form>

<%@ page contenttype= "text/html;charset=gb2312"%>
<%@ page language= "java" import= "java.sq1.*"%>
<jsp:usebean id= "Sq1bean" scope= "page" class= "jsp.mysq1"/>
<%! String name,email,url,body,sq1; %>
<%! int id; %>

<%
name = NULL;
Name = Request.getparameter ("name");
%>
<%
if (name!= null&&name!= "")
{
name = new String (Request.getparamer ("name"). GetBytes ("8859_1"));
email = new Steing Request.getparamer ("email"). GetBytes ("8859_1");
url = new String (request.getparamer ("url"). GetBytes ("8859_1"));
Body=newsteing (Request.getparamer ("Body"). GetBytes ("8859_1"); sq1= "Insertintoguestbook" (name,email,url,body)
VALUES (' +name+ ', ' "+email+ ', '", ' "=url+ ', '" +body+ ")";
Sq1bean.executery (SQ1);
Sq1bean.sq1close ();

}else{
Out.print ("<b><font color=red>please Enter your name,email and body!!! </font>
</b> ");
}
%>
<p><font size= "4" ><b><a href= "./index.jsp#see" >see my guestbook</a></b>
</font></p>
<p> </p>
<%
ResultSet RS = Sq1bean.executequery ("SELECT * FRM Guestbook ORDER BY RecordID
DESC ");

while (Rs.next ()) {
Name =new String (rs.getstring ("Name"). GetBytes ("8859_1"));
Email =new String (rs.getstring ("Email"). GetBytes ("8859_1"));
Uel =new String (rs.getstring ("Ual"). GetBytes ("8859_1"));
Body =new String (rs.getstring ("Body"). GetBytes ("8859_1"));
%>
<table border=1>
<tr>
<td>name:</td><td><%= Name%>
</td>
</tr>
<tr>
<td>email:</td><td><a href= "mailto:<%= email%>" ><%= Email%></a></td >
</tr>
<tr>
<td>siteurl;</td><td><a href= "<%= url%>" ><%= url%></a></td>
</tr>
<tr>
<td>body:</td><td><%= Body%></td>
</tr>
</table>
<%
}
Rs.close ();
Sq1bean.sq1close ();

%>



</div>
</body>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.