You can either create a request scoped attribute called basePath in the 
scriptlet or use the JSP EL ${pageContext.request.contextPath} in the page.

Dennis Byrne

>-----Original Message-----
>From: Alexandre Jaquet [mailto:[EMAIL PROTECTED]
>Sent: Friday, September 8, 2006 09:15 AM
>To: 'MyFaces Discussion'
>Subject: current path
>
>Hi,
>
>I'm trying to put the current path in a component with the following code :
>
><%
>    String path = request.getContextPath();
>    String basePath = request.getScheme() + "://" + 
>request.getServerName() + ":" + request.getServerPort() + path + "/";
> %>
>
><h:commandLink id="lnkDetail" 
>onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
>'secondefenetre', 'width=500,height=500,scrollbars');">
>
>but basePath is not interpreted html code generated :
>
>a href="#" 
>onclick="window.open(&lt;%=basePath%&gt;'/core/salesforce/dealerList.jsf', 
>'secondefenetre', 'width=500,height=500,scrollbars')
>
>any idea ?
>
>my best regards
>


Reply via email to