标题:tomcat配置出现了警告和error
只看楼主
gzsword
Rank: 1
来 自:广东省清远市
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-11-29
 问题点数:0 回复次数:0 
tomcat配置出现了警告和error
我电脑里面安装了jdk1.6,tomcat的版本6.0的,之后我在网上下载一个tomcat配置的word文档,一搜索就有的,然后详细的配置了tomcat里面的webapps的目录信息..增加了myapp文件夹,里面也添了不少东西,D:\Tomcat\webapps\myapp\WEB-INF\classes\test...在安装前我把端口改为9090,之后所有的都做完了,那时候还可以运行tomcat,我是一个菜鸟,按照书上的例子写了一个jsp后缀的文件,可是不知道把它放到哪里,怎样去运行,我后来把它放到了D:\Tomcat\webapps\myapp目录下,可是输入http://localhost:9090/myapp/helloworld.jsp,网页就出错了.(重申,配置环境我按照文档配置,没出现什么问题)
下面是出错页面的信息:

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 11 in the jsp file: /helloworld.jsp
The method parselnt(String) is undefined for the type Integer
8: <center>
9: <h1>
10: <%
11: int times=Integer.parselnt(request.getParameter("times"));
12: for(int i=0;i <=times;i++)
13: {
14: out.println("HelloWorld!");


Stacktrace:
org.apache.(DefaultErrorHandler.java:92)
org.apache.(ErrorDispatcher.java:330)
org.apache.(JDTCompiler.java:423)
org.apache.(Compiler.java:317)
org.apache.(Compiler.java:295)
org.apache.(Compiler.java:282)
org.apache.jasper.(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.18

helloworld.jsp里面的内容是:<%@ page language="java" contentType="text/html;charset=gb2312"%>
<%@ page info="a hello world example"%>
<html>
      <head>
        <title>理解JSP的原理 </title>
  </head>
  <body>
      <center>
  <h1>
  <%
  int times=Integer.parselnt(request.getParameter("times"));
  for(int i=0;i <=times;i++)
  {
  out.println("HelloWorld!");
  out.println(" <br>");
  }
  %>
  </h1>
  </center>
</body>
</html>


上面的问题还不算是什么,因为至少我可以运行那个word文档里面的jsp的例子,而且成功了,可是我重启电脑的时候,可怕的事情发生了,tomcat里面居然出现了警告和几个严重的错误,我晕.

2008-11-29 1:21:06 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property '
debug' to '0' did not find a matching property.
2008-11-29 1:21:06 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: D:\Tomcat\b
in;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\jdk1.6\bin;C:\Pro
gram Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Ser
ver\90\Tools\binn\;;TMD.MutexDefaultS-1-5-21-1645522239-651377827-83X-?
2008-11-29 1:21:06 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-9090
2008-11-29 1:21:06 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1562 ms
2008-11-29 1:21:06 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-11-29 1:21:06 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.18
2008-11-29 1:21:06 org.apache.catalina.core.StandardContext resourcesStart
严重: Error starting static Resources
java.lang.IllegalArgumentException: Document base D:\myapp does not exist or is
not a readable directory
        at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
java:141)
        at org.apache.catalina.core.StandardContext.resourcesStart(StandardConte
xt.java:3957)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
126)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-11-29 1:21:06 org.apache.catalina.core.StandardContext start
严重: Error in resourceStart()
2008-11-29 1:21:06 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2008-11-29 1:21:06 org.apache.catalina.core.StandardContext start
严重: Context [/myapp] startup failed due to previous errors
2008-11-29 1:21:06 org.apache.catalina.core.StandardContext stop
信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/
myapp] has not been started
2008-11-29 1:21:07 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-9090
2008-11-29 1:21:07 org.apache. init
信息: JK: ajp13 listening on /0.0.0.0:8009
2008-11-29 1:21:07 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/109  config=null
2008-11-29 1:21:07 org.apache.catalina.startup.Catalina start
信息: Server startup in 1588 ms

你要知道,tomcat我重装过很多次了,第一次是下载exe后缀的安装文件,配制好一切,可是重启后,就出现了上面的问题,后来我再做一次,还是这样...再后来我索性下载一个zip后缀的,一解压就可以,配置好了,重启,情况还是一样..谁可以告诉我,出现什么问题?最重要的还是要解决后面的信息错误的问题...
搜索更多相关主题的帖子: tomcat 警告 
2008-11-29 11:39



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-246860-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.175752 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved