<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>cdivilly</title>
	<atom:link href="http://cdivilly.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cdivilly.wordpress.com</link>
	<description></description>
	<lastBuildDate>Fri, 16 Dec 2011 11:12:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cdivilly.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>cdivilly</title>
		<link>http://cdivilly.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cdivilly.wordpress.com/osd.xml" title="cdivilly" />
	<atom:link rel='hub' href='http://cdivilly.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Weblogic &amp; Basic Auth</title>
		<link>http://cdivilly.wordpress.com/2011/12/16/weblogic-basic-auth/</link>
		<comments>http://cdivilly.wordpress.com/2011/12/16/weblogic-basic-auth/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 11:12:37 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[notetoself]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[basic auth]]></category>
		<category><![CDATA[Servlet]]></category>
		<category><![CDATA[weblogic]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=305</guid>
		<description><![CDATA[Weblogic will by default attempt to authenticate any HTTP Basic credentials, even if the URI being accessed does not fall within a statically declared web.xml security constraint. Doesn&#8217;t seem like a reasonable default to me, but anyways there is a means to change this behaviour, the enforce-valid-basic-auth-credentials setting: To set the enforce-valid-basic-auth-credentials flag, perform the &#8230; <a href="http://cdivilly.wordpress.com/2011/12/16/weblogic-basic-auth/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=305&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Weblogic will by default attempt to authenticate any HTTP Basic credentials, even if the URI being accessed does not fall within a statically declared <code>web.xml</code> security constraint. Doesn&#8217;t seem like a reasonable default to me, but anyways there is a <a href="http://docs.oracle.com/cd/E11035_01/wls100/security/thin_client.html#wp1057361">means</a> to change this behaviour, the <code>enforce-valid-basic-auth-credentials</code> setting:</p>
<p>To set the <code>enforce-valid-basic-auth-credentials</code> flag, perform the following steps:</p>
<ol>
<li>Add the <code>&lt;enforce-valid-basic-auth-credentials&gt;</code> element to <code>config.xml</code> within the <code>&lt;security-configuration&gt;</code> element.
<pre><code>...
&lt;enforce-valid-basic-auth-credentials&gt;false&lt;/enforce-valid-basic-auth-credentials&gt;
&lt;/security-configuration&gt;
...</code></pre>
</li>
<li>Start or restart all of the servers in the domain.</li>
</ol>
<p>It&#8217;s a shame there isn&#8217;t an equivalent setting in the <code>weblogic.xml</code> deployment descriptor.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/305/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=305&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2011/12/16/weblogic-basic-auth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu, Subclipse, and JavaHL</title>
		<link>http://cdivilly.wordpress.com/2011/11/16/ubuntu-subclipse-and-javahl/</link>
		<comments>http://cdivilly.wordpress.com/2011/11/16/ubuntu-subclipse-and-javahl/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 12:20:24 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[javahl]]></category>
		<category><![CDATA[subclipse]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=291</guid>
		<description><![CDATA[If you get an error message like the following when using Subclipse (The Eclipse SVN plugin) on Ubuntu: Failed to load JavaHL Library. This means that your Ubuntu installation is missing the Java bindings for svn, to remedy this, install the relevant package: sudo apt-get install libsvn-java Add the following to your eclipse.ini after the &#8230; <a href="http://cdivilly.wordpress.com/2011/11/16/ubuntu-subclipse-and-javahl/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=291&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you get an error message like the following when using Subclipse (The Eclipse SVN plugin) on Ubuntu:</p>
<pre>Failed to load JavaHL Library.</pre>
<p>This means that your Ubuntu installation is missing the Java bindings for svn, to remedy this, install the relevant package:</p>
<pre>sudo apt-get install libsvn-java</pre>
<p>Add the following to your eclipse.ini after the line starting with <code>-vmargs</code></p>
<pre>-Djava.library.path=/usr/lib/jni</pre>
<p>Restart Eclipse. An alternative solution is to reconfigure Subclipse to use the pure Java bindings provided by SVNKit, select the Window|Preferences menu option, then choose Team&gt;SVN from the tree view in the left pane, then choose SVNKit for the Client setting under the SVN Interface heading. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=291&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2011/11/16/ubuntu-subclipse-and-javahl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>links for 2011-08-06</title>
		<link>http://cdivilly.wordpress.com/2011/08/07/links-for-2011-08-06/</link>
		<comments>http://cdivilly.wordpress.com/2011/08/07/links-for-2011-08-06/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 00:20:45 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/2011/08/07/links-for-2011-08-06/</guid>
		<description><![CDATA[IAB Commentary:Architectural Concerns on the Use of DNS &#8230; (tags: DNS Wildcards Considerations)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=300&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.iab.org/documents/correspondence-reports-documents/docs2003/2003-09-20-dns-wildcards/">IAB Commentary:Architectural Concerns on the Use of DNS &#8230;</a></div>
<div class="delicious-tags">(tags: <a href="http://www.delicious.com/cdivilly/DNS">DNS</a> <a href="http://www.delicious.com/cdivilly/Wildcards">Wildcards</a> <a href="http://www.delicious.com/cdivilly/Considerations">Considerations</a>)</div>
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/300/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=300&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2011/08/07/links-for-2011-08-06/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Servlets and URI Parameters</title>
		<link>http://cdivilly.wordpress.com/2011/04/22/java-servlets-uri-parameters/</link>
		<comments>http://cdivilly.wordpress.com/2011/04/22/java-servlets-uri-parameters/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 12:34:16 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[http]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Parameters]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Servlet]]></category>
		<category><![CDATA[URI]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=263</guid>
		<description><![CDATA[Java Servlet Containers don't play well with the lesser known URI Parameter <a href="http://cdivilly.wordpress.com/2011/04/22/java-servlets-uri-parameters/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=263&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s a URI Parameter? well it&#8217;s not the values after the question mark in the URI below:</p>
<pre>
/some/path?key=value
</pre>
<p>those are HTML Form values. Actually URI Parameters are rarely used, and also poorly understood by servlet containers, here&#8217;s an example URI:</p>
<pre>
/some/path;param
</pre>
<p>To be pedantic (and this post is full of pedantry!) I should probably call them something like &#8216;URI Path Segment Parameters&#8217;, but for the sake of brevity I&#8217;ll continue to say URI Parameter for the rest of this document.</p>
<p>The HTTP 1.1 specification [1] never refers to URI parameters specifically but it does say:</p>
<blockquote><p>
   For definitive information on<br />
   URL syntax and semantics, see &#8220;Uniform Resource Identifiers (URI):<br />
   Generic Syntax and Semantics,&#8221; RFC 2396 [42] (which replaces RFCs<br />
   1738 [4] and RFC 1808 [11]). This specification adopts the<br />
   definitions of &#8220;URI-reference&#8221;, &#8220;absoluteURI&#8221;, &#8220;relativeURI&#8221;, &#8220;port&#8221;,<br />
   &#8220;host&#8221;,&#8221;abs_path&#8221;, &#8220;rel_path&#8221;, and &#8220;authority&#8221; from that<br />
   specification.
</p></blockquote>
<p>RFC 2396 [2] has this to say about the <code>abs_path</code> definition:</p>
<blockquote>
<pre>
abs_path         = "/"  path_segments
...
path_segments = segment *( "/" segment )
segment          = *pchar *( ";" param )
param             = *pchar

pchar              = unreserved | escaped |
                         ":" | "@" | "&amp;" | "=" | "+" | "$" | ","

The path may consist of a sequence of path segments separated by a
single slash "/" character.  Within a path segment, the characters
"/", ";", "=", and "?" are reserved.  Each path segment may include a
sequence of parameters, indicated by the semicolon ";" character.
The parameters are not significant to the parsing of relative
references.
 </pre>
</blockquote>
<p>Note how parameters are permitted on each segment of the path.</p>
<p>As an aside RFC 2396 has been obsoleted by RFC 3986&nbsp;[3], which seems to widen the definition of a URI parameter:</p>
<blockquote>
<pre>
sub-delims  = "!" / "$" / "&amp;" / "'" / "(" / ")"
                    / "*" / "+" / "," / ";" / "="
segment     = *pchar
pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
...
Aside from dot-segments in hierarchical paths, a path segment is
considered opaque by the generic syntax.  URI producing applications
often use the reserved characters allowed in a segment to delimit
scheme-specific or dereference-handler-specific subcomponents.  For
example, the semicolon (";") and equals ("=") reserved characters are
often used to delimit parameters and parameter values applicable to
that segment.  The comma (",") reserved character is often used for
similar purposes.  For example, one URI producer might use a segment
such as "name;v=1.1" to indicate a reference to version 1.1 of
"name", whereas another might use a segment such as "name,1.1" to
indicate the same.  Parameter types may be defined by scheme-specific
semantics, but in most cases the syntax of a parameter is specific to
the implementation of the URI's dereferencing algorithm.
</pre>
</blockquote>
<p>So a parameter is now anything that follows a <code>sub-delims</code> character, not just a semi-colon. However since HTTP 1.1 depends on RFC 2396 I don&#8217;t think the above is directly relevant to this discussion, and I don&#8217;t expect containers to support this syntax.</p>
<p>What does the Servlet Specification [4] have to say about URI Parameters? Very little, if anything, just the following:</p>
<blockquote><p>
Path parameters that are part of a GET request (as defined by HTTP 1.1) are not<br />
exposed by these APIs. They must be parsed from the String values returned by<br />
the getRequestURI method or the getPathInfo method.
</p></blockquote>
<p>Now this statement raises a couple of questions:</p>
<ul>
<li>What is a &#8216;path parameter&#8217;? HTTP 1.1 never uses this term, I&#8217;m inferring that its a URI parameter</li>
<li>Why does it state they only apply to GET requests?</li>
</ul>
<p>So I&#8217;m unclear whether the above statement is meant to apply to URI Parameters or not. The one inference I will draw from it is that all data passed in the request URI should be retrievable from <code>getRequestURI()</code>, and the path portion (following the portion of the path mapped to the servlet path) of the request URI should be retrievable from <code>getPathInfo()</code>.</p>
<p>The javadocs for these methods also imply this:</p>
<blockquote><p>
java.lang.String getRequestURI()</p>
<p>    Returns the part of this request&#8217;s URL from the protocol name up to the query string in the first line of the HTTP request. The web container does not decode this String. For example:
</p></blockquote>
<blockquote><p>
java.lang.String getPathInfo()</p>
<p>    Returns any extra path information associated with the URL the client sent when it made this request. The extra path information follows the servlet path but precedes the query string and will start with a &#8220;/&#8221; character.</p>
<p>    This method returns null if there was no extra path information.</p>
<p>    Same as the value of the CGI variable PATH_INFO.</p>
<p>    Returns:<br />
        a String, decoded by the web container, specifying extra path information that comes after the servlet path but before the query string in the request URL; or null if the URL does not have any extra path information
</p></blockquote>
<h2>Servlet containers don&#8217;t handle URI Parameters the way I expect</h2>
<p>I wrote a little servlet (mapped to <code>/*</code>) to test how various servlet containers (just the ones I had to hand, there&#8217;s plenty more I didn&#8217;t test) handle URI Parameters. The servlet issues a temporary redirect to the following path and then displays the values returned from the HttpServletRequest interface:</p>
<pre>
a,b/c;d/e.f;g/h?i=j+k&amp;l=m
</pre>
<p>This is the output I expected:</p>
<table border='1'>
<tr>
<th>getServerInfo</th>
<th>getPathInfo</th>
<th>getQueryString</th>
<th>getRequestURI</th>
<th>getRequestURL</th>
</tr>
<tr>
<td>Container</td>
<td>a,b/c;d/e.f;g/h</td>
<td>i=j+k&amp;l=m</td>
<td>/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
<td>http://localhost:8080/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
</tr>
</table>
<p>Let&#8217;s take a look at the actual results&#8230;</p>
<table border='1'>
<tr>
<th>getServerInfo</th>
<th>getPathInfo</th>
<th>getQueryString</th>
<th>getRequestURI</th>
<th>getRequestURL</th>
</tr>
<tr>
<td>Apache Tomcat/7.0.12</td>
<td>/a,b/c/e.f/h</td>
<td>i=j+k&amp;l=m</td>
<td>/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
<td>http://localhost:8080/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
</tr>
<tr>
<td>jetty/6.1.26</td>
<td>/a,b/c</td>
<td>i=j+k&amp;l=m</td>
<td>/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
<td>http://localhost:8080/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
</tr>
<tr>
<td>GlassFish Server Open Source Edition 3.0.1</td>
<td>/a,b/c</td>
<td>i=j+k&amp;l=m</td>
<td>/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
<td>http://localhost:8080/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
</tr>
<tr>
<td>WebLogic Server 10.3.4.0</td>
<td>/a,b/c</td>
<td>i=j+k&amp;l=m</td>
<td>/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
<td>http://localhost:7001/servlet-uri-handling/a,b/c;d/e.f;g/h</td>
</tr>
<tr>
<td>Oracle Containers for J2EE 10g (10.1.3.5.0) </td>
<td>/a,b/c</td>
<td>i=j+k&amp;l=m</td>
<td>/servlet-uri-handling/a,b/c</td>
<td>http://localhost:8888/servlet-uri-handling/a,b/c</td>
</tr>
</table>
<p>Some observations:</p>
<ul>
<li>As expected, none of the containers follow the wider spec of RFC 3986, treating any of the sub-delimiters as parameter markers, they only treat the semi-colon as the parameter marker.</li>
<li>All containers do recognize the presence of URI parameters</li>
<li>All containers discard any kind of URI parameter data when returning the value of <code>getPathInfo()</code>. Not sure why they do this, I can&#8217;t see anything in the Servlet specification telling them to do this.</li>
<li>Tomcat is the only container that understands that each segment of the path can have parameters. All the others assume the parameters can only appear on the last segment.</li>
<li>All containers bar OC4J will return the full path information (including context path, up to the query string) from <code>getRequestURI()</code>.</li>
</ul>
<h3>Conclusion</h3>
<p>If you need to handle URI parameters don&#8217;t use <code>getPathInfo()</code>, use <code>getRequestURI()</code> and parse out the information you need yourself, remember to URL decode if needed. If you&#8217;re tied to OC4J then you&#8217;re out of luck and there doesn&#8217;t seem to be a way to handle URI parameters.</p>
<h2>References</h3>
<ul>
<li>[1] <a href="http://tools.ietf.org/html/rfc2616">RFC 2616</a></li>
<li>[2] <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a></li>
<li>[3] <a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a></li>
<li>[4] <a href="http://jcp.org/aboutJava/communityprocess/final/jsr315/index.html">Java Servlet Specification</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/263/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=263&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2011/04/22/java-servlets-uri-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>A Year With Ubuntu</title>
		<link>http://cdivilly.wordpress.com/2011/03/18/a-year-with-ubuntu/</link>
		<comments>http://cdivilly.wordpress.com/2011/03/18/a-year-with-ubuntu/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 14:19:50 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[bye bye windows]]></category>
		<category><![CDATA[hello ubuntu]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=250</guid>
		<description><![CDATA[On leaving Windows for good. <a href="http://cdivilly.wordpress.com/2011/03/18/a-year-with-ubuntu/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=250&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This time last year I got a new work laptop, a Dell E6400, dual core 2.8GHz, 4GB, enough hard disk capacity that I&#8217;ve forgotten what it is. I dutifully installed the corporate Windows XP image and eventually after the ubiquituous reboots got to a nice clean desktop, looking forward to a nice jump in computing power, I hit the start button to get on with installing the rest of the software I&#8217;m going to need, and nothing happens. Of course that always seems to happen on XP, you have to wait seconds to minutes after the desktop displaying before things have settled down enough to get anything to happen.</p>
<p>At that instant I gave up on Windows, my next action was to download a 64bit Ubuntu .iso, and burn it to DVD. I&#8217;d played with virtualization and dual booting before, but on the spur of the moment I decided I was just going to wipe the hard disk one more time and throw my lot in with Ubuntu, I&#8217;d figure out how to manage without the few Windows only applications I needed somehow, it&#8217;d be better than gritting my teeth at my unresponsive desktop every morning.</p>
<p>In one sense this was a big deal for me, I&#8217;ve been using Microsoft operating systems since MSDOS 2.0, not exclusively, but certainly as my primary O.S. When other kids were zapping their way through Zaxxon on the C64 etc, I was making do with Kings Quest on our trusty green screen Ferranti PC clone. DOS and Windows was where I learned to program, I&#8217;d read the Norton and Petzold books cover to cover many times over. Now I was closing the door on all of that.</p>
<p>In another sense it was not a big deal at all. I rebooted the machine, wiped the hard disk, installed Ubuntu in minutes and quickly booted to a desktop that responded to clicks straight away! Being a Java developer for the past decade, I continue to use the exact same tools as on Windows. The benefits greatly outweight the drawbacks for me. The UI is fast and responsive, and has all that modern eye candy that XP lacks. Installing software is a breeze. OpenOffice is a credible alternative to MS Office. It easily runs an install of Oracle without affecting system responiveness, which is something that I could never manage on Windows. And of course its Un*x, which to me as programmer is a huge benefit, it&#8217;s handy to develop on the same platform as the platform where the majority of my work will get deployed.</p>
<p>Of course there are niggles. I can&#8217;t disable just the trackpad and not the nipple, it keeps re-enabling itself, hibernate/sleep has stopped working (it used to work great, but somewhere along the way things regressed). It&#8217;s slow to connect to wifi and it often fails to connect properly, ending up with a 0.0.0.0 address, requiring me to delete the wifi connection and reconnect to workaround (anyways I&#8217;m blaming the router for this one, it&#8217;s flaky). All very annoying, but none of them make me want to go back to Windows.</p>
<p>I&#8217;ve also had to do some iPhone development in the past year, so for a while used our domestic Macbook Pro as my work machine. The experience was very similar to Ubuntu but I&#8217;ll go out on a limb here and say if you&#8217;re a Java developer at least, Ubuntu provides a nicer environment than OS/X. My envy of all the cool programmers turning up at meetings with shiny Macbooks has passed.</p>
<p>I wonder if I&#8217;ll still be using some Linux distro as my primary O/S in another 20-30 years time?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/250/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=250&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2011/03/18/a-year-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>APEX Listener 1.1</title>
		<link>http://cdivilly.wordpress.com/2011/03/02/apex-listener-1-1/</link>
		<comments>http://cdivilly.wordpress.com/2011/03/02/apex-listener-1-1/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 10:45:32 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[APEX]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=243</guid>
		<description><![CDATA[Version 1.1 of Oracle APEX Listener is now available for download. This is the first official release to include Resource Templates functionality, which lets you expose Oracle Database data as RESTful APIs. Read the release notes here. Important changes to note are discussed here. As ever please let us know your feedback in the APEX &#8230; <a href="http://cdivilly.wordpress.com/2011/03/02/apex-listener-1-1/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=243&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Version 1.1 of Oracle APEX Listener is now available for <a href="http://www.oracle.com/technetwork/developer-tools/apex-listener/downloads/index.html">download</a>. This is the first official release to include <a href="http://cdivilly.wordpress.com/2010/10/18/apex-listener-resource-templates/">Resource Templates</a> functionality, which lets you expose Oracle Database data as RESTful APIs. Read the release notes <a href="http://download.oracle.com/otn/java/appexpress/1.1/docs/AELRN/E21069_01.pdf">here</a>. Important changes to note are discussed <a href="http://forums.oracle.com/forums/thread.jspa?threadID=2184404">here</a>. As ever please let us know your feedback in the <a href="http://forums.oracle.com/forums/forum.jspa?forumID=858">APEX Listener Forum</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/243/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=243&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2011/03/02/apex-listener-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu, Personal Package Archives, Proxies and Update Manager</title>
		<link>http://cdivilly.wordpress.com/2011/02/16/ubuntu-personal-package-archives-proxies-and-update-manager/</link>
		<comments>http://cdivilly.wordpress.com/2011/02/16/ubuntu-personal-package-archives-proxies-and-update-manager/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 12:47:37 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[libmobiledevice]]></category>
		<category><![CDATA[ppa]]></category>
		<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=239</guid>
		<description><![CDATA[sudo add-apt-repository ppa:repositoryName can partially fail if behind a proxy/firewall, leading to the repository GPG key not being added. Learn how to locate and manually install the GPG key for a PPA, and stop Update Manager complaining about untrusted sources <a href="http://cdivilly.wordpress.com/2011/02/16/ubuntu-personal-package-archives-proxies-and-update-manager/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=239&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently my iPod Touch stopped connecting to my Ubuntu box. Seems the latest iPod Firmware update caused the problem. The solution is to install the latest version if the libraries providing the iPod connectivity. Problem is the latest versions have yet to make it into the main update channel. </p>
<p>So you have to add a <a href="https://launchpad.net/~pmcenery/+archive/ppa/+index?field.series_filter=maverick">Personal Package Archive</a> (PPA) to pickup the latest version, it should be just a matter of:</p>
<pre>
sudo add-apt-repository ppa:pmcenery
</pre>
<p>but in my case this did not work properly, failing to retrieve the GPG key for the repository, seems <code>gpg</code> has problems traversing the proxy/firewall (I didn&#8217;t notice this at the time).</p>
<p>A few days later and Update Manager wants to update the ipod libraries, but then fails saying this would require installing untrusted packages. What an irritating message, give me the option to make an exception instead of point blank refusing. I eventually realise the PPA GPG key is missing, so try various incantations to get gpg to traverse the proxy/firewall without success, after a bit of googling I find an alternative approach:</p>
<p>On the PPA Web Page, there&#8217;s a heading called &#8216;Technical Details for this PPA&#8217;, click it to expand it, under &#8216;Signing Key&#8217; there&#8217;s a hyper-linked key, click the link, and then the link on the next page, and you reach a page showing the GPG key for the PPA. Save the text from <code>-----BEGIN PGP PUBLIC KEY BLOCK-----</code> to <code>-----END PGP PUBLIC KEY BLOCK-----<br />
</code> in a text file. </p>
<p>In Ubuntu go to System|Administration|Update Manager|Settings|Authentication|Import Key File&#8230; and choose the text file you just created. Then press the Close button, then the Check button, and now Install Updates should now work without problems</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=239&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2011/02/16/ubuntu-personal-package-archives-proxies-and-update-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>Resource Templates, not just for APEX</title>
		<link>http://cdivilly.wordpress.com/2010/12/17/rt-not-just-for-apex/</link>
		<comments>http://cdivilly.wordpress.com/2010/12/17/rt-not-just-for-apex/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 01:52:39 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Resource Templates]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=228</guid>
		<description><![CDATA[Oracle APEX Listener&#8216;s primary function is to serve as a Java friendly alternative to mod_plsql. The most well known application that uses mod_plsql being APEX. However the Listener is not restricted to providing HTTP access to APEX, it can provide HTTP access to any PL/SQL procedure that mod_plsql can. Similarly the Resource Templates functionality we &#8230; <a href="http://cdivilly.wordpress.com/2010/12/17/rt-not-just-for-apex/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=228&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oracle.com/technetwork/developer-tools/apex-listener/overview/index.html">Oracle APEX Listener</a>&#8216;s primary function is to serve as a Java friendly alternative to <a href="http://download.oracle.com/docs/cd/E12839_01/portal.1111/e12041/toc.htm">mod_plsql</a>. The most well known application that uses mod_plsql being <a href="http://www.oracle.com/technology/apex/index.html">APEX</a>. However the Listener is not restricted to providing HTTP access to APEX, it can provide HTTP access to any PL/SQL procedure that mod_plsql can. </p>
<p>Similarly the Resource Templates functionality we have introduced in the latest APEX Listener<a href="http://www.oracle.com/technetwork/developer-tools/apex-listener/ea1-download-listener-177114.html"> Early Access Release</a> is not dependent on APEX. Resource Templates can be used to expose any data stored in the database via HTTP, regardless of whether that data is managed by an APEX application or not. To be clear you don&#8217;t need to use APEX to be able to use Resource Templates.</p>
<p>P.S. If you&#8217;re using the new Resource Templates functionality, I&#8217;d love to hear about it, let me know the good or bad here or in the <a href="http://forums.oracle.com/forums/forum.jspa?forumID=858">forum</a>, thanks!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=228&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2010/12/17/rt-not-just-for-apex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu Upstart Script for Oracle Database</title>
		<link>http://cdivilly.wordpress.com/2010/10/28/ubuntu-upstart-script-for-oracle-database/</link>
		<comments>http://cdivilly.wordpress.com/2010/10/28/ubuntu-upstart-script-for-oracle-database/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 12:59:11 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=219</guid>
		<description><![CDATA[Recent versions of Ubuntu use Upstart instead of System-V style initialization, so if you want Oracle to start at boot time then you&#8217;ll need an Upstart script for Oracle. Create a file named /etc/init/oracle.conf: gksu gedit /etc/init/oracle.conf and add the following contents to the file: description "Oracle Database" author "http://cdivilly.wordpress.com" # The location of the &#8230; <a href="http://cdivilly.wordpress.com/2010/10/28/ubuntu-upstart-script-for-oracle-database/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=219&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recent versions of Ubuntu use <a href="http://upstart.ubuntu.com/">Upstart</a> instead of System-V style initialization, so if you want Oracle to start at boot time then you&#8217;ll need an Upstart script for Oracle. </p>
<p>Create a file named <code>/etc/init/oracle.conf</code>:</p>
<pre>
gksu gedit /etc/init/oracle.conf
</pre>
<p>and add the following contents to the file:</p>
<pre>
description  "Oracle Database"
author       "http://cdivilly.wordpress.com"

# The location of the Oracle install
env ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
# The user to execute Oracle as
env ORACLE=oracle

start on (net-device-up
          and local-filesystems
	  and runlevel [2345])
stop on runlevel [016]

expect fork

pre-start script
    su - $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
end script

post-stop script
    su - $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
end script
</pre>
<p>You may need to modify the value of the <code>ORACLE_HOME</code> and <code>ORACLE</code> environment variables to match your local settings.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/219/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=219&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2010/10/28/ubuntu-upstart-script-for-oracle-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
		<item>
		<title>REST and Oracle APEX Listener</title>
		<link>http://cdivilly.wordpress.com/2010/10/18/apex-listener-resource-templates/</link>
		<comments>http://cdivilly.wordpress.com/2010/10/18/apex-listener-resource-templates/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 17:16:51 +0000</pubDate>
		<dc:creator>cdivilly</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[APEX Listener]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Resource Templates]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://cdivilly.wordpress.com/?p=209</guid>
		<description><![CDATA[Update: November 2011, This functionality is available in Oracle Application Express Listener 1.1 and later, note the syntax of bind variables has been changed to match that used in other Oracle products: {person} becomes :person. The examples below have been changed to reflect the updated syntax Oracle Application Express Listener Early Adopter Release 1.1 introduces &#8230; <a href="http://cdivilly.wordpress.com/2010/10/18/apex-listener-resource-templates/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=209&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Update: November 2011</strong>, This functionality is available in Oracle Application Express Listener 1.1 and later, note the syntax of bind variables has been changed to match that used in other Oracle products: <code>{person}</code> becomes <code>:person</code>. The examples below have been changed to reflect the updated syntax</p>
<p>Oracle Application Express Listener Early Adopter Release 1.1 introduces a feature called <strong>Resource Templates</strong> that enables quick and easy configuration of <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">RESTful web services</a> for exposing and manipulating data stored in an Oracle Database via HTTP.</p>
<h3>Hello REST World</h3>
<p>Resource Templates are a mechanism to bind a <a href="http://tools.ietf.org/html/draft-gregorio-uritemplate-03">URI Template</a> to an SQL Query or a PL/SQL Block. For example a Resource Template could bind the URI Template: <code>hello?who={person}</code> to the following SQL Query:</p>
<pre>select 'Hello ' || :person || ' from Oracle Application Express Listener' greeting from dual</pre>
<p>Note how the <code>{person}</code> parameter in the URI Template is bound to a similarly named variable (<code>:person</code>) in the SQL query. Suppose our Application Express Listener is deployed at: <code>http://example.com/apex/</code> then a HTTP request like the following:</p>
<pre>GET /apex/hello?who=World HTTP/1.1
Host: example.com</pre>
<p>will generate a HTTP response like the following:</p>
<pre>HTTP/1.1 200 OK
ETag: "vovmx3pCoUq/DcdTY/hXusiq1QU="
Content-Type: application/json

{
 "greeting": "Hello World from Oracle Application Express Listener"
}</pre>
<ul>
<li>When the path: <code>hello?who=World</code> is received by the Application Express Listener, it is matched against our Resource Template&#8217;s URI Template.</li>
<li>The concrete value <code>World</code> is used as the value for <code>:person</code> parameter</li>
<li>The results of the Resource Template&#8217;s SQL Query are transformed into a JSON document</li>
<li>The JSON document consists of a JSON object. Each column in the query result set is mapped to a property of the JSON object.</li>
</ul>
<h3>Entity Tags and Conditional Operations</h3>
<p>Note the <a href="http://tools.ietf.org/html/rfc2616#section-14.19"><code>ETag</code></a> header in the HTTP response of the previous example. An <code>ETag</code> is a version identifier for a resource, in other words whenever the content of a resource changes, the value of its <code>ETag</code> header also changes. Resource Templates can generate an <code>ETag</code> header as follows:</p>
<ul>
<li>By generating a secure hash of the resource&#8217;s contents. This is the default mechanism, but requires buffering the content of the resource to generate the hash</li>
<li>Sometimes the resource or its constituent parts will already contain information to uniquely identify a version of a resource, so alternatively a SQL query may be defined that generates a unique version identifier. The result set of the SQL query is securely hashed and used as the <code>ETag</code> value. This option does not require buffering of the resource, but care needs to be taken to ensure the SQL query does guarantee a different result set for each resource version</li>
<li>No <code>ETag</code>. Naturally there is an option to suppress generation of an <code>ETag</code> header</li>
</ul>
<p>Resource Templates have an automatic capability for handling <a href="http://bitworking.org/news/150/REST-Tip-Deep-etags-give-you-more-benefits">HTTP Conditional Operations</a> where a <a href="http://tools.ietf.org/html/rfc2616#section-14.26"><code>If-None-Match</code></a> or <a href="http://tools.ietf.org/html/rfc2616#section-14.24"><code>If-Match</code></a> header is included with a request. To follow on from the example in the previous section a HTTP request like the following:</p>
<pre>GET /apex/hello?who=World HTTP/1.1
Host: example.com
If-None-Match: "vovmx3pCoUq/DcdTY/hXusiq1QU="</pre>
<p>will generate a HTTP response like the following:</p>
<pre>HTTP/1.1 304 Not Modified</pre>
<ul>
<li>Again when the path: <code>hello?who=World</code> is received by the Application Express Listener, it is matched against our Resource Template&#8217;s URI Template.</li>
<li>The results of the Resource Template&#8217;s SQL Query are transformed into a JSON document</li>
<li>A secure hash of the JSON document is generated and is compared to the value of the <code>If-None-Match</code> header</li>
<li>Since the values are identical the Application Express Listener generates a <code>304 Not Modified</code> response and does not include the resource&#8217;s content in the response</li>
<li>So in the case where a resource representation has not changed since the last time a client retrieved it, the overhead of transmitting the resource&#8217;s contents from server to client is avoided.</li>
</ul>
<h3>Media Resources</h3>
<p>Resource Templates can be used to generate any type of resource not just the default of JSON documents. Resource Templates support a special type of SQL query called a Media Resource Query. Media Resource Queries consist of an SQL Query that generate a single result row with two columns in the row. The first column denotes the resource&#8217;s MIME type, the second column contains the resource&#8217;s content. For example if we have a Resource Template with a URI Template of : <code>customers/locations/{state}</code> bound to the following query:</p>
<pre>select 'application/vnd.google-earth.kml+xml', xmlquery('
&lt;k:kml xmlns:k="http://www.opengis.net/kml/2.2"&gt;
 &lt;k:Folder&gt;
  &lt;k:name&gt;{$state}&lt;/k:name&gt;
{ for $c in ora:view("oe","customers")/ROW
let $loc := $c/CUST_GEO_LOCATION/SDO_POINT
where $c/CUST_ADDRESS/STATE_PROVINCE = $state
return
   &lt;k:Placemark&gt;
    &lt;k:name&gt;{concat($c/CUST_FIRST_NAME," ",$c/CUST_LAST_NAME)}&lt;/k:name&gt;
     &lt;k:Point&gt;
      &lt;k:coordinates&gt;{$loc/X/text()},{$loc/Y/text()},0&lt;/k:coordinates&gt;
     &lt;/k:Point&gt;
    &lt;/k:Placemark&gt;
}
&lt;/k:Folder&gt;
&lt;/k:kml&gt;' passing upper(:state) as "state" returning content) from dual</pre>
<p>Then a HTTP request like:</p>
<pre>GET /apex/customers/locations/ny HTTP/1.1
Host: example.com</pre>
<p>will generate a HTTP response like:</p>
<pre>HTTP/1.1 200 OK
ETag: "P4eISUyr2BZwtN1VnQHYyV556wU="
Content-Type: application/vnd.google-earth.kml+xml

&lt;kml xmlns="http://www.opengis.net/kml/2.2"&gt;
 &lt;Folder&gt;
  &lt;name&gt;NY&lt;/name&gt;
  &lt;Placemark&gt;
   &lt;name&gt;Blake Seignier&lt;/name&gt;
   &lt;Point&gt;
    &lt;coordinates&gt;-76.14607,43.106533,0&lt;/coordinates&gt;
   &lt;/Point&gt;
  &lt;/Placemark&gt;
  ...
 &lt;/Folder&gt;
&lt;/kml&gt;</pre>
<ul>
<li>In this example we leverage the powerful XMLQuery SQL function to generate a standards compliant KML file, thus quickly making our customer data available to third party GIS applications</li>
</ul>
<h3>And There&#8217;s More&#8230;</h3>
<p>The above gives a brief flavour of what Resource Templates can accomplish, but there&#8217;s lots more functionality, here&#8217;s a few highlights:</p>
<ul>
<li>HTTP Headers can be bound to Queries/PLSQL blocks in a similar manner to URI Template parameters, allowing responses to vary depending on HTTP headers received (e.g. localizing the response based on the <code>Accept-Language</code> header</li>
<li>Similar support for HTML Forms enables form fields to be bound to Query/PLSQL parameters, making processing of HTML forms straightforward, including forms containing file upload fields</li>
<li>Extraction of HTML5 Microdata from HTML resources to enable production of an alternate JSON representation of the microdata</li>
</ul>
<h3>Try it out, Learn More</h3>
<p><del>You can download the Early Adopter Release <a href="http://www.oracle.com/technetwork/developer-tools/apex-listener/ea1-download-listener-177114.html">here</a>. The <a href="http://www.oracle.com/technetwork/developer-tools/apex-listener/ea1-download-listener-177114.html">Developer Guide</a> provides all the information needed to get started with Resource Templates.</del></p>
<p>The latest version of Oracle Application Express Listener can be downloaded <a title="Oracle Application Express Listener Download" href="http://www.oracle.com/technetwork/developer-tools/apex-listener/downloads/index.html">here</a>. The <a href="http://www.oracle.com/technetwork/developer-tools/apex-listener/documentation/index.html">Developer Guide</a> provides all the information needed to get started with Resource Templates.</p>
<h3>Your Feedback</h3>
<p><del>This is an Early Adopter release, it is not a finished product,</del> As ever we encourage you to try out Oracle Application Express Listener and tell us what you think in the <a href="http://forums.oracle.com/forums/forum.jspa?forumID=858&amp;start=0">Oracle Application Express Listener forum</a>. We look forward to your feedback.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cdivilly.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cdivilly.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cdivilly.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cdivilly.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cdivilly.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cdivilly.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cdivilly.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cdivilly.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cdivilly.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cdivilly.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cdivilly.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cdivilly.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cdivilly.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cdivilly.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cdivilly.wordpress.com&amp;blog=1131318&amp;post=209&amp;subd=cdivilly&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cdivilly.wordpress.com/2010/10/18/apex-listener-resource-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db427f3007f2492932e09fc1b964e23e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cdivilly</media:title>
		</media:content>
	</item>
	</channel>
</rss>
