对了忘了说了编译时错误是:
org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 16 in the jsp file: /login.jspGenerated servlet error:
[javac] Compiling 1 source fileC:\Tomcat 4.1\work\Standalone\localhost\myapp\login_jsp.java:65: 'else' without 'if'
else{
An error occurred at line: -1 in the jsp file: nullGenerated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\myapp\login_jsp.java:120: '}' expected
^
C:\Tomcat 4.1\work\Standalone\localhost\myapp\login_jsp.java:31: 'try' without 'catch' or 'finally'
try {
^
3 errors好了拜托大家了!
org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 16 in the jsp file: /login.jspGenerated servlet error:
[javac] Compiling 1 source fileC:\Tomcat 4.1\work\Standalone\localhost\myapp\login_jsp.java:65: 'else' without 'if'
else{
An error occurred at line: -1 in the jsp file: nullGenerated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\myapp\login_jsp.java:120: '}' expected
^
C:\Tomcat 4.1\work\Standalone\localhost\myapp\login_jsp.java:31: 'try' without 'catch' or 'finally'
try {
^
3 errors好了拜托大家了!
解决方案 »
- MVC模式-学生管理系统
- 关于WebService
- 自定义数组复值问题。高手指点那里错了!
- STRUTS 如何提交多笔数据?
- struts连接mysql,Connection cnn = dataSource.getConnection()异常
- weblogic要怎样才能在eclipse中单步调试
- [紧急求助!]急求Hibernate高手帮助!!~~~~~
- 用displaytag展现大数据量数据,如何提升翻页效率?
- 这两个函数是什末意思来者有分!
- 100分求jive2.0以上的源代码,收到后马上给分。谢谢
- 怎样用java把数据库中的文字转存为Word文档(.doc)??
- tomcat知识请教,高手们看看吧
if(n==0){//////////////////////////////////
%>
<p>请输入完整的密码和用户名</p>
<p><a href="index.jsp">返回</a></p>
<%
else{/////////////////////////////////////else前面的if的大括号没有闭合
String tempuser = new String();
String tempname = new String();
String url = new String();
import java.sql.Statement;
就对了,它有方法覆盖.
if( rs.nest()){
tempname=rs.getString("username");
catch(SQLException ex){
System.out.println("err:"+ex.getMessage());
}
}
else///////////////////////////////////不知道这个else放在这里干什么,没什么作用就应该去掉或者写成else{}(非要保留的话)
这样的错误自己留心检查吧,你的代码有可能不只三个错误,其他的错误有可能被这三个错误隐藏了。代码书写要规范,注意正确的缩进,这样才能使括号的层次分明。你的第三个错误看看错误提示就知道问题出在哪里了。自己找一下吧。
这句话有错。
^_^
try{
sql="select * from chatroomuser where userid="+use_id+"and "+use_sn="+userpassword+";
ResultSet rs = stmt.executeQuery(sql);
if( rs.nest()){
tempname=rs.getString("username");
catch(SQLException ex){
System.out.println("err:"+ex.getMessage());
}
}
else
%>
.....
{
if(...)
{
.....
}else
{
.....
}
}