This content has been marked as final. Show 3 replies
>1 person found this helpful
Yes, the server will likely have a thread per request although it is not strictly necessary when it uses NIO under the hood. The only thing you have to worry about is that a request is handled isolated from all others. That is not JSF specific in any way.
JSF pages are translated into servlet at a certain point of the lifecycle or not? Talking about the Render Response Phase, the JavaEE 5 tutorial says: "During this phase, the JavaServer Faces implementation delegates authority for rendering the page to the JSP container if the application is using JSP pages ..... the components will render themselves as the JSP container traverses the tags in the page."JSP pages are translated into servlets; again not related to JSF. You may use JSPs as the view technology for JSF but I would recommend using Facelets in stead.
Does it mean that the response is constructed one tag at a time while the jsp container traverses the whole view without the need to translate the page into a servlet and call the resulting jsp_service method (as for standard jsp pages)?No, that's not what it says at all. Basically all it says is that the JSP renderer will trigger the JSF components to render and not JSF itself.
Hi gimbal, thanks a lot for your help but I'm not sure to understand if jsf pages are translated into servlet when using JSP as the view technology for JSF. Could you please tell me if my interpretation is correct:
when using JSP as view technology for JSF, the jsp page is still translated into a servlet during jsf lifecycle. Once the servlet is ready, the original thread created by the web container calls the resulting jsp_service method in order to provide a response to the client.
Well almost. The jsp_service call will be part of the normal servlet execution, which is during the invocation of doGet or doPost based on what method the request has (GET, POST). The server doesn't do anything special other than run the servlet like any other servlet.1 person found this helpful
note that most if not all servers keep the generated .java source file somewhere, usually in a 'work' subdirectory. You could check out what the server generates yourself.