jspÁ¬½ÓmysqlÎÊÌâ
ÎÒµÄtomcat6.0.20 jdbcÇý¶¯ÊÇ5.1µÄ Ç°´ÎÎÒÕÕ×ÅÍøÉϵÄÅäÖþͿÉÒÔÁË Ò²²»ÓÃŪʲô»·¾³±äÁ¿ Õâ´Î¾Í²»ÐÐÁË ÎÒŪÁË»·¾³±äÁ¿Ò²²»ÐÐ tomcatÏÂÃæûÓÐcomm ËùÒÔÎÒ°Ñmysql-connector-java-5.1.8-bin.jar·Åµ½D:\Tomcat 6.0\libÏÂÃæ ͬʱÔÚD:\jdk1.6\libÏÂÃæÒ²·ÅÁËÒ»¸ö ¸Ã·ÅµÄÎÒÒ²·ÅÁË ²»¸Ã·ÅµÄµØ·½Ò²·Å µ«ÊÇ»¹ÊDz»ÐÐ ÏÂÃæÊÇËýµÄÒì³£
HTTP Status 500 -
--------------------------------------------------------------------------------
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: 6 in the generated java file
Only a type can be imported. com.mysql.jdbc.Driver resolves to a package
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspSe
Ïà¹ØÎÊ´ð£º
×ö¸öÕ¾ÄÚËÑË÷£¬ÏÖÔÚÓÃlike ÕâÑùµÄЧÂÊʵÔÚÌ«µÍÁË£¬Ïë¸Ä³ÉÈ«ÎÄËÑË÷·½Ê½¡£
µ«¿´ÁËÍøÉÏ˵µÄÖÐÎÄÖ§³Ö²»ºÃ£¬ÏëÎÊһϸ÷λÐÖµÜÊÇÈçºÎ½â¾öÕâ¸öÎÊÌâµÄ£¿
µ¥¶À½¨Á¢Ö÷Ìâ±íºÍÄÚÈÝ±í ¼ìË÷Ö÷Ìâ
È»ºó¸ù¾ÝÖ÷Ìâ¼ìË÷Ä ......
ÏÂÃæcategoryTreeCont.jsp ´úÂë
----------------------------------------
Java code:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
< ......
ÈçÌ⣬ÎÒÊÇÓÃstruts2×öµÄÍøÒ³£¬ÓÃÁËradio±êÇ©£¬Ã¿¸öÑ¡ÏîÇ°¶¼ÓÐÒ»¸öСԲȦ£¬ÎÒÐèÒª°ÑСԲȦȥµô£¬µ¥»÷×־ͺ㬱»Ñ¡ÖеÄÑ¡Ïî±³¾°±äÉ«¡£
¾ÍÏñ´ó¶àÊýÍøÕ¾µÄ·ÖÀà¼ìË÷£¬±ÈÈçÕâ¸öÍøÕ¾µÄÄÇÑùµÄ¸ù¾Ý¸÷ÖÖÌõ¼þµÄʵʱËÑË÷£º
ht ......
//Óÿͻ§µÄsessionµÄid½¨Á¢Ò»¸öÁÙʱÎļþ£º
//String tempFileName=(String)session.getId();
String tempFileName = (String)session.getId();
//out.println(& ......