Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Struts Plugin that adds support to annotated action classes and forms

License

Notifications You must be signed in to change notification settings

uliss3s/StrutsAnnotationPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Struts Annotation Plugin

Struts 1.3.X Plugin that adds annotation support for mapping Actions and POJOs (as DynaActionForm).

Info

It depends on Spring "org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider" class

Usage

Add this in your project main struts configuration file:

<plug-in className="com.github.uliss3s.strutsannotationplugin.Plugin">
    <set-property property="actionsPackageLocation" value="my.app.web.actions"/>
    <set-property property="formsPackageLocation" value="my.app.domain"/>
</plug-in>

Basic Action Configuration:

import com.github.uliss3s.strutsannotationplugin.annotations.Action;
import com.github.uliss3s.strutsannotationplugin.annotations.Forward;
import com.github.uliss3s.strutsannotationplugin.annotations.ActionScope;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Action(path = "/my/url/action", scope = ActionScope.REQUEST, forwards = {
	@Forward(name = "default", path = "/my/url/action")
})
public class MyAction extends Action {

    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception {

    	...

    	return mapping.findForward("default");
    }

    ...

}

About

Struts Plugin that adds support to annotated action classes and forms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages