Looks like a classpath problem to me. My JDK 1.3.1 has no such HTMLFilter class in java.util. Where is HTMLFilter coming from? Is that something you wrote?
John > -----Original Message----- > From: Jean Georges PERRIN [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 11:55 AM > To: 'Tomcat Users List' > Subject: RE: New context: fine, development environment: not fine! > > > Hi John, > > I got my example thru the packaged version of 4.1.12 (LE) for Windows. > > Changing the line to: > <% out.print(request.getHeader("User-Agent")); %> > > does the job fine, however: > <% > out.print(java.util.HTMLFilter.filter(request.getHeader("User- > Agent"))); > %> > > fails: > org.apache.jasper.JasperException: Unable to compile class for JSP > > An error occurred at line: 11 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:51: > cannot resolve > symbol > symbol : class HTMLFilter > location: package util > > out.print(java.util.HTMLFilter.filter(request.getHeader("User- > Agent"))); > out.write("\r\n\r\n"); > ^ > 1 error > > jgp > > > -----Original Message----- > > From: Turner, John [mailto:[EMAIL PROTECTED]] > > Sent: Monday, December 09, 2002 17:32 > > To: 'Tomcat Users List' > > Subject: RE: New context: fine, development environment: not fine! > > > > > > 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:tomcat-user- > > [EMAIL PROTECTED]> > > For additional commands, e-mail: <mailto:tomcat-user- > > [EMAIL PROTECTED]> > > > -- > 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]>