Importing a downloaded JAR file into a Servlet

73 views Asked by At

I have recently downloaded the json-lib jar, and added it to my libraries using NetBean's library wizard.

I believe to import net.sf.json.JSONObject, I first have to call the package at the beginning of the servlet file.

However, when I try to do 'package net.sf.json', I get the error 'class, interface or enum expected'.

I have placed the jar in the WEB-INF/lib folder. I am certain I'm missing something, but I'm not certain what. Any advice would be appreciated.

0

There are 0 answers