日期:2014-05-18  浏览次数:20853 次

大概内存溢出
用的是tomcat,最近看到一个新错误

exception  

org.apache.jasper.JasperException:   Java   heap   space
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:453)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root   cause  

javax.servlet.ServletException:   Java   heap   space
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.Login_jsp._jspService(org.apache.jsp.Login_jsp:122)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root   cause  

java.lang.OutOfMemoryError:   Java   heap   space

是不是我的tomcat还需要设置一下呢?
我只写写了几个类而已,难道堆就装不下了?

------解决方案--------------------
加上参数-Xms512m -Xmx1024m试试?