Where can I get help?

The best place to find help is the mailing list

[top]

How can I retrieve an object from session?

Use the In annotation: @In(scope=ScopeType.SESSION) private User currentUser;

[top]

How can I add an object to session?

Use the Out annotation: @Out(scope=ScopeType.SESSION) private User currentUser;

[top]

How can I directly access any of the four typical web object scopes/context?

Use the In annotation: @In private HttpServletRequest request; @In private HttpServletResponse response; @In private HttpSession session; @In private ServletContext application;

[top]

Is there any other way to do it?

Use constructor injection with any of the previously mentioned contexts: public MyLogicConstructor(HttpServletRequest request) { this.request = request; }

[top]

Is there any ThreadLocal way to get access to the session (any) object?

No, ThreadLocal interferes with the way we are thinking nowadays in OOP. Its "static" nature causes most programmers to rely on it as a easy way to access an object from anywhere. In other words: a simpler way to access static variables in a threaded scope without any care regarding your application design.

[top]

What should I do if I get a ConversionException?

You probably try to set an object for which hasn't a converter. Read the tutorial regarding custom converters which explains in detail how to create a custom converter.

[top]

How can I protect my jsp files form direct access?

Two possibilities: 1. Put all your jsp files inside the WEB-INF folder. 2. Use security-constraint in the web.xml file.

[top]

How can I switch to client side redirection?

Example: if your component is named "system", your logic "exit", and the result is "ok", update your views.properties file with the following: system.exit.ok = redirect:http://www.google.com

[top]

Where is the @Read annotation?

It was deprecated but still functional. Try using @Parameter instead. The old name (Read) was commonly mistaken with request attributes, the new name is quite clear.

[top]

How can I change the user locale?

You can do it using the jstl fmt taglib. Let's say the current page has the language parameter set to de. Then use the following code to switch the locale to de:

[top]