<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog4J &#187; Glassfish</title>
	<atom:link href="http://blog4j.free.fr/index.php/category/javaee/glassfish-javaee/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog4j.free.fr</link>
	<description>Articles et tutoriels sur la plateforme Java EE</description>
	<lastBuildDate>Sat, 11 Nov 2023 18:27:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installer PHP sur Glassfish avec Quercus</title>
		<link>http://blog4j.free.fr/index.php/2008/03/24/installer-php-sur-glassfish-avec-quercus/</link>
		<comments>http://blog4j.free.fr/index.php/2008/03/24/installer-php-sur-glassfish-avec-quercus/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 12:27:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php sur glassfish]]></category>
		<category><![CDATA[php sur serveur java]]></category>
		<category><![CDATA[quercus]]></category>

		<guid isPermaLink="false">http://blog4j.free.fr/index.php/2008/03/24/installer-php-sur-glassfish-avec-quercus/</guid>
		<description><![CDATA[Quercus est une implémentation de PHP 5 en Java. Cette librairie permet donc d&#8217;utiliser du PHP sur n&#8217;importe quel serveur d&#8217;application Java. Voici comment l&#8217;installer et l&#8217;utiliser :
Il faut tout d&#8217;abord télécharger les .jar de Quercus (disponibles ici) .
Une fois téléchargés, il faut les inclure dans le dossier lib du domaine du serveur glassfish  [...]

<script type="text/javascript">
SHARETHIS.addEntry({
    title: "Installer PHP sur Glassfish avec Quercus",
    url: "http://blog4j.free.fr/index.php/2008/03/24/installer-php-sur-glassfish-avec-quercus/"
});
</script>
    ]]></description>
			<content:encoded><![CDATA[<p><a href="http://quercus.caucho.com/" title="PHP sur Glassfish avec Quercus" rel="nofollow">Quercus</a> est <strong>une implémentation de PHP 5 en Java</strong>. Cette librairie permet donc d&#8217;<strong>utiliser du PHP sur n&#8217;importe quel serveur d&#8217;application Java</strong>. Voici comment l&#8217;installer et l&#8217;utiliser :</p>
<p>Il faut tout d&#8217;abord <strong>télécharger les .jar de Quercus</strong> (disponibles <a href="http://blog.jdevelop.eu/downloads/glassfishphp/quercus.zip" rel="nofollow" title="PHP sur Glassfish avec Quercus">ici</a>) .</p>
<p>Une fois téléchargés, il faut <strong>les inclure dans le dossier lib du domaine du serveur glassfish</strong>  (par exemple dans le dossier [glassfish_home]/domains/domain1/lib/).</p>
<p>Il suffit ensuite d&#8217;<strong>implémenter la servlet de Quercus dans le fichier web.xml de l&#8217;application et d&#8217;en définir le mapping</strong>. Par exemple pour mapper toutes les pages en .php :</p>

<div class="wp_syntax"><div class="code"><pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;servlet-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>Quercus Servlet<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/servlet-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;servlet-class<span style="font-weight: bold; color: black;">&gt;</span></span></span>com.caucho.quercus.servlet.QuercusServlet<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/servlet-class<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;servlet-mapping<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;servlet-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>Quercus Servlet<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/servlet-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;url-pattern<span style="font-weight: bold; color: black;">&gt;</span></span></span>*.php<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/url-pattern<span style="font-weight: bold; color: black;">&gt;</span></span></span> 
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/servlet-mapping<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>On peut maintenant créer une page PHP et l&#8217;inclure dans le répertoire contenant les pages web de l&#8217;application. Une fois le .war de l&#8217;appli déployé, la page PHP sera disponible sur le serveur Glassfish !</p>
<p><a href="http://sharethis.com/item?publisher=7b829c6f-b726-4687-8b67-8a213e6bef30&title=Installer+PHP+sur+Glassfish+avec+Quercus&url=http%3A%2F%2Fblog4j.free.fr%2Findex.php%2F2008%2F03%2F24%2Finstaller-php-sur-glassfish-avec-quercus%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog4j.free.fr/index.php/2008/03/24/installer-php-sur-glassfish-avec-quercus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Glassfish] Les &#171;&#160;alternate docroot&#160;&#187;</title>
		<link>http://blog4j.free.fr/index.php/2008/02/12/glassfish-les-alternate-docroot/</link>
		<comments>http://blog4j.free.fr/index.php/2008/02/12/glassfish-les-alternate-docroot/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 17:16:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[glassfish alternate docroot]]></category>

		<guid isPermaLink="false">http://blog4j.free.fr/index.php/2008/02/12/glassfish-les-alternate-docroot/</guid>
		<description><![CDATA[Un &#171;&#160;alternate docroot&#160;&#187; permet de mapper un répertoire physique du serveur à une url.
Voici  un exemple concret qui permettra de mieux comprendre l&#8217;utilité de cette fonctionalité de Glassfish :
Un site dispose d&#8217;une section d&#8217;upload de photos. Ces photos sont enregistrées dans un répertoire /uploads de l&#8217;application.
Un gros problème se pose alors : une fois [...]

<script type="text/javascript">
SHARETHIS.addEntry({
    title: "[Glassfish] Les &#171;&#160;alternate docroot&#160;&#187;",
    url: "http://blog4j.free.fr/index.php/2008/02/12/glassfish-les-alternate-docroot/"
});
</script>
    ]]></description>
			<content:encoded><![CDATA[<p>Un &laquo;&nbsp;<b>alternate docroot</b>&nbsp;&raquo; permet de mapper un répertoire physique du serveur à une url.<br />
Voici  un exemple concret qui permettra de mieux comprendre l&#8217;utilité de cette fonctionalité de <b>Glassfish</b> :</p>
<p>Un site dispose d&#8217;une section d&#8217;upload de photos. Ces photos sont enregistrées dans un répertoire /uploads de l&#8217;application.<br />
Un gros problème se pose alors : une fois  que l&#8217;on redéploie l&#8217;application, le contenu du répertoire /uploads est vidé puisque les photos ne seront plus présentes dans le .war de l&#8217;application.<br />
La solution à ce problème est donc les <b>alternate docroot</b>.</p>
<p>On va pouvoir, dans le fichier sun-web.xml, définir un répertoire externe à l&#8217;application où l&#8217;on stockera les photos et y mapper une url. Ainsi, si on déclare dans notre sun-web.xml :</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;alternatedocroot_1&quot;</span> 
  <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;from=/uploads/*
  dir=/home/&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p><b>Glassfish</b> ira chercher toutes les photos qui auront l&#8217;url http://www.monSite.com/uploads/maPhoto.png dans le dossier /home/uploads/ du serveur.</p>
<p>A noter qu&#8217;il est possible de définir plusieurs <b>alternate docroot</b>, il faudra alors les déclarer sous la forme :</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;alternatedocroot_1&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;...&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;alternatedocroot_2&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;...&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;alternatedocroot_3&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;...&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p><a href="http://sharethis.com/item?publisher=7b829c6f-b726-4687-8b67-8a213e6bef30&title=%5BGlassfish%5D+Les+%26laquo%3B%26nbsp%3Balternate+docroot%26nbsp%3B%26raquo%3B&url=http%3A%2F%2Fblog4j.free.fr%2Findex.php%2F2008%2F02%2F12%2Fglassfish-les-alternate-docroot%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog4j.free.fr/index.php/2008/02/12/glassfish-les-alternate-docroot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Glassfish] Gérer les virtual server</title>
		<link>http://blog4j.free.fr/index.php/2008/02/09/glassfish-gerer-les-virtual-server/</link>
		<comments>http://blog4j.free.fr/index.php/2008/02/09/glassfish-gerer-les-virtual-server/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 19:35:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[faire tourner glassfish port 80]]></category>
		<category><![CDATA[http listener glassfish]]></category>
		<category><![CDATA[virtual server glassfish]]></category>

		<guid isPermaLink="false">http://blog4j.free.fr/index.php/2008/02/09/glassfish-gerer-les-virtual-server/</guid>
		<description><![CDATA[Le virtual Hosting permet à un serveur Glassfish avec une même adresse IP de gérer plusieurs sites
Glassfish gère et différencie chaque site par son nom d&#8217;hôte.
Concrètement, le virtual hosting permet facilement de créer des serveurs virtuels avec pour chacun des noms d&#8217;hôtes différents.
Il est ensuite possible pour chaque serveur virtuel d&#8217;écouter sur un n° de [...]

<script type="text/javascript">
SHARETHIS.addEntry({
    title: "[Glassfish] Gérer les virtual server",
    url: "http://blog4j.free.fr/index.php/2008/02/09/glassfish-gerer-les-virtual-server/"
});
</script>
    ]]></description>
			<content:encoded><![CDATA[<p>Le <strong>virtual Hosting</strong> permet à un serveur <strong>Glassfish </strong>avec une même adresse IP de gérer plusieurs sites<br />
<strong>Glassfish </strong>gère et différencie chaque site par son nom d&#8217;hôte.</p>
<p>Concrètement, le <strong>virtual hosting</strong> permet facilement de créer des <strong>serveurs virtuels</strong> avec pour chacun des noms d&#8217;hôtes différents.<br />
Il est ensuite possible pour chaque serveur virtuel d&#8217;écouter sur un <strong>n° de port défini</strong> et de <strong>gérer la sécurité</strong> (SSL&#8230;).<br />
On pourra bien sûr, déployer des applications sur ce serveur virtuel.</p>
<p>Voici comment créer un nouveau domaine à l&#8217;aide de la console d&#8217;administration de glassfish :</p>
<p>Il faut tout d&#8217;abord se rendre dans la section virtual server ( HTTP Service &gt; Virtual Server ) et cliquer sur New.<br />
Une fois sur l&#8217;écran &laquo;&nbsp;New Virtual Server&nbsp;&raquo;, mettre <strong>un nom unique en id</strong> et préciser le nom d&#8217;hôte ou l&#8217;adresse IP de votre serveur dans la case <strong>Host</strong>.<br />
Laisser les autres propriétés par défaut et faire <strong>Ok</strong>.</p>
<p><img src="http://blog4j.free.fr/wp-includes/images/virtual-server-glassfish.PNG" alt="virtual server glassfish, faire tourner glassfish sur le port 80" /></p>
<p>Il faut ensuite créer un &laquo;&nbsp;<strong>http listener</strong>&nbsp;&raquo; qui interceptera les requêtes ( faire HTTP service &gt; HTTP Listeners).<br />
Cliquer sur <strong>New</strong>.<br />
Sur l&#8217;écran <strong>New HTTPListener</strong>, mettez un nom, l&#8217;ip du serveur ainsi que le n° de port sur lequel le listener doit interpréter les requêtes et sélectionnez le serveur virtuel précédemment créé. Faire <strong>Next</strong> puis sur l&#8217;écran suivant laisser les options par défaut et faire <strong>Finish</strong>.</p>
<p><img src="http://blog4j.free.fr/wp-includes/images/c1.PNG" alt="http listener glassfish, faire tourner glassfish sur le port 80" /></p>
<p>Il ne reste plus qu&#8217;a retourner sur notre serveur virtuel  ( dans HTTP Service &gt; Virtual Server ) pour y indiquer le nom de notre http-listener dans la case <strong>http-listener</strong>.</p>
<p><a href="http://sharethis.com/item?publisher=7b829c6f-b726-4687-8b67-8a213e6bef30&title=%5BGlassfish%5D+G%C3%A9rer+les+virtual+server&url=http%3A%2F%2Fblog4j.free.fr%2Findex.php%2F2008%2F02%2F09%2Fglassfish-gerer-les-virtual-server%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog4j.free.fr/index.php/2008/02/09/glassfish-gerer-les-virtual-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glassfish : déployer une application à la racine</title>
		<link>http://blog4j.free.fr/index.php/2008/01/22/glassfish-deployer-une-application-a-la-racine/</link>
		<comments>http://blog4j.free.fr/index.php/2008/01/22/glassfish-deployer-une-application-a-la-racine/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 11:27:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[déployer application racine Glassfish]]></category>
		<category><![CDATA[déployer war à la racine]]></category>
		<category><![CDATA[serveur glassfish]]></category>

		<guid isPermaLink="false">http://blog4j.free.fr/index.php/2008/01/22/glassfish-deployer-une-application-a-la-racine/</guid>
		<description><![CDATA[L&#8217;interface d&#8217;administration de Glassfish permet de déployer très facilement des applications à partir d&#8217;archives (.war, .ear, .jar&#8230;).
Voici une petite astuce toute simple permettant de déployer son application directement à la racine, c&#8217;est à dire ne plus avoir :
http://www.monDomaine.com/MonApplication/page.jsf
mais
http://www.monDomaine.com/page.jsf
Il suffit, lors du déploiement,  de spécifier &#171;&#160;/&#160;&#187; pour le context root.
L&#8217;application sera alors disponible à partir [...]

<script type="text/javascript">
SHARETHIS.addEntry({
    title: "Glassfish : déployer une application à la racine",
    url: "http://blog4j.free.fr/index.php/2008/01/22/glassfish-deployer-une-application-a-la-racine/"
});
</script>
    ]]></description>
			<content:encoded><![CDATA[<p>L&#8217;interface d&#8217;administration de Glassfish permet de déployer très facilement des applications à partir d&#8217;archives (.war, .ear, .jar&#8230;).</p>
<p>Voici une petite astuce toute simple permettant de déployer son application directement à la racine, c&#8217;est à dire ne plus avoir :</p>
<p>http://www.monDomaine.com/MonApplication/page.jsf</p>
<p>mais</p>
<p>http://www.monDomaine.com/page.jsf</p>
<p>Il suffit, lors du déploiement,  de spécifier &laquo;&nbsp;/&nbsp;&raquo; pour le context root.<br />
L&#8217;application sera alors disponible à partir de  la racine du site.</p>
<p><a href="http://sharethis.com/item?publisher=7b829c6f-b726-4687-8b67-8a213e6bef30&title=Glassfish+%3A+d%C3%A9ployer+une+application+%C3%A0+la+racine&url=http%3A%2F%2Fblog4j.free.fr%2Findex.php%2F2008%2F01%2F22%2Fglassfish-deployer-une-application-a-la-racine%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog4j.free.fr/index.php/2008/01/22/glassfish-deployer-une-application-a-la-racine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
