One Day Sec

What are the naming constraints for JSP and Java files when using JNI in a Tomcat environment?

In a Tomcat environment, the Java class must be in the `org.apache.jsp` package, and the file name must follow the pattern `*_jsp` (e.g., `testtomcat_jsp.java`). The corresponding JSP file should match that pattern exactly (e.g., `testtomcat.jsp`). The class name inside the Java code (e.g., `JniClass`) can be arbitrary, but the outer class must adhere to the package and naming rules. These constraints are highlighted in the article's JNI loading section.
package org.apache.jspnaming conventionsJSP fileTomcat constraints

Browse all Q&A →