<?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>Der Blog von Benny Neugebauer &#187; JEE</title>
	<atom:link href="http://www.bennyn.de/tag/jee/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bennyn.de</link>
	<description>Alles über die Informatik &#38; Co.</description>
	<lastBuildDate>Mon, 21 May 2012 16:07:42 +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>Dynamically include files in JSP</title>
		<link>http://www.bennyn.de/programmierung/java/dynamically-include-files-in-jsp.html</link>
		<comments>http://www.bennyn.de/programmierung/java/dynamically-include-files-in-jsp.html#comments</comments>
		<pubDate>Thu, 26 Apr 2012 13:55:03 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Core]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[Java Server Pages]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[jstl]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=3503</guid>
		<description><![CDATA[This is a good example to dynamically include a header file in JavaServer Pages (JSP): &#60;%@ taglib prefix=&#34;c&#34; uri=&#34;http://java.sun.com/jsp/jstl/core&#34; %&#62; &#60;%@ taglib prefix=&#34;fn&#34; uri=&#34;http://java.sun.com/jsp/jstl/functions&#34; %&#62; &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;meta charset=&#34;utf-8&#34; /&#62; &#60;title&#62;JSP Page&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;c:set var=&#34;userAgent&#34; scope=&#34;page&#34; value=&#34;${header['User-Agent']}&#34;/&#62; &#60;c:choose&#62; &#60;c:when test=&#34;${fn:contains(userAgent,'iPhone')}&#34;&#62; &#60;%@include file=&#34;header_iphone.jsp&#34; %&#62; &#60;/c:when&#62; &#60;c:when test=&#34;${fn:contains(userAgent,'iPad')}&#34;&#62; &#60;%@include file=&#34;header_ipad.jsp&#34; %&#62; &#60;/c:when&#62; &#60;c:when test=&#34;${fn:contains(userAgent,'Android')}&#34;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>This is a good example to dynamically include a header file in JavaServer Pages (JSP):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;%@ taglib prefix=&quot;c&quot; uri=&quot;http://java.sun.com/jsp/jstl/core&quot; %&gt;
&lt;%@ taglib prefix=&quot;fn&quot; uri=&quot;http://java.sun.com/jsp/jstl/functions&quot; %&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;        
  &lt;c:set var=&quot;userAgent&quot; scope=&quot;page&quot; value=&quot;${header['User-Agent']}&quot;/&gt;
  &lt;c:choose&gt;
    &lt;c:when test=&quot;${fn:contains(userAgent,'iPhone')}&quot;&gt;
      &lt;%@include file=&quot;header_iphone.jsp&quot; %&gt;
    &lt;/c:when&gt;
    &lt;c:when test=&quot;${fn:contains(userAgent,'iPad')}&quot;&gt;
      &lt;%@include file=&quot;header_ipad.jsp&quot; %&gt;
    &lt;/c:when&gt;
    &lt;c:when test=&quot;${fn:contains(userAgent,'Android')}&quot;&gt;
      &lt;%@include file=&quot;header_android.jsp&quot; %&gt;
    &lt;/c:when&gt;
    &lt;c:otherwise&gt;
      &lt;%@include file=&quot;header_other.jsp&quot; %&gt;
    &lt;/c:otherwise&gt;
  &lt;/c:choose&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/java/dynamically-include-files-in-jsp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get user agent in JSP</title>
		<link>http://www.bennyn.de/programmierung/java/get-user-agent-in-jsp.html</link>
		<comments>http://www.bennyn.de/programmierung/java/get-user-agent-in-jsp.html#comments</comments>
		<pubDate>Tue, 24 Apr 2012 12:31:18 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Server Pages]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[user agent]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=3492</guid>
		<description><![CDATA[This is how you can show the user agent in JavaServer Pages (JSP): Version 1 &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;meta charset=&#34;utf-8&#34; /&#62; &#60;title&#62;JSP Page&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;% String userAgent = request.getHeader(&#34;user-agent&#34;); out.print(userAgent); %&#62; &#60;/body&#62; &#60;/html&#62; Version 2 &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;meta charset=&#34;utf-8&#34; /&#62; &#60;title&#62;JSP Page&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;% String userAgent = request.getHeader(&#34;user-agent&#34;); %&#62; &#60;%= [...]]]></description>
			<content:encoded><![CDATA[<p>This is how you can show the user agent in JavaServer Pages (JSP):</p>
<h2>Version 1</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;%
      String userAgent = request.getHeader(&quot;user-agent&quot;);
      out.print(userAgent);
    %&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<h2>Version 2</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;%
      String userAgent = request.getHeader(&quot;user-agent&quot;);
    %&gt;
    &lt;%= userAgent %&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<h2>Version 3</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;c:out value=&quot;${header['User-Agent']}&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<h2>Version 4</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;c:set var=&quot;userAgent&quot; scope=&quot;page&quot; value=&quot;${header['User-Agent']}&quot;/&gt;
  &lt;c:out value=&quot;${userAgent}&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<h2>Version 5</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;c:set var=&quot;userAgent&quot; scope=&quot;page&quot; value=&quot;${header['User-Agent']}&quot;/&gt;
  &lt;%=pageContext.getAttribute(&quot;userAgent&quot;)%&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/java/get-user-agent-in-jsp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IndexOutOfBoundsException with Catalina SSI Servlet</title>
		<link>http://www.bennyn.de/programmierung/java/indexoutofboundsexception-with-catalina-ssi-servlet.html</link>
		<comments>http://www.bennyn.de/programmierung/java/indexoutofboundsexception-with-catalina-ssi-servlet.html#comments</comments>
		<pubDate>Fri, 13 Apr 2012 13:35:47 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Catalina]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[Server Side Includes]]></category>
		<category><![CDATA[Servlet]]></category>
		<category><![CDATA[SSI]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=3422</guid>
		<description><![CDATA[I played around with some Server Side Includes using org.apache.catalina.ssi.SSIServlet and noticed that some statements (which were fine on Apache) are not working on GlassFish. Finally I found the solution. In Apache (using mod_ssi) you can do this: &#60;!--#if expr=&#34;{$HTTP_USER_AGENT} == /(iPhone)/&#34; --&#62; &#60;p&#62;It's an iPhone.&#60;/p&#62; &#60;!--#endif --&#62; But on GlassFish Server (with SSIServlet) you [...]]]></description>
			<content:encoded><![CDATA[<p>I played around with some Server Side Includes using <code>org.apache.catalina.ssi.SSIServlet</code> and noticed that some statements (which were fine on Apache) are not working on GlassFish. Finally I found the solution.</p>
<p>In Apache (using mod_ssi) you can do this:</p>

<div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">&lt;!--#if expr=&quot;{$HTTP_USER_AGENT} == /(iPhone)/&quot; --&gt;
&lt;p&gt;It's an iPhone.&lt;/p&gt;
&lt;!--#endif --&gt;</pre></div></div>

<p>But on GlassFish Server (with SSIServlet) you have to do this:</p>

<div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">&lt;!--#if expr=&quot;{$HTTP_USER_AGENT} = '/(iPad)/'&quot; --&gt;
&lt;p&gt;It's an iPhone.&lt;/p&gt;
&lt;!--#endif --&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/java/indexoutofboundsexception-with-catalina-ssi-servlet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minify and obfuscate code with Maven</title>
		<link>http://www.bennyn.de/programmierung/java/minify-and-obfuscate-code-with-maven.html</link>
		<comments>http://www.bennyn.de/programmierung/java/minify-and-obfuscate-code-with-maven.html#comments</comments>
		<pubDate>Tue, 10 Apr 2012 09:41:15 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[minify]]></category>
		<category><![CDATA[obfuscate]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[YUI Compressor]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=3403</guid>
		<description><![CDATA[In a production site you always want to have minified and obfuscated code (i.e. CSS and JavaScript files) so that the file content is as small as possible because this will save bandwidth and loading time. The best known and easiest tool for this is the YUI Compressor from Yahoo!. In a Java Enterprise application, [...]]]></description>
			<content:encoded><![CDATA[<p>In a production site you always want to have minified and obfuscated code (i.e. CSS and JavaScript files) so that the file content is as small as possible because this will save bandwidth and loading time. The best known and easiest tool for this is the <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a> from Yahoo!.</p>
<p>In a Java Enterprise application, the YUI Compressor can be integrated very easy with Maven. All you need is the <a href="http://maven-samaxes-plugin.googlecode.com/svn/sites/maven-minify-plugin/index.html">Maven Minify Plugin</a>. That&#8217;s how to use it:<br />
<span id="more-3403"></span></p>
<h2>pom.xml</h2>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">         <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>de.bennyn.examples<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>mavenproject1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.0-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>mavenproject1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;endorsed.dir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.build.directory}/endorsed<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/endorsed.dir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project.build.sourceEncoding<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>UTF-8<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project.build.sourceEncoding<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javaee-web-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>6.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>provided<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-compiler-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.3.2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compilerArguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;endorseddirs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${endorsed.dir}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/endorseddirs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/compilerArguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-war-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.1.1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;failOnMissingWebXml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/failOnMissingWebXml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-dependency-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>validate<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>copy<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${endorsed.dir}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;silent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/silent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javaee-endorsed-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>6.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
      <span style="color: #808080; font-style: italic;">&lt;!-- Maven Minify Plugin --&gt;</span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.samaxes.maven<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-minify-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.3.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>default-minify<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>process-resources<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cssSourceDir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>css<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cssSourceDir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cssSourceFiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cssSourceFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>style.css<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cssSourceFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cssSourceFiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cssFinalFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>my-styles.css<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cssFinalFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jsSourceDir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>js<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jsSourceDir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jsSourceFiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jsSourceFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>timer-singleton.js<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jsSourceFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jsSourceFiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jsFinalFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>my-scripts.js<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jsFinalFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>minify<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>index.jsp</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;JSP Page&lt;/title&gt;
    &lt;link href=&quot;./css/my-styles.min.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
    &lt;script src=&quot;./js/my-scripts.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Benny is here!&lt;/h1&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/java/minify-and-obfuscate-code-with-maven.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>For and foreach loop example in Java</title>
		<link>http://www.bennyn.de/programmierung/java/for-and-foreach-loop-example-in-java.html</link>
		<comments>http://www.bennyn.de/programmierung/java/for-and-foreach-loop-example-in-java.html#comments</comments>
		<pubDate>Wed, 04 Apr 2012 20:27:36 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[for]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[JME]]></category>
		<category><![CDATA[JSE]]></category>
		<category><![CDATA[loop]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=3365</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 public static void main&#40;String&#91;&#93; args&#41; &#123; String&#91;&#93; firstNames = &#123; &#34;Marge&#34;, &#34;Homer&#34;, &#34;Lisa&#34;, &#34;Bart&#34;, &#34;Maggie&#34; &#125;; &#160; System.out.println&#40;&#34;- With for loop:&#34;&#41;; &#160; for &#40;int i = 0; i &#60; firstNames.length; i++&#41; &#123; System.out.println&#40;firstNames&#91;i&#93;&#41;; &#125; [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> firstNames <span style="color: #339933;">=</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #0000ff;">&quot;Marge&quot;</span>, <span style="color: #0000ff;">&quot;Homer&quot;</span>, <span style="color: #0000ff;">&quot;Lisa&quot;</span>, <span style="color: #0000ff;">&quot;Bart&quot;</span>, <span style="color: #0000ff;">&quot;Maggie&quot;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;- With for loop:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> firstNames.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>firstNames<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;- With foreach loop&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> name <span style="color: #339933;">:</span> firstNames<span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/java/for-and-foreach-loop-example-in-java.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

