JSP not compiled by JASPER, but OK by hand
If I alter my JSPs, I get the message at the bottom. However, if I go to the work directory and manually do a JAVAC on the _jsp.java file, it compiles fine and I can refresh the page and it is now fine. I'm using a bean, and to make it work by hand had to move it into the work directory under its package name. Is the \/*.jsp in the source name causeing this error?
I am using APACHE 2, TOMCAT 4.1, ANT 1.4 and mod_jk on a Windows 2000 server machine.
Following this message is the relavent parts of my environment variables:
======================================================
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:324)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:535)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
2002-10-11 08:39:59 Error compiling file: D:\Programs\Apache\Tomcat\work\Standalone\localhost\_\/ISS_jsp.java [javac] Compiling 1 source file
======================================================
ANT_HOME=D:\Programs\Apache\Ant
APACHE_HOME=D:\Programs\Apache\Apache2
CATALINA_HOME=D:\Programs\Apache\Tomcat
CLASSPATH=.;D:\Programs\SQLLIB\java\db2java.zip;D:\Programs\SQLLIB\java\runtime.zip;d:\java\jdk1.4\lib\ext\QTJava.zip;D:\JAVA\JDK1.4
\lib;D:\JAVA\J2EE\lib\j2ee.jar;D:\JAVA\J2EE\lib\jhall.jar;
DB2INSTANCE=DB2
DB2TEMPDIR=D:\Programs\SQLLIB
J2EE_HOME=D:\JAVA\J2EE
JAVA_HOME=D:\JAVA\JDK1.4
JDK_HOME=D:\JAVA\JDK1.4
libpath=.;D:\JAVA\JDK1.4\lib;D:\JAVA\J2EE\lib;
Path=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;D:\Programs\SQLLIB\BIN;D:\Programs\SQLLIB\FUNCTION;D:\Programs\SQLLIB\SAMPLES
\REPL;D:\Programs\SQLLIB\HELP;D:\IMNNQ_NT;d:\Programs\PGPNT;D:\JAVA\JDK1.4\bin;D:\JAVA\J2EE\bin;;D:\Programs\PROTEC~1
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0801
QTJAVA="d:\java\jdk1.4\lib\ext\QTJava.zip"
I have this error too...
In log of tomcat it appears the following error:
2002-11-27 09:16:55 Error compiling file: C:\Arquivos de programas\Apache Group\Tomcat 4.1\work\Standalone\localhost\fms\/index_jsp.java [javac] Compiling 1 source file
I believe that the error occurs due to ?... \/index_jsp.java? that it appears in the message.
Where I can correct this error?
Help-me...
Mr. Darcy
In browser it appers the following error:
Type:Exception report
message description: The server encountered an internal error () that prevented it from fulfilling this request.
exception :
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:324)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
Similar Messages
-
I have some JSP code which does not compile in JDeveloper but works fine when deployed in a web server (Websphere).
There is a page called main.jsp with code like:
Map clientDataList = (Map) request.getAttribute("clientDataList");
<%@ include file="standard1Page.jsp" %>
clientDataList is set in a servlet which forwards to main.jsp. On standard1Page.jsp I want to access the clientDataList object:
<%= clientDataList.get("sitealignment") %>
But standard1Page.jsp does not compile in JDeveloper because clientDataList is not defined on that page:
Error(2,75): variable clientDataList not found in class _standard1Page
Is this a fundamental problem with JDeveloper not following through the "includes" when doing the project compile, or is there something I can set to make this stuff compile. If not I'm going to have to edit my JSPs in a text editor so I can compile my project.
FrancisI have some JSP code which does not compile in JDeveloper but works fine when deployed in a web server (Websphere).
There is a page called main.jsp with code like:
Map clientDataList = (Map) request.getAttribute("clientDataList");
<%@ include file="standard1Page.jsp" %>
clientDataList is set in a servlet which forwards to main.jsp. On standard1Page.jsp I want to access the clientDataList object:
<%= clientDataList.get("sitealignment") %>
But standard1Page.jsp does not compile in JDeveloper because clientDataList is not defined on that page:
Error(2,75): variable clientDataList not found in class _standard1Page
Is this a fundamental problem with JDeveloper not following through the "includes" when doing the project compile, or is there something I can set to make this stuff compile. If not I'm going to have to edit my JSPs in a text editor so I can compile my project.
Francis The problem is that "standard1page.jsp" is not a JSP page, it is just a text fragment to be included in a real JSP page. As it's just a fragment, it won't compile correctly as a JSP page. If you add it to your project as ".jsp", JDeveloper tries to compile it.
A common convention for JSP included fragments is to name them with a".jspf" suffix, so it's relatively clear what they are, and to make the IDE not compile them as JSP pages. -
Jsp not compiling....
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ page import='com.uk.nhs.training.data.ActivityMatrix'%>
<%@ page errorPage="ExceptionHandler.jsp"%>
<SCRIPT language="JavaScript" type="text/javascript">
function showBookingDays(id)
var bookings = document.getElementsByName('booking');
alert(bookings.length);
for(i=0;i<=bookings.length;i++)
if(bookingConflicts.bookings.checked==true)
//showDiv(id);
else
bookingConflicts.bookings[i].checked=false;
function showDiv(divId)
var item = document.getElementById(id);
alert("show item"+item);
if (item)
item.className='unhidden';
</script>
<div id="content"><!-- Top story -->
<div id="topstory" class="box">
<div id="topstory-img"></div>
<!-- /topstory-img -->
<div id="topstory-desc">
<div id="topstory-title"><strong>BOOK Activity</strong></div>
<!-- /topstory-title -->
<div id="topstory-desc-in"></div>
<!-- /topstory-desc-in --></div>
<!-- /topstory-desc --></div>
<!-- /topstory -->
<div id="bodycontent">
<% int errorCount=0; %>
<spring:bind path="bookactivityevent.*">
<c:forEach items="${status.errorMessages}" var="error">
<B><font color="red">Error: <c:out value="${error}"/></font><B/>
<% errorCount++; %>
</c:forEach>
</spring:bind>
<form method="post" name="bookingConflicts" action="<c:url value="/secure/bookActivityTrainer.htm"/>">
<input type="hidden" name="bookingId"/>
<input type="hidden" name="bookingDetailsId"/>
<table align="left" width="50%" border=0>
<tr>
<td></td>
<td>BookingType</td>
<td>ClientName</td>
<td>CourseTitle</td>
<td>Duration</td>
<tr>
</tr>
<tr>
<c:forEach var="booking" items="${bookactivityevent.conflictBookings}" varStatus="a">
<tr align="left">
<td><INPUT TYPE="checkbox" NAME="booking" id="booking" value="<c:out value="${booking.bookingId}"/>" onClick="showBookingDays('<c:out value="${booking.bookingId}"/>')"></td>
<td><c:out value="${booking.bookingType}"/></td>
<td><c:out value="${booking.client.orgName}"/></td>
<td><c:out value=""/></td>
<td><c:out value="${booking.bookingId}"/></td>
<c:set var="temp" value="${0}"/>
<c:forEach var="bookingDetails" items="${booking.bookingDetails}">
<tr align="right">
<div align="left class="hidden" id="<c:out value="${booking.bookingId}"/>" >
<td>
<INPUT TYPE="RADIO" NAME="bookingDetails" id="<c:out value="${bookingDetails.bookingDetailsId}"/>" onClick="">Day<c:out value="${temp}"/>
</td>
<td>
<c:out value="${bookingDetails.trainer.firstName}"/><c:out value="${bookingDetails.trainer.surName}"/>
</td>
<c:set var="temp" value="${temp+1}"/>
</div>
</tr>
</c:forEach>
</tr>
</c:forEach>
<tr>
<td align="left" colspan="2"><input type="submit" name="_target0" value="Previous"/></td>
<td align="left" colspan="2"><input type="submit" name="_target0" value="Amend"/></td>
<td align="left" colspan="2"><input type="submit" name="_target2" value="Submit"/></td>
<td align="left" colspan="2"><input type="submit" name="_target2" value="Rebook/Cancel"/></td>
<td align="left" colspan="2"><input type="button" name="Cancel"
value="Cancel" onClick="goHomePage();"/></td>
</tr>
</table>
</form>
</div>
<hr class="noscreen"/>
<!-- /content -->
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ page import='com.uk.nhs.training.data.ActivityMatrix'%>
<%@ page import='com.uk.nhs.training.data.ActivityTimeConstants'%>
<SCRIPT language="JavaScript" type="text/javascript">
function bookActivity()
if (document.bookActivityController.activitySelect.selectedIndex == 0)
alert("Please Select Activity");
else if (document.bookActivityController.trainerId.selectedIndex == 0)
alert ( "Please Select Trainer");
else if(document.bookActivityController.fromDate.value=="")
alert("Please supply the Start Date of Activity")
else
validateForExistingCourses();
function validateForExistingCourses()
flag="wait";
var trainerId=document.getElementById("trainerId").value;
var fromDate=document.getElementById("fromDate").value;
var toDate=document.getElementById("toDate").value;
var activityId=document.getElementById("activitySelect").value;
url="ajaxList.htm?actionType=checkBookedCoursesActivities&trainerId="+trainerId+"&fromDate="+fromDate+"&toDate="+toDate+"&activitySelect="+activityId;
what = "checkForPreBookedCoursesActivities(req.responseXML)";
doCallback(null);
function checkForPreBookedCoursesActivities(theXmlResponse)
// alert("in here in checking prebookedCourses");
if(theXmlResponse != null)
var isActivityExisting = theXmlResponse.getElementsByTagName('existingActivity')[0].text;
var isCourseExisting = theXmlResponse.getElementsByTagName('existingbookedcourse')[0].text;
if(isActivityExisting=="Y")
alert("Activity You are trying to book for Trainer already exists");
return false;
else if(isCourseExisting=="Y")
if(confirm('Conflict Message. The dates choosen conflict with a current booking.Do you want to override'))
window.open("/training1.1/secure/prebookedEvents.htm","clientwindow",'StatusBar', 'toolbar=yes,resizable=yes,scrollbars=yes,width=500,height=400,left=0,top=0');
return false;
else
document.bookActivityController.action="/training1.1/secure/bookActivityTrainer.htm?actionType=submitForm";
document.bookActivityController.submit();
function goHomePage()
window.location="/training1.1/secure/welcome.htm";
function showHideAmPm(divId)
if(document.bookActivityController.halfday.checked==true)
showDiv(divId);
else
hideDiv(divId);
function showDiv(divId)
var item = document.getElementById(divId);
alert("show item"+item);
if (item)
item.className='unhidden';
function hideDiv(divId)
var item = document.getElementById(divId);
alert("unhide item"+item);
if (item)
item.className='hidden';
function getActivitiesPm()
if(document.bookActivityController.am.checked==true)
document.bookActivityController.pm.checked=false;
flag="wait";
url="ajaxList.htm?actionType=activities&keyword=PM";
what = "setActivities(req.responseXML)";
doCallback(null);
document.bookActivityController.activityTimeSelect.value="halfday";
document.bookActivityController.activityTimeSubType.value="pm";
// alert("subType"+document.bookActivityController.activityTimeSubType.value);
function getActivitiesAm()
if(document.bookActivityController.pm.checked==true)
document.bookActivityController.am.checked=false;
flag="wait";
url="ajaxList.htm?actionType=activities&keyword=AM";
what = "setActivities(req.responseXML)";
doCallback(null);
document.bookActivityController.activityTimeSelect.value="halfday";
document.bookActivityController.activityTimeSubType.value="pm";
function getSingleDayActivities()
if(document.bookActivityController.singleday.checked==true)
document.bookActivityController.moredays.checked=false;
document.bookActivityController.halfday.checked=false;
hideDiv('partofhalfday');
document.bookActivityController.activityTimeSelect.value="fullday";
flag="wait";
url="ajaxList.htm?actionType=activities&keyword=FullDay";
what = "setActivities(req.responseXML)";
doCallback(null);
else
hideDiv('activitySelect');
function getMoreDaysActivities()
alert();
if(document.bookActivityController.moredays.checked==true)
document.bookActivityController.singleday.checked=false;
document.bookActivityController.halfday.checked=false;
hideDiv('partofhalfday');
document.bookActivityController.activityTimeSelect.value="moredays";
flag="wait";
url="ajaxList.htm?actionType=activities&keyword=FullDay";
what = "setActivities(req.responseXML)";
doCallback(null);
else
hideDiv('activitySelect');
showDiv('dateTo');
function setActivities(theXmlResponse)
//start filling the Venues Select boxes now
if(theXmlResponse != null)
var coursesBox=document.getElementById("activitySelect");
coursesBox.options.length=0;
var activityElementsLength=theXmlResponse.getElementsByTagName('activity').length;
var activityElementsArray=theXmlResponse.getElementsByTagName('activity');
//alert("length"+activityElementsLength+activityElementsArray);
for(x = 0; x < activityElementsLength; x++)
//coursesBox.options[coursesBox.options.length] = new Option(coursesElementsArray[x].firstChild.text, coursesElementsArray[x].lastChild.text);
var optn = document.createElement("OPTION");
optn.text = activityElementsArray[x].firstChild.text;
optn.value = activityElementsArray[x].lastChild.text;
coursesBox.options.add(optn);
if (activityElementsLength>0)
showDiv('activityTD');
flag="release";
</script>
<div id="content"><!-- Top story -->
<div id="topstory" class="box">
<div id="topstory-img"></div>
<!-- /topstory-img -->
<div id="topstory-desc">
<div id="topstory-title"><strong>BOOK Activity</strong></div>
<!-- /topstory-title -->
<div id="topstory-desc-in"></div>
<!-- /topstory-desc-in --></div>
<!-- /topstory-desc --></div>
<!-- /topstory -->
<div id="bodycontent">
<% int errorCount=0; %>
<spring:bind path="bookactivityevent.*">
<c:forEach items="${status.errorMessages}" var="error">
<B><font color="red">Error: <c:out value="${error}"/></font><B/><br/>
<% errorCount++; %>
</c:forEach>
</spring:bind>
<form method="post" name="bookActivityController" action="<c:url value="/secure/bookActivityTrainer.htm"/>">
<table align="right" width="50%" border=0>
<input type="hidden" name="activityTimeSelect"/>
<input type="hidden" name="activityTimeSubType"/>
<tr>
<td align="left">
<spring:bind path="bookactivityevent.userSuppliedActivity.activity.time">
<c:set var="activitytime" value="${bookactivityevent.userSuppliedActivity.activity.time}"/>
<INPUT TYPE="checkbox" NAME="halfday" onclick="showHideAmPm('partofhalfday')" <c:if test="${(activitytime == 'AM')}"> checked</c:if>/>Half Day
<div align="left "id="partofhalfday"
<c:choose>
<c:when test="${(activitytime eq 'AM') || (activitytime eq 'PM')}"> </c:when>
<c:otherwise> class="hidden"</c:otherwise>
</c:choose>>
<INPUT TYPE="RADIO" NAME="am" onClick="getActivitiesAm()" value="am" <c:if test="${(activitytime eq 'AM')}"> checked </c:if> >AM <INPUT TYPE="RADIO" NAME="pm" onClick="getActivitiesPm()" <c:if test="${(activitytime eq 'PM')}"> checked </c:if>>PM <BR>
</div>
</td>
</tr>
<tr>
<td><INPUT TYPE="checkbox" NAME="singleday" onClick="getSingleDayActivities()" <c:if test="${activitytime eq 'FULLDAY'}"> checked </c:if>> Single Day</td>
</tr>
<tr>
<td><INPUT TYPE="checkbox" NAME="moredays" onClick="getMoreDaysActivities()" <c:if test="${activitytime eq 'MOREDAYS'}"> checked </c:if>> More Days</td>
</tr>
</spring:bind>
<tr>
<td align="left" id="activityTD">Activity :
<c:set var="activityList" value="${requestScope.activityMap}"/>
<c:choose>
<c:when test="${empty activityList}">
<spring:bind path="bookactivityevent.userSuppliedActivity.activity.activityId">
<select name="activitySelect" id="activitySelect" size="1"
STYLE="width: 150px">
<option value="Choose Activity" default>Choose Activity</option>
</select>
</spring:bind>
</c:when>
<c:otherwise>
<spring:bind path="bookactivityevent.userSuppliedActivity.activity.activityId">
<select name="activitySelect" id="activitySelect"
size="1" STYLE="width: 150px">
<option value="" default>Choose Activity</option>
<c:forEach var="activity" items="${activityList}" varStatus="a">
<c:choose>
<c:when
test="${(bookactivityevent !=null) && (bookactivityevent.userSuppliedActivity.activity.activityId == activity.activityId)}">
<option value="<c:out value="${activity.activityId}"/>" selected><c:out
value="${activity.activityId}" /></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${activity.activityId}"/>"><c:out
value="${activity.activity}"/>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</spring:bind>
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<td align="left">Trainer:
<spring:bind path="bookactivityevent.userSuppliedActivity.trainer.trainerId">
<select name="trainerId" id="trainerId"
size="1" STYLE="width: 150px">
<option value="" default>Choose Trainer</option>
<c:forEach var="trainer" items="${trainers}" varStatus="a">
<c:choose>
<c:when
test="${(bookactivityevent !=null) && (bookactivityevent.userSuppliedActivity.trainer.trainerId == trainer.trainerId)}">
<option value="<c:out value="${trainer.trainerId}"/>" selected>
<c:out value="${trainer.firstName}"/> <c:out
value="${trainer.surName}" /></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${trainer.trainerId}"/>"><c:out
value="${trainer.firstName}"/> <c:out
value="${trainer.surName}" /></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</spring:bind>
</td>
</tr>
<tr>
<td align="left" id="dateFrom">From Date
<spring:bind path="bookactivityevent.userSuppliedActivity.dateFrom">
<fmt:formatDate var="formattedFromDate" type="date" pattern="dd/MM/yyyy" value="${status.value}"/>
<input type="text" name="dateFrom" value="<c:out value='${formattedFromDate}'/>"/>
</spring:bind>
<a href="javascript:cal1.popup();"><img
src="../design/cal.gif" width="16" height="16" border="0"
alt="Click Here to Pick up the date"></a></td>
</tr>
<tr>
<td align="left" id="dateTo" class="hidden">To Date
<spring:bind path="bookactivityevent.userSuppliedActivity.dateTo">
<fmt:formatDate var="formattedToDate" type="date" pattern="dd/MM/yyyy" value="${status.value}"/>
<input type="text" name="dateTo" value="<c:out value='${formattedToDate}'/>"/>
</spring:bind>
<a href="javascript:cal2.popup();"><img
src="../design/cal.gif" width="16" height="16" border="0"
alt="Click Here to Pick up the date"></a></td>
</tr>
<tr>
<td align="left" colspan="2"><input type="submit" name="_target2" value="BookActivity"/></td>
<c:if test="${(bookactivityevent != null) && (not empty bookactivityevent.conflictBookings)}">
<td align="left" colspan="2"><input type="submit" name="_target1" value="OverRideBookings"/></td>
</c:if>
<td align="left" colspan="2"><input type="button" name="Cancel"
value="Cancel" onClick="goHomePage();" /></td>
</tr>
</table>
</form>
</div>
<hr class="noscreen"/>
<div class="content-padding"></div>
<script language="JavaScript">
var cal1 = new calendar1(document.bookActivityController.elements['dateFrom']);
cal1.year_scroll = true;
cal1.time_comp = false;
var cal2 = new calendar1(document.bookActivityController.elements['dateTo']);
cal2.year_scroll = true;
cal2.time_comp = false;
</script></div>
<!-- /content -->
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ page isELIgnored="false" %>
<%@ page import="java.util.List" %>
<%@ page import="com.uk.nhs.training.data.BookingDetails" %>
<div id="content">
<!-- Top story -->
<div id="topstory" class="box">
<div id="topstory-img"></div> <!-- /topstory-img -->
<div id="topstory-desc">
<div id="topstory-title">
<strong>BOOK COURSE (CONT..)</strong>
</div> <!-- /topstory-title -->
<div id="topstory-desc-in">
</div> <!-- /topstory-desc-in -->
</div> <!-- /topstory-desc -->
</div> <!-- /topstory -->
<div>
<SCRIPT language="JavaScript" type="text/javascript">
function setEndDate()
var i=0;
for (var j = 0; j < document.forms[0].elements.length; j++) {
if (document.forms[0].elements[j].type == 'text')i++;
for (var k = 0; k < i; k++) {
document.getElementById("hhh"+k).value=document.getElementById("bbb"+k).value;
function free_date_picker(obj_name, layer_name, text_to ,type, hide_self, language, row_id, coursetime)
// IF str < lng, add leading 0 to complete the str
function leading_zeros(str, lng)
// param validation
if(lng == null)
lng = 2;
var str = str.toString();
while(str.length < lng)
str = '0' + str;
return str;
// Nbr days for this month
function returnDays(date)
var year = date.getFullYear();
var month = date.getMonth();
var days = 31;
if( month == 3 || month == 5 || month == 8 || month == 10 ){
days = 30;
else if(month == 1){
days = 28;
if(year % 4 == 0){
days = 29;
if(year % 100 == 0){
days = 28;
if(year % 400 == 0){
days = 29;
return(days);
// Return last month
function returnLastMonth(date)
var year = date.getFullYear();
var month = date.getMonth();
var dt = new Date();
month --;
if(month == -1){
month = 11;
year --;
dt.setYear(year);
dt.setDate(1);
dt.setMonth(month);
return dt;
// Retourne le mois suivant
function returnNextMonth(date)
var year = date.getFullYear();
var month = date.getMonth();
var dt = new Date();
month ++;
if(month == 12){
month = 0;
year ++;
dt.setYear(year);
dt.setDate(1);
dt.setMonth(month);
return dt;
// Retourne le nom du mois
function return_month_name(date)
switch(language){
case("en"):
var month = new Array('January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December');
break;
case("fr"):
default:
var month = new Array('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
return month[date.getMonth()];
function return_month_in_letters(themonth)
switch(language){
case("en"):
var month = new Array('January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December');
break;
case("fr"):
default:
var month = new Array('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
return month[themonth];
this.setto = function(eng_date)
// input text
if(type == 1)
document.getElementById(text_to).value = eng_date;
// span, div ...
if(type == 2)
document.getElementById(text_to).innerHTML = eng_date;
this.write_calendar = function(date)
var monDate;
var nb_days_last_month = 0;
var cnt_days = 0;
var days_month = 0;
var str = new String();
var style = new String();
var next_month = new Date();
var last_month = new Date();
var today = new Date();
var date = new Date(date);
var last_year = new Date(date);
var next_year = new Date(date);
date.setDate(1); // le premier du mois
next_month = returnNextMonth(date); // le mois précédent
last_month = returnLastMonth(date); // le mois suivant
nb_days_last_month = returnDays(last_month); // nombre jours mois précédent
cnt_days = -date.getDay()+1; // compteur de jours, part le dimanche du début du mois
days_month = returnDays(date); // nombre de jours mois sélectionné
str = ''; // forge la chaîne de caractères à mettre dans la div
next_year.setYear(date.getFullYear() + 1); // année précédente
last_year.setYear(date.getFullYear() - 1); // année suivante
str += '<table cellspacing="0" cellpadding="0" border="1" width="250" bgcolor="blue">';
str += '<tr>';
// année précédente
str += ' <td colspan="1" align="left"><a href="' + "javascript:" +
obj_name + ".write_calendar('" + eval(last_year) + "')" + ';"><--</a></td>';
// mois précédent
str += ' <td colspan="1" align="left"><a href="' + "javascript:" +
obj_name + ".write_calendar('" + eval(last_month) + "')" + '"><-</a></td>';
// libellé mois année
str += ' <td colspan="3" align="center">'
str += return_month_name(date) + ' ' + date.getFullYear();
str += ' </td>';
// mois suivant
str += ' <td colspan="1" align="right"><a href="' + "javascript:" +
obj_name + ".write_calendar('" + eval(next_month) + "')" + '">-></a></td>';
// année suivante
str += ' <td colspan="1" align="right"><a href="' + "javascript:" +
obj_name + ".write_calendar('" + eval(next_year) + "')" + '">--></a></td>';
str += '</tr>';
// pour tous les jours du mois
var cnt_semaines = 0;
while(cnt_semaines < 6){
cnt_semaines ++;
str += ' <tr>';
for(var cnt = 0; cnt < 7; cnt++){
// mois suivant
if(cnt_days > days_month){
day = cnt_days - days_month;
month = next_month.getMonth() + 1;
year = next_month.getFullYear();
style = "font-size:10px;";
// mois précédent
else if(cnt_days < 1){
day = cnt_days + nb_days_last_month;
month = last_month.getMonth() + 1;
year = last_month.getFullYear();
style = "font-size:10px;";
// mous sélectionné
else{
var d1 = new Date();
var d2 = new Date();
// Todays date for comparision.
var today=new Date();
d1.setMonth(date.getMonth());
d1.setYear(date.getFullYear());
d1.setDate(cnt_days);
day = cnt_days;
month = date.getMonth() + 1;
year = date.getFullYear();
// aujourd'hui ?
if(d1.getFullYear() == d2.getFullYear() && d1.getMonth() == d2.getMonth() && d1.getDate() == d2.getDate() ){
style = "font-size:18px;font-color:red;";
else{
style = "font-size:12px;";
//dstr = year + '/' + leading_zeros(month) + '/' + leading_zeros(day);
dstr=leading_zeros(day) + ' ' + return_month_in_letters(month-1) + ' ' + year;
if (cnt==1) monDate=dstr;
// inscrit la cellule
str += ' <td width="14%">';
str += ' <span style="' + style + '">';
if (month < (today.getMonth()+1) || (year < today.getFullYear()) ) {
str += '<font color="darkblue">';
str += day;
str += '</font>';
} else if ((cnt>=1)&& (cnt<=5) && (month == (today.getMonth()+1)) && (day > today.getDate())) {
str += ' <a href="javascript:' + obj_name + '.setto(\'' + dstr + '\')" onClick="getWeekCalendarViewTrainer(\''+monDate+'\', \''+row_id+'\', \''+coursetime+'\', \''+dstr+'\')">';
str += day;
str += ' </a>';
} else if ( ((cnt>=1)&& (cnt<=5) && (month > (today.getMonth()+1))) || ( (cnt>=1)&& (cnt<=5) && (year > today.getFullYear()) ) ) {
str += ' <a href="javascript:' + obj_name + '.setto(\'' + dstr + '\')" onClick="getWeekCalendarViewTrainer(\''+monDate+'\', \''+row_id+'\', \''+coursetime+'\', \''+dstr+'\')">';
str += day;
str += ' </a>';
}else {
str += '<font color="darkblue">';
str += day;
str += '</font>';
str += ' </font>';
str += ' </td>';
cnt_days ++;
str += ' </tr>';
str += '</table>';
document.getElementById(layer_name).innerHTML = str;
this.show = function()
if(hide_self)
document.getElementById(layer_name).style.visibility = 'visible';
this.hide = function()
if(hide_self)
document.getElementById(layer_name).style.visibility = 'hidden';
// create layer and show calendar
document.write('<div id="' + layer_name + '" onmouseout="' + obj_name + '.hide();">...</div>');
this.write_calendar(new Date());
</SCRIPT>
<form name="BookType2" action="<c:url value="/secure/bookCourse.htm"/>" method="post" onsubmit="javascript:setEndDate()">
<%int errorCount=0; %>
<spring:bind path="booking.*">
<c:forEach items="${status.errorMessages}" var="error">
<B><font color="red">Error: <c:out value="${error}"/></font><B/><br/>
<% errorCount++; %>
</c:forEach>
</spring:bind>
<% if (errorCount == 0) { %>
<table width="960">
<%int i=0; %>
<c:forEach items="${booking.bookingDetails}" var="q" varStatus="rowStatus">
<tr><td colspan="3">Pick a Date from the Date Picker for Course:
<strong> <c:out value="${q.course.courseTitle}"/></strong></td></tr>
<tr><td>
<%String theCourseTime=((BookingDetails)pageContext.getAttribute("q")).getCourse().getCoursetime();%>
<script>var b<%=i %> = new free_date_picker('b<%=i %>', 'date_picker_b<%=i %>', 'bbb<%=i %>', 1, false, 'en', '<%=i %>', '<%=theCourseTime%>');</script>
</td><td>
<spring:bind path="booking.bookingDetails['${rowStatus.index}'].startDate">
<input name="bookingDetails[<%=i %>].startDate" id="bbb<%=i %>" type="text" size="17" readOnly="true" value="<c:out value="${status.value}"/>" />
</spring:bind>
<spring:bind path="booking.bookingDetails['${rowStatus.index}'].endDate">
<input name="bookingDetails[<%=i %>].endDate" id="hhh<%=i %>" type="hidden" value="<c:out value="${status.value}"/>" />
</spring:bind>
<br/><br/>
<c:if test="${q.trainer.trainerId == null}">
<spring:bind path="booking.bookingDetails['${rowStatus.index}'].trainer.trainerId">
<select name="bookingDetails[<%=i %>].trainer.trainerId" id="trainerValue<%=i %>">
<option value="">Select trainer</option>
</select>
</spring:bind>
</c:if>
<c:if test="${q.trainer.trainerId != null}">
<spring:bind path="booking.bookingDetails['${rowStatus.index}'].trainer.trainerId">
<select name="bookingDetails[<%=i %>].trainer.trainerId" id="trainerValue<%=i %>">
<option value="<c:out value="${status.value}"/>" selected><c:out value="${q.trainer.title} ${q.trainThe slightest mistake in a javascript function will cause JSP to have problems and Javascript will not tell you what the
problem is. Example, if you are missing a ';' it will not tell you where the problem is.
Its best to comment out all contents of all the javascript functions and run your JSP. If displays ok, then uncomment
out one function at a time and try running the JSP again. Keep doing this until you come across the one or more
functions that have a problem and fix them.
One problem I think I found is this:
FROM
for(i=0;i<=bookings.length;i++)
TO:
for(var i=0;i<=bookings.length;i++)
If you comment out the javascript and it still doesnt compile, comment out blocks of the html tags, then uncomment one section at a time to see where the problem is. Alternatively, install an IDE such as Eclipse. Its JSP editor will often highlight where there is a problem in the html tags (but not in the javascript) -
Can not compile the jsp in Tomcat 4
Hello anyone
Now I use jdk1.4 and Tomcat 4.0.4, and put in the directory d:\j2sdk and d:\tomcat. Even I set the classpath as follow, I still compile jsp.
SET CLASSPATH=.;D:\j2sdk\lib\tools.jar;D:\tomcat\common\lib\servlet.jar
but at before, i can run it at Tomcat 3.2.
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
D:\tomcat\work\Standalone\localhost\_\userCounter$jsp.java:4: Class or interface declaration expected.
import javax.servlet.*;
^
D:\tomcat\work\Standalone\localhost\_\userCounter$jsp.java:10: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.userCounter$jsp not found.
public class userCounter$jsp extends HttpJspBase {
^
2 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
pls help, thank you very much!This is a new problem with jdk1.4 when compiling with tomcat.
The solution is to ensure that any classes in WEB-INF/classes are in a package structure and the relevant jsp calls the same using the package name.
best
kev -
JSP Pages are not compiling in JBoss5.1.0GA
Hi Folks,
We have developed an webapplication and we deployed in JBoss4.0.1sp1 application is running fine.
One week back we downloaded JBoss5.1.0GA and we deployed the same application in JBoss5.1.0GA, but we are getting this eaception "org.apache.jasper.JasperException: Unable to compile class for JSP: "
please find the exception details below
====================================================================================================
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 56 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
An error occurred at line: 17 in the jsp file: /pages/configset/createconfigset.jsp
The method setJspId(String) is undefined for the type ViewTag
14: <%@page import="com.cisco.wo.configui.beans.backing.configset.CreateBackingBean"%>
15: <%@page import="com.cisco.wo.configui.utils.ConfigUIConst"%>
16:
17: <f:view>
18:
19:
20: <%
An error occurred at line: 45 in the jsp file: /pages/configset/create.jsp
The method setJspId(String) is undefined for the type SubviewTag
42:
43: <!-- Start header -->
44:
45: <f:subview id="configsetHeader">
46: <c:import url="configsetheader.jsp" />
47: </f:subview>
48:
An error occurred at line: 45 in the jsp file: /pages/configset/createt.jsp
The method setBodyContent(BodyContent) is undefined for the type SubviewTag
42:
43: <!-- Start header -->
44:
45: <f:subview id="configsetHeader">
46: <c:import url="setheader.jsp" />
47: </f:subview>
48:
An error occurred at line: 45 in the jsp file: /pages/configset/create.jsp
The method doInitBody() is undefined for the type SubviewTag
42:
43: <!-- Start header -->
44:
45: <f:subview id="configsetHeader">
46: <c:import url="configsetheader.jsp" />
47: </f:subview>
48:
Thanks in Advance...!Hi All,
We developed the JSF web application in JBoss4.0.1SP1 the application running fine.
The same application we deployed in JBoss5.1.0GA some of the pages are compiling and some of the pages are not compiling.
the exception log:
=======================================================================================================================================
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 16 in the jsp file: /pages/configset/itemstab.jsp
The method setJspId(String) is undefined for the type ViewTag
13: <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
14:
15: <%@page errorPage="configseterrorpage.jsp"%>
16: <f:view>
17: <head>
18: <title>Configuration Set - Items</title>
19: <!-- Include Global Meta Data -->
An error occurred at line: 46 in the jsp file: /pages/configset/itemstab.jsp
The method setJspId(String) is undefined for the type SubviewTag
43:
44: <!--googleoff: index-->
45:
46: <f:subview id="configsetheader">
47: <c:import url="configsetheader.jsp" />
48: </f:subview>
49:
An error occurred at line: 46 in the jsp file: /pages/configset/itemstab.jsp
The method setBodyContent(BodyContent) is undefined for the type SubviewTag
43:
44: <!--googleoff: index-->
45:
46: <f:subview id="configsetheader">
47: <c:import url="configsetheader.jsp" />
48: </f:subview>
49:
An error occurred at line: 46 in the jsp file: /pages/configset/itemstab.jsp
The method doInitBody() is undefined for the type SubviewTag
43:
44: <!--googleoff: index-->
45:
46: <f:subview id="configsetheader">
47: <c:import url="configsetheader.jsp" />
48: </f:subview>
49:
An error occurred at line: 413 in the generated java file
The method doAfterBody() is undefined for the type SubviewTag
An error occurred at line: 61 in the jsp file: /pages/configset/itemstab.jsp
The method setJspId(String) is undefined for the type SubviewTag
58:
59: <!-- Begin Main Content -->
60: <div class="icw">
61: <div class="icwWrapper icwOrder" style="width: 921px"><f:subview
62: id="configsetsummary">
63: <c:import url="configsetsummary.jsp" />
64: </f:subview></div>
An error occurred at line: 61 in the jsp file: /pages/configset/itemstab.jsp
The method setBodyContent(BodyContent) is undefined for the type SubviewTag
58:
59: <!-- Begin Main Content -->
60: <div class="icw">
61: <div class="icwWrapper icwOrder" style="width: 921px"><f:subview
62: id="configsetsummary">
63: <c:import url="configsetsummary.jsp" />
64: </f:subview></div>
note The full stack trace of the root cause is available in the JBoss Web/2.1.3.GA logs.
============================================================================
Thanks in Advance...! -
I have tried a lot searching for such issue, but cd not find any solution which
cd help me.
We have a jsp which compiles well in one enviroment, but does not compile in another.
The enviroment in which it compiles is as follows:
OS: Solaris 2.6, Patch level 32
wls version: 6.1 with no service pak
The enviroment in which it does not compile is as follows:
OS: Solaris 8, Patch level 19
wls version: 6.1 with no service pak
In the second enviroment, it gives the folowing error, when invoked...
//error start....
/requisition/reqteamwiz.jsp(532): scriptlet close brace '}' unbalanced at line
532 which breaks scope '_base_service_scope_'
probably occurred due to an error in /requisition/reqteamwiz.jsp line 532:
<strong><font face="Verdana" size="1"><input type="button" style="font-family:
Verdana; font-size: 8pt" name="B1" value=" Submit " onClick="FrontPage_Form1_Validator(document.FrontPage_Form1,
'<%= i%>')"></td></font></strong>
//error end
The line seems OK, and this works fine in the first enviroment.
Cd anyone pls give any suggestions or references as to any known issues with the
second enviroment.
Thanks a lot...
[email protected] (David M. Karr) wrote:
>>>>>> "vinay" == vinay s <[email protected]> writes:
>
> vinay> I have tried a lot searching for such issue, but cd not find
>any solution which
> vinay> cd help me.
> vinay> We have a jsp which compiles well in one enviroment, but does
>not compile in another.
> vinay> The enviroment in which it compiles is as follows:
> vinay> OS: Solaris 2.6, Patch level 32
> vinay> wls version: 6.1 with no service pak
>
> vinay> The enviroment in which it does not compile is as follows:
> vinay> OS: Solaris 8, Patch level 19
> vinay> wls version: 6.1 with no service pak
>
> vinay> In the second enviroment, it gives the folowing error, when
>invoked...
> vinay> //error start....
> vinay> /requisition/reqteamwiz.jsp(532): scriptlet close brace '}'
>unbalanced at line
> vinay> 532 which breaks scope '_base_service_scope_'
> vinay> probably occurred due to an error in /requisition/reqteamwiz.jsp
>line 532:
> vinay> <strong><font face="Verdana" size="1"><input type="button"
>style="font-family:
> vinay> Verdana; font-size: 8pt" name="B1" value=" Submit " onClick="FrontPage_Form1_Validator(document.FrontPage_Form1,
> vinay> '<%= i%>')"></td></font></strong>
> vinay> //error end
>
> vinay> The line seems OK, and this works fine in the first enviroment.
> vinay> Cd anyone pls give any suggestions or references as to any
>known issues with the
> vinay> second enviroment.
> vinay> Thanks a lot...
>
>If you use an expression scriptlet for an attribute value, it has to
>be the
>entire attribute value, not just a portion of it.
>
>--
>===================================================================
>David M. Karr ; Java/J2EE/XML/Unix/C++
>[email protected] ; SCJP; SCWCD
>
>
I am using the scriplet for entire value, seems the post got jumbled up.
FrontPage_Form1_Validator is a javascript function which takes 2 parameters, one
of which is provided by the expression scriplet.
<strong><font face="Verdana" size="1"><input type="button" style="font-family:
Verdana; font-size: 8pt" name="B1" value=" Submit " onClick="FrontPage_Form1_Validator(document.FrontPage_Form1,
'<%= i%>')"></td></font></strong>
-
JSP Issue in 9.1 but not 8.1
I am building a Web application and packaging it into an EAR file then deploying it into 9.1 WebLogic server. I have an issue that is happening when I activate the changes at deployment time but this one is when it's trying to compile the JSP code, as follows:
-- cut --
Substituted for the exception weblogic.servlet.jsp.CompilationException which lacks a String contructor, original message - wi_marital_status_coapp_us_en.inc.jsp:53:2: This tag is not recognized. <jsp:usebean id="userBean" ^---------^ wi_marital_status_coapp_us_en.inc.jsp:61:2: This tag is not recognized. ><jsp:usebean id="errorBean" ^---------^ wi_marital_status_coapp_us_en.inc.jsp:69:2: This tag is not recognized. ><jsp:usebean id="creditAppBean" ^---------^ wi_marital_status_coapp_us_en.inc.jsp:79:35: The qualifier of this name is a package, which cannot contain methods. ><util:If predicate="<%= !userBean.isAuthenticated() %>" > ^-------------^ wi_marital_status_coapp_us_en.inc.jsp:87:25: No match was found for method size() in type <error>. <util:If predicate="<%= creditAppBean.getData().size() == 0 %>"> ^----------------------------^ wi_marital_status_coapp_us_en.inc.jsp:87:39: The qualifier of this name is a package, which cannot contain methods. <util:If predicate="<%= creditAppBean.getData().size() == 0 %>"> ^-----^ wi_marital_status_coapp_us_en.inc.jsp:95:32: The qualifier of this name is a package, which cannot contain methods. <% Set errorFields = errorBean.getMessageFields(); %> ^--------------^
-- cut --
It seems to be complaining about it in 9.1 but not in 8.1.
Please advise.
Thanks,
SamiI am getting the following errors when i am trying to build an existing web application. I was able to build it successfully using weblogic 8.1.
Below are the versions i am using
Weblogic 9.1
Ant1.6.2
JDK 1.5.0_04
===================================================
Results.jsp:596:63: The qualifier of this name is a package, which cannot contai
n methods.
onclick="PopupURLMenu('<%=ResultsUtil.getMyDoc(oDocs,cou
nt).getUrl()%>',
^------^
Results.jsp:598:28: No match was found for method getDisplayName() in type <erro
r>.
<%=ResultsUtil.getMyDoc(oDocs,count).getDisplayName()%>
^------------------------------------------------^
Results.jsp:598:40: The qualifier of this name is a package, which cannot contai
n methods.
<%=ResultsUtil.getMyDoc(oDocs,count).getDisplayName()%>
^------^
Results.jsp:606:55: No match was found for method getUrl() in type <error>.
onclick="PopupURLMenu('<%=ResultsUtil.getMyDoc(oDocs
,count+1).getUrl()%>',
^-------------------------
-----------------^
Results.jsp:606:67: The qualifier of this name is a package, which cannot contai
n methods.
onclick="PopupURLMenu('<%=ResultsUtil.getMyDoc(oDocs
,count+1).getUrl()%>',
^------^
Results.jsp:608:32: No match was found for method getDisplayName() in type <erro
r>.
<%=ResultsUtil.getMyDoc(oDocs,count+1).getDisplayNam
e()%>
^------------------------------------------------
--^
Results.jsp:608:44: The qualifier of this name is a package, which cannot contai
n methods.
<%=ResultsUtil.getMyDoc(oDocs,count+1).getDisplayNam
e()%>
^------^
Results.jsp:638:21: No match was found for method getDisplayName() in type <erro
r>.
if (ResultsUtil.getMyDoc(oDocs,q).getDisplayName().equals("") )
^--------------------------------------------^
Results.jsp:638:21: No match was found for method equals(java.lang.String) in ty
pe <error>.
if (ResultsUtil.getMyDoc(oDocs,q).getDisplayName().equals("") )
^-------------------------------------------------------^
Results.jsp:638:33: The qualifier of this name is a package, which cannot contai
n methods.
if (ResultsUtil.getMyDoc(oDocs,q).getDisplayName().equals("") )
^------^
at weblogic.servlet.jsp.jspc20.runBodyInternal(jspc20.java:424)
at weblogic.servlet.jsp.jspc20.runJspc(jspc20.java:195)
at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:239)
at weblogic.application.compiler.AppcUtils.compileWAR(AppcUtils.java:348
at weblogic.application.compiler.WARCompiler.compile(WARCompiler.java:74
at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCo
mpilerFlow.java:113)
at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompile
rFlow.java:43)
at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDri
ver.java:55)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:24)
at weblogic.application.compiler.Appc.runBody(Appc.java:151)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:115)
at weblogic.application.compiler.Appc.main(Appc.java:162)
at weblogic.appc.main(appc.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:
290)
at weblogic.ant.taskdefs.j2ee.Appc.privateExecute(Appc.java:243)
at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:154)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
====================================
Is this a problem with the classpath ?
Thanks in advance,
Bye -
Some jsps will not compile FC5+Tomcat
Hello,
I cannot compile SOME jsp pages for some reason.
I have something like this:
http://www.mydomain.net:8080/WEB/index.jsp - this comiles
http://www.mydomain.net:8080/WEB/BLAH/BLAH/index.jsp - will not compile where BLAH is a bunch of different folders.
I have it all working on Win XP. Now I am trying to make it work on FC5.
I took the page that can compile and moved it to BLAH/BLAH folder and it does not compile now!
OS: Fedora Core 5 (if it matters)
What is going on? Any ideas?
Thanks.sure, here it is
Thanks for help.
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:342)
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:248)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
Compile failed; see the compiler error output for details.
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:216)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) -
Why JSP not use new class that I compile again?
I use bean class with JSP. But When I add some code and compile new bean. JSP not use new been class it use old class.
I try to set file server.xml and set <DefaultContext reloadable="true"/> and restart Tomcat. But it not work?
any help please?I run JSP in http://localhost:8080/stringbean.jsp
is context name mean localhost
in c:\tomcat\work has following directory
standalone (level1 dir)
localhost (level2 dir)
- (level3 dir)
examples (level3 dir)
manager (level3 dir)
tomcat-doc (level3 dir)
webdav (level3 dir) -
Help: OJSPC can not compile the JSP with struts tag
Hi,
I am trying to precompile the JSP page with EAR package but OJSPC can not parse the Struts tags.
I always get oracle.jsp.parse.JspParseException:
Error: org.apache.struts.taglib.html.MessgesTei while reading TLD /WEB-INF/tld/struts-html.tld
My OC4J version is 10.1.3.2 and I did tried putting the struts-taglib.jar to /opt/oracle/product/app10g/j2ee/home/jsp/lib or /lib/taglib
but still do not work.
Can anyone tell me how to configure the OJSPC and let it support customerized taglibs?
Thanks a lot!This is a new problem with jdk1.4 when compiling with tomcat.
The solution is to ensure that any classes in WEB-INF/classes are in a package structure and the relevant jsp calls the same using the package name.
best
kev -
I created a new project - No template - All Technologies, and can not get a JSP shell to compile. It's generating Error: java.lang.NullPointerException. I then added the JSP Runtime, Servlet Runtime, J2EE and Oracle 9iAS and I'm still getting the message. What is the key to make this work?
It was working earlier today on another project until I removed the model from the application workspace. I tried a new project, but am getting the same results. I can compile a JSP on an old project, but I don't know what the difference is.I added a simple output statement. The error is the same.
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="java.io.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>untitled</title>
</head>
<body>
<%
out.println("Test");
%>
</body>
</html> -
How I not compile jsp again?
Whenever I restart the weblogic server, all the jsp loading will be slow since it seems wl will compile all jsp again. I have tried to set the startmode=true and config war's reload period = -1. But it does not work. It result in the very poor performance since the jsp loading will consume so much time. How I force the wl does not compile the jsps again?
import java.awt.event.*;
import java.awt.*;
import java.applet.*;
public class MyApplet extends Applet implements Runnable {
// Variable definitions
int a[];
double b[];
// methods definitions
public void init(){
MyFile file = new MyFile();
MyMath math = new MyMath();
file.file_init(); // see file: MyFile.class
math.math_init(); // see file: MyMath.class
public void start() {
public void run() {
// note these two methods
file.file_read(); // see file: MyFile.class
math.math_atan(); // see file: MyMath.class
----------------------------MyMath.class-----------------------------------------
public class MyMath {
// variable definitions
int x[];
double y[];
public void math_init(){
public void math_atan() {
// some user define math opperation
public void math_dispose() {
// some destroy code
------------------------------MyFile.class----------------------------------------
public class MyFile {
// variable definitions
public void file_init() {
// file initialize code
public void file_dispose() {
// file dispose code
public void file_read() {
// read some format file
Note classes are something like c structure you can make a instances of them see a struct would be something like this
struct MyMath {
int math_init;
}math;
^
|
instance
and we could access the info in that struct like math.math_init; well java uses classes keyword "class" like you see above but java does this
MyMath math = new MyMath();
^
|
instance
math.math_init();Well good luck hope this helps -
PL/SQL will compile with warnings but will not run
I have a pl/sql package that will compile with warnings but no errors but when i try to run it I get an ORA-6508 error telling me there is an error somewhere in the package but I can't find it.
I have two user schemas that use 2 slightly different versions of the package. I had to make slight code changes to one of the versions and when I made those changes it stopped running. The second version compiles and runs correctly.
After going through a line by line comparison the first copy was still not running. I copied the second version of the code into the broken schema and commented out the additional lines of code that are not needed in this version.
When I tried to compile and run this version it still fails with the same error.
I am using Oracle XE and the databases are small.
I can send on the code if necessary.
Can anyone point me in the right direction?
Thanks
SusanI tried doing what you suggested but there are no errors as it is compiling correctly.
It is only when I run the package through the debugger that I get the error. I have posted it below
Connecting to the database Hess S3.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', '2086' )
Debugger accepted connection from database on port 2086.
Processing 59 classes that have already been prepared...
Finished processing prepared classes.
Exception breakpoint occurred at line 10 of BnmSkOTQ3jz5I52ZOxC4QNw.pls.
$Oracle.EXCEPTION_ORA_6508:
ORA-04063: package body "SHIPPING.LIFTINGSCHEDULE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SHIPPING.LIFTINGSCHEDULE"
ORA-06512: at line 10
Process exited.
Disconnecting from the database Hess S3.
Debugger disconnected from database.
Regards
susan -
The ANE library is compiled to MacOS, but does not compile on Windows.
ANE lbrary FPHockeyApp http://flashpress.ru/blog/contents/ane/hockeyapp/FPHockeyApp-6.1.ane
Application:
package
import flash.display.Sprite;
import ru.flashpress.hockeyapp.FPHockeyApp;
import ru.flashpress.hockeyapp.ns.haIOS;
public class TestHockeyApp extends Sprite
public function TestHockeyApp()
super();
use namespace haIOS;
var APP_ID:String = 'you app id';
FPHockeyApp.manager.configureWithIdentifier(APP_ID);
FPHockeyApp.manager.startManager();
FPHockeyApp.manager.authenticator.authenticateInstallation();
Compiled in MacOS, but does not compile on Windows:
Why so?Windows 64-bit.
On a single MacBookPro installed OSX and Windows(not virtual). -
I have recently downloaded NWDS tool that comes with the NW04s trial version (NWDS version 7).
When I create portal components (par files), NWDS does not compile the java files. It creates a par file even with errors in Java. Is this a new "feature" of NWDS? am I missing anything?Create DC for the JSP also. It will work.
Maybe you are looking for
-
Error when invoking BPEL process from Java client
Hi, I am trying to invoke the SyncHelloWorld BPEL process through a simple java application. When I run the application, I get the following error: java.rmi.RemoteException: ; nested exception is: ORABPEL-02052 Cannot lookup BPEL domain. The BPE
-
Windows vista 64 bits + xfi xtreme music + logitech g51 + SWAPS CHANN
Hello ! I am heber from argentina! bs as! federal discrict! Hey guys! you are soo cool! you help me a lot of times! but now i have to write to you becausa i dont get a solid solution to my problem. I search and see that there are some users with the
-
Once bootcamp is installed on my Mac, how easy is it to go back and forth from windows to Mac? Just a press of button or do I have to completely log off of one to go to the other?
-
Pictures gone from Ipad after connecting to Itunes
I was starting up the macpro after having put new harddisc in after breakdown. All my photos were on Ipad1. When connecting Ipad a message came: do you want to transfer pictures from Iphoto to Ipad, pictures on Ipad will be kept. I agreed, but all
-
Hi all, i'm facing a strange problem. I've created my multilanguage addon, but i have some problems with aet_LanguageChanged event. When i change the language of the company and i read back the oCompany.language to set my new language, i get the old