第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么我的<jsp:useBean ......>中的class報錯。Unable to compile class for JSP:

package?Math;

public?class?Box?{
	private?int?length;
	private?int?width;
	private?int?height;
	
	public?Box()?{
	}

	public?int?getLength()?{
		return?length;
	}

	public?void?setLength(int?length)?{
		this.length?=?length;
	}

	public?int?getWidth()?{
		return?width;
	}

	public?void?setWidth(int?width)?{
		this.width?=?width;
	}

	public?int?getHeight()?{
		return?height;
	}

	public?void?setHeight(int?height)?{
		this.height?=?height;
	}
}

JSP中:

<%@?page?language="java"?import="java.util.*"?contentType="text/html;?charset=utf-8"%>
<%@?page?import="Math.Box"?%>
<%
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>
??	<jsp:useBean?id="box"?class="Math.Box"?scope="page"></jsp:useBean>
??	<h1>普通方式顯示javabeans</h1>
		

??</body>
</html>



它在useBean的class報錯。Unable to compile class for JSP:


正在回答

2 回答

首先,包的名稱一般以小寫字母開頭

其次。Math是java的關(guān)鍵字不能用于命名

2 回復 有任何疑惑可以回復我~
#1

未之未央丿 提問者

太謝謝你!你一句話就幫我解決了問題
2016-03-26 回復 有任何疑惑可以回復我~

http://img1.sycdn.imooc.com//56f602970001c31102940378.jpg將包名修改下就可以了,但是包名的格式一般公司命名為“com.公司名.項目名.模塊名....”

1 回復 有任何疑惑可以回復我~
#1

未之未央丿 提問者

謝謝,經(jīng)過修改,已經(jīng)可以了~~
2016-03-26 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

為什么我的<jsp:useBean ......>中的class報錯。Unable to compile class for JSP:

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號