java - Cannot Find Symbol error when using jsp page import -


i have been trying import java class jsp page using typical syntax:

<%@ page import="packagename.helloworldtest" %> 

and

<%@ page import="packagename.* %> 

whenever try receive error:

pwc6199: generated servlet error: cannot find symbol

symbol: class helloworldtest

location: package packagename

pwc6197: error occurred @ line: 3 in jsp file: /web-inf/jsp/test.jsp

pwc6199: generated servlet error: cannot find symbol

symbol: variable helloworldtest

location: class org.apache.jsp.web_002dinf.jsp.test_jsp

i'm using maven. have reconfigured project default output folder web-inf/classes, still receive error.

it's when maven build finishes don't have helloworldtest class generated inside /web-inf/classes/packagename/ folder. if not, need fix maven configuration.

if class file there, check final war artifact maven generating. class there too? if yes, check exploded war directory on servlet container has class file (under /webapps folder in tomcat).

if class file exists inside app server too, check spelling mistakes in package name specified in jsp.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -