From: Greg W. <gr...@mo...> - 2003-12-23 08:09:02
|
Sorry for the slow response - but you worked out the issue I think. As Jasper uses ant to compile JSPs, it should be able to use any compiler supported by ant itself. Thus I recommend looking at the ant documentation etc. cheers Ludde wrote: > Found out that suns "javac" rely on .class files from classpath and can > not use a classloader. > > Does any one know a "javac" compiler that can use a classloader as well > as the normal classpath ? > > I'm currently trying "janino" for compiling JSP's with JETTY , > http://www.janino.net/javadoc/index.html , it has been said that it > works with Jasper. > > I've also heard of other "javacs" like Kopi/pizza that I will > investigate to see if they use a classloader. > > /Rickard > > >>Hello all. >> >>My Question??? >>Is it possible to instruct the ANT JSP -compilation part in Jetty >>to use my custom classloader ? Since it is possible to instruct >>Jetty to use a customclass loader. >> >>My Problem: >>Problems with the last stage of JSP handling. Jetty is able to >>generate the servlets from the jsp , but then , when it comes to >>compilation of these it fails , becuse ANT seems to NOT use the >>same classloader as Jetty is set to use (In my case a network >>classloader) >> >>My project/Idea: >>I'm using a network classloader for sending objects between jvm's >>without having the class files on the target machine. >> ,using this trick I dont have to put .jar files on the machine >>that needs to de-serialize the recieved object. >> >>I've managed to send objects containg internal references to Jetty >>classes to a machine that don't have any jetty.jar/javaxservlet.jar >>in the filesystem. Jetty starts up fine , using this network >>classloader. >> >>I'm starting the war archive in this "network" transfered Jetty and >>it works fine, I'm even able to set jetty to use my network >>classloader within the WAR archive , that is , a servlet inside the >>war file that needs classes will load it using my network loader. >>This how I instructed jetty to do so... >> >>------------------------------------------------- >>Server server=new Server("mywar.war"); >>HttpContext[] c=server.getContexts(); >>c[0].setClassLoaderJava2Compliant(true); >>c[0].setParentClassLoader(NetClassLoader()); >>server.start(); >>-------------------------------------------------- >> >>Jetty is also able to generate the servlets from the .jsp's inside >>the war archive , THIS IS GREAT !! >> >>but it fails to compile these "machine" generated servlets, (ok the >>reason is that I dont the javaxservlet.jar inte my classpath,,,but >>the reason for this is that I want ALL my CLASSSES to be loaded >>trough my network classloader) >> >>here is the error messge anyway: >>22:33:43.456 EVENT Error compiling file: >>/tmp/Jetty__8888__demoapp/index_jsp.java [javac] Compiling 1 >>source file >> [javac] /tmp/Jetty__8888__demoapp/index_jsp.java:3: package >>javax.servlet does not exist >> [javac] import javax.servlet.*; >> >> >> >>/Regards Rickard Lundin >>/ps >>I intend to use Jetty in my small experimental Code mobility >>project http://aortas.sourceforge.net >> >> >> >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: IBM Linux Tutorials. >>Become an expert in LINUX or just sharpen your skills. Sign up for > > IBM's > >>Free Linux Tutorials. Learn everything from the bash shell to sys > > admin. > >>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click >>_______________________________________________ >>Jetty-support mailing list >>Jet...@li... >>https://lists.sourceforge.net/lists/listinfo/jetty-support >> >> > > |