<?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>betweenGo &#187; Struts</title>
	<atom:link href="http://betweengo.com/category/apache/struts/feed/" rel="self" type="application/rss+xml" />
	<link>http://betweengo.com</link>
	<description>We make Ruby on Rails easy.  We make ATG easy.</description>
	<lastBuildDate>Tue, 08 May 2012 19:30:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>mod_rewrite to bypass security</title>
		<link>http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/</link>
		<comments>http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 16:21:40 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=447</guid>
		<description><![CDATA[Many Apache webserver installations use uriworkermap to configure requests are forwarded to Tomcat/JBoss and which are not.   This provides a certain level of security.  For example: ## APACHE RESOURCES (static files): !/*.gif=myapp !/*.html=myapp ## DISALLOW  (security-related filter): !/*.jsp=myapp !/*.xml=myapp ## TOMCAT RESOURCES: /*.do=myapp However if you dynamically generate your sitemap.xml or any other XML files [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/09/23/browser-security-warnings/' rel='bookmark' title='Browser Security Warnings'>Browser Security Warnings</a></li>
<li><a href='http://betweengo.com/2008/04/01/mod_rails/' rel='bookmark' title='mod_rails'>mod_rails</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Many Apache webserver installations use <a title="The Apache Tomcat Connector - Reference Guide - uriworkermap.properties configuration" href="http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html">uriworkermap</a> to configure requests are forwarded to Tomcat/JBoss and which are not.   This provides a certain level of security.  For example:</p>
<pre>## APACHE RESOURCES (static files):
!/*.gif=myapp
!/*.html=myapp

## DISALLOW  (security-related filter):
!/*.jsp=myapp
!/*.xml=myapp

## TOMCAT RESOURCES:
/*.do=myapp</pre>
<p>However if you <a title="Dynamically generate sitemap.xml" href="http://betweengo.com/2009/03/02/dynamically-generate-sitemapxml/">dynamically generate your sitemap.xml</a> or any other XML files using a servlet then this security will be a problem since the XML request will not make it to Tomcat/JBoss.  This is when mod_rewrite comes to the rescue.</p>
<p>You can set up <a title="Apache module mod_rewrite" href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">mod_rewrite</a> to rewrite the sitemap.xml request to be a sitemap.do request.</p>
<pre>RewriteRule ^/sitemap\.xml$ /sitemap.do [PT,L]</pre>
<p>Then you can <a title="Strust 1 - Welcome - Struts Config in a Nutshell" href="http://struts.apache.org/1.x/#Struts_Config_in_a_Nutshell">set up Struts</a> to forward this request to sitemap.xml.</p>
<pre>&lt;action path="/sitemap" forward="/sitemap.xml"/&gt;</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2009%2F03%2F02%2Fmod_rewrite-to-bypass-security%2F&amp;title=mod_rewrite%20to%20bypass%20security" id="wpa2a_2"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/09/23/browser-security-warnings/' rel='bookmark' title='Browser Security Warnings'>Browser Security Warnings</a></li>
<li><a href='http://betweengo.com/2008/04/01/mod_rails/' rel='bookmark' title='mod_rails'>mod_rails</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Size of collection in a JSP/DSP page</title>
		<link>http://betweengo.com/2008/05/15/size-of-collection-jsp-dsp/</link>
		<comments>http://betweengo.com/2008/05/15/size-of-collection-jsp-dsp/#comments</comments>
		<pubDate>Thu, 15 May 2008 18:44:26 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[JSTL]]></category>
		<category><![CDATA[Page Development]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JSP]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=182</guid>
		<description><![CDATA[(Photo: leaf pile by oeimah) Sometimes in a JSP/DSP page you will want to get the size of a collection and unless you are within a Range, ForEach or similar droplet you won&#8217;t have access to this value. Struts has a nice solution using the bean:size tag.  JSTL 1.1 has a nice solution using the [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/05/09/accessing-repositoryitems-with-jstl/' rel='bookmark' title='Accessing RepositoryItems with JSTL'>Accessing RepositoryItems with JSTL</a></li>
<li><a href='http://betweengo.com/2008/04/29/comparison-of-dsp-and-dspel/' rel='bookmark' title='Comparison of DSP and DSPEL'>Comparison of DSP and DSPEL</a></li>
<li><a href='http://betweengo.com/2008/08/22/trim-white-space-from-jsp/' rel='bookmark' title='Trim White Space from JSP'>Trim White Space from JSP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.flickr.com/photos/oeimah/4112247972/"><img title="leaf pile on Flickr" src="http://farm3.static.flickr.com/2496/4112247972_3bb40b80b3.jpg" alt="leaf pile on Flickr" /></a></p>
<p style="text-align: center;">(Photo: <a title="leaf pile on Flickr" href="http://www.flickr.com/photos/oeimah/4112247972/">leaf pile</a> by <a title="Flickr: oeimah's photostream" href="http://www.flickr.com/photos/oeimah/">oeimah</a>)</p>
<p>Sometimes in a JSP/DSP page you will want to get the size of a collection and unless you are within a Range, ForEach or similar droplet you won&#8217;t have access to this value.</p>
<p>Struts has a nice solution using the <a title="&lt;bean:size&gt;" href="http://struts.apache.org/1.3.8/struts-taglib/tagreference.html#bean:size">bean:size</a> tag.  JSTL 1.1 has a nice solution using the <a title="JSTL Function length" href="http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fn/length.fn.html">fn:length</a> function.</p>
<p>Here is an example of how to use Struts, DSPEL and JSTL to get the size of a collection.</p>
<pre>  &lt;dspel:getvalueof param="book.pages" var="pages"
                    vartype="java.util.Collection"/&gt;
  &lt;bean:size id="numPages" name="pages"/&gt;
  Number of Pages: &lt;c:out value="${numPages}"/&gt;
  Number of Pages: &lt;dspel:valueof value="${numPages}"/&gt;</pre>
<p>Here is an example of how to use JSTL 1.1 and DSPEL to get the size of a collection.</p>
<p>&nbsp;</p>
<pre>  &lt;dspel:getvalueof param="book.pages" var="pages"
                    vartype="java.util.Collection"/&gt;
  Number of Pages: &lt;c:out value="${fn:length(pages)}"/&gt;</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F05%2F15%2Fsize-of-collection-jsp-dsp%2F&amp;title=Size%20of%20collection%20in%20a%20JSP%2FDSP%20page" id="wpa2a_4"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/05/09/accessing-repositoryitems-with-jstl/' rel='bookmark' title='Accessing RepositoryItems with JSTL'>Accessing RepositoryItems with JSTL</a></li>
<li><a href='http://betweengo.com/2008/04/29/comparison-of-dsp-and-dspel/' rel='bookmark' title='Comparison of DSP and DSPEL'>Comparison of DSP and DSPEL</a></li>
<li><a href='http://betweengo.com/2008/08/22/trim-white-space-from-jsp/' rel='bookmark' title='Trim White Space from JSP'>Trim White Space from JSP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/05/15/size-of-collection-jsp-dsp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Submitting a form with a radio button</title>
		<link>http://betweengo.com/2007/04/28/submitting-form-with-radio-button/</link>
		<comments>http://betweengo.com/2007/04/28/submitting-form-with-radio-button/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 15:46:29 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=108</guid>
		<description><![CDATA[Submitting a form from a radio button is not common but it is a nice UI which is even better when done with AJAX. A typical form with two radio buttons would look something like this. &#60;form action="test.html"&#62; 1 &#60;input type="radio" name="test" value ="1"&#62;&#60;br&#62; 2 &#60;input type="radio" name="test" value ="2"&#62; &#60;p&#62;&#60;input type="submit" value="submit"&#62; &#60;/form&#62; 1 [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Submitting a form from a radio button is not common but it is a nice UI which is even better when done with AJAX.</p>
<p>A typical form with two radio buttons would look something like this.</p>
<pre>&lt;form action="test.html"&gt;
1 &lt;input type="radio" name="test" value ="1"&gt;&lt;br&gt;
2 &lt;input type="radio" name="test" value ="2"&gt;
&lt;p&gt;&lt;input type="submit" value="submit"&gt;
&lt;/form&gt;</pre>
<table border="1" cellpadding="5">
<tbody>
<tr>
<td>
<form action="test.html"> 1</p>
<input name="test" type="radio" value="1" /> 2</p>
<input name="test" type="radio" value="2" />
<input type="submit" value="submit" />
</form>
</td>
</tr>
</tbody>
</table>
<p>But with basic JavaScript you can make a simpler form like this.</p>
<pre>&lt;script&gt;
function submitAction( form, absPath ) {
form.action = absPath;
form.submit();
}
&lt;/script&gt;
&lt;form action="test.html" id="test"&gt;
1 &lt;input type="radio" name="test" value ="1" onchange="submitAction(document.getElementById('test'), 'test.html')"&gt;&lt;br&gt;
2 &lt;input type="radio" name="test" value ="2" onchange="submitAction(document.getElementById('test'), 'test.html')"&gt;
&lt;/form&gt;</pre>
<table border="1" cellpadding="5">
<tbody>
<tr>
<td>
<form action="test.html"> 1</p>
<input name="test" type="radio" value="1" /> 2</p>
<input name="test" type="radio" value="2" />
<input type="submit" value="submit" />
</form>
</td>
</tr>
</tbody>
</table>
<p>If you are using Struts the above form&#8217;s JSP would be:</p>
<pre>&lt;html:form action="test.do" styleId="test"&gt;
1 &lt;input type="radio" name="test" value ="1" onchange="submitAction(document.getElementById('test'), 'test.do')"&gt;&lt;br&gt;
2 &lt;input type="radio" name="test" value ="2" onchange="submitAction(document.getElementById('test'), 'test.do')"&gt;
&lt;/html:form&gt;</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2007%2F04%2F28%2Fsubmitting-form-with-radio-button%2F&amp;title=Submitting%20a%20form%20with%20a%20radio%20button" id="wpa2a_6"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2007/04/28/submitting-form-with-radio-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
