Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleAbout the Struts 2 Wiki Space

The Struts 2 Wiki is a community-supported resource. To contribute to the wiki space, simply create a CWIKI Confluence account.

The Struts 2 Community Wiki space is not bundled with the Struts 2 distribution, but it is still an exciting and valuable community resource!


Tip

Visit the Struts 2 DocumentationDocumentation for the official project documentation!

...

Some of the pages here include:

Archive

Projects Using WebWork or Struts2

A few of our closest friends ...

Articles and press

Media coverage of Struts 2 and WebWork2

Developer Stories

Real world usages, How are you using struts 2?

Companies that provide Struts 2 support

An unofficial list of some likely suspects

Related Projects

Related non-plugin projects like IDE plugins

The Vault

Unvarnished tidbits from the leading edge

Troubleshooting guide migrating from Struts 2.0.x to 2.1.x

Problem/solutions migrating to Struts 2.1.x

Proposals

Proposals for future Struts features

Struts 中文文档

Some Chinese document for St

Struts 2 官方文档中文版

从官方文档翻译而来  translate from Struts 2 Documentation

Old documentation pages moved from Home

The Vault

What is the vault ?

The vault contains lots of unsorted problems, snippets, remarks and ideas, mostly found in posts in the WebWork Forum. You can think of this page as a place to store content before it is analyzed and put in the official docs, cookbook or FAQ. It's raw, unpolished, and can contain typos. If you can't find it in the docs, you can take a look in here (or use the search in the forum). It also gives an idea of what problems ww users encounter in their search for the holy grail.

Feel free to 'take' issues from this page and move them to an appropriate page.

Note
titleUnder construction

Tryout - if this is a bad idea, feel free to tell me so. It would be great if we could have some sort of notifier in the forum to inform us when an interesting post arrives.

Migration to 2.2

Note about upgrading your WW tags to 2.2

Just a quick fyi that caused issues for us... In 2.2 when extending UIBean evaluateExtraParams() no longer takes parameters. (Our parameters were not working until we realized that evaluateExtraParams was not being invoked due to the change.) In 2.1 evaluateExtraParams was passed the stack IIRC.

Not sure if this is documented anywhere but it caused us quite a headache when migrating from 2.1 to 2.2.

Where did the velocity templates go ?

checking cvs log, it seems that Pat has removed it with comment as follows:

removing velocity macro implementations - they are so old and out of date now it will cause more harm than good keeping them around

Best practices

Should I make an action or rather link to a .jsp page ?

If you put an action configuration in your xwork.xml but don't put an action
class attribute, it will default to using the ActionSupport class, which
just returns SUCCESS.

Migration to Spring IoC

How can we migrate ServletRequestAware, ServletResponseAware and ValidationAware to Spring bean definitions?

I tink just the normal way would work. The action will now be created by spring, and if the ServletConfigInterceptor is in the stack and the action implementation implement those interface, webwork should set the appropriate methods.

Freemarker, Velocity, JSP

How to catch Freemarker exceptions (the ugly big yellow pages)

FreeMarker delegates exception handling to so-called TemplateExceptionHandlers. By default the HTML_DEBUG_HANDLER is used (this one generates the yellow error page), but you can easily specify a different exception handler by using the setTemplateExceptionHandler method of your configuration object. FM provides some simple handlers you can use, in your case I recommend the RETHROW_HANDLER ( http://freemarker.org/docs/api/freemarker/template/TemplateExceptionHandler.htmlImage Removed).

My ww:include actions aren't processed

Did you declare the ww tag library in your includes ? If I'm not mistaken, jsp includes work different from ww includes (ww process the pages before including them).

I'm using ww:urlHelper in combination with the c:out tag, but it won't work !

if the url with &amp is used in the value attribute it will not work properly unless the escapeXml is set to false.

Validation

When using clientside validation, DWR states it gets No Data From Server

...