The best place to find help is the mailing list
[top] |
Use the In annotation: @In(scope=ScopeType.SESSION) private User currentUser;
[top] |
Use the Out annotation: @Out(scope=ScopeType.SESSION) private User currentUser;
[top] |
Use the In annotation: @In private HttpServletRequest request; @In private HttpServletResponse response; @In private HttpSession session; @In private ServletContext application;
[top] |
Use constructor injection with any of the previously mentioned contexts: public MyLogicConstructor(HttpServletRequest request) { this.request = request; }
[top] |
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] |
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] |
Two possibilities: 1. Put all your jsp files inside the WEB-INF folder. 2. Use security-constraint in the web.xml file.
[top] |
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] |
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] |
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] |