[EMAIL PROTECTED] wrote:
It does not look like you imported the TimeZone class into the page.You can do that with this directive:
<%@ page import="java.util.*" %>
Adam
Christopher
Morris To: JRun-Talk <[EMAIL PROTECTED]>
<cmmorri@uswe cc:
st.com> Subject: JRun JSP compiler returns "Type TimeZone was not found"11/01/00
01:47 PM
Please
respond to
jrun-talk
This is a multi-part message in MIME format.
--------------C0F61BFD5C0585A0E64074E5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bitI'm trying to test JRun's JSP capability and I created the JSP
page that is attached. When I try to run the page, I get the
following errors from JRun. For some reason the TimeZone class
(part of the Java 2 API) is un recognized. Is there a
configuration change that I need to make in the JMC?javax.servlet.ServletException: Compilation error occured: Found
3 errors in JSP file:
/opt2/ptools/web/test-app/tz.jsp:5: Error: Type TimeZone was not
found.
/opt2/ptools/web/test-app/tz.jsp:17: Error: Type Calendar was not
found.
/opt2/ptools/web/test-app/tz.jsp:17: Error: "Locale/UK" is either
a misplaced package name or a non-existent entity. An expression
name is expected in this context.allaire.jrun.scripting.DefaultCFE:
Errors reported by
compiler:/opt2/ptools/web/test-app/WEB-INF/jsp/jrun__tz2ejsp7.java:39:1:39:8:Error: Type TimeZone was not found.
/opt2/ptools/web/test-app/WEB-INF/jsp/jrun__tz2ejsp7.java:51:1:51:8:Error: Type Calendar was not found.
/opt2/ptools/web/test-app/WEB-INF/jsp/jrun__tz2ejsp7.java:51:54:51:62:Error: "Locale/UK" is either a misplaced package name or a
non-existent entity. An expression name is expected in this
context.
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at
allaire.jrun.CompilationFailedException.(CompilationFailedException.java:22)at
allaire.jrun.scripting.DefaultCFE.(JavaCompilerService.java:368)
at
allaire.jrun.scripting.DefaultCFE.(JavaCompilerService.java:376)
at
allaire.jrun.scripting.JavaCompilerService.compile(JavaCompilerService.java:122)at
allaire.jrun.jsp.JSPServlet.compilePage(JSPServlet.java:458)
at
allaire.jrun.jsp.JSPServlet.createServlet(JSPServlet.java:399)
at
allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:202)
at
allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:169)
at allaire.jrun.servlet.JRunSE.service(Compiled Code)
at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at allaire.jrun.servlet.JRunSE.service(Compiled Code)
at allaire.jrun.servlet.JvmContext.dispatch(Compiled
Code)
at allaire.jrun.jrpp.ProxyEndpoint.run(Compiled Code)
at allaire.jrun.ThreadPool.run(Compiled Code)
at allaire.jrun.WorkerThread.run(Compiled Code)Attachments:
<xml version="1.0" ?>
<H1>Time JSP</H1>
<%
//the parameter "zone" shall be equal to a number between 0 and
24 (inclusive)
TimeZone timeZone = TimeZone.getDefault(); //returns the
default TimeZone
if (request.getParameterValues("zone") != null)
{
// gets a TimeZone. For this example we're just going to
assume
// its a positive argument, not a negative one.
String timeZoneArg = request.getParameterValues("zone")[0];
timeZone = TimeZone.getTimeZone("GMT+" + timeZoneArg +
":00");
}
/*
since we're basing our time from GMT, we'll set our Locale to
Brittania, and get a Calendar.
*/
Calendar myCalendar = Calendar.getInstance(timeZone, Locale.UK);%>
<%= myCalendar.get(Calendar.HOUR_OF_DAY) %>:
<%= myCalendar.get(Calendar.MINUTE) %>:
<%= myCalendar.get(Calendar.SECOND) %>--------------C0F61BFD5C0585A0E64074E5
Content-Type: text/x-vcard; charset=us-ascii;
name="cmmorri.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Christopher Morris
Content-Disposition: attachment;
filename="cmmorri.vcf"begin:vcard
n:Morris;Christopher M.
tel;fax:303-707-9414
tel;work:303-707-7046
x-mozilla-html:TRUE
org:Qwest, Network Planning, Technology Modeling and Prototype Development
version:2.1
email;internet:[EMAIL PROTECTED]
title:Systems and Database Analyst
note:Phone: 303-707-7046
adr;quoted-printable:;;700 W. Mineral Ave.=0D=0ARm. IA
G12.29;Littleton;CO;80126;
x-mozilla-cpt:;10368
fn:Christopher M. Morris
end:vcard--------------C0F61BFD5C0585A0E64074E5--
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
begin:vcard n:Morris;Christopher M. tel;fax:303-707-9414 tel;work:303-707-7046 x-mozilla-html:TRUE org:Qwest, Network Planning, Technology Modeling and Prototype Development version:2.1 email;internet:[EMAIL PROTECTED] title:Systems and Database Analyst note:Phone: 303-707-7046 adr;quoted-printable:;;700 W. Mineral Ave.=0D=0ARm. IA G12.29;Littleton;CO;80126; x-mozilla-cpt:;10368 fn:Christopher M. Morris end:vcard
