Reputation: 303
I am using Tomcat 7.0.61 on Ubuntu 14.02 LTS and I can see the lib
directory existing in the /usr/share/tomcat7
folder.
The typical webapps folder for Tomcat is
/var/lib/tomcat7/webapps/ROOT/
Then I created the separated folder for my web application called myjsp
and everything seemed to work really fine because until I tried to install the JSTL taglib library downloaded from the tomcat portal.
On Windows, I put the JSTL jar file in the C:/tomcat7/lib
directory which may serve as the shared folder for all applications as far as I know. And it works on Windows because I could import the library in the scripts.
But on Ubuntu right now, nothing is likely to properly work on my system. I have tried moving the JAR file to the /usr/share/tomcat7/lib
and in /var/lib/tomcat7/webapps/myjsp/WEB-INF/lib
So where should I put the JSTL JAR file in?
Note: I created the WEB-INF
folder manually with the only folder in there which is lib
folder
Upvotes: 2
Views: 823
Reputation: 1
Don't put anything to the ROOT
, because if you undeploy your app the root context will be shown to the user. Use the following path
/var/lib/tomcat7/webapps/myapp
Make sure you have used an environment variable and system property for
CATALINA_BASE=/var/lib/tomcat7
To deploy the application better to create .war
file and put it into webapps
either manually or better using a tomcat manager app. The tomcat is configured by default to start automatic deployment if you put a file to the webapps
.
All libraries in the war
should be in /WEB-INF/lib
.
You can use this answer to download required jars from accredited sources.
Upvotes: 3