Referenced projects in Tomcat problem [message #515870] |
Sun, 21 February 2010 23:51 |
David Messages: 4 Registered: February 2010 |
Junior Member |
|
|
I've got a project "foo.entities" which contains a bunch of data entity classes.
I've got another project "foo.servlets" which references the entities project. foo.servlets is a Dynamic Web Project that uses Tomcat. I added the reference by going foo.servlets > Properties > Java Build Path > Projects > "foo.entities".
I make use of the entity classes in the Servlet classes fine and it compiles alright (or rather, the IDE gives me no error messages). I also reference the entity classes within JSP files.
I already import it using:
<%@ page imports="foo.entities.*" %>
...but Tomcat gives me this error:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 4 in the jsp file: /LoginInfo.jsp
foo.entities.User cannot be resolved to a type
1: <%@ page session="true" import="java.util.*, foo.entities.*" %>
2: <%
3:
4: foo.entities.User user = (User)session.getAttribute("user");
5: if( user != null ) { %>
6:
7: <p>Logged in as <%= user.getID() %> (<%= user.getRoleName() %>).</p>
What's up?
[Updated on: Sun, 21 February 2010 23:52] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04860 seconds