pradayrolus
Messages postés4Date d'inscriptionmercredi 28 décembre 2005StatutMembreDernière intervention 6 février 2006
-
3 févr. 2006 à 15:12
Twinuts
Messages postés5375Date d'inscriptiondimanche 4 mai 2003StatutModérateurDernière intervention14 juin 2023
-
3 févr. 2006 à 16:44
Bonjour,
dans le cadre de l'internationalisation d'une
application, il m'a été demandé de créer un JAR contenant tout les
fichiers d'aide selon les langues.
Voici l'architecture du JAR lui même contenu dans le répertoire lib soit :
WEB-INF
|___lib
|___I18N.jar
|____FR
|__Aide -> les fichiers d'aide, par exemple sommaire.html
|
|____ES
|__Aide-> le fichier sommaire.html
Avant j'avais ces fichiers dans un réperoire html et au niveau de ma JSP j'ouvrais une popup en pointant sur le fichier html (en paramètre) soit :
var
window.top.page_d_aide = "sommaire.html";
function pop_aide () {
var chemin_fichier = "smn/html/aide/" + window.top.page_d_aide;
var viewerpop = open
("smn/jsp/aide/frame_aide.jsp?aidejsp=" + chemin_fichier , "AIDE","height =430,Width=530,toolbar=no,scrollbars=yes");
viewerpop.window.moveTo(80,100);
}
Maintenant le fichier html ne se trouve plus dans
html/aide/ mais dans la lib dans le répertoire FR/Aide
Comment puis je faire pour que ma JSP pointe sur mon fichier html présent dans la lib ?
Finds the resource with the given name. A resource is some data
(images, audio, text, etc) that can be accessed by class code in a way
that is independent of the location of the code.
The name of a resource is a '<tt>/</tt>'-separated path name that
identifies the resource.
This method will first search the parent class loader for the
resource; if the parent is <tt>null</tt> the path of the class loader
built-in to the virtual machine is searched. That failing, this method
will invoke
findResource(String)
to find the resource.
<dl> * Parameters: : <dd>
name
- The resource name
* Returns: : A <tt>URL</tt> object for reading the resource, or
<tt>null</tt> if the resource could not be found or the invoker
doesn't have adequate privileges to get the resource. * Since: : <dd>1.1