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

<%@ 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>


漫之旅
浏览 1600回答 4
4回答

withyou王杰

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

withyou王杰

wesd

拖鞋_

贴出错误
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java