一会能访问一会又不能访问。
type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /index.jsp(3,5) Invalid standard action
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1174)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1466)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
这是class代码 存放在WEB-INF\classes\bean\
package yctgmysql;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;public class yctgmysql{

/* private Connection conn = null;
// java.sql.Connection conn; 
//java.lang.String strConn; 
Class.forName("com.mysql.jdbc.Driver").newInstance(); 
conn= java.sql.DriverManager.getConnection("jdbc:mysql://localhost:3306/net_must","root","founder"); 
if(conn==null)

System.out.println("get Conn Error"); 

Statement stmt=conn.createStatement(); 
ResultSet RS_result=null;
*/
private Connection conn = null;
private ResultSet rs = null;
private String server = "localhost:3306"; // Can't use localhost , you must use IP or CNAME .:3306
private String db = "net_must"; //change to your db name
private String user = "root"; //change to your username
private String pass = "founder"; //change to your password
private String drivername="com.mysql.jdbc.Driver"; //mysql driver
private String URL="jdbc:mysql://"+server+"/"+db+"?useUnicode=true&characterEncoding=GBK&user="+user+"&password="+pass;public Connection getConn(){ //get database connection
try{
Class.forName(drivername).newInstance(); //载入驱动器
conn = DriverManager.getConnection(URL); //连接到数据库
}
catch(Exception e){
e.printStackTrace();
}
return conn ;
}public ResultSet executeSQL(String str) {
try{
Statement stmt = conn.createStatement(); //语句接口
//rs = stmt.executeQuery(str); //获得结果集
}
catch(Exception e){
e.printStackTrace();
}
return rs;

}
这是jsp代码
<%@ page contentType="text/html;charset=gb2312" %> 
<!--%@ include file="conns/yctg.jsp"%-->
<jsp:usebean id="yctgmysql" class="bean.yctgmysql"/> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>人民公安报社远程投稿系统</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="css/netmp.css" rel="stylesheet" type="text/css" />
<link href="css/title_002.css" rel="stylesheet" type="text/css" />
</head>
<script language="JavaScript" type="text/javascript">
<!--function fEvent(sType,oInput){
switch (sType){
case "focus" :
oInput.isfocus = true;
oInput.style.backgroundColor='#FFFFD8';
case "mouseover" :
oInput.style.borderColor = '#99E300';break;
case "blur" :
oInput.isfocus = false;
oInput.style.backgroundColor="";case "mouseout" :
if(!oInput.isfocus){
oInput.style.borderColor='#A1BCA3';
}
break;
}
}//-->
</script>
<body>
<!--top-->
<div id="top_box_001">
<div id="logo_01"></div>
<div id="top_box_002" class="batitle_01 z12"><a href="#" class="batitle_01 z12">设为首页</a> | <a href="#" class="batitle_01 z12">收藏</a></div>
</div>
<!--top end-->
<div align="center">
<div id="box_001">
<div id="box_002" class="hetitle_01 z12">
<% 
RS_result=stmt.executeQuery("select * from net_notice where not_wtrue='1' ORDER BY not_id desc limit 0,9"); 
String not_title; 
int mullx=1;
while(RS_result.next())
{
out.print(mullx);
out.print(".");
out.print("<a href='index.jsp?id="+RS_result.getString("not_id")+"' class='hetitle_01 z12'>");
out.print(RS_result.getString("not_title"));
out.print("</a>");
out.print("<br>");
mullx=mullx+1;
}
RS_result.close(); 
stmt.close(); 
conn.close(); 
%> </div>
  
  
<div id="box_003">
<div align="left"><span class="hetitle_02 z16 cu" id="box_left">登录系统</span><div class="error_div z12" id="error_div"></div></div>
<div id="ge"></div>
<form action="index.htm" method="post" name="form" id="form" onSubmit="return fCheck()">
<p class="MR_pinp">
<span  class="hetitle_02 z14 cu">用户名</span>
<input name="username" id="username" type="text" tabindex="1" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOver="fEvent('mouseover',this)" onMouseOut="fEvent('mouseout',this)" size="16" maxlength="20" /></p>
<div id="ge"></div><p class="MR_pinp">
<span class="hetitle_02 z14 cu">密 码</span>
  <input onMouseOver="fEvent('mouseover',this)" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOut="fEvent('mouseout',this)" name="pass" id="pass" type="password" size="16" tabindex="2"  maxlength="20" /></p>
  <div id="ge"></div>
  <div id="submit_01"><input type="submit" value="登 录" class="inp_L1" onMouseOver="this.className='inp_L2'" onMouseOut="this.className='inp_L1'" id="input_btn1"  name="user" tabindex="4" /></div>
</form>
</div>
</div><div id="foot_box_01"></div>  
</div>
</body>
</html>

解决方案 »

  1.   

    去掉jsp代码中的<jsp:usebean id="yctgmysql" class="bean.yctgmysql"/> ,因为好像你的JSP没有使用他啊:还有你的类定义包:package yctgmysql; ,但是你说他在WEB-INF\classes\bean\ 下面,包的路径都不对,怎么弄的啊?
      

  2.   

    WEB-INF\classes\下面根本不是放.java文件的地方啊,.java都是在src下面啊
      

  3.   

    看错误org.apache.jasper.JasperException: /index.jsp(3,5) 好像是index.jsp文件中的问题,检查一下index.jsp文件是否有什么问题。
      

  4.   

    这是class代码 存放在WEB-INF\classes\bean\   这里放你的.java 文件 
      

  5.   

    <form action="index.htm" method="post" name="form" id="form" onSubmit="return fCheck()"> 
    红色部分你确定要提交到“index.htm”吗???还是写错了??
      

  6.   

    去掉jsp代码中的 <jsp:usebean id="yctgmysql" class="bean.yctgmysql"/> ,因为好像你的JSP没有使用他啊: 
    还有你的类定义包:package yctgmysql; ,但是你说他在WEB-INF\classes\bean\ 下面,包的路径都不对,怎么弄的啊?