Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Tomcat and the fly likes Adding JSON package for Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Adding JSON package for Tomcat" Watch "Adding JSON package for Tomcat" New topic

Adding JSON package for Tomcat

Toulouse Laurent

Joined: Oct 14, 2001
Posts: 8

I am using linux to run tomcat and want to utilize org.JSON package. I downloaded the source code from I am unsure how to configure this external package so I can use it in my JSP files. I can't add it to my JAVA/etc bin because I do not have admin permission. Any simple solutions? Thanks!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60755

"Toulouse", please check your private messages for an important administrative matter.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Once you compile the classes, put the class files (with their proper directory structure) in the WEB-INF/classes directory of your application.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

There are two ways to add it to your web application: as Ben says, add the *.class files to WEB-INF/classes (together with your own class files), or if it's in a JAR file, add the JAR file to WEB-INF/lib of your web application.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
It is sorta covered in the JavaRanch Style Guide.
subject: Adding JSON package for Tomcat
Similar Threads
Json Parser
encoding - decoding JSON objects in JSP page
class file has wrong version 50.0, should be 49.0
Servlet JSON response
popular open source java JSON parser