Tomcat 6 - 请求的资源...不可用

发布于 2024-08-07 09:40:07 字数 2520 浏览 11 评论 0原文

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

<?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 相关的内容。我使用了 xampp 的 tomcat 插件。我是初学者,所以这可能是一个简单的错误或跳过的步骤。我只是在寻找正确方向的推动力。

[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)

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>

I am receiving the error:

The requested resource ... is not available.

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

终弃我 2024-08-14 09:40:07

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

请升级系统上的 JRE。

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.

Upgrade the JRE on your system.

慢慢从新开始 2024-08-14 09:40:07

我不确定,但我认为 ZZ Coder 可能是对的,您是否检查过您的项目的目标编译器合规级别以及是否设置为 1.6 (Java 6);将其设置为 1.5(或服务器运行的任何 Java 版本)-重建并部署,看看会发生什么。

I'm not sure but I think ZZ Coder could be right did you check what complier compliance level your project is targeted at and if it's set to 1.6 (Java 6); set it to 1.5 (or whatever Java version your Server is running in) -rebuild and deploy and see what happens.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文