首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

linux tomcat 验证码无法显示有关问题

2013-09-11 
linux tomcat 验证码无法显示问题项目在window下能正常显示验证码,但切到linux下无法正常显示,报错如下typ

linux tomcat 验证码无法显示问题

项目在window下能正常显示验证码,但切到linux下无法正常显示,报错如下

type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: Servlet execution threw an exceptionorg.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)root cause java.lang.NoClassDefFoundErrorjava.lang.Class.forName0(Native Method)java.lang.Class.forName(Class.java:164)java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1141)java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1131)com.jsict.ictmap.web.servlet.AuthImg.doGet(AuthImg.java:37)javax.servlet.http.HttpServlet.service(HttpServlet.java:617)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.

?在网上google后有说法要在设置 JAVA_OPTIONS=" -Djava.awt.headless=true"
可设了后还是没能解决

后来在 http://www.blogjava.net/java-sunfly/articles/213428.html?找到解决方案,成功解决

在catalina.sh前面 加上 unset DISPLAY 解决


我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行