Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to import my own package in my jsp?

843835Jul 1 2003 — edited Jul 1 2003
I am doing aproject now. I have finished the java source file and complied them successfully. I want to package all of them and import this package in my jsp files. I copy all the .java and .class files to tomcat/webapps/projsp/WEB-INF/classes/ directory. I also write one line in my jsp file as following:
<%@ page language= "java" import="java.sql.*,java.util.*,java.io.*,induction.*" %>

My package named induction. I guess the problem is abput the class path. I don't know how can system find the package of mine. Hopefully, someone can help me!

Below is The error information when I run my jsp:

Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
/usr/local/tomcat/work/DEFAULT/projsp/jsp/geography_1.java:9: Package induction not found in import.
import induction.*;
^
1 error, 1 warning

at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:898)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:733)
at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2003
Added on Jul 1 2003
3 comments
493 views