Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Struts2 annotation problem

Miles, Chris

2010-04-08


Author LoginPost Reply
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






©2008 gg3721.com - Jax Systems, LLC, U.S.A.