Tomcat 6 - 请求的资源...不可用 [英] Tomcat 6 - The requested resource ... is not available

查看:243
本文介绍了Tomcat 6 - 请求的资源...不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Java和Stripes Framework开始开发。我的web.xml文件中有以下内容

I am trying to start developing with Java and the Stripes Framework. I have the following in my web.xml file

<?xml version="1.0" encoding="ISO-8859-1"?> 
<web-app version="2.4"  xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    >

      <filter>
        <filter-name>StripesFilter</filter-name>
        <filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
        <init-param>
          <param-name>ActionResolver.Packages</param-name>
          <param-value>
            pdapm.action
          </param-value>
        </init-param>
        <init-param>
          <param-name>Extension.Packages</param-name>
          <param-value>
            pdapm.extensions, org.stripesbook.reload.extensions
          </param-value>
        </init-param>   
      </filter>

      <filter>
        <filter-name>DynamicMappingFilter</filter-name>
        <filter-class>net.sourceforge.stripes.controller.DynamicMappingFilter</filter-class> 
      </filter>

      <filter-mapping>
        <filter-name>DynamicMappingFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>   
      </filter-mapping>

      <welcome-file-list>
        <welcome-file>index.html</welcome-file> 
      </welcome-file-list>

</web-app>

我收到错误消息:

The requested resource ... is not available.

我需要添加任何东西或者我应该尝试修复与tomcat相关的任何内容。我使用tomcat插件来xampp。我是初学者,所以这可能是一个简单的错误或跳过步骤。我只是想朝着正确的方向努力。

Is there anything I need to add or anything I should try to fix associated with tomcat. I used the tomcat addon to xampp. I am a beginner so it may have been a simple mistake or skipped step. I'm just looking for a nudge in the right direction.

[21:44:14] WARN net.sourceforge.stripes.util.ResolverUtil - Could not examine class
'pdapm/action/BaseActionBean.class' due to a java.lang.UnsupportedClassVersionError 
with message: Bad version number in .class file (unable to load class 
pdapm.action.BaseActionBean) 

[21:44:14] WARN net.sourceforge.stripes.util.ResolverUtil - Could not examine class 
'pdapm/action/HomeActionBean.class' due to a java.lang.UnsupportedClassVersionError 
with message: Bad version number in .class file (unable to load class 
pdapm.action.HomeActionBean)


推荐答案

错误意味着您的条带库是使用比Tomcat的JVM更新的Java编译的。 Java不是向前兼容的。假设您的Tomcat在Java 5下运行。它无法加载使用Java 6编译的类。

The error means your stripes library is compiled with a newer Java than the Tomcat's JVM. Java is not forward-compatible. Say your Tomcat runs under Java 5. It can't load classes compiled with Java 6.

升级系统上的JRE。

这篇关于Tomcat 6 - 请求的资源...不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆