Results 1 to 3 of 3

Thread: ${pageContext.servletContect} is not working properly

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    El Dorado
    Posts
    80

    Default ${pageContext.servletContect} is not working properly

    Hi.
    I'm integerating Struts with Spring and every thing is ok.
    My JSPs use the following line :
    <link ref="${pageContext.servletContect}/styles/style.css" rel .... />
    But the pervious line has no effect !
    After Rendering the page, the following line appears :
    <link ref="org.apache.catalina.core.ApplicationContextFa cade@1ff563" ..... />
    What is the problem ?
    Thanks.

  2. #2

    Default

    I'm sure this isn't the problem but there's a typo in this line
    Code:
    <link ref="${pageContext.servletContect}/styles/style.css" rel .... />
    Should be "pageContext.servletContext"

    Surely all you need in your JSP is

    Code:
    <link ref="<c:url value="/styles/stye.css"/>" rel .... />
    HTH

    Mike

  3. #3
    Join Date
    Jul 2005
    Location
    Russia
    Posts
    118

    Default

    Also, there is logical error in the expression
    It should be ${request.contextPath}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •