写了段代码 运行提示错误 刚学jsp 还不是很清楚
麻烦大虾们帮忙解决下An error occurred at line: 14 in the jsp file: /check.jsp
Syntax error on token(s), misplaced construct(s)
11: String intro=request.getParameter("intro");
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
An error occurred at line: 14 in the jsp file: /check.jsp
Syntax error on token(s), misplaced construct(s)
11: String intro=request.getParameter("intro");
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
An error occurred at line: 15 in the jsp file: /check.jsp
Syntax error on token "Invalid Character", invalid AssignmentOperator
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}
An error occurred at line: 16 in the jsp file: /check.jsp
Syntax error, insert ")" to complete MethodInvocation
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}
19: else if(password1.equals(" ")){
An error occurred at line: 16 in the jsp file: /check.jsp
Syntax error, insert ";" to complete BlockStatements
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}
19: else if(password1.equals(" ")){
麻烦大虾们帮忙解决下An error occurred at line: 14 in the jsp file: /check.jsp
Syntax error on token(s), misplaced construct(s)
11: String intro=request.getParameter("intro");
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
An error occurred at line: 14 in the jsp file: /check.jsp
Syntax error on token(s), misplaced construct(s)
11: String intro=request.getParameter("intro");
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
An error occurred at line: 15 in the jsp file: /check.jsp
Syntax error on token "Invalid Character", invalid AssignmentOperator
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}
An error occurred at line: 16 in the jsp file: /check.jsp
Syntax error, insert ")" to complete MethodInvocation
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}
19: else if(password1.equals(" ")){
An error occurred at line: 16 in the jsp file: /check.jsp
Syntax error, insert ";" to complete BlockStatements
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href="check.jsp"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}
19: else if(password1.equals(" ")){
这个有问题:
out.println(" <a href='check.jsp'>"+返回+" </a>");
The left-hand side of an assignment must be a variable
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href='check.jsp'>"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}
An error occurred at line: 15 in the jsp file: /check.jsp
Syntax error on token "Invalid Character", invalid AssignmentOperator
12: if(username==null){
13: username=" "; }
14: else if(username.equals(" ")){
15: out.println("用户名不能为空 请返回重新输入!");
16: out.println("<a href='check.jsp'>"+返回+"</a>"); }
17: else if(password1==null){
18: password1=" ";}An error occurred at line: 21 in the jsp file: /check.jsp
返回 cannot be resolved
18: password1=" ";}
19: else if(password1.equals(" ")){
20: out.println("密码不能为空 请返回重新输入!");
21: out.println("<a href='register.html'>"+返回+"</a>");
22: }
23: else if(password2==null){
24: password2=" ";}这些又是什么问题呢?
谢谢了
看了楼主这一堆错误.有的是变量不对 有的是标点符号不对..
劝楼主.
1.把基础打好了再写..
2.这个是javascript板块,不是Java版
2.像你的有些错误是太不细心,可以用MyEclipse之类的IDE去编写
16: out.println(" <a href='check.jsp'>"+返回+" </a>"); }
改成16: out.println(" <a href=\"check.jsp\">"+返回+" <\/a>"); }
out.println(" <a href=\"check.jsp\">返回</a>");
还是不行
初学
麻烦兄弟悉心教导