In the server.xml file I have a virtual host defined as,
<Host name="domain.com" appBase="/home/webapps/servlets">
<Context path="/" docBase="/home/user/public_html"></Context>
</Host>
In the docBase is an index.jsp file, "/home/user/public_html/index.jsp"
In the appBase is an index.jsp file, "/home/webapps/servlets/index.jsp"
Both index.jsp file are identical.
In the index.jsp file I attempt to use a servlet;
<%@ page import="com.domain.myServlet" %>
<jsp:useBean id="myId" scope="page" class="com.domain.myServlet" />
The servlet is located in, "/home/webapps/servlets/WEB-INF/classes/com/domain/myServlet"
If I execute http://domain.com/index.jsp I get the following error,
"The value for the useBean class attribute com.domain.myServlet is invalid"
If I change the context in the server.xml file to the following it works.
<Context path="" docBase="."></Context>
This is because it executes the index.jsp file in the appBase directory of "/home/webapps/servlets/index.jsp"
It appears the code in the index.jsp file in "/home/user/public_html" can not find the servlets in the appBase.
So how do I tell code in the index.jsp in the public_html directory how to find the servlets in appBase.
Thanks.