Don't know which "snoop" example you have, but mine doesn't look anything
like yours.

Mine just says <%= request.getHeader("User-Agent") %>.

It doesn't have any of that other HTMLFilter.Filter stuff.  As an aside,
you're getting the error message because you are declaring
"util.HTMLFilter.filter(request.getHeader("User-Agent"))" and not
"java.util.HTMLFilter.filter(request.getHeader("User-Agent"))" (note
addition of "java" just like you did in the Date example in your code.

John


> -----Original Message-----
> From: Jean Georges PERRIN [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: New context: fine, development environment: not fine!
> 
> 
> Hi,
> 
> Apache Tomcat 4.1.12
> Windows XP SP1
> Standalone
> 
> I have created a new context, called 'stores'. This new 
> context works fine
> with JSP, except on one small thing.
> 
> (1) This works fine:
> <html>
> <head><title>Hello World!</title></head>
> <body>
> 
> You are using: <%= new java.util.Date().toString() %>
> 
> </body>
> </html>
> 
> (2) This fails at compile time on "util" - see (3):
> <html>
> <head><title>Hello World!</title></head>
> <body>
> 
> You are using: <%= new java.util.Date().toString() %>
> 
> <% 
> out.print(util.HTMLFilter.filter(request.getHeader("User-Agent"))); %>
> 
> </body>
> </html>
> 
> (3) Error:
> org.apache.jasper.JasperException: Unable to compile class for JSP
> 
> An error occurred at line: 9 in the jsp file: /helloworld.jsp
> 
> Generated servlet error:
>     [javac] Compiling 1 source file
> 
> C:\Program Files\Apache Group\Tomcat
> 4.1\work\Standalone\localhost\stores\helloworld_jsp.java:49: 
> package util
> does not exist
>  out.print(util.HTMLFilter.filter(request.getHeader("User-Agent")));
> out.write("\r\n\r\n\r\n");
>                ^
> 1 error
> 
> ---
> 
> The same code runs fine in the snoop.jsp example. I have diffed the
> generated code and I see no major difference (except for 
> dumping HTML of
> course!).
> 
> In my new context, I have no datasource, no mail, no resource, no
> environment...
> 
> My 'stores' directory contains only helloworld.html and 
> helloworld.jsp which
> is the code in (1) and (2).
> 
> Any idea? Tip?
> 
> TIA
> 
> Jean Georges
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to