cancel
Showing results for 
Search instead for 
Did you mean: 

JSF context for external resources & sticky sessions

jag
Champ in-the-making
Champ in-the-making
I have 2 (possibly related) questions:

1) In your JSPs you use the following technique to refer to external resources (images etc.):
<%=request.getContextPath()%>
We were forced to used a similar methodology in a JSF application that we wrote (uses the Sun RI). Of course we wanted to use relative references but we found that for the first request the application was at a different point in the directory tree to the other requests. Is this the reason that you are obtaining the context from the implicit JSP request object?

2) Our application is deployed in a clustered WebLogic 8.1 SP4 environment. We have an intermittent problem which is causing the HTTP Session to be lost. It appears to happen when requesting images, CSS files etc (hence the possible relationship). This definitely could be a BEA issue but I was wondering whether you encountered anything similar during your development?
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
Hi,

The reason for using <%=request.getContextPath()%> is that we support the application running as a portlet inside JBoss portal. The application context in this situation is /portal, therefore if we didn't use the implicit request and used rewlative paths none of our images would be found.

As for question 2, no we haven't seen any HTTP sessions being lost, although we have had some challenges due to the portal / alfresco context mix mentioned above. What particular area do you see the session being lost or is it random?