Announcement Announcement Module
Collapse
No announcement yet.
${pageContext.servletContect} is not working properly Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ${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
    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

    Comment


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

      Comment

      Working...
      X