Glassfish: Storing Java classes in the docroot folder?
- by Tom Marthenal
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!