Çójsp¸ßÊÖ°ï°ïæ
ÎÒ¸Õѧjsp£¬ÕÒÁËÒ»¸öÍøÕ¾ÏëÅäÖúû·¾³£¬È»ºó¸Ä¸Ä£¬¿ÉÊÇÓöµ½Ò»¸öÎÊÌ⣬²»¶®Ôõô½â¾ö¡£Çë´ó¼Ò°ï°ïÎÒ£¡
ÎÊÌâÈçÏ£ºÎÒ×°µÄ»·¾³ÊÇ£ºeclipse+MyEclipse5.5+sql2000+tomcat5.5ÔËÐкó³öÏÖ£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:406)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:348)
javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServ
Ïà¹ØÎĵµ£º
Õâ¸öÎÊÌâµÄÈ·ºÜ·³ÈË£¬Æäʵ¶¼ÊÇMyEclipseµÄ"×Ô×÷´ÏÃ÷"ºÍ·ÃÎÊÍøÂçÉϵÄAPI DocµÄ½á¹û£¨ËüĬÈÏÓÃVisual DesignerÀ´´ò¿ªµÄ£©£¬½øÐÐÏÂÁÐÉèÖü´¿ÉÓÐЧ»º½âÖ®¡£
1. ҪôÓÒ¼üµ¥»÷Îļþ£¬Ñ¡Ôñ Open With -¡· MyEclipse JSP Editor ´ò¿ª£¬ÕâÑù²»»á²ÉÓÿÉÊÓ»¯µÄ´ò¿ª£¬ºÄ×ÊÔ´ÉÙ£¬×Ô¶¯ÌáʾҲ·Ç³£¿ì¡£
2. Ҫô²ÉȡһÀÍÓÀÒݵķ½·¨ Window ......
JSP/Servlet£ºServlet/JSP»á»°¸ú×Ù»úÖÆ
ÔÚWeb·þÎñÆ÷¶Ë±à³ÌÖУ¬»á»°×´Ì¬¹ÜÀíÊÇÒ»¸ö¾³£±ØÐ뿼ÂǵÄÖØÒªÎÊÌâ¡£±¾ÎÄ·ÖÎöJSP/ServletµÄ»á»°¹ÜÀí»úÖÆ¼°ÆäËùÃæÁÙµÄÎÊÌ⣬ȻºóÌá³öÁËÒ»ÖָĽøµÄ»á»°¹ÜÀí·½·¨¡£
Ò»¡¢ServletµÄ»á»°¹ÜÀí»úÖÆ
ÔÚWeb·þÎñÆ÷¶Ë±à³ÌÖУ¬»á»°×´Ì¬¹ÜÀíÊÇÒ»¸ö¾³£±ØÐ뿼ÂǵÄÖØÒªÎÊÌâ¡£±¾ÎÄ·ÖÎöJSP/ServletµÄ ......
1 ËùÓÐµÄ .java|.jsp|.html|.xml Ô´Îļþ¾ùʹÓÃutf-8±àÂë¸ñʽ±£´æµ½ÏµÍ³´ÅÅÌ¡£
È磺ÔÚEclipseÖбà¼Îļþ£¬Ñ¡ÖÐÎļþ´ò¿ªÓÒ¼ü²Ëµ¥Ñ¡ÔñÊôÐÔ£¬½«Îı¾Îļþ±àÂëÉèÖÃΪÆäËû²¢Ñ¡ÔñUTF-8£»Ò²¿ÉÒÔÔÚ
Eclipse——Ê×Ñ¡Ïî——³£¹æ——ÄÚÈÝÀàÐÍÖÐÉèÖø÷ÖÖÎļþµÄȱʡ±àÂ룬ÕâÑùÒÔºóËùÓеÄÎı¾Îļþ¶¼Ê¹ÓÃÍ³Ò ......
ת×Ô£ºhttp://java.chinaitlab.com/Tomcat/33170.html
¾³£¿´µ½jspµÄ³õѧÕßÎÊtomcatÏÂÈçºÎÅäÖÃjsp¡¢servletºÍbeanµÄÎÊÌ⣬ÓÚÊÇ×ܽáÁËÒ»ÏÂÈçºÎtomcatÏÂÅäÖÃjsp¡¢servletºÍben£¬Ï£Íû¶ÔÄÇЩ³õѧÕßÓÐËù°ïÖú¡£
¡¡¡¡
¡¡¡¡Ò»¡¢¿ª·¢»·¾³ÅäÖÃ
¡¡¡¡
¡¡¡¡µÚÒ»²½£ºÏÂÔØj2sdkºÍtomcat£ºµ½sun¹Ù·½Õ¾£¨http://java.sun.com/j2se/1.5.0 ......