Where can I put jar files in Tomcat 6?

I am having trouble loading my Java class JSP page, which is in the jar file. The message I get indicates a class exception that was not found:

Jan 6, 2011 12:21:45 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 72 in the jsp file: /xmlloader.jsp
FactArray cannot be resolved to a type
69:         sourceType = "1";
70: }
71: 
72: FactArray fa = new FactArray();
73: Fact f;
74: 
75: /***********************/

The type FactArrayis one of my classes in the com.mypackage.fact.FactArray package that exists in myjar.jar. myjar.jar is a stand-alone Java project (using NetBeans, but I don't think this is relevant).

I include the package in my JSP as follows:

<%@ page import="com.mypackage.fact.*" %>

I am deploying my website and JSP in Tomcat 6 as a WAR file. I include myjar.jar in this WAR in WEB-INF / lib, but this does not work. I tried putting myjar.jar in the tomcat / lib folder, but this does not work either.

. , : " WEB-INF/lib", , .

JAR, Tomcat?

+3
2

/WEB-INF/lib webapp .

, :

  • JAR ( ZIP )
  • / ( !)

, . servlet.

+9

, ; , env, webapps/ROOT/lib

+1

Source: https://habr.com/ru/post/1783932/


All Articles