Are you mapping the jsp to /services in the web.xml? if you do, getServletPath should return the path you are looking for.

 <servlet>
    <servlet-name>jsp</servlet-name>
    <jsp-file>/usecase/page.jsp</jsp-file>
  </servlet>

  <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>/services</url-pattern>
  </servlet-mapping>

  -Chris

Erik Weber wrote:
Hmm I must be doing something wrong. That's giving me the same value as Erez's example. Strange, I would have expected it to give me "/services". I wonder how I am causing it to give me "/usecase/page.jsp".

atta-ur rehman wrote:

Hi Erik,

This one worked for me:

<c:set var="v">
    <%= request.getServletPath() %>
</c:set>

<c:out value="${v}"/>
<bean:write name="v"/>

HTH,

ATTA

On Tue, 20 Jul 2004 16:20:30 -0400, Erik Weber <[EMAIL PROTECTED]> wrote:


How can I set a variable (I assume with c:set) that will hold the value
of request.getServletPath, so that I can use it in el tags?

Thanks,
Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to