Hi,
Your JSP code is wrong. The <%@ page import... %> directive needs to go at
the top of the page. When the Jasper compiler turns it into Java, that
directive gets turned into one or more Java import statements, and you
wouldn't stick those in the middle of your code.
Remember, all the HTML gets turned into Java code, as follows:
out.write("<html>\r\n<head>\r\n...");
So that your import statements (and the class variable declaration "<%!
Vector v; %>") appear inside a servlet doGet() method, which is illegal
Java. In spite of the superficial similarities, JSP is not really like PHP.
The PHP interpreter turns embedded PHP code into HTML, while the JSP
compiler turns HTML into Java (and then the Java compiler turns it into byte
code). It will help you to keep this in mind when writing JSP code.
BTW, I'm a little troubled by that "<%! Vector v; %>" declaration. This
turns v into an instance variable of the servlet class that Jasper creates.
Is this what you intended? If not, remove the exclamation mark and leave
the variable declaration where it is.
Kind regards,
Chris Williams.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]