Glassfish: Storing Java classes in the docroot folder?

Posted by Tom Marthenal on Stack Overflow See other posts from Stack Overflow or by Tom Marthenal
Published on 2011-01-16T09:15:43Z Indexed on 2011/01/16 9:53 UTC
Read the original article Hit count: 226

Filed under:
|
|

I'm very new to using Glassfish or JSP.

I have this working in NetBeans (which has Glassfish bundled) but when I try to put it on my server which is running Glassfish Server, I really don't know what I'm doing.

I can place a JSP file in "domains/domain1/docroot/index.jsp" and it will work when I visit my site, but I can't, for some reason, get Java classes to work.

I copied the files in "/build/web/" from the NetBeans project to the docroot folder on my server.

The errors I get when I visit the site are:

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6199: Generated servlet error:
string:///index_jsp.java:7: package test does not exist

PWC6197: An error occurred at line: 5 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:52: cannot find symbol
symbol  : class TestClass
location: class org.apache.jsp.index_jsp

PWC6197: An error occurred at line: 5 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:52: cannot find symbol
symbol  : class TestClass
location: class org.apache.jsp.index_jsp

The actual Java class is in "WEB-INF/classes/test/TestClass.class" (it is pre-compiled).

I really have no idea what I'm doing wrong so any help is greatly appreciated. Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about jsp