I'm using Tomcat 5.5.4 with JDK/JRE 1.5.0_04. I have set my environment variables accoring to the directions and have written some other JSP pages that work fine, so I think everything is set up correctly.
Whenever I try to compile and run the following code in a JSP page, I get the error noted below. I am new to Java, but this seems pretty basic to be getting an error... Thanks for your help!
Is the "@" used for supressing the literal output of exceptions that might be thrown? Like I said, I'm new to Java. Thanks again, Ben
The <%@ ... %> is a directive tag, not a scriptlet tag. This isn't really a Java issue as much as it is a JSP specific issue.
I always recommend learning servlets before JSP. JSP is an abstraction layer that results in machine generated Servlet code. If you understand the underlying principals (which are as clear as the keys on a piano in basic servlet code) it's a lot easier to figure out what a JSP is really doing.
One tip: A lot of app servers (such as Tomcat) keep the generated servlet code around so you can see exactly what your JSP is being turned into. [ July 12, 2005: Message edited by: Ben Souther ]
Ahhh, that makes a lot more sense. I didn't realize that <%!, <%@, etc. were entities entirely separate from the unadorned <%. That is very sound advice, Ben, and I have indeed been focusing my efforts on learning servlets before much else.