J
jerjoan
Unregistered / Unconfirmed
GUEST, unregistred user!
example3a.jsp 文件内容如下:
<!--http://localhost/example3a.jsp?bal=222.45&fName=Steven-->
<html>
<head><title>Sessino Example</head></title>
<body>
<p>
<h1>Where wil your balance take you?</h1>
<br>
<%--Get paramaters for the request object--%>
<%String firstName = request.getParameter("fName");%>
<%String balance = request.getParameter("bal");%>
<%--Convert the bal paramater from String todo
uble--%>
<%double accountBalance =do
uble.valueOf(balance).doubleValue();%>
<%--Write the input paramaters to the Session object. The Session object cannot store ado
uble,You must first convert it to do
uble.--%>
<%
Session.setAttribute("userName",firstName);
do
uble tempAccountBalance = newdo
uble(accountBalance);
Session.setAttribute("userBalance",tempAccountBalance);
%>
<%--Output result--%>
Balance for<%= firstName%>:<% = accountBalance%><br>
<br><br>
Do you need a <a href = "example3b.jsp">invest your money</a>?
<br><br>
Do you need a <a href = "example3c.jsp">job</a>.
</body>
</html>
我编译后出现如下错误我采用的是jdk1.4+Tomcat4.0,已完成配置,一些简单的jsp文件可以正常执行)
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
../work/localhost/mysite/_0002fexample_00033a_0002ejspexample3a_jsp_0.java:103: Missing term.
out.write(":");
是文件有错,还是有什么没有完成的配置.
<!--http://localhost/example3a.jsp?bal=222.45&fName=Steven-->
<html>
<head><title>Sessino Example</head></title>
<body>
<p>
<h1>Where wil your balance take you?</h1>
<br>
<%--Get paramaters for the request object--%>
<%String firstName = request.getParameter("fName");%>
<%String balance = request.getParameter("bal");%>
<%--Convert the bal paramater from String todo
uble--%>
<%double accountBalance =do
uble.valueOf(balance).doubleValue();%>
<%--Write the input paramaters to the Session object. The Session object cannot store ado
uble,You must first convert it to do
uble.--%>
<%
Session.setAttribute("userName",firstName);
do
uble tempAccountBalance = newdo
uble(accountBalance);
Session.setAttribute("userBalance",tempAccountBalance);
%>
<%--Output result--%>
Balance for<%= firstName%>:<% = accountBalance%><br>
<br><br>
Do you need a <a href = "example3b.jsp">invest your money</a>?
<br><br>
Do you need a <a href = "example3c.jsp">job</a>.
</body>
</html>
我编译后出现如下错误我采用的是jdk1.4+Tomcat4.0,已完成配置,一些简单的jsp文件可以正常执行)
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
../work/localhost/mysite/_0002fexample_00033a_0002ejspexample3a_jsp_0.java:103: Missing term.
out.write(":");
是文件有错,还是有什么没有完成的配置.