为了账号安全,请及时绑定邮箱和手机立即绑定

求这里jsp代码有什么错误的,为什么编译错误

求这里jsp代码有什么错误的,为什么编译错误

漫之旅 2016-10-04 16:37:45
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>  <head>    <base href="<%=basePath%>">        <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0">     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> -->  </head>    <body>    This is my JSP page. <br>    <%!    void a()    {    for(int i=1;i<=9;i++)    {    for(int j=1;j==i;j++)    {    System.out.println(i*j);    }    }    }    %>    <%=a() %>  </body></html>
查看完整描述

4 回答

?
withyou王杰

TA贡献7条经验 获得超9个赞

并且返回类型要为数据类型

查看完整回答
反对 回复 2016-10-17
?
withyou王杰

TA贡献7条经验 获得超9个赞

wesd

查看完整回答
反对 回复 2016-10-17
?
拖鞋_

TA贡献453条经验 获得超223个赞

贴出错误
查看完整回答
反对 回复 2016-10-04
  • 4 回答
  • 0 关注
  • 1563 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信