Does anyone know of a basic hello world application that uses the Convention 
plugin and Maven.  I am having trouble getting any of my actions to be 
registered.

Here is the S2 related dependencies from my pom.xml
        <!--Struts2-->
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>2.1.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-spring-plugin</artifactId>
            <version>2.1.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-config-browser-plugin</artifactId>
            <version>2.1.2</version>
        </dependency>

Here is what I have in my web.xml
    <filter>
        <filter-name>struts2</filter-name>
        
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

Here is my struts.xml
<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.1.dtd";>
<struts>
    <constant name="struts.objectFactory" value="spring"/>
    <constant name="struts.devMode" value="true"/>
    <constant name="struts.configuration.xml.reload" value="true"/>
    <constant name="struts.custom.i18n.resources" value="globalMessages"/>
    <constant name="struts.convention.action.packages" 
value="--my-base-package--"/>
    <package name="conap" extends="struts-default">
        <default-interceptor-ref name="paramsPrepareParamsStack"/>
    </package>
</struts>

My java class package is the same value that is in the placeholder 
--my-base-package--

The class name ends in Action.  I tried placing it in a sub-package named 
.actions and also tried it with extending ActionSupport.


When I check 
http://localhost:8080/--my-context-/config-browser/actionNames.action, I get no 
actions mapped.

Any help would be appreciated.


 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



      

Reply via email to