Re: [classloading] How to use URLClassLoader within a servlet

2002-12-13 Thread Ola Berg
Okay, I moved the JAR to $CATALINA_HOME/webapps/ROOT and changed the code to: Great, and thanks. In about two hours I will stop the daunting task of creating a web application in VBScript/ASP (yuck) and picking up the registry-system again. I will immediately try out your way. I suspect the

[classloading] How to use URLClassLoader within a servlet

2002-12-12 Thread Ola Berg
I have this problem with using my own (URLClassLoader) class loader in a servlet of mine. The thing is that I am writing a web front end to domain name services (automatic registration of .org, .com. .biz, .info etc domains). Depending on the top level domain, I need to use different versions

Re: [classloading] How to use URLClassLoader within a servlet

2002-12-12 Thread Ola Berg
I would recommend to use a different approach: [snip] Doesn't help since the underlying API (outside of my control) belongs in different jars (same class names, different implementations). Sure, by tweaking I can do as you suggested, but the dynamic class loading will be the most flexible.

Re: [classloading] How to use URLClassLoader within a servlet

2002-12-12 Thread Ola Berg
I have an analogous case, in which I have a single API for database access, with choice of database (Oracle, MySQL,...) made at run-time. The problem was simply solved using the 'Abstract Factory' pattern. This means that I have two packages (db.MySql, db.Oracle), which both

Re: [classloading] How to use URLClassLoader within a servlet

2002-12-12 Thread Ola Berg
Or you could try to isolate the problem with an example and post that to the list. The problem can be stated as ---8--- URL[] urls = new URL[]{ new URL(http://www.myserver.com/jars/myapi-1.2.jar;) }; URLClassLoader cl = new URLClassLoader( urls); //have tried different parents //here it hangs

Re: using manager web application

2002-12-12 Thread Ola Berg
Just a simple guess, sorry if this is just too stupid of me to point out but, have you tried http://myserver:8080/manager ? /O - Original Message - From: Eman Fattouh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 12, 2002 12:53 PM Subject: using manager web

Re: [classloading] How to use URLClassLoader within a servlet

2002-12-12 Thread Ola Berg
couldn't you use this the 'top level domain' to determine which context to send the request to?. Yes of course. That is one of the B plans, should this classloading thing fail. A plan is still dynamic class loading. /O -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional

Re: [classloading] How to use URLClassLoader within a servlet

2002-12-12 Thread Ola Berg
As an experiment, I created a directory under WEB-INF called ext and dumped a' JAR file in it (commons-cli-1.0.jar). Then I created a servlet that did: [snip] Which is just the kind of thing you want, yes? No, you cheated ;-) You put the jar file in the WEB-INF. Strictly, we want it

Re: Ship java app to windows box

2002-12-10 Thread Ola Berg
My question is if it is common to ship java web app to Windows box with tomcat and jdk. Common, I don't know, but it isn't legal (license-wise) to redistribute the JDK (only the JRE), and the JDK is needed for tomcat. Second: whíle you can distribute tomcat bundled with your application,

ClassLoader issue

2002-12-09 Thread Ola Berg
Could anyone describe how to load classes within a servlet using a URLClassLoader in Tomcat, or reference to a link somewhere? /O -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]

Re: ClassLoader issue

2002-12-09 Thread Ola Berg
have you looked at tomcat's classloader document? http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html Charlie Yes, and it basically talks about the class loaders that Tomcat uses. But I want to be able to load classes from an jar file at an arbitrary URL specified at

Re: How do I install a jar file and reference it with a jsp page?

2002-12-09 Thread Ola Berg
Having trouble using this jar file which has code for an Equifax interface (credit check). I've been given a jar file with sample code. Where do I put in the tomcat directory and how do I reference it in a jsp page? Do I need to do anything on the server to configure? The package is