Unable to compile class for JSP - Java / Web ¿ª·¢
<%@page language="java" contentType="text/html;charset=gb2312" import="java.sql.*"%>
<jsp:useBean id="db" class="wang.connectDB"/>
<%
String name=request.getParameter("username");
String psw=request.getParameter("password");
if(name==null||psw==null||name.equals("")||psw.equals(""))
{
session.setAttribute("error","1");
response.sendRedirect("error.jsp");
}
else
{
try
{
String sql="select * from userlogin where user_name='"+name+"' and user_psw='"+psw+"'";
ResultSet rs=db.executeQuery(sql);
if(rs.next())
{
String priority=rs.getString("user_priority");
Session.setAttribute("username",name);
Session.setAttribute("userpsw",psw);
Session.setAttribute("userid",rs.getString("user_id"));
Session.setAttribute("userpriority",priority);
response.sendRedirect("list.jsp");
}
else
{
Session.setAttribute("error&q
Ïà¹ØÎÊ´ð£º
<%@ page contentType = "text/html;charset =gb2312"%>
<%!
public String codeToString(String str)
{
String s =str;
&nbs ......
Ò»¸ö¾²Ì¬µÄhtmlÒ³Ãæ£¬ÃÀ»¯£¬½çÃæ²¼¾ÖÒѾ´¦ÀíºÃÁË £¬ÔÚ±àд³ÌÐòµÄʱºòÐèÒªÔÚת»¯³ÉJSPÒ³Ãæ£¬
ËùÒÔн¨Ò»¸öJSPÒ³Ãæ£¬½²ÔÀ´µÄ´úÂ뿽±´µ½ÀïÃæÈ¥£¬½á¹û²¼¾Ö±äÁË£¿
²»´æÔÚ·¾¶ÎÊÌâ!
ûÈË? ÕæÊ§°Ü!
......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
//Óÿͻ§µÄsessionµÄid½¨Á¢Ò»¸öÁÙʱÎļþ£º
//String tempFileName=(String)session.getId();
String tempFileName = (String)session.getId();
//out.println(& ......
[color=#FF9900]ÎÒÏëÓÃÒ»¸öjspÒ³Ãæ¶¯Ì¬µØÏÔʾһЩÊý¾Ý£¬ÕâЩÊý¾ÝÔÚjspÒ³ÃæÉÏÒÔÇúÏߵķ½Ê½ÏÔʾ£¬ÒòΪÕâЩÊý¾ÝÊÇʵʱµÄ·¢Ë͹ýÀ´µÄ£¬ËùÒÔÎÒÏëÇúÏßÒ²ÊÇʵʱµÄ½øÐб仯(ÀàËÆ¹ÉƱ²é¿´µÄÄÇÖÖÇúÏß)£¬¶ø²»Êǵã»÷¡®Ë¢Ð¡¯£¬¸÷Î ......