I have copied the json-simple-1.1.1.jar
into the WEB-INF/lib
folder. In index.jsp
, I am writing:
<%@ page import="org.json.simple.parse.JSONParser" %>
.
But this gives me the error:
An error occurred at line: 17 in the generated java file Only a type can be imported. org.json.simple.parse.JSONParser resolves to a package
I have seen other questions with this error but they all point to pasting the jar file into the right folder. I've already done that. What am I missing? Is there something I need to write in the Catalina host config by any chance? The virtual host for this in server.xml
is:
<Host name="test-jsp.dev" appBase="/var/lib/tomcat7/webapps/test-jsp.dev"></Host>
Maybe an XML attribute I'm not setting?
I have already restarted the server. Also double checked that the group/owner of the jar file is root
, because that's the way it is in the webapps/ROOT
folder.