jsp新手碰到问题,,高手指教下
代码如下:
<%@ page language= "java " import= "java.util.* " pageEncoding= "UTF-8 "%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+ ":// "+request.getServerName()+ ": "+request.getServerPort()+path+ "/ ";
%>
<%@ page import= "conn.* "%>
<%@ page import= "java.sql.* "%>
<!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>
<IMG src= "IMAGE/a.bmp " border= "0 ">
<TABLE border= "1 " width= "100% ">
<TR>
<%
conntion conn = new conntion();
Statement st = conn.getStatement();
String sql= "select * from MENU order by MenuId ";
ResultSet rs=st.executeQuery(sql);
while(rs.next()){
%>
<TD height= "23 " width= "110 " align= "center "> <a href= " <%=rs.getString( "MenuUrl ")%> " target= " <%=rs.getString( "MenuOpentype ")%> "> <%=rs.getString( "MenuName ")%> </a> </TD>
<%
}
conn.close();
%>
</TR>
</TABLE>
<P> </P> </body>
</html>
报错:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 31 in the jsp file: /index.jsp
Generated servlet error:
conntion cannot be resolved or is not a type
An error occurred at line: 31 in the jsp file: /index.jsp
Generated servlet error:
conntion cannot be resolved or is not a type
[解决办法]
conntion conn = new conntion(); 拼写错误?
connection conn = new connection();
[解决办法]
import java.sql.*
[解决办法]
conntion conn = new conntion(); 拼写错误?
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html