users@glassfish.java.net

RE: can't get embedded jsp compiler to see system classpath

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Sat, 25 Jun 2011 19:28:03 -0400

in sun-web.xml
look for 'classloader' element
add attribute extra-class-path="first.jar;second.jar"

http://download.oracle.com/docs/cd/E19798-01/821-1750/bearq/index.html

hth
Martin
______________________________________________
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut ętre privilégié. Si vous n'ętes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert ŕ l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement ętre sujets ŕ la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


> To: users_at_glassfish.dev.java.net
> Subject: can't get embedded jsp compiler to see system classpath
> From: forums_at_java.net
> Date: Sat, 25 Jun 2011 09:57:48 -0500
>
> I've been banging my head on this roadblock all night, going crazy -- running
> embedded glassfish in our application, and it's generally working fine,
> *except* jsp's that reference our code won't compile -- the jsp classloader
> isn't seeing anything in the system classpath.
>
> I know that's what's going on, because I can create a jsp that does
> Class.forName(x) and it loads one of our classes fine, but as soon as in that
> same jsp I reference x directly, it fails with a jsp compiler error (package
> / class not found).
>
> I'm dynamically deploying war files and scattered archives, both have the
> same problem.
>
> using setConfigFileURI to set custom domain.xml, and copying in other config
> files like default-web.xml before doing bootstrap.newGlassFish() and start().
>
> Have tried fork=false, development=false in default-web.xml that I copy in.
>
> Is there any way to make the jsp classloader be the system classloader, or to
> have it use the classpath of the jvm it's embedded in ?
>
>
>
> --
>
> [Message sent by forum member 'kdwinton']
>
> View Post: http://forums.java.net/node/815929
>
>