<?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>Mersoft Corporation Blog &#187; WebSphere CE</title>
	<atom:link href="http://blog.mersoft.com/tag/websphere-ce/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mersoft.com</link>
	<description>Achieve, Compete, and Evolve</description>
	<lastBuildDate>Wed, 07 Sep 2011 15:13:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WebSphere CE &#8211; Deploy WAR on its own port</title>
		<link>http://blog.mersoft.com/2010/01/15/websphere-ce-deploy-war-on-its-own-port/</link>
		<comments>http://blog.mersoft.com/2010/01/15/websphere-ce-deploy-war-on-its-own-port/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 23:16:32 +0000</pubDate>
		<dc:creator>Tom Bollwitt</dc:creator>
				<category><![CDATA[Java/Java Frameworks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[Geronimo]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[WAR]]></category>
		<category><![CDATA[WebSphere]]></category>
		<category><![CDATA[WebSphere CE]]></category>

		<guid isPermaLink="false">http://blog.mersoft.com/?p=354</guid>
		<description><![CDATA[I was tasked by the powers that be to figure out how to deploy a WAR in WebSphere Application Server Community Edition (WSASCE) under a separate port from other applications that were already running on our test server. After much googling and frustration, since I have never worked with WSASCE before, I finally figured it [...]]]></description>
			<content:encoded><![CDATA[<p>I was tasked by the powers that be to figure out how to deploy a WAR in WebSphere Application Server Community Edition (WSASCE) under a separate port from other applications that were already running on our test server. After much googling and frustration, since I have never worked with WSASCE before, I finally figured it out.</p>
<p>This ended up being fairly simple, however the the example from the <a title="WebSphere docs" href="http://publib.boulder.ibm.com/wasce/V2.0.0/en/configuring-resources-in-the-asset-scope.html#Configuringresourcesintheassetscope-ConfiguringaTomcatwebcontainer" target="_blank">WebSphere docs</a> did not work for me. I then was able to finally find some <a title="Geronimo docs" href="http://cwiki.apache.org/GMOxDOC22/app-per-port-running-multiple-web-apps-on-different-ports.html" target="_blank">Geronimo docs</a> that ended up working for me after a few minor adjustments since the example was for deploying an EAR.</p>
<p>Essentially all that needs to be done is to instruct WSASCE to create a new web container to deploy your WAR to. This can all be done via the deployment plan for your WAR.</p>
<p>Here is a sample deployment plan. Please note that there are a few things you will need to tweak for your envirnoment, which are noted after the sample.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1"&gt;
  &lt;environment&gt;
    &lt;moduleId&gt;
      &lt;groupId&gt;GROUP_ID&lt;/groupId&gt;
      &lt;artifactId&gt;ARTIFACT_ID&lt;/artifactId&gt;
      &lt;version&gt;VERSION&lt;/version&gt;
      &lt;type&gt;war&lt;/type&gt;
    &lt;/moduleId&gt;
    &lt;dependencies /&gt;
    &lt;hidden-classes /&gt;
    &lt;non-overridable-classes /&gt;
  &lt;/environment&gt;
  &lt;context-root&gt;/YOUR_CONTEXT&lt;/context-root&gt;
  &lt;web-container&gt;
    &lt;gbean-link&gt;TomcatWebContainer1&lt;/gbean-link&gt;
  &lt;/web-container&gt;

  &lt;gbean name="TomcatWebConnector1"&gt;
    &lt;attribute name="name"&gt;HTTP&lt;/attribute&gt;
    &lt;attribute name="host"&gt;0.0.0.0&lt;/attribute&gt;
    &lt;attribute name="port"&gt;8090&lt;/attribute&gt;
    &lt;attribute name="maxHttpHeaderSize"&gt;8192&lt;/attribute&gt;
    &lt;attribute name="maxThreads"&gt;150&lt;/attribute&gt;
    &lt;attribute name="minSpareThreads"&gt;25&lt;/attribute&gt;
    &lt;attribute name="maxSpareThreads"&gt;75&lt;/attribute&gt;
    &lt;attribute name="enableLookups"&gt;false&lt;/attribute&gt;
    &lt;attribute name="redirectPort"&gt;8453&lt;/attribute&gt;
    &lt;attribute name="acceptCount"&gt;100&lt;/attribute&gt;
    &lt;attribute name="connectionTimeout"&gt;20000&lt;/attribute&gt;
    &lt;attribute name="disableUploadTimeout"&gt;true&lt;/attribute&gt;
    &lt;reference name="TomcatContainer"&gt;
      &lt;name&gt;TomcatWebContainer1&lt;/name&gt;
    &lt;/reference&gt;
    &lt;reference name="ServerInfo"&gt;
      &lt;name&gt;ServerInfo&lt;/name&gt;
    &lt;/reference&gt;
  &lt;/gbean&gt;

  &lt;gbean name="TomcatWebContainer1"&gt;
    &lt;attribute name="catalinaHome"&gt;var/catalina&lt;/attribute&gt;
    &lt;reference name="EngineGBean"&gt;
      &lt;name&gt;TomcatEngine1&lt;/name&gt;
    &lt;/reference&gt;
    &lt;reference name="ServerInfo"&gt;
      &lt;name&gt;ServerInfo&lt;/name&gt;
    &lt;/reference&gt;
    &lt;reference name="WebManager"&gt;
      &lt;name&gt;TomcatWebManager&lt;/name&gt;
    &lt;/reference&gt;
  &lt;/gbean&gt;

  &lt;gbean name="TomcatEngine1"&gt;
    &lt;attribute name="className"&gt;org.apache.geronimo.tomcat.TomcatEngine&lt;/attribute&gt;
    &lt;attribute name="initParams"&gt;
      name=Geronimo1
    &lt;/attribute&gt;
    &lt;reference name="DefaultHost"&gt;
      &lt;name&gt;TomcatHost1&lt;/name&gt;
    &lt;/reference&gt;
    &lt;references name="Hosts"&gt;
      &lt;pattern&gt;
        &lt;name&gt;TomcatHost1&lt;/name&gt;
      &lt;/pattern&gt;
    &lt;/references&gt;
    &lt;reference name="RealmGBean"&gt;
      &lt;name&gt;NoSecurityRealm&lt;/name&gt;
    &lt;/reference&gt;
  &lt;/gbean&gt;

  &lt;gbean name="TomcatHost1"&gt;
    &lt;attribute name="className"&gt;org.apache.catalina.core.StandardHost&lt;/attribute&gt;
    &lt;attribute name="initParams"&gt;
      name=localhost1
      appBase=
      workDir=work1
    &lt;/attribute&gt;
  &lt;/gbean&gt;

  &lt;gbean name="NoSecurityRealm"&gt;
    &lt;attribute name="className"&gt;org.apache.geronimo.tomcat.realm.TomcatEJBWSGeronimoRealm&lt;/attribute&gt;
  &lt;/gbean&gt;
&lt;/web-app&gt;</pre>
<p>You will need to replace the following placeholders in the above XML with values for your own WAR.</p>
<ul>
<li>GROUP_ID &#8211; Your group ID</li>
<li>ARTIFACT_ID &#8211; Your artifact ID</li>
<li>VERSION &#8211; The version of your WAR</li>
<li>YOUR_CONTEXT &#8211; The root context for your WAR</li>
</ul>
<p>You may also modify the following for your own environment if desired</p>
<ul>
<li><strong><em>TomcatWebContainer1</em></strong> is the name of the new web container.</li>
<li><em><strong>TomcatEngine1</strong></em> is the name of the new engine for the new web container.</li>
<li><em><strong>TomcatHost1</strong></em> is the name of the new virtual host in the new web container.</li>
<li><strong><em>TomcatWebManager</em></strong> is the name of the web manager of the new web container.</li>
<li><strong><em>TomcatWebManager</em></strong> is the name of the web manager defined in the initial server.</li>
<li><strong><em>TomcatJAASRealm</em></strong> is the name of the Tomcat realm for authenticating and authorizing users.</li>
<li><strong><em>TomcatJAASRealm</em></strong> is the name of the realm defined in the initial server configuration.</li>
<li><strong><em>0.0.0.0</em></strong> is replaced with the host name or IP address of the web containers host. The value localhost will restrict access to requesters in the server&#8217;s host. Use the value 0.0.0.0 if you  don&#8217;t want to provide the specific IP Address or host name.</li>
<li><strong><em>8090</em></strong> is replaced with the port number where the HTTP connector will listen for requests.</li>
</ul>
<p>To deploy your WAR into the new web container, include the <strong>&lt;web-container&gt;</strong> element and specify a <strong>&lt;gbean-link&gt;</strong> to the new container where <strong><em>TomcatWebContainer1</em></strong> is replaced with the name of the container GBean.</p>
<pre>
<pre> ...
 &lt;web-container&gt;
   &lt;gbean-link&gt;TomcatWebContainer1&lt;/gbean-link&gt;
 &lt;/web-container&gt;
 ...</pre>
</pre>
<p>Now just deploy your WAR with your new handy-dandy deployment plan.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.mersoft.com%2F2010%2F01%2F15%2Fwebsphere-ce-deploy-war-on-its-own-port%2F&amp;linkname=WebSphere%20CE%20%26%238211%3B%20Deploy%20WAR%20on%20its%20own%20port"><img src="http://blog.mersoft.com/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.mersoft.com/2010/01/15/websphere-ce-deploy-war-on-its-own-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

