14 Replies Latest reply on Dec 28, 2012 5:43 AM by shaikh dahood

    JSP compilation error in JBoss 7.1

    shaikh dahood Newbie

      Hi Guys,

       

      I have the below code in my header.jsp which resides in /WEB-INF/tiles/ folder structure.

       

      <%@page import="com.mycompany.dx.common.*"%>

      <%@page import="com.mycompany.dx.web.common.*"%>

      <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

      <%@ taglib uri="/WEB-INF/myc-tags.tld" prefix="myc" %>

       

                <div class="top">

                          <a href='<%= ApplicationProperties.getString("com.mycompany.dx.MyCom_HOME") %>' title="MyCom link"><IMG border='0' src='<myc:context path="/images/MyCom_logo.gif"/>' alt='MyCom'></a>

                          <a href="<myc:context/>"><img src="<myc:context path="/images/data_exchange_logo.gif"/>" width="95" height="40" alt="Application Name Logo and Link"/></a>

                          <span class="topnav">

                                     

                                    <a href='<%= ApplicationProperties.getString("com.mycompany.dx.MyCom_HOME") %>' title="MyCom link">MyCom</a>

                                     

                                    <a href="javascript:void(window.open('<%= ApplicationProperties.getString("com.mycompany.dx.MyCom_HELP") %>','WINDOWNAME','height=600, width=800, scrollbars=1'))"; title="Help Link">Help</a>

                                     

                                    <%-- NOTE: the bean:message tag will render both double and single quotes to single quotes --%>

                                    <a href="<%= ApplicationProperties.getString("com.mycompany.dx.MyCom_LOGOUT") %>" title="Logout Link">Logout</a>

                          </span>

                          <span class="user">

                                    <%-- TODO: Need to replace this with the actual User Name --%>

                                    <b><%=UserCredentialsHelper.getDisplayableUserName(request)%></b>

                          </span>

                          <br/>

                </div>

       

       

      I get the below error in my console

      An error occurred at line: 7 in the generated java file

      The import com.mycompany.dx.web.common cannot be resolved

       

       

      An error occurred at line: 20 in the jsp file: /WEB-INF/tiles/header.jsp

      UserCredentialsHelper cannot be resolved

      17:                     </span>

      18:                     <span class="user">

      19:                               <%-- TODO: Need to replace this with the actual User Name --%>

      20:                               <b><%=UserCredentialsHelper.getDisplayableUserName(request)%></b>

      21:                     </span>

      22:                     <br/>

      23:           </div>

       

       

       

       

      Stacktrace:

                at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:446) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.10.Final.jar:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:639) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:576) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:621) [jbossweb-7.0.10.Final.jar:]

                at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) [struts.jar:1.1]

                at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) [struts.jar:1.1]

                at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) [struts.jar:1.1]

                at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881) [struts.jar:1.1]

                at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) [struts.jar:1.1]

                at org.apache.jsp.mycLayout_jsp._jspx_meth_tiles_005finsert_005f0(mycLayout_jsp.java:357)

                at org.apache.jsp.mycLayout_jsp._jspx_meth_html_005fhtml_005f0(mycLayout_jsp.java:154)

                at org.apache.jsp.mycLayout_jsp._jspService(mycLayout_jsp.java:77)

                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.10.Final.jar:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.10.Final.jar:]

                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.10.Final.jar:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:541) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:479) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:407) [jbossweb-7.0.10.Final.jar:]

                at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) [struts.jar:1.1]

                at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) [struts.jar:1.1]

                at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:254) [struts.jar:1.1]

                at com.mycompany.dx.web.struts.DxRequestProcessor.processForwardConfig(DxRequestProcessor.java:202) [classes:]

                at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) [struts.jar:1.1]

                at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) [struts.jar:1.1]

                at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) [struts.jar:1.1]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]

                at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]

                at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_14]

       

      can anyone help me out in fixing this issue?