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?