Servlet.service() for servlet jsp threw exception

1.[2018-04-16 16:38:01] [SEVERE] [web-container] [ApplicationDispatcher[/tzxmspweb] PWC1231: Servlet.service() for servlet jsp threw exception
问题原因:在页面的jsp中有一个<!-- 简单问题 -->注释有问题,中文注释在jsp编译的时候编译错误,所以在页面显示不出来报错
解决办法:在jsp页面上写注释 <!-- -->尽量用英文

阅读更多

[[jsp]] Servlet.service() for servlet jsp threw exception

07-08

JBOSSS服务器启动后无法访问JSP页面,请问有人遇到过吗rnrnrn10:59:54,984 ERROR [[jsp]] Servlet.service() for servlet jsp threw exceptionrnjavax.servlet.ServletException: OncePerRequestFilter just supports HTTP requestsrn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:62)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)rn at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)rn at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)rn at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn

严重: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateEx

11-18

2009-11-18 14:44:34 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.IllegalStateException: No Java compiler availablern at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationrnContext.java:225)rn at org.apache.jasper.JspCompilationContext.compile(JspCompilationContextrn.java:560)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapperrn.java:302)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3rn29)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplrnicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFrnilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVrnalve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVrnalve.java:174)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticarntorBase.java:433)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jrnava:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jrnava:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValrnve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.javrna:151)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.javarn:874)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.prnrocessConnection(Http11BaseProtocol.java:665)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpornint.java:528)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFolrnlowerWorkerThread.java:81)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPrnool.java:689)rn at java.lang.Thread.run(Thread.java:620)

严重: Servlet.service() for servlet jsp threw exception

06-17

java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;rn at org.apache.jsp.a_jsp._jspInit(a_jsp.java:22)rn at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)rn at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:416)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn请问这是哪里错误了?

请教:: Servlet.service() for servlet jsp threw exception java.lang.NullPointerExce

08-15

刚我启动浏览器的时候,提示错误:rn严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NullPointerExceptionrn at org.apache.jsp.index_jsp._jspService(index_jsp.java:105)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Unknown Source)rn当我把这段代码删了,页面可以正常显示,但是我不知道这段代码哪里出错了,请各位指教rn[code=java] rn <%rn String info;rn String dt;rn String user;rnrn List> messageList = JDBCOption.query(SQLConstant.getmessage);rn for (int i = 0; i < messageList.size(); i++) rn HashMap hm = messageList.get(i);rn user = hm.get("author").toString();rn info = hm.get("info").toString();rn dt = hm.get("published").toString();rn %>rn rn <%=user %>rn <%=info %>rn <%=dt %>rn rnrn <%rn rn %>rn rn [/code]rn源代码如下rn[code=text]<%@ page language="java" contentType="text/html; charset=UTF-8"rn pageEncoding="UTF-8"%>rn<%@ page import="java.util.List"%>rn<%@ page import="java.util.HashMap"%>rn<%@page import="com.dedo.BBS.Jdbc.SQLConstant"%>rn<%@page import="com.dedo.BBS.Jdbc.JDBCOption"%>rnrnrnrnrnrnrn rn Untitled Documentrn rn rnrnrnrn rn rn rn rn 所有 /正向 / 反向/rn rn 公告区rn //这里有错******rn <%rn String info;rn String dt;rn String user;rnrn List> messageList = JDBCOption.query(SQLConstant.getmessage);rn for (int i = 0; i < messageList.size(); i++) rn HashMap hm = messageList.get(i);rn user = hm.get("author").toString();rn info = hm.get("info").toString();rn dt = hm.get("published").toString();rn %>rn rn <%=user %>rn <%=info %>rn <%=dt %>rn rnrn <%rn rn %>rn rn rn rn rn rn rn rn 输入发布内容rn rn rn rn rn rn 小白rn rn rn rn rn rn rnrnrn[/code]rn[code=java]package com.dedo.BBS.Servlet;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport java.sql.Timestamp;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport com.dedo.BBS.Jdbc.JDBCOption;rnimport com.dedo.BBS.Jdbc.SQLConstant;rnimport com.dedo.BBS.Tool.Common;rnrnrnrn/**rn * Servlet implementation class SubMessagern */rnpublic class SubMessage extends HttpServlet rn private static final long serialVersionUID = 1L;rn rn /**rn * @see HttpServlet#HttpServlet()rn */rn public SubMessage() rn super();rn // TODO Auto-generated constructor stubrn rnrn /**rn * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)rn */rn protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn processRequest(request, response);rn rnrn /**rn * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)rn */rn protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn processRequest(request, response);rn rn rn protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOExceptionrn rn String message = request.getParameter("message");rn java.util.Date d = new java.util.Date();rn JDBCOption.update(SQLConstant.addmessage, 1,message,new Timestamp(d.getTime()));rn response.sendRedirect("index.jsp");rn rnrnrn[/code]rn[code=java]package com.dedo.BBS.Jdbc;rnrnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.PreparedStatement;rnimport java.sql.ResultSet;rnimport java.sql.ResultSetMetaData;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnimport java.util.ArrayList;rnimport java.util.HashMap;rnimport java.util.List;rnimport java.util.Map;rnrnimport com.dedo.BBS.Tool.Common;rnrnpublic class JDBCOption rn private static DBConfig dbconfig = null;rnrn static //连接数据库rn dbconfig = new DBConfig();rn try rn Class.forName(dbconfig.getDriver());rn catch (ClassNotFoundException e) rn e.printStackTrace();rn rn rn /*rn * 查询操作rn */rn public static List query(String sql, Object... paramters) rn List returnValue = new ArrayList();rn ResultSet rs = null;rn Connection conn = null;rn PreparedStatement ps = null;rnrn try rn conn = DriverManager.getConnection(dbconfig.getUrl(), dbconfig.getUsername(), dbconfig.getPassword());rn ps = conn.prepareStatement(sql);rn for (int i = 0; i < paramters.length; i++) rn ps.setObject(i + 1, paramters[i]);rn rn rn rs = ps.executeQuery();rn rn while (rs.next()) rn ResultSetMetaData md = rs.getMetaData();rn Map map = new HashMap();rn rn for (int i = 0; i < md.getColumnCount(); i++) rn map.put(md.getColumnLabel(i + 1), rs.getObject(i + 1));rn rn returnValue.add(map);rn rnrn catch (SQLException e) rn e.printStackTrace();rn finallyrn Common.free(conn, ps, rs);rn rnrn return returnValue;rn rn rn rn rnrn[/code]

Servlet.service() for servlet ShowNews threw exception

09-06

2011-9-6 20:26:52 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet ShowNews threw exceptionrnjava.lang.NullPointerExceptionrn at org.cs.trade.dao.impl.UserDaoImpl.findNews(UserDaoImpl.java:29)rn at org.cs.trade.service.impl.UserService.findNews(UserService.java:17)rn at org.cs.trade.control.ShowNews.service(ShowNews.java:27)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Unknown Source)rn

Servlet.service() for servlet jsp threw exception java.lang.NullPointerException

06-26

2010-06-25 23:07:00,281 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/oa].[jsp]] Servlet.service() for servlet jsp threw exceptionrnjava.lang.NullPointerExceptionrn at org.apache.jsp.leftbottomFrame_jsp._jspService(org.apache.jsp.leftbottomFrame_jsp:91)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)rn at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)rn at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)rn at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)rn at java.lang.Thread.run(Thread.java:534)rn

严重: Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError

01-08

2016-1-8 15:08:51 org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.OutOfMemoryError: PermGen spacern at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:621)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)rn at java.net.URLClassLoader.access$000(URLClassLoader.java:56)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:195)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:188)rn at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)rn at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)rn at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:621)rn at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)rn at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)rn at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)rn at com.pub.interceptor.PermissionInterceptor.intercept(PermissionInterceptor.java:62)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn2016-1-8 15:08:57 org.apache.coyote.http11.Http11Processor processrn严重: Error processing requestrnjava.lang.OutOfMemoryError: PermGen spacernException in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" java.lang.OutOfMemoryError: PermGen spacernException in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" java.lang.OutOfMemoryError: PermGen spacernWARN 2016-01-08 15:09:12,895 - com.mchange.v2.async.ThreadPoolAsynchronousRunner -386434 [Timer-0] - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@5247b502 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!rn

Servlet.service() for servlet default threw exception

03-02

严重: Servlet.service() for servlet default threw exceptionrnjava.lang.NullPointerExceptionrn at service.LoginAction.execute(LoginAction.java:43)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) rn问题补充:public class LoginAction extends ActionSupport rn private String username; rn private String password; rn private PersonDAO personManager; rn /*其中的seter和geter方法省略了*/rn @Override rn public String execute() throws Exception rn String flag = ""; rn Person per = new Person(); rn per.setUname(this.username); rn per.setUpwd(this.password); rn personManager.save(per);rn return flag; rn rn rnsave函数的的代码。。。。。rnpublic class PersonDAO extends HibernateDaoSupportrnpublic void save(Person transientInstance) rn log.debug("saving Person instance");rn try rn getHibernateTemplate().save(transientInstance);rn log.debug("save successful");rn catch (RuntimeException re) rn log.error("save failed", re);rn throw re;rn rn还有什么需要的请各位大侠提出来谢谢诶rnrn

求助:Servlet.service() for servlet jsp threw exception

05-15

严重: Servlet.service() for servlet jsp threw exceptionrnjavax.servlet.ServletException: File "/navigate.jsp" not foundrn at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:329)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)rn at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:565)rn at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:493)rn at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:111)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)rn at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1303)rn at java.lang.Thread.run(Thread.java:619)rn2012-5-14 23:49:27 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet jsp threw exceptionrnjavax.servlet.ServletException: File "/navigate.jsp" not foundrn at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:329)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)rn at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:565)rn at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:493)rn at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:111)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)rn at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1303)rn at java.lang.Thread.run(Thread.java:619)rnrn[b](声明:我没有这个文件navigate.jsp,且只有一个工程,struts2+apache-tomcat-5.5.35+Sun JDK 1.6.0_13)rn试过几个工程都不行,以前成功的也出现这样了。求解!!~~~rn[/b]rn

求解:Servlet.service() for servlet jsp threw exception

08-19

这个代码写了很久了,一直都没有问题,今天早上跟新了SVN之后打开页面就是抱着个错误,找不到原因,请各位高手帮忙看看rn错误代码rn[code=Java]rn2011-08-19 09:23:56 com.opensymphony.xwork2.util.logging.commons.CommonsLogger.error(CommonsLogger.java:34) [ERROR] Could not load the FreeMarker template named 'select':rn2011-8-19 9:23:56 org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrnfreemarker.core.ParseException: Encountered "?" at line 26, column 29.rnWas expecting:rn ...rn rn at freemarker.core.FMParser.generateParseException(FMParser.java:4477)rn at freemarker.core.FMParser.jj_consume_token(FMParser.java:4348)rn at freemarker.core.FMParser.BuiltIn(FMParser.java:756)rn at freemarker.core.FMParser.AddSubExpression(FMParser.java:742)rn at freemarker.core.FMParser.PrimaryExpression(FMParser.java:273)rn at freemarker.core.FMParser.UnaryExpression(FMParser.java:319)rn at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:435)rn at freemarker.core.FMParser.AdditiveExpression(FMParser.java:385)rn at freemarker.core.FMParser.RangeExpression(FMParser.java:569)rn at freemarker.core.FMParser.RelationalExpression(FMParser.java:516)rn at freemarker.core.FMParser.EqualityExpression(FMParser.java:476)rn at freemarker.core.FMParser.AndExpression(FMParser.java:601)rn at freemarker.core.FMParser.OrExpression(FMParser.java:624)rn at freemarker.core.FMParser.Expression(FMParser.java:221)rn at freemarker.core.FMParser.If(FMParser.java:1138)rn at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2290)rn at freemarker.core.FMParser.Content(FMParser.java:2534)rn at freemarker.core.FMParser.OptionalBlock(FMParser.java:2702)rn at freemarker.core.FMParser.Root(FMParser.java:2874)rn at freemarker.template.Template.(Template.java:149)rn at freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:376)rn at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:347)rn at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:229)rn at freemarker.template.Configuration.getTemplate(Configuration.java:486)rn at freemarker.template.Configuration.getTemplate(Configuration.java:451)rn at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:96)rn at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)rn at org.apache.struts2.components.UIBean.end(UIBean.java:513)rn at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)rn at org.apache.jsp.jsp.contract.contractUpdate_jsp._jspx_meth_s_005fselect_005f0(contractUpdate_jsp.java:391)rn at org.apache.jsp.jsp.contract.contractUpdate_jsp._jspService(contractUpdate_jsp.java:185)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)rn at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159)rn at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.interceptrn[/code]rnrn

Servlet.service() for servlet jsp threw exception:NosuchMethodError?

12-26

我做的项目,昨天运行的还好好的,rn今天,打开竟然出现这个错误。过滤器没有错误,web.xml配置也正确rn却指向过滤器的错误,rnServlet.service() for servlet jsp threw exceptionrnjava.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;rn at org.apache.jsp.login_jsp._jspInit(login_jsp.java:22)rn at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)rn at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.handson.service.filter.DoFilter.doFilter(DoFilter.java:27)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)rn at java.lang.Thread.run(Unknown Source)rn请高手指点一下,十分感谢rn

Servlet.service() for servlet jsp threw exception异常

10-27

写了一个简单的公告管理系统,在登录时出现了一下异常。rnrn2008-10-27 15:42:48 org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrnjavax.servlet.jsp.JspTagException: IOException:java.sql.SQLException: Illegal operation on empty result set.rn at nm.tag.DisplayTag.doEndTag(DisplayTag.java:84)rn at org.apache.jsp.user.noticelist_jsp._jspx_meth_mytag_005fpagingDisplay_005f0(noticelist_jsp.java:214)rn at org.apache.jsp.user.noticelist_jsp._jspService(noticelist_jsp.java:119)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)rn at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn at java.lang.Thread.run(Thread.java:619)rn其中DisplayTag.java源码如下:rnpackage nm.tag;rnrnimport java.util.Vector;rnrnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.jsp.JspException;rnimport javax.servlet.jsp.JspTagException;rnimport javax.servlet.jsp.JspWriter;rnimport javax.servlet.jsp.tagext.TagSupport;rnrnimport nm.Notice;rnrnpublic final class DisplayTag extends TagSupport rn /**rn * rn */rn private static final long serialVersionUID = 1L;rnrn public int doEndTag() throws JspException rn JspWriter out = pageContext.getOut();rn HttpServletRequest request = (HttpServletRequest) pageContextrn .getRequest();rn String strPage = request.getParameter("page");rn int page;rn if (strPage == null || strPage.equals(""))rn page = 1;rn else rn page = Integer.parseInt(strPage);rn rnrn try rn int pageSize = 2;rn Vector noticeVector = Notice.search(pageSize, page);rn out.println(" ");rn out.println(" ");rn out.println("首页 ");rn out.println("上一页 ");rn out.println("1 ");rn out.println("2 ");rn out.println("3 ");rn out.println("下一页 ");rn out.println("尾页");rn out.println("");rnrn out.println(" ");rn out.println(" 标题");rn out.println(" 内容");rn out.println(" 修改");rn out.println(" 删除");rn out.println("");rnrn String title = null;rn String content = null;rnrn Notice bean = null;rn for (int i = 0; i < noticeVector.size(); i++) rn bean = (Notice) noticeVector.elementAt(i);rnrn title = bean.getTitle();rn title = new String(title.getBytes("ISO-8859-1"), "GB2312");rnrn content = bean.getContent();rn content = new String(content.getBytes("ISO-8859-1"), "GB2312");rnrn out.println(" ");rn out.println(" " + title + "");rn out.println(" " + content + "");rn out.println(" "rn + "Edit " + "");rn outrn .println(" "rn + "Delete " + "");rn out.println("");rn rnrn out.println("");rn out.clear();rn out=pageContext.pushBody();rn catch (Exception ex) rn throw new JspTagException("IOException:" + ex.toString());rn rnrn return super.doEndTag();rn rnrnnoticelist.jsp如下:rn<%@ page contentType="text/html;charset=gb2312" language="java"%>rn<%@ include file="/common/taglibs.jsp"%>rnrnrn <bean:message key="pagingDisplay.title" />rnrn rnrn <%@ include file="/common/header.jsp"%>rn rn 撰写公告 rn 注销登录rn rn rn <%@ include file="/common/footer.jsp"%>rnrnrn 不知道是哪里出了问题才会出现的异常,烦请各位大虾帮忙!!!

for servlet jsp threw exception

04-15

那位知道这是个什么问题?我遇到好几天了一直解决不了,我找过了没有发现空指针的问题!rnERROR[http-8080-Processor25](StandardWrapperValve.java:253)-Servlet.service() for servlet jsp threw exceptionrnjava.lang.NullPointerExceptionrn at com.westsec.ch.realty.struts.action.ShopAction.getAll(ShopAction.java:101)rn at com.westsec.ch.realty.struts.action.ShopAction.getSelectOption(ShopAction.java:107)rn at org.apache.jsp.jsp.employee.regis_jsp._jspService(regis_jsp.java:442)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Thread.java:619)rn

严重: Servlet.service() for servlet action threw exception

06-05

严重: Servlet.service() for servlet action threw exceptionrnjava.lang.IllegalStateExceptionrn at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)rn at org.apache.struts.chain.commands.servlet.PerformForward.handleAsRedirect(PerformForward.java:125)rn at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:94)rn at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)rn at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.help.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:39)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rnrn这个是用SSH做的 要实现的功能也可以,但是就是要抱这个错....rn请高手指教下..

Servlet.service() for servlet [] in context with path [] threw exception

04-09

Servlet.service() for servlet [RegisterServlet] in context with path [/FoodServer] threw exceptionrnjava.lang.NullPointerExceptionrn[img=http://img.bbs.csdn.net/upload/201504/09/1428574056_811220.png][/img]rnandriod为客户端,java项目为服务端rnrn服务端的RegisterServlet.java代码rnpackage com.dy.servlet;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport java.net.URLDecoder;rnimport java.sql.Connection;rnimport java.sql.PreparedStatement;rnimport java.sql.ResultSet;rnimport java.sql.Statement;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport com.dy.util.DBUtil;rnrn/**rn * Servlet implementation class RegisterServletrn */rnpublic class RegisterServlet extends HttpServlet rnprivate static final long serialVersionUID = 1L;rn rn /**rn * @see HttpServlet#HttpServlet()rn */rn public RegisterServlet() rn super();rn // TODO Auto-generated constructor stubrn rnrn /**rn* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)rn*/rnprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn// TODO Auto-generated method stubrnthis.doPost(request, response);rnrnrn/**rn* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)rn*/rnprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn// TODO Auto-generated method stubrnString userName = URLDecoder.decode(request.getParameter("userName"),"UTF-8"); 第45行rnString password = URLDecoder.decode(request.getParameter("password"),"UTF-8");rnString phone = request.getParameter("phone");rnString address = request.getParameter("address");rnString rname = URLDecoder.decode(request.getParameter("rname"),"UTF-8");rnString sql2 = "select count(*) from users where username='"+userName+"'";rnString sql = "insert into users(username,password,phone,address,rname) values('"+userName+"','"+password+"','"+address+"','"+phone+"','"+rname+"')";rnDBUtil util = new DBUtil();rnConnection conn = util.openConnection();rnPrintWriter out = response.getWriter();rnString result = "0";rntry rnPreparedStatement pstmt = conn.prepareStatement(sql2);rnResultSet rs = pstmt.executeQuery();rnint count=0;rnwhile(rs.next()) rncount=rs.getInt(1);rnrnif(count!=0)rnresult = "2";rnelsernStatement stmt = conn.createStatement();rnstmt.executeUpdate(sql);rnresult = "1";rnrn catch (Exception e) rn// TODO Auto-generated catch blockrne.printStackTrace();rnresult = "2";rnfinally rnutil.closeConn(conn);rnrnout.print(result);rnrnrn运行出错严重: Servlet.service() for servlet [RegisterServlet] in context with path [/FoodServer] threw exceptionrnjava.lang.NullPointerExceptionrn at java.net.URLDecoder.decode(Unknown Source)rn at com.dy.servlet.RegisterServlet.doPost(RegisterServlet.java:45)rn第45行为String userName = URLDecoder.decode(request.getParameter("userName"),"UTF-8"); rn[img=http://img.bbs.csdn.net/upload/201504/09/1428574227_117371.png][/img]rn某些.java能正常运行,mysql数据库连接正常。rn​

严重: Servlet.service() for servlet default threw exception

07-04

java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/ObjectUtilsrn at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:150)rn at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584)rn at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)rn at java.lang.Thread.run(Thread.java:619)rnrn结果查出来了,就是在页面上显示的时候报错了,请高手帮忙解决下,感激不尽!ssh框架整合的问题。

servlet报错严重: Servlet.service() for servlet jsp threw exception java.lang.ClassCa

10-28

严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.ClassCastException: com.yn.enrity.ShangPin cannot be cast to java.util.Listrn at org.apache.jsp.image02.ddinfo_jsp._jspService(ddinfo_jsp.java:349)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)rn at com.yn.cotroller.OrderServlet.xqOrder(OrderServlet.java:64)rn at com.yn.cotroller.OrderServlet.doGet(OrderServlet.java:34)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn代码如下:rnpackage com.yn.cotroller;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport java.util.ArrayList;rnimport java.util.List;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport com.yn.dao.OrderDao;rnimport com.yn.dao.ShangpinDao;rnimport com.yn.enrity.Order;rnimport com.yn.enrity.RegistUser;rnimport com.yn.enrity.ShangPin;rnrnpublic class OrderServlet extends HttpServlet rn OrderDao dao = new OrderDao();rnrn public void doGet(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rnrn request.setCharacterEncoding("utf-8");rn // 获取flag标志rn String flag = request.getParameter("flag");rn // 根据flag的值判断执行什么方法rn if("all".equals(flag))rn showOrderAll(request,response);rn else if ("add".equals(flag)) rn this.addOrder(request, response);rn else if ("xq".equals(flag)) rn this.xqOrder(request, response);rn else if ("select".equals(flag)) rn this.selectOrder(request, response);rn else if ("update".equals(flag)) rn this.updateOrder(request, response);rn rn rn /**rn * 详情rn * @param requestrn * @param responsern * @throws ServletExceptionrn * @throws IOExceptionrn */rn private void xqOrder(HttpServletRequest request,rn HttpServletResponse response) throws ServletException, IOExceptionrn int orderID = Integer.parseInt(request.getParameter("id"));rn System.out.println(orderID);rn List list = new ArrayList();rn list = dao.queryOrderById(orderID);rn request.setAttribute("list", list);rn rn int spID = Integer.parseInt(request.getParameter("id"));rn System.out.println(spID);rn ShangPin list1 = new ShangPin();rn ShangpinDao dao = new ShangpinDao();rn list1 = dao.querySpByID(spID);rn request.setAttribute("list1", list1);rn rn // 跳转rn request.getRequestDispatcher("image02/ddinfo.jsp").forward(request,rn response);rn rn rn /**rn * 修改注册用户信息rn * @param requestrn * @param responsern * @throws ServletExceptionrn * @throws IOExceptionrn */rn private void updateOrder(HttpServletRequest request,rn HttpServletResponse response)throws ServletException, IOException rn //获取信息rn int orderID = Integer.parseInt(request.getParameter("orderID"));rn String ordername = request.getParameter("ordername");rn String address = request.getParameter("address");rn String zipcode = request.getParameter("zipcode");rn String phone = request.getParameter("phone");rn rn //修改信息rn dao.updateOrder(new Order(orderID,ordername,address,zipcode,phone));rn //回到列表rn this.showOrderAll(request, response);rn rn rn /**rn * 添加注册用户rn * @param requestrn * @param responsern * @throws ServletExceptionrn * @throws IOExceptionrn */rn private void addOrder(HttpServletRequest request,rn HttpServletResponse response)throws ServletException, IOException rn //获取信息rn// int registID = Integer.parseInt(request.getParameter("registID"));rn// String username = request.getParameter("username");rn// String pwd = request.getParameter("pwd");rn// String gender = request.getParameter("gender");rn// String email = request.getParameter("email");rn// String phone = request.getParameter("phone");rn// dao.AddUser(new RegistUser(registID,username,pwd,gender,email,phone));rn// this.showRegistAll(request, response);rn rn rn /**rn * 显示全部注册用户信息rn * @param requestrn * @param responsern * @throws ServletExceptionrn * @throws IOExceptionrn */rn private void showOrderAll(HttpServletRequest request,rn HttpServletResponse response)throws ServletException, IOException rn List list = dao.queryOrderAll();rn request.setAttribute("list", list);rn request.getRequestDispatcher("image02/dingdan.jsp").forward(request,rn response);rn rn rn /**rn * 根据ID查询rn * rn * @param requestrn * @param responsern * @throws ServletExceptionrn * @throws IOExceptionrn */rn private void selectOrder(HttpServletRequest request,rn HttpServletResponse response) throws ServletException, IOException rn int id = Integer.parseInt(request.getParameter("id"));rn List list1 = new ArrayList();rn list1 = dao.queryOrderById(id);rn request.setAttribute("list1", list1);rn rn // 跳转rn request.getRequestDispatcher("image02/dingdanupdate.jsp").forward(request,rn response);rnrn rnrn public void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rnrn this.doGet(request, response);rn rnrnrn

没有更多推荐了,返回首页