• Post Reply Bookmark Topic Watch Topic
  • New Topic

in jsp file ,object of java file not created  RSS feed

 
Aijaz Soomro
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friends, when i creat any object of java class,
like
<%
new Test();
%>
So, message come that,
An error occured between lines: 9 and 11 in the jsp file: /How.jsp
Generated servlet error:
E:\Tomcat\work\localhost\_\How$jsp.java:60: Class org.apache.jsp.Test not found.
new Test();
^
Please suggest me that where , i should save the Test.java File,in which directory , so, that it should be compiled Automatically
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to compile Test.java yourself and make sure it is accessible to your JSP. Then, in your JSP, you need an page import directive:
<%@ page import="Test" %>
And make sure you include the fully qualified class name (Test) including the package it is in.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!