jsp won't compile...

From: Frances Del Rio (fdr58_at_yahoo.com)
Date: 11/29/04


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



Relevant Pages

  • Re: jsp wont compile...
    ... JSPs are first compiled to plain Java servlets. ... The java sources resulting from the JSP processing (and also the ... You can also compile JSPs to Java manually; ... command-line tool for this; supposing PATH and JAVA_HOME are correctly ...
    (comp.lang.java.help)
  • Simple JSP fails!!!
    ... We test on the Windows box, and then upload to the Unix box. ... I tried uploading a simple "Hello World" JSP ... Compile failed; see the compiler error output for details. ...
    (comp.lang.java.programmer)
  • Re: prob while deploying war component in JBOSS
    ... > refer to ... You have to put your EJB classes to the JBoss classpath (in a seperate ... > Is it due to this my JSP is not getting compiled? ... does not compile you would see a Jasper error message. ...
    (comp.lang.java.help)
  • Unprecise error line number on JSP compilation
    ... I am using Tomcat 5.5 and when i compile a jsp i'm facing this ... If the Jsp contains an error in a java script, tomcat doesn't print ...
    (comp.lang.java.programmer)
  • Re: JSP wont compile... error contains no info......
    ... I've been working on this project for about two weeks now, all of a sudden since last Sunday evening my JSP's won't compile ... I never knew you could run out of RAM memory on a web server.. ...
    (comp.lang.java.help)