Hello:
The example
j2ee application that I created to test is really simple.
Here is my directory structure:
\benny_test\web-inf\classes\test.class
\benny_test\web-inf\web.xml
\benny_test\index.jsp
\benny_test\test\index1.jsp
***************************************************************************
Here is the contents of the test.class file:
public class test
{
private
String t = null;
public test(String t1)
{
setTest(t1);
}
public void setTest(String t1)
{
t = t1;
}
public String getTest()
{
return t;
}
}
***************************************************************************
Here is the contents of the index.jsp file:
<b> hello </b> <br />
<%
String test_str = null;
test ts = new test("Hello from the main jsp directory");
test_str = ts.getTest();
%>
<b> test_str is: </b> <%=test_str%>
<br /><br />
Click <a href="test/index1.jsp"> here </a> to test your jsp index1.jsp file in the test sub-directory
***************************************************************************
And, here is the contents of the test/index1.jsp file:
<b> hello from test sub-directory </b> <br />
<%
String test_str = null;
test ts = new test("Hello from the jsp test sub-directory");
test_str = ts.getTest();
%>
<b> test_str is: </b> <%=test_str%>
***************************************************************************
As you can see there are no import statements for test.class in the jsp pages.
index.jsp works fine.
test/index1.jsp gives me the following error:
Request URI:/benny_test/test/index1.jsp Exception: OracleJSP
racle.jsp.provider.JspCompileException: Errors compiling:C:\OC4J\j2ee\home\application-deployments\default\benny_test\persistence\_pages\_test\_index1.java
[jsp src:line #:5] cannot resolve symbol symbol : class test location: class _test._index1 test ts = new test("Hello from the jsp test sub-directory");
[jsp src:line #:5] cannot resolve symbol symbol : class test location: class _test._index1 test ts = new test("Hello from the jsp test sub-directory");