jsp won't compile...
From: Frances Del Rio (fdr58_at_yahoo.com)
Date: 11/29/04
- Next message: JS: "Problems making a Graph"
- Previous message: Oscar kind: "Re: specific values in loops"
- Next in thread: Andrew Thompson: "Re: jsp won't compile..."
- Reply: Andrew Thompson: "Re: jsp won't compile..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 17:14:13 -0500
I have a jsp that won't compile, I get this error:
An error occurred at line: 30 in the jsp file: /hamlet.jsp
Generated servlet error:
C:\tomcat\work\Catalina\localhost\hamletj\org\apache\jsp\hamlet_jsp.java:77:
';' expected
out.print(iptIn);
^
1 error
HOWEVER: 'out.println(iptIn);' does NOT appear in this jsp!!
entire code for jsp as it stands now:
- - - - - - - - -
<html>
<body>
<%
String hamlet = "Hamlet is sitting on the fence, wondering whether
to be or not to be..";
String ipt = request.getParameter("phrase");
if (hamlet.indexOf(ipt) == -1) {
%>
<div id="phr"> phrase not found.</div>
<%
} else if (hamlet.indexOf(ipt) != -1 && hamlet.indexOf(ipt) > 1 &&
ipt.indexOf("..") == -1) {
int iptL = ipt.length();
int iptPos = hamlet.indexOf(ipt);
int iptPos2 = iptPos - 2;
int iptPos1 = iptPos - 1;
char ipt1 = hamlet.charAt(iptPos1);
char ipt2 = hamlet.charAt(iptPos2);
String iptIn = ipt
+ hamlet.charAt(iptPos + iptL)
+ hamlet.charAt(iptPos + iptL + 1);
%>
<div id="phr">
<%ipt2%><%ipt1%><%=iptIn%>
</div>
<%
}
%>
</body>
</html>
?????????????
I'm trying to do jsp version of this little app (which is done w/a
servlet..) http://www.francesdelrio.com/hamlet/
thank you very much!! Frances
- Next message: JS: "Problems making a Graph"
- Previous message: Oscar kind: "Re: specific values in loops"
- Next in thread: Andrew Thompson: "Re: jsp won't compile..."
- Reply: Andrew Thompson: "Re: jsp won't compile..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|