You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jean Georges PERRIN <jg...@jgp.net> on 2002/12/09 17:28:07 UTC

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>