struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miles, Chris" <chris.mi...@spsa.pnn.police.uk>
Subject Struts2 annotation problem
Date Thu, 08 Apr 2010 15:47:45 GMT
Within my web apps lib directory I have the convention plugin and also
the config browser plugin.

 

My code is as follows:

 

package com.example;

 

import org.apache.struts2.convention.annotation.*;

import org.apache.struts2.interceptor.SessionAware;

 

import java.util.Map;

import java.util.List;

 

BaseAction extends Action Support.

 

@ParentPackage("test")

@Namespace("/test")

public class ShippingDetailsAction extends BaseAction {

 

    @Action(value = "check")

    public String check() throws Exception {

        return SUCCESS;

    }

 

    @Action(value = "fetch")

    public String fetch() throws Exception {

        return SUCCESS;

    }

}

 

My struts xml file contains

 

<struts>

    <package name="test" extends="struts-default" namespace="/test"/>

</struts>

 

However I get action not mapped/found when I try to connect to

 

/CONTEXT/test/fetch.action

 

Or

 

/CONTEXT/test/check.action

 

When I check the config browser it says the test namespace has no
actions within it.

 

I am deploying to glassfish 2.1

 

Thanks

 

Chris

 





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message