2 Replies Latest reply on Nov 1, 2015 1:29 AM by jaysensharma

    JBoss is not processing '${pageContext.request.contextPath} in JSP

    niksharma

      Hi All,

       

      Jboss is not processing below expression in JSP.

       

      '${pageContext.request.contextPath}/j_spring_security_check'

       

      instead of context path, above expression is coming as it is.

      Not sure what I am missing

        • 1. Re: JBoss is not processing '${pageContext.request.contextPath} in JSP
          niksharma

          I am adding details for above question

           

          Problem is that Jboss is not processing JSP ... I think I am missing some dependency.

          When I access JSP ... its complete content(as) text appearing on browser.

           

          Below is my pom.xml

           

          <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

            <modelVersion>4.0.0</modelVersion>

            <groupId>com.qn.sampleJboss</groupId>

            <artifactId>sample-boot-jboss</artifactId>

            <version>0.0.1-SNAPSHOT</version>

            <packaging>war</packaging>

            <parent>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-starter-parent</artifactId>

            <version>1.2.2.RELEASE</version>

            </parent>

            <dependencies>

            <dependency>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-starter-web</artifactId>

            <exclusions>

            <exclusion>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-starter-tomcat</artifactId>

            </exclusion>

            </exclusions>

            </dependency>

            <dependency>

            <groupId>org.springframework</groupId>

            <artifactId>spring-webmvc</artifactId>

            <version>4.1.5.RELEASE</version>

            </dependency>

           

            <dependency>

            <groupId>javax.servlet</groupId>

            <artifactId>javax.servlet-api</artifactId>

            <scope>provided</scope>

            </dependency>

            </dependencies>

           

           

            <build>

            <plugins>

           

           

            <plugin>

            <groupId>org.jboss.as.plugins</groupId>

            <artifactId>jboss-as-maven-plugin</artifactId>

            <version>7.7.Final</version>

           

            <executions>

                              <execution>

                                  <phase>install</phase>

                                  <goals>

                                      <goal>deploy</goal>

                                  </goals>

                              </execution>

                          </executions>

           

            </plugin>

            </plugins>

            </build>

          </project>

           

           

          Please help, if some know the answer

          • 2. Re: JBoss is not processing '${pageContext.request.contextPath} in JSP
            jaysensharma

            Hello,

             

                 Can you please provide us you simple testcase ?

             

                 As i quickly checked with a very simple JSP based WAR at my end on JBoss EAP 6.4 and it worked well.

             

            <%@ page contentType="text/html;charset=UTF-8" language="java" %>
            <!DOCTYPE html>
            <html>
                    <head>
                            <title>JSP - Context Path</title>
                    </head>
                    <body>
                            Web Application Context Path = ${pageContext.request.contextPath}
                    </body>
            </html>
            

             

            I am attaching my simple WAR here for quick testing "Test.war".

             

            Please test the same at your end. This is just to isolate the issue that

            1) if there is any thing misconfigured at your end at the JBoss  EAP level

                OR

            2). There is something specific (like some EE jar or unwanted jar)  to your particular application which is breaking this.

             

            Also can you please share the list of JARs present inside your WebApp ?   Just to double check if you are including any EE specific JAR which might be causing the conflict.