Discussions

Web tier: servlets, JSP, Web frameworks: Deployment of JSP in JBOSS 4.0.2

  1. Deployment of JSP in JBOSS 4.0.2 (2 messages)

    Hello,

    I have been trying to deploy a web application on JBOSS 4.0.2 with JSP and java activities. I am using jakarta struts-1.2.4; and javax.servlet.jar file in jre\lib\ext.
    I imported a class "com.khu.dto.HelpdeskDTO" in the JSP page as follows-
    <%@ page import="com.khu.dto.HelpdeskDTO" %>
    BUT,

    I get the following servlet error as shown from the log-

    -----------------------------------------------------------------------------------
    14:13:52,755 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP

    Generated servlet error:
    Only a type can be imported. com.khu.dto.HelpdeskDTO resolves to a package

    Generated servlet error:
    Only a type can be imported. com.khu.cc.UserInfo resolves to a package

    An error occurred at line: 16 in the jsp file: /jsps/helpdesk/HelpdeskRequest.jsp
    Generated servlet error:
    HelpdeskDTO cannot be resolved or is not a type

    An error occurred at line: 16 in the jsp file: /jsps/helpdesk/HelpdeskRequest.jsp
    Generated servlet error:
    HelpdeskDTO cannot be resolved or is not a type


            at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
            at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
            at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
            at org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
            at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
            at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
            at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
            at com.novell.afw.portlet.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:139)
            at com.sssw.wf.xf.activity.EboJSPNode.doRender(EboJSPNode.java:121)
            at com.sssw.wf.xf.activity.EboRenderableNode.onRender(EboRenderableNode.java:105)
            at com.sssw.wf.xf.core.EboProcess.onRender(EboProcess.java:430)
            at com.sssw.wf.xf.core.EboEngine.onRender(EboEngine.java:190)
            at com.sssw.wf.xf.manager.EboProcessManager.onRender(EboProcessManager.java:104)
            at com.novell.afw.portal.portlet.pf.pageFlowRunner.onRender(pageFlowRunner.java:182)
            at com.novell.afw.portal.portlet.pf.baseRunner.doView(baseRunner.java:61)
            at javax.portlet.GenericPortlet.doDispatch(Unknown Source)
            at com.novell.afw.portal.portlet.pf.baseRunner.doDispatch(baseRunner.java:46)
            at javax.portlet.GenericPortlet.render(Unknown Source)
            at com.novell.afw.portlet.core.EboPortletContainer.processOperation(EboPortletContainer.java:698)
            at com.novell.afw.portlet.core.EboPortletContainer.processOperation(EboPortletContainer.java:549)
            at com.novell.afw.portlet.core.EboPortletContainer.getMarkup(EboPortletContainer.java:222)
            at com.novell.afw.portlet.consumer.core.EboPortletConsumerContainer.processOperation(EboPortletConsumerContainer.java:305)
            at com.novell.afw.portlet.consumer.core.EboPortletConsumerContainer.getMarkup(EboPortletConsumerContainer.java:175)
            at com.novell.afw.portal.proxy.EboPortletContainerProxy.getMarkup(EboPortletContainerProxy.java:240)
            at com.novell.afw.portal.aggregation.EboPortletProxyHelper.renderPortlet(EboPortletProxyHelper.java:271)
            at com.novell.afw.portal.aggregation.EboPortalAggregationHelper.runPortletsInTheMainThread(EboPortalAggregationHelper.java:1775)
            at com.novell.afw.portal.aggregation.EboPortalAggregationHelper.renderSynchPortlets(EboPortalAggregationHelper.java:1746)
            at com.novell.afw.portal.aggregation.EboPortalAggregationHelper.callRender(EboPortalAggregationHelper.java:2110)
            at com.novell.afw.portal.aggregation.EboPortalAggregationControllerImpl.initiateRendering(EboPortalAggregationControllerImpl.java:1326)
            at com.novell.afw.portal.aggregation.EboPortalAggregationControllerImpl.renderPortalResponse(EboPortalAggregationControllerImpl.java:531)
            at com.novell.afw.portal.aggregation.EboPortalAggregationServlet.handlePortalContainerRequest(EboPortalAggregationServlet.java:761)
            at com.novell.afw.portal.aggregation.EboPortalAggregationServlet.callService(EboPortalAggregationServlet.java:218)
            at com.novell.afw.portal.aggregation.EboPortalAggregationServlet.doGet(EboPortalAggregationServlet.java:90)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at com.novell.afw.portal.xforms.EboXFormClientDetectionFilter.doFilter(EboXFormClientDetectionFilter.java:97)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
            at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
            at java.lang.Thread.run(Thread.java:534)

    ------------------------------------------------------------------------------------
    Any ideas of where the flaw could be?

    Thanks,
    Kollswe
  2. in the com.khu.dto.HelpdeskDTO path ( in web_inf) is any class?
  3. Hello,I have been trying to deploy a web application on JBOSS 4.0.2 with JSP and java activities. I am using jakarta struts-1.2.4; and javax.servlet.jar file in jrelibext. I imported a class "com.khu.dto.HelpdeskDTO" in the JSP page as follows- <%@ page import="com.khu.dto.HelpdeskDTO" %>BUT,I get the following servlet error as shown from the log------------------------------------------------------------------------------------14:13:52,755 ERROR [[jsp]] Servlet.service() for servlet jsp threw exceptionorg.apache.jasper.JasperException: Unable to compile class for JSPGenerated servlet error:Only a type can be imported. com.khu.dto.HelpdeskDTO resolves to a packageGenerated servlet error:Only a type can be imported. com.khu.cc.UserInfo resolves to a packageAn error occurred at line: 16 in the jsp

    Seems to me to be a case of your application not finding the "com.khu.dto.HelpDespDTO" in its classpath.
    Venkat