Questions tagged [struts2-convention-plugin]

The Struts 2 Convention Plugin provides Struts 2 with convention-based actions and views, allowing zero-config Struts 2 applications, while providing customization at multiple levels.

The Struts 2 Convention Plugin provides Struts 2 with convention-based actions and views, allowing zero-config Struts 2 applications, while providing customization at multiple levels.

Features include:

  • Action location by package naming conventions
  • Result (JSP, FreeMarker, etc) location by naming conventions
  • Class name to URL naming convention
  • Package name to namespace convention
  • SEO compliant URLs (i.e. my-action rather than MyAction)
  • Action name overrides using annotations
  • Interceptor overrides using annotations
  • Namespace overrides using annotations
  • XWork package overrides using annotations
  • Default action and result handling (i.e. /products will try com.example.actions.Products as well as com.example.actions.products.Index)

This plugin can provide additional configuration based on convention. It also uses annotations to replace or override the configuration settings made by this plugin. All annotations that could be used in the code you can find under the package org.apache.struts2.convention.annotation.

80 questions
0
votes
1 answer

Using Interceptor with Annotation in Struts2 with Spring and Convention Plugin

I have been trying to use interceptor with annotation in struts2 to handle my request and responses so that I can perform some pre and post actions. But, I have used struts 2 with convention plugin initially which I can't really change. My framework…
0
votes
1 answer

Struts 2 plugin Conversion - from Codebehind to Convention plugin

I'm getting confusion to converting the codebehind annotation to conventional struts.xml file. How to identify action name in action class? Because if write method public String list{} - action its match with JSPs product-list.jsp will automatically…
0
votes
1 answer

struts2 convention plugin dependency

I have a project which was running fine. I wanted to try the annotations in struts 2 so i added the convention plugin jar(2.3.14.2) to my WEB-INF/lib folder along with the other struts2 jars. Upon restarting my tomcat server within eclipse, i get a…
-1
votes
1 answer

Struts2 no Action mapped for namespace [/] and action name [index] associated with context path

This has been asked many times before, but not quite the same as this. Everything seems to be present and in the right place. I'm using Java8, Eclipse, Maven, Struts2 w/ Convention Plugin, Spring, Tiles and annotations. The context-root is iquality,…
-1
votes
1 answer

When is the Struts Convention Plug-in Applied?

I’m trying to understand how the Convention plugin determines when to do URL interpretation. In some REST Plug-in examples I see PrefixBasedActionMapper configured with ”/rest:rest,:struts” and it seems that Convention is only applied to the rest…
Tyler Camp
  • 177
  • 15
1 2 3 4 5
6