Another option is 
<% class Something {
   }
%>

This will declare the class within the method _jspService scope.  Its not
really recommended, but it is an option (works under Tomcat 3.1 and 3.2,
unsure about 4.0, using JDK 1.2 on WinNT)

        Randy

-----Original Message-----
From: Bryan Basham [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 14, 2000 11:15 AM
To: [EMAIL PROTECTED]
Subject: Re: declaring a class in JSP 



> I have this JSP:
> <% private class Something{} 
> 
> %>
> 
> this get's rejected by Jasper.
> Is there any reason why?

Someone recommended the syntax <%! [[decl]] %>
Remember that all such declarations are embedded in the
servlet class that is generated for you.  The upshot:
your Something class will be an "inner class".

-Bryan

Reply via email to