|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
masquerading
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2003
Location: East Coast
Posts: 2,401
|
Trying to import a custom class
I've been searching through Google but can't seem to come across a solution to how to import a custom class in Java. I'm creating an application following the MVC pattern, having my servlets be the controllers, and beans be the models. I'm using Tomcat JDBC, and my directory looks like this:
Code:
src/
bean/
Listing.java
servlet/
Tester.java
web/
etc
|
|
|
|
|
|
#2 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2002
Location: Paris
Posts: 1,005
|
Are you getting this when when compiling or running the application?
How do you have your project set up? Is it a war? Also can you post the full error message + stack trace. |
|
|
|
|
|
#3 | |
|
masquerading
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2003
Location: East Coast
Posts: 2,401
|
Quote:
I'm not sure what a "war" is? It's set up through Tomcat/JDBC. Code:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Wrapper cannot find servlet class servlet.Listing or a class it depends on
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)
root cause
java.lang.ClassNotFoundException: servlet.Listing
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)
|
|
|
|
|
|
|
#4 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2002
Location: Paris
Posts: 1,005
|
I'm unfamiliar with "Tomcat JDBC". I'm very familiar with Tomcat and JDBC as separate entities however. JDBC is for database connectivity.
Anyway, maybe I should rephrase my question, how is the servlet running on Tomcat. Also are you running Tomcat yourself or is this some shared hosting? Somewhere you must have a directory structure that looks like this: Code:
WEB-INF/
classes/
bean/
Listing.class
servlet/
Tester.class
web.xml
web/
etc
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 05:24.









Hybrid Mode
