- This topic has 2 replies, 2 voices, and was last updated 16 years, 1 month ago by Gabriel Khoa Bui.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
Gabriel Khoa BuiMemberIm 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?
Loyal WaterMemberI’m not sure. Some other user on this forum would be able to help you with this.
Gabriel Khoa BuiMemberThanks 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”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>
…
</web-app> -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)