facebook

JBOSS portal 2.42 error in compiling JSP

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #290041 Reply

    Im using windows vista sp1, JDK 5, MySQL 5 and JBOSS portal 2.42.

    I wonder why cant I start my JSP file. Here is the code:

    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/theme/portlet.tld" prefix="portlet"%>
    <jsp:directive.page
        import="org.apache.commons.validator.GenericValidator" />
    
    <jsp:directive.page import="com.cpd.hat.util.AttrConst"/>
    <portlet:defineObjects />
     <!--body-->
     <%
         String message = (String)renderRequest.getAttribute(AttrConst.MESSAGE);
         if(!GenericValidator.isBlankOrNull(message)){
            %>
                <script type="text/javascript">
                     var message = '<%=message%>';
                     if(message != null && message.length > 0 && typeof(message) != 'undefined'){
                         alert(message);
                         message = null;                     
                     }             
                 </script>
            <%    
            message = null;
            if(renderRequest.getAttribute(AttrConst.MESSAGE) != null){
                renderRequest.removeAttribute(AttrConst.MESSAGE);
                renderRequest.setAttribute(AttrConst.MESSAGE, null);
            }     
         } 
     %>
     <div id="middle">     
     
      <div style="padding-bottom:10px"><img src="<%=renderRequest.getContextPath()%>/images/banner.jpg" style="border:1px solid #757575"/></div>
      </div> 
     <!--end body-->

    It thows an exeption like this:

     GenericValidator
    16:30:39,656 ERROR [CommandFilter] Exception in command invocation
    org.apache.jasper.JasperException: Unable to compile class for JSP
    
    Generated servlet error:
    C:\Program Files\jboss-portal-2.4.2\server\default\work\jboss.web\localhost\pmover\org\apache\jsp\WEB_002dINF\jsp\admin\mainAdmin_jsp.java:7: package com.cpd.hat.model does not exist
    import com.cpd.hat.model.AttrConst;
    
    C:\Program Files\jboss-portal-2.4.2\server\default\work\jboss.web\localhost\pmover\org\apache\jsp\WEB_002dINF\jsp\admin\mainAdmin_jsp.java:7: package com.cpd.hat.model does not exist
    import org.apache.commons.validator.GenericValidator;
    

    I changed ” jsp:directive.page ” to “<%@ page “, but still resulted error.
    So, what is wrong with my JSP file?

    #290048 Reply

    Loyal Water
    Member

    I’m not sure. Some other user on this forum would be able to help you with this.

    #290088 Reply

    Thanks man,

    I am using Serlvet 2.4. My thinking is a misconfiguration in web.xml

    <web-app version=”2.4″ xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;

    </web-app>

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: JBOSS portal 2.42 error in compiling JSP

You must be logged in to post in the forum log in