Topic: 有关jsp配置的问题,急!急!急!急! |
Print this page |
1.有关jsp配置的问题,急!急!急!急! | Copy to clipboard |
Posted by: yeehya Posted on: 2004-05-19 22:13 小的初学jsp。我用的tomcat4.0.1,这是在mapxtreme4.5 for java(一种用于制作基于web的GIS工具软件)中自带的,和我以前用的tomcat版本有点不同。出了点问题,我以http://localhost:8080可以打开tomcat的主页面。可以用html页面,调用applet,也能直接访问servlet。但是访问.jsp文件时,就会报错,而且错误时相同的,都是如下的: TYPE: Exception report MESSAGE: Internal Server Error Description: The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request ============================================= Exception: javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:871) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:371) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424) at java.lang.Thread.run(Thread.java:536) ============================================= Root cause: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:103) at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:183) at org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCache.java:165) at org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:138) at org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:324) at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:371) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424) at java.lang.Thread.run(Thread.java:536) ============================================= 希望高人指教呀!~ |
2.Re:有关jsp配置的问题,急!急!急!急! [Re: yeehya] | Copy to clipboard |
Posted by: whirl79 Posted on: 2004-05-19 23:04 你在jsp页面中一定调用了servlet,在servlet中的init()方法,可能写错了,你调试一下 |
3.Re:有关jsp配置的问题,急!急!急!急! [Re: yeehya] | Copy to clipboard |
Posted by: yeehya Posted on: 2004-05-20 09:53 public void init() throws ServletException { String strParam = getInitParameter("mapxtremeurl"); if(strParam != null && strParam.length() > 0) mapxtremeurl = strParam; strParam = getInitParameter("imgtype"); if(strParam != null && strParam.length() > 0) imgtype = strParam; strParam = getInitParameter("imgsizex"); if(strParam != null && strParam.length() > 0) imgsizex = (new Integer(strParam)).intValue(); strParam = getInitParameter("imgsizey"); if(strParam != null && strParam.length() > 0) imgsizey = (new Integer(strParam)).intValue(); strParam = getInitParameter("smallimgsizex"); if(strParam != null && strParam.length() > 0) smallimgsizex = (new Integer(strParam)).intValue(); strParam = getInitParameter("smallimgsizey"); if(strParam != null && strParam.length() > 0) smallimgsizey = (new Integer(strParam)).intValue(); strParam = getInitParameter("imgbgcolor"); if(strParam != null && strParam.length() > 0) imgbgcolor = new Color((new Integer(strParam)).intValue()); strParam = getInitParameter("datasource"); if(strParam != null && strParam.length() > 0) datasource = strParam; if(datasource == null) errset("请指定数据源类型"); else if(datasource.equals("oracle")) { strParam = getInitParameter("database"); if(strParam != null && strParam.length() > 0) database = strParam; if(database == null) errset("请指定数据库url"); strParam = getInitParameter("dbusername"); if(strParam != null && strParam.length() > 0) dbusername = strParam; strParam = getInitParameter("dbpassword"); if(strParam != null && strParam.length() > 0) dbpassword = strParam; strParam = getInitParameter("dbtable"); if(strParam != null && strParam.length() > 0) dbtable = strParam; strParam = getInitParameter("dbnamecol"); if(strParam != null && strParam.length() > 0) dbnamecol = strParam; strParam = getInitParameter("dbmapdefcol"); if(strParam != null && strParam.length() > 0) dbmapdefcol = strParam; } else if(datasource.equals("file")) { strParam = getInitParameter("filetype"); if(strParam != null && strParam.length() > 0) filetype = strParam; if(filetype.equals("mdf")) { strParam = getInitParameter("mdfpath"); if(strParam != null && strParam.length() > 0) mdfpath = strParam; if(mdfpath == null) errset("请指定mdf地图定义文件路径"); } else { strParam = getInitParameter("gstpath"); if(strParam != null && strParam.length() > 0) gstpath = strParam; if(gstpath == null) errset("请指定gst地图定义文件路径"); } } strParam = getInitParameter("mapdef"); if(strParam != null && strParam.length() > 0) mapdef = strParam; if(mapdef == null) errset("请指定地图定义名称"); try { MapJ tempmap = initMapJ(); resetpoint = tempmap.getCenter(); resetzoom = tempmap.getZoom(); } catch(Exception e) { e.printStackTrace(); } } 这是servlet中init()是不是有问题呀`? |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |