English 中文(简体)
组合我第一个加沙地带项目的问题
原标题:Problem configuring my first Stripes project

apparently i m having some technical problem configuring Stripes.

我使用Eclipse ganymede,当我试图从主要项目或从小段从Tomcat获得404个错误时。

这是我的项目的结构:

Web-content>Web-inf>lib>....jstl, commons.logging and stripes jars
Web-content>Web-inf>classes>StripesResources.properties
Web-content>Web-inf>classes>stripesbook>action>StripesTime.java
                                               (extends ActionBean)
Web-content>Web-inf>jsp>stripesTime.jsp
Web-content>Web-inf>lib>web.xml....which looks as follows:

web.xml: Stripes

  <filter>
    <filter-name>Stripes Filter</filter-name>
    <filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
    <init-param>
      <param-name>ActionResolver.Packages</param-name>
      <param-value>stripesbook.action</param-value>
    </init-param>
  </filter>

  <servlet>
    <servlet-name>DispatcherServlet</servlet-name>
    <servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <filter-mapping>
    <filter-name>StripesFilter</filter-name>
    <servlet-name>DispatcherServlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <servlet-mapping>
    <servlet-name>DispatcherServlet</servlet-name>
    <url-pattern>*.action</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>StripesTime.jsp</welcome-file>
  </welcome-file-list>
</web-app>

Apparently, jars are loaded correctly, the packages are in the right places "the stripes tutorial i m following inserts the packages as folders under the web-inf rather then under the Java-Resources:src" I cant get why, even if i run the jsp file independently, tomcat wont find it. Any suggestions? Thank you!

最佳回答

加沙地带框架期望行动区或班子停止行动。 其他类别的名称被忽略,除非你召集加沙地带承认这些名称(见:rel=“nofollow”)。 姓名BasedActionResolver

Thus if you change the name of the StripesTime class to StripesTimeAction it will be recognized by Stripes and mapped to the URL: "/StripesTime.action".

另见:。 尼加拉瓜 标签和活动名称

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签