<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using Jboss System Properties</title>
	<atom:link href="http://www.openscope.net/2010/01/11/jboss-system-properties/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.openscope.net/2010/01/11/jboss-system-properties/</link>
	<description>Practical java, unix, and xml</description>
	<lastBuildDate>Thu, 26 Aug 2010 18:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Ant</title>
		<link>http://www.openscope.net/2010/01/11/jboss-system-properties/comment-page-1/#comment-392</link>
		<dc:creator>Ant</dc:creator>
		<pubDate>Thu, 05 Aug 2010 22:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.openscope.net/?p=161#comment-392</guid>
		<description>Unfortunately there is no direct equivalent in JBoss. The closest you can get is a hosted contextual mapping to a local directory as explained in this article: http://community.jboss.org/wiki/ExternalDirectories, but it will only serve up static content, no jsps or dynamically compiled resources. One purpose of the j2ee spec is to formulate some kind of standard so that multiple vendors can deploy a standard enterprise application and you can migrate. If your application uses custom descriptors however, you roll the dice if you ever want to explore the idea of migrating to a different vendor.  That&#039;s the choice you end up with - either stick to the standards or risk locking yourself into a single vendor&#039;s platform. I&#039;ve been in your situation before, and I&#039;ve been burned before by it so I tend to lean towards using the standard.</description>
		<content:encoded><![CDATA[<p>Unfortunately there is no direct equivalent in JBoss. The closest you can get is a hosted contextual mapping to a local directory as explained in this article: <a href="http://community.jboss.org/wiki/ExternalDirectories" rel="nofollow">http://community.jboss.org/wiki/ExternalDirectories</a>, but it will only serve up static content, no jsps or dynamically compiled resources. One purpose of the j2ee spec is to formulate some kind of standard so that multiple vendors can deploy a standard enterprise application and you can migrate. If your application uses custom descriptors however, you roll the dice if you ever want to explore the idea of migrating to a different vendor.  That&#8217;s the choice you end up with &#8211; either stick to the standards or risk locking yourself into a single vendor&#8217;s platform. I&#8217;ve been in your situation before, and I&#8217;ve been burned before by it so I tend to lean towards using the standard.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ps</title>
		<link>http://www.openscope.net/2010/01/11/jboss-system-properties/comment-page-1/#comment-390</link>
		<dc:creator>ps</dc:creator>
		<pubDate>Thu, 05 Aug 2010 21:05:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.openscope.net/?p=161#comment-390</guid>
		<description>Yes, I think your what you say is correct. It the connector which does it. But then I dont understand how to achieve this in jBoss. Any thoughts would be very helpful</description>
		<content:encoded><![CDATA[<p>Yes, I think your what you say is correct. It the connector which does it. But then I dont understand how to achieve this in jBoss. Any thoughts would be very helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ant</title>
		<link>http://www.openscope.net/2010/01/11/jboss-system-properties/comment-page-1/#comment-389</link>
		<dc:creator>Ant</dc:creator>
		<pubDate>Thu, 05 Aug 2010 04:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.openscope.net/?p=161#comment-389</guid>
		<description>OK - I think i understand what&#039;s going on. Correct me if I&#039;m wrong: you&#039;re using jrun-web.xml to configure your web application using virtual-mapping as described in this problem: 

http://community.jboss.org/message/192491#192491

and as described in JRun&#039;s &quot;jrun-web.xml&quot; documentation here:

http://www.adobe.com/livedocs/jrun/4/Assembly_and_Deployment_Guide/descriptors4.htm

There is a major different between web.xml and jrun-web.xml in that web.xml is server/vendor implementation agnostic and will thus deploy in any j2ee compliant server while jrun-web.xml is much like jboss-web.xml, and weblogic.xml in that they are vendor specific deployment descriptors and are therefore unusable on any other app servers. It&#039;s like trying to speak Korean to an Icelandic person, they won&#039;t understand what&#039;s being described by the descriptors. 

It appears from that unanswered JBoss post that it has never been addressed. The use of virtual-mapping is not part of the j2ee standard, and is therefore not implemented in JBoss. It appears the closest thing you can do is configure a jboss external directory as a context as described in this article:

http://community.jboss.org/wiki/ExternalDirectories

Essentially you end up creating a mapped context to a local directory. I think this still takes the compilation of JSPs off the table as there is no way for JBoss to dynamically load in those files and compile them into servlets. 

Its important to know a little bit about how jboss works with deployments - JBoss takes each deployable artifact and copies them  into the instance/tmp directory. As JBoss loads them into the instance/tmp directory they all get loaded into ram and if configured to auto detect file updates, will reload the modified file on demand. JSPs are a litlte different - these guys are read in and compiled into servlet code and then written to disk in the instance/work directory, one folder for every mapped domain served by the instance. In order for external JSP directories to work as they do in the JRun implementation there would need to be some kind of connector that would snap on to the web.xml parsing engine which would figure out how to load local configured directories into the JBoss servlet container - compiling those jsps and then saving them into that instance/work directory. Such a connector does not exist as far as I know.</description>
		<content:encoded><![CDATA[<p>OK &#8211; I think i understand what&#8217;s going on. Correct me if I&#8217;m wrong: you&#8217;re using jrun-web.xml to configure your web application using virtual-mapping as described in this problem: </p>
<p><a href="http://community.jboss.org/message/192491#192491" rel="nofollow">http://community.jboss.org/message/192491#192491</a></p>
<p>and as described in JRun&#8217;s &#8220;jrun-web.xml&#8221; documentation here:</p>
<p><a href="http://www.adobe.com/livedocs/jrun/4/Assembly_and_Deployment_Guide/descriptors4.htm" rel="nofollow">http://www.adobe.com/livedocs/jrun/4/Assembly_and_Deployment_Guide/descriptors4.htm</a></p>
<p>There is a major different between web.xml and jrun-web.xml in that web.xml is server/vendor implementation agnostic and will thus deploy in any j2ee compliant server while jrun-web.xml is much like jboss-web.xml, and weblogic.xml in that they are vendor specific deployment descriptors and are therefore unusable on any other app servers. It&#8217;s like trying to speak Korean to an Icelandic person, they won&#8217;t understand what&#8217;s being described by the descriptors. </p>
<p>It appears from that unanswered JBoss post that it has never been addressed. The use of virtual-mapping is not part of the j2ee standard, and is therefore not implemented in JBoss. It appears the closest thing you can do is configure a jboss external directory as a context as described in this article:</p>
<p><a href="http://community.jboss.org/wiki/ExternalDirectories" rel="nofollow">http://community.jboss.org/wiki/ExternalDirectories</a></p>
<p>Essentially you end up creating a mapped context to a local directory. I think this still takes the compilation of JSPs off the table as there is no way for JBoss to dynamically load in those files and compile them into servlets. </p>
<p>Its important to know a little bit about how jboss works with deployments &#8211; JBoss takes each deployable artifact and copies them  into the instance/tmp directory. As JBoss loads them into the instance/tmp directory they all get loaded into ram and if configured to auto detect file updates, will reload the modified file on demand. JSPs are a litlte different &#8211; these guys are read in and compiled into servlet code and then written to disk in the instance/work directory, one folder for every mapped domain served by the instance. In order for external JSP directories to work as they do in the JRun implementation there would need to be some kind of connector that would snap on to the web.xml parsing engine which would figure out how to load local configured directories into the JBoss servlet container &#8211; compiling those jsps and then saving them into that instance/work directory. Such a connector does not exist as far as I know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ps</title>
		<link>http://www.openscope.net/2010/01/11/jboss-system-properties/comment-page-1/#comment-388</link>
		<dc:creator>ps</dc:creator>
		<pubDate>Thu, 05 Aug 2010 03:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.openscope.net/?p=161#comment-388</guid>
		<description>Well, I replaced JRun with jboss and added Apache mod_jk in the front to serve multiple jboss configs. The existing structure was that JSPs and JS files were kept in a storage location outside of deployment. 
Jrun has a Apache module, so when Apache recieves a JSP request, it forwards it to jRun, which can pick it up from an outside storage structure and serve it simply based on a web.xml mapping (of relative paths)

Now, it seems to me, Apache mod_jk is serving relative paths and JBoss web cannot make sense of the path by looking at the web.xml. I looked at adding virtual directory definitions as part of Tomcat context, but JBoss 5.1.0 does not support it. 

At this point, my option does not include redoing the existing structure or bringing files into the WAR.

How would I make Apache or JBoss serve/understand the real path and pick files up? I wld love to get rid of these symlinks.</description>
		<content:encoded><![CDATA[<p>Well, I replaced JRun with jboss and added Apache mod_jk in the front to serve multiple jboss configs. The existing structure was that JSPs and JS files were kept in a storage location outside of deployment.<br />
Jrun has a Apache module, so when Apache recieves a JSP request, it forwards it to jRun, which can pick it up from an outside storage structure and serve it simply based on a web.xml mapping (of relative paths)</p>
<p>Now, it seems to me, Apache mod_jk is serving relative paths and JBoss web cannot make sense of the path by looking at the web.xml. I looked at adding virtual directory definitions as part of Tomcat context, but JBoss 5.1.0 does not support it. </p>
<p>At this point, my option does not include redoing the existing structure or bringing files into the WAR.</p>
<p>How would I make Apache or JBoss serve/understand the real path and pick files up? I wld love to get rid of these symlinks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ant</title>
		<link>http://www.openscope.net/2010/01/11/jboss-system-properties/comment-page-1/#comment-387</link>
		<dc:creator>Ant</dc:creator>
		<pubDate>Wed, 04 Aug 2010 19:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.openscope.net/?p=161#comment-387</guid>
		<description>It sounds like you&#039;re trying to include files local to the OS&#039;s file system as linked files in your jsp or html files. Are they images, javascript files, or compile required jsps? These items would normally be packaged as part of the deployed artifact&#039;s war file, and should not be accessed through the local OS&#039;s filesystem

So the simple answer is: no. Not unless you want to load the jsp file into a java 1.6 dynamic compiler object, and compile all your jsp code yourself and then somehow hook into jboss&#039; servlet container framework so you can persist the compiled servlet. The method in this article gives you access to a directory, from which you can load items into a File object. This works well for reading into a Properties object, but not so much for compiling jsps.

In a nutshell if you end up needing to go outside the web application&#039;s space, into say, a local /www httpd web directory, prefer the fully qualified local server/hostname instead of using the internal file structure of your OS. By trying to use the local file system instead of a dedicated web server, your application will collapse under load. Web servers are meant to handle much heavier stress than the OS&#039;s file system - symbolic links included, as web servers implement much more rigorous caching mechanisms and access time saving techniques. You might also be breaking the j2ee paradigms by making your application installed base dependant, not making it easy to deploy into a new environment.

Can you describe your environment a little more? Its unusual that you&#039;d have to stick all your jsps and resources somewhere other than a war file. There is definitely a better way than having to resort to symbolic links.</description>
		<content:encoded><![CDATA[<p>It sounds like you&#8217;re trying to include files local to the OS&#8217;s file system as linked files in your jsp or html files. Are they images, javascript files, or compile required jsps? These items would normally be packaged as part of the deployed artifact&#8217;s war file, and should not be accessed through the local OS&#8217;s filesystem</p>
<p>So the simple answer is: no. Not unless you want to load the jsp file into a java 1.6 dynamic compiler object, and compile all your jsp code yourself and then somehow hook into jboss&#8217; servlet container framework so you can persist the compiled servlet. The method in this article gives you access to a directory, from which you can load items into a File object. This works well for reading into a Properties object, but not so much for compiling jsps.</p>
<p>In a nutshell if you end up needing to go outside the web application&#8217;s space, into say, a local /www httpd web directory, prefer the fully qualified local server/hostname instead of using the internal file structure of your OS. By trying to use the local file system instead of a dedicated web server, your application will collapse under load. Web servers are meant to handle much heavier stress than the OS&#8217;s file system &#8211; symbolic links included, as web servers implement much more rigorous caching mechanisms and access time saving techniques. You might also be breaking the j2ee paradigms by making your application installed base dependant, not making it easy to deploy into a new environment.</p>
<p>Can you describe your environment a little more? Its unusual that you&#8217;d have to stick all your jsps and resources somewhere other than a war file. There is definitely a better way than having to resort to symbolic links.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ps</title>
		<link>http://www.openscope.net/2010/01/11/jboss-system-properties/comment-page-1/#comment-385</link>
		<dc:creator>ps</dc:creator>
		<pubDate>Wed, 04 Aug 2010 18:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.openscope.net/?p=161#comment-385</guid>
		<description>SO can a solution like this be used for accessing JSP, and other files outside of JBoss deployment? I am facing an issue where all my JSPs /javascripts are in an outside location to jBoss deployment. But jboss cannot pick them based on relative paths. Right now I am having to cop with creating symlinks. Any thoughts?</description>
		<content:encoded><![CDATA[<p>SO can a solution like this be used for accessing JSP, and other files outside of JBoss deployment? I am facing an issue where all my JSPs /javascripts are in an outside location to jBoss deployment. But jboss cannot pick them based on relative paths. Right now I am having to cop with creating symlinks. Any thoughts?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
