<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-236553278252454438</atom:id><lastBuildDate>Tue, 04 Nov 2025 11:22:19 +0000</lastBuildDate><category>JQuery</category><category>Jasper Reports</category><category>Struts 2 Help</category><category>Birt Report</category><category>Converter</category><category>Freemarker - Template Engine</category><category>Glassfish</category><category>HTTP Status Code Definitions</category><category>Hibernate</category><category>JDBC - JNDI</category><category>JDBC - MYSQL</category><category>JavaScript</category><category>MySQL</category><category>SSL</category><category>Struts 1 Vs Struts 2</category><category>Struts 2 Validation</category><category>Tomcat</category><category>iBatis</category><title>Java, Struts, Spring, &amp;amp; Hibernate</title><description>Java, Struts 1 &amp;amp; 2, Spring, Hibernate, iBatis, Jasper Reports, RDBMS, JDBC, JSP, Servlet, HTML, JS, AJAX, JQuery</description><link>http://java-struts.blogspot.com/</link><managingEditor>noreply@blogger.com (Miral)</managingEditor><generator>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-637839311218680583</guid><pubDate>Thu, 15 Jun 2017 17:55:00 +0000</pubDate><atom:updated>2017-06-15T10:55:53.004-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><title>Event.stopPropagation() and Event.preventDefault() </title><description>&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. &lt;b&gt;event.stopPropagation() &lt;/b&gt;stops an event from bubbling up the event chain&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. &lt;b&gt;event.preventDefault() &lt;/b&gt;will only prevent browser’s default action on that event from occurring, but the event still propogates up the event chain.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Example&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;$(&quot;#myDiv&quot;).click(function() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;alert(&#39;click on #myDiv&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;$(&quot;#divButton&quot;).click(function(e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;alert(&#39;button click&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;e.stopPropagation();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;});&lt;/span&gt;</description><link>http://java-struts.blogspot.com/2017/06/eventstoppropagation-and.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-4425686293490503540</guid><pubDate>Fri, 02 Dec 2011 19:58:00 +0000</pubDate><atom:updated>2011-12-02T12:07:40.343-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SSL</category><title>SSL Certificate err</title><description>&lt;div&gt;&lt;div&gt;{http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1612) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1595) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1172) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div style=&quot;color: rgb(255, 255, 255);&quot;&gt;&lt;u&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Check the truststore path in a .properties file it should be on correct location? &lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;You can try (double escape \) in that path for windows machine.&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/div&gt;&lt;/div&gt;</description><link>http://java-struts.blogspot.com/2011/12/ssl-certificate-err.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-3000957046309883410</guid><pubDate>Thu, 20 Oct 2011 20:42:00 +0000</pubDate><atom:updated>2011-10-20T13:50:29.922-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">JQuery</category><title>Detecting an undefined object in JavaScript</title><description>&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;typeof allows the identifier to never been declared before&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;typeof&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; obj &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;undefined&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;instead of&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;if(obj == null) // will throw an error due to never declared&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</description><link>http://java-struts.blogspot.com/2011/10/detecting-undefined-object-in.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-1316191113731025271</guid><pubDate>Wed, 31 Aug 2011 17:22:00 +0000</pubDate><atom:updated>2011-08-31T10:57:44.295-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><title>How to stop caching with jQuery ($.get(), $.ajax() etc) and javascript</title><description>&lt;pre&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;To make it unique for each passes, we can place in a random number behind the url as shown below&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;$.get(&#39;remoteUrl.do?&#39;+Math.random()+, function(data){&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;$(&#39;#msg&#39;+id).html(data);&lt;/pre&gt;&lt;pre&gt;}, &#39;html&#39;);&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;Set cache:false &lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;$.ajax({&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;url: &#39;remoteUrl.do&#39;,&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;cache: false,&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;success: function(data){&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;		&lt;/span&gt;$(&#39;#resultDiv&#39;).append(data);&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;} }); &lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;php plain&quot;&gt;$.ajaxSetup({&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;php plain&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;cache: false&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;php plain&quot;&gt;});&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;Disable caching using html meta tag:&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;textarea style=&quot;margin-top: 2px; margin-bottom: 2px; height: 71px; margin-left: 2px; margin-right: 2px; width: 405px; &quot;&gt;&amp;lt;meta equiv=&quot;cache-control&quot; content=&quot;no-cache&quot;&amp;gt;&amp;lt;meta equiv=&quot;expires&quot; content=&quot;0&quot;&amp;gt;&amp;lt;meta equiv=&quot;pragma&quot; content=&quot;no-cache&quot;&amp;gt;&lt;/textarea&gt;&lt;/b&gt;&lt;/pre&gt;</description><link>http://java-struts.blogspot.com/2011/08/how-to-stop-caching-with-jquery-get.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-2845294646288567121</guid><pubDate>Wed, 31 Aug 2011 14:58:00 +0000</pubDate><atom:updated>2011-08-31T10:22:15.565-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><title>org.hibernate.PropertyAccessException</title><description>nested exception is org.hibernate.PropertyAccessException: Exception occurred inside getter of Hibernate Object&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Reason:&lt;/div&gt;&lt;div&gt;&lt;li&gt;Nullable database column was mapped to a primitive type property  &lt;/li&gt;&lt;li&gt;The Hibernate type is not castable to the property type (or vice-versa)  &lt;/li&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://java-struts.blogspot.com/2011/08/orghibernatepropertyaccessexception.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-6033363471823395414</guid><pubDate>Wed, 13 Jul 2011 19:07:00 +0000</pubDate><atom:updated>2011-07-13T12:25:25.742-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tomcat</category><title>Tomcat - JDBC driver unregisted when the web application stops</title><description>&lt;div&gt;SEVERE: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stoppe&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;textarea style=&quot;width: 466px; height: 71px;&quot; cols=&quot;50&quot; rows=&quot;3&quot;&gt;&amp;lt;context-param&amp;gt;&amp;lt;br&amp;gt;&amp;lt;param-name&amp;gt;webAppRootKey&amp;lt;/param-name&amp;gt;&amp;lt;br&amp;gt;&amp;lt;param-value&amp;gt;webapp.root&amp;lt;/param-value&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/context-param&amp;gt;&lt;/textarea&gt;&lt;/div&gt;</description><link>http://java-struts.blogspot.com/2011/07/tomcat-jdbc-driver-unregisted-when-web.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-8581063159947973983</guid><pubDate>Tue, 29 Jun 2010 19:42:00 +0000</pubDate><atom:updated>2010-06-29T12:49:20.361-07:00</atom:updated><title>Glassfish v2( JDBC Connection Pool, JNDI)</title><description>Step 1:&lt;br /&gt;Place database driver in glassfish lib dir. (e.g. lib/mysql-jdbc-5.1.11.jar) and restart server.&lt;br /&gt;&lt;br /&gt;Step 2:&lt;br /&gt;Login to Admin Console: http:\\localhost:4848\&lt;br /&gt;Goto Resource &gt; JDBC &gt; Connection Pool&lt;br /&gt;Provide Name, Select Database vendor and Select Resource Type&lt;br /&gt;&lt;br /&gt;Step 3:&lt;br /&gt;Enter DataSource class name (Database driver)&lt;br /&gt;Change other settings as you want&lt;br /&gt;&lt;br /&gt;Save and Ping&lt;br /&gt;:) &quot;Ping Succeed&quot;&lt;br /&gt;&lt;br /&gt;Connection Pool is ready</description><link>http://java-struts.blogspot.com/2010/06/glassfish-v2-jdbc-connection-pool-jndi.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-7793365081158300429</guid><pubDate>Thu, 27 May 2010 22:29:00 +0000</pubDate><atom:updated>2010-06-23T15:21:16.344-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Converter</category><title>Converter - Convert MS Word/Excel to PDF</title><description>&lt;span style=&quot;font-family:arial;&quot;&gt;Converts MS Word to PDF, image etc&lt;br /&gt;Converts MS Excel Spreadsheet to PDF, image etc &lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Supported formats, MS Word, Excel, Powerpoint, Txt, Csv, Flash, ODT, RTF, PDF.. etc.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Here is the code:&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;long startTime1 = System.currentTimeMillis();&lt;br /&gt;&lt;br /&gt;// connect to an OpenOffice.org instance running on port 8100&lt;br /&gt;OpenOfficeConnection connection = new SocketOpenOfficeConnection(SocketOpenOfficeConnection.DEFAULT_PORT);&lt;br /&gt;connection.connect();&lt;br /&gt;DocumentConverter converter1 = new OpenOfficeDocumentConverter(connection);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;File inputFile = new File(&quot;C:\\Miral\\temp\\myDocument.doc&quot;));&lt;br /&gt;File outputFile = new File(&quot;C:\\Miral\\temp\\myPortDocument.pdf&quot;);&lt;br /&gt;totalFileSize+=(inputFile.length()/1024*100000)/100000;&lt;br /&gt;converter1.convert(inputFile, outputFile);&lt;br /&gt;&lt;br /&gt;System.out.println(&quot;Total File Size(kb): &quot;+totalFileSize);&lt;br /&gt;long endTime1 = System.currentTimeMillis();&lt;br /&gt;System.out.println(&quot;Conversion Time: &quot;+(endTime1-startTime1));&lt;br /&gt;// close the connection&lt;br /&gt;connection.disconnect();&lt;/span&gt;&lt;/p&gt;</description><link>http://java-struts.blogspot.com/2010/05/jodconverter-any-format-to-pdf.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-5874489992404371977</guid><pubDate>Tue, 27 Apr 2010 19:35:00 +0000</pubDate><atom:updated>2010-06-07T07:41:48.191-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">iBatis</category><title>iBatis (MyBatis)</title><description>&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;strong&gt;How to call stored procedure in iBatis?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;You can execute stored procedure via SqlMap xml file.&lt;br /&gt;See the folloing example:&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style=&quot;color:#000000;&quot;&gt;&lt;span style=&quot;color:#990000;&quot;&gt;&amp;lt;!-- To call stored procedure. --&amp;gt;&lt;br /&gt;&lt;/span&gt;&amp;lt;procedure id=&quot;getItemInfo&quot; resultClass=&quot;Items&quot; parameterMap=&quot;getItemInfoCall&quot;&amp;gt;&lt;br /&gt;{ call getEmp( #invoiceNo# ) }&lt;br /&gt;&amp;lt;/procedure&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;color:#000000;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;color:#000000;&quot;&gt;&amp;lt;parameterMap id=&quot;getItemInfoCall&quot; class=&quot;map&quot;&amp;gt;&lt;br /&gt;&amp;lt;parameter property=&quot;invoiceNo&quot; jdbcType=&quot;INT&quot; javaType=&quot;java.lang.Integer&quot; mode=&quot;IN&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;color:#000000;&quot;&gt;&amp;lt;/parameterMap&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial;color:#990000;&quot;&gt;&amp;lt;!-- Now call this method --&amp;gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Reader rd = Resources.getResourceAsReader(&quot;SqlMapConfig.xml&quot;); &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;SqlMapClient smclient = SqlMapClientBuilder.buildSqlMapClient(rd); &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;int invoiceNo = 1; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;System.out.println(&quot;Getting item information from db&quot;); &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Items itm = (Items)smclient .queryForObject (&quot;Items.getItemInfo&quot;, invoiceNo);&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;/p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;div style=&quot;DISPLAY: none&quot;&gt;&lt;br /&gt;- Steps to generate doa, mapping files and pojos using iBator&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- iBatis and Oracle selectByExamplePaginatedList&lt;/span&gt;&lt;/div&gt;</description><link>http://java-struts.blogspot.com/2010/05/ibatis-mybatis.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-268542184811129090</guid><pubDate>Mon, 03 Aug 2009 16:39:00 +0000</pubDate><atom:updated>2009-08-28T10:39:27.111-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Struts 2 Validation</category><title>Struts 2 Validation Annotation</title><description>This post will show how to use &lt;span style=&quot;font-weight: bold;&quot;&gt;Annotation based validation in Struts 2&lt;/span&gt;. For this example I used the add transaction part of google&#39;s portfolio manager (noticed that they do not have validations over there). Struts 2 provides a number of validators for XML based validation rules. All of them have respective annotations defined and can be used in place of XML validation rules. In the example, we will use the @RequiredStringValidator, @RegexFieldValidator and also see how to parameterize messages when using annotations.&lt;br /&gt;&lt;br /&gt;Follow these steps to implement the example ... There&#39;s more&lt;br /&gt;&lt;br /&gt;1. Create a dynamic web project in Eclipse.&lt;br /&gt;2. Copy the following jar files into the WEB-INF/lib directory, all these files are available with sturts download.&lt;br /&gt;* struts2-core-2.0.11.1.jar&lt;br /&gt;* xwork-2.0.4.jar&lt;br /&gt;* freemarker-2.3.8.jar&lt;br /&gt;* commons-logging-1.1.1.jar&lt;br /&gt;* ognl-2.6.11.jar&lt;br /&gt;3. Update your web deployment desciptor to include the sturts filter dispatcher.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;WEB-INF/web.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea cols=&quot;47&quot; rows=&quot;22&quot;&gt;&lt;web-app xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; web=&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot; schemalocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot; id=&quot;WebApp_ID&quot; version=&quot;2.5&quot;&gt;&lt;br /&gt;&lt;display-name&gt;struts2Validation&lt;/display-name&gt;&lt;br /&gt;&lt;filter&gt;&lt;br /&gt;&lt;filter-name&gt;struts2&lt;/filter-name&gt;&lt;br /&gt;&lt;filter-class&gt;&lt;br /&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;br /&gt;&lt;/filter-class&gt;&lt;br /&gt;&lt;/filter&gt;&lt;br /&gt;&lt;filter-mapping&gt;&lt;br /&gt;&lt;filter-name&gt;struts2&lt;/filter-name&gt;&lt;br /&gt;&lt;url-pattern&gt;/*&lt;/url-pattern&gt;&lt;br /&gt;&lt;/filter-mapping&gt;&lt;br /&gt;&lt;br /&gt;&lt;welcome-file-list&gt;&lt;br /&gt;&lt;welcome-file&gt;index.html&lt;/welcome-file&gt;&lt;br /&gt;&lt;/welcome-file-list&gt;&lt;br /&gt;&lt;/web-app&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Create the input JSP : &lt;span style=&quot;font-weight: bold;&quot;&gt;transactions.jsp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea cols=&quot;47&quot; rows=&quot;35&quot;&gt;&lt;%@ taglib prefix=&quot;s&quot; uri=&quot;/struts-tags&quot;%&gt;&lt;br /&gt;&lt;br /&gt;&lt;s:form action=&quot;addTransaction&quot; validate=&quot;true&quot; method=&quot;post&quot;&gt;&lt;br /&gt;&lt;s:fielderror&gt;&lt;br /&gt;&lt;/s:fielderror&gt;&lt;br /&gt;&lt;/s:form&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Symbol&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:textfield name=&quot;symbol&quot;&gt;&lt;/s:textfield&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Type&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:select name=&quot;type&quot; list=&quot;#{&#39;&#39;:&#39;Select One&#39;, &#39;BUY&#39;:&#39;Buy&#39;,&#39;SELL&#39;:&#39;Sell&#39;,&#39;BUY_COVER&#39;:&#39;Buy to Cover&#39;,&#39;SELL_SHORT&#39;:&#39;Sell Short&#39;}&quot;&gt;&lt;br /&gt;&lt;/s:select&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Date&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:textfield name=&quot;date&quot;&gt;&lt;/s:textfield&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Number of Shares&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:textfield name=&quot;numberOfShares&quot;&gt;&lt;/s:textfield&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Price&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:textfield name=&quot;price&quot;&gt;&lt;/s:textfield&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Commission&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:textfield name=&quot;comission&quot;&gt;&lt;/s:textfield&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Notes&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:textfield name=&quot;notes&quot;&gt;&lt;/s:textfield&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;s:submit name=&quot;submit&quot; value=&quot;submit&quot;&gt;&lt;/s:submit&gt;&lt;br /&gt;&lt;s:submit name=&quot;submitNoValidate&quot; value=&quot;submit without validation&quot; method=&quot;noValidation&quot;&gt;&lt;/s:submit&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: The method=&quot;noValidation&quot; indicates to struts that on submission, the noValidation() method will be invoked on the AddTransactionAction class.&lt;br /&gt;&lt;br /&gt;5. Create the output JSP :&lt;span style=&quot;font-weight: bold;&quot;&gt; done.jsp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea cols=&quot;47&quot; rows=&quot;35&quot;&gt;&lt;%@ taglib prefix=&quot;s&quot; uri=&quot;/struts-tags&quot;%&gt;&lt;br /&gt;&lt;br /&gt;&lt;s:bean name=&quot;actions.AddTransactionAction&quot; id=&quot;addTransaction&quot;&gt;&lt;/s:bean&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td colspan=&quot;2&quot;&gt;The following transaction has been added to your portfolio&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Symbol&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:label name=&quot;symbol&quot; value=&quot;%{symbol}&quot;&gt;&lt;/s:label&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Type&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:label name=&quot;type&quot; value=&quot;%{type}&quot;&gt;&lt;br /&gt;&lt;/s:label&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Date&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:label name=&quot;date&quot; value=&quot;%{date}&quot;&gt;&lt;/s:label&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Number of Shares&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:label name=&quot;numberOfShares&quot; value=&quot;%{numberOfShares}&quot;&gt;&lt;/s:label&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Price&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:label name=&quot;price&quot; value=&quot;%{price}&quot;&gt;&lt;/s:label&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Commission&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:label name=&quot;comission&quot; value=&quot;%{comission}&quot;&gt;&lt;/s:label&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Notes&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;s:label name=&quot;notes&quot; value=&quot;%{notes}&quot;&gt;&lt;/s:label&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. Create the Action class :&lt;span style=&quot;font-weight: bold;&quot;&gt;AddTransactionAction.java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;package actions;&lt;br /&gt;&lt;br /&gt;import org.apache.struts2.interceptor.validation.SkipValidation;&lt;br /&gt;&lt;br /&gt;import com.opensymphony.xwork2.ActionSupport;&lt;br /&gt;import com.opensymphony.xwork2.validator.annotations.RegexFieldValidator;&lt;br /&gt;import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;&lt;br /&gt;import com.opensymphony.xwork2.validator.annotations.ValidatorType;&lt;br /&gt;import com.opensymphony.xwork2.validator.annotations.Validation;&lt;br /&gt;&lt;br /&gt;@Validation&lt;br /&gt;public class AddTransactionAction extends ActionSupport {&lt;br /&gt;&lt;br /&gt;private String symbol;&lt;br /&gt;private String type;&lt;br /&gt;private String date;&lt;br /&gt;private String numberOfShares;&lt;br /&gt;private String price;&lt;br /&gt;private String comission;&lt;br /&gt;private String notes;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String execute() throws Exception {&lt;br /&gt;System.out.println(&quot;In Execute&quot;);&lt;br /&gt;&lt;br /&gt;return SUCCESS;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@SkipValidation&lt;br /&gt;public String noValidation() throws Exception {&lt;br /&gt;System.out.println(&quot;In Novalidation&quot;);&lt;br /&gt;return SUCCESS;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getSymbol() {&lt;br /&gt;return symbol;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@RequiredStringValidator(type = ValidatorType.FIELD, message = &quot;Symbol Required&quot;)&lt;br /&gt;public void setSymbol(String symbol) {&lt;br /&gt;this.symbol = symbol;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getType() {&lt;br /&gt;return type;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@RequiredStringValidator(type = ValidatorType.FIELD, message = &quot;Type Required&quot;)&lt;br /&gt;public void setType(String type) {&lt;br /&gt;this.type = type;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getDate() {&lt;br /&gt;return date;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@RequiredStringValidator(type = ValidatorType.FIELD, message = &quot;Date Required&quot;)&lt;br /&gt;@RegexFieldValidator(type=ValidatorType.FIELD, message=&quot;&quot;,key=&quot;date.error.message&quot;, expression = &quot;[0-9][0-9]/[0-9][0-9]/[1-9][0-9][0-9][0-9]&quot;)&lt;br /&gt;public void setDate(String date) {&lt;br /&gt;this.date = date;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getNumberOfShares() {&lt;br /&gt;return numberOfShares;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@RequiredStringValidator(type = ValidatorType.FIELD, message = &quot; Number of Shares Required&quot;)&lt;br /&gt;public void setNumberOfShares(String numberOfShares) {&lt;br /&gt;this.numberOfShares = numberOfShares;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getPrice() {&lt;br /&gt;return price;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@RequiredStringValidator(type = ValidatorType.FIELD, message = &quot;Price Required&quot;)&lt;br /&gt;public void setPrice(String price) {&lt;br /&gt;this.price = price;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getComission() {&lt;br /&gt;return comission;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@RequiredStringValidator(type = ValidatorType.FIELD, message = &quot;Comission Required&quot;)&lt;br /&gt;public void setComission(String comission) {&lt;br /&gt;this.comission = comission;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getNotes() {&lt;br /&gt;return notes;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public void setNotes(String notes) {&lt;br /&gt;this.notes = notes;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;* The annotation @Validation is used to indicate that the current action might need validation. The validations on a method level can be skipped using the @SkipValidation annotation on the method.&lt;br /&gt;* The method noValidations() uses the @SkipValidation annotation, you can see this when you click on &quot;Submit without validation&quot; in the JSP&lt;br /&gt;* The @RequiredStringValidator annotation is used to indicate a Required Strint similar to the following xml rule&lt;br /&gt;&lt;textarea cols=&quot;47&quot; rows=&quot;7&quot;&gt;&lt;br /&gt;&lt;validators&gt;&lt;br /&gt;&lt;field name=&quot;numberOfShares&quot;&gt;&lt;br /&gt;&lt;field-validator type=&quot;requiredstring&quot;&gt;&lt;br /&gt;&lt;message&gt;Number of Share is required&lt;/message&gt;&lt;br /&gt;&lt;/field-validator&gt;&lt;br /&gt;&lt;/field&gt;&lt;br /&gt;&lt;/validators&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;* On the date field, I used a @RegexFieldValidator annotation, so that the date field will be mandated to have a given format.&lt;br /&gt;* Parameterized messages: You will notice that the message attribute of the @RegexFieldValidator is set to an empty string, while the key is set to a value. This is due to the fact that the message attribute is mandatory, and the key attribute is used to denote the message key from the properties files. The parameters can be retrieved in the properties files using the ${date} notation where the &quot;date&quot; variable is expected to available in the value stack.&lt;br /&gt;&lt;br /&gt;7. Create a definition for the action in &lt;span style=&quot;font-weight: bold;&quot;&gt;struts.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea cols=&quot;47&quot; rows=&quot;7&quot;&gt;&lt;struts&gt;&lt;br /&gt;&lt;package name=&quot;struts2Validation&quot; extends=&quot;struts-default&quot;&gt;&lt;br /&gt;&lt;action name=&quot;addTransaction&quot; class=&quot;actions.AddTransactionAction&quot;&gt;&lt;br /&gt;&lt;result name=&quot;success&quot;&gt;done.jsp&lt;/result&gt;&lt;br /&gt;&lt;result name=&quot;input&quot;&gt;transactions.jsp&lt;/result&gt;&lt;br /&gt;&lt;/action&gt;&lt;br /&gt;&lt;/package&gt;&lt;br /&gt;&lt;/struts&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: The result with name &quot;input&quot; is because the validator returns the result to input when validation fails.&lt;br /&gt;8. Create the properties file for messages&lt;br /&gt;&lt;br /&gt;date.error.message=Date ${date} is not properly formatted.&lt;br /&gt;&lt;br /&gt;package.properties&lt;br /&gt;&lt;br /&gt;Note: In the properties file, ${date} is used to retrieve the &quot;date&quot; value from the value stack, this is the way Struts 2 supports parameterization.&lt;br /&gt;&lt;br /&gt;9. Create the struts.properties file to set the theme to simple theme, so that you have more control how the UI components are laid out.&lt;br /&gt;&lt;br /&gt;struts.ui.theme=simple&lt;br /&gt;&lt;br /&gt;struts.properties</description><link>http://java-struts.blogspot.com/2009/08/struts-2-editor-ide.html</link><author>noreply@blogger.com (Miral)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-8490748764159291819</guid><pubDate>Thu, 23 Jul 2009 22:07:00 +0000</pubDate><atom:updated>2010-06-23T15:12:52.737-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Glassfish</category><title>Glassfish: Add Cluster Support</title><description>&lt;strong&gt;Start your domain&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Command: asadmin start-domain domain1&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;You will see message:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Domain does not support application server clusters and other standalone instances.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Goto: &lt;a href=&quot;http://localhost:4848/&quot;&gt;http://localhost:4848/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Go to the Application Server tree node, on the right hand side, you will see the &#39;Add Cluster Support&#39; button. Click on this button&lt;br /&gt;&lt;br /&gt;The next page will show you the implication about this action. Click OK&lt;br /&gt;&lt;br /&gt;You will see that the profile has been successfully upgraded and server restart is required&lt;br /&gt;&lt;br /&gt;Now restart your server.&lt;br /&gt;&lt;br /&gt;You will see message:&lt;br /&gt;&lt;strong&gt;Domain supports application server clusters and other standalone instances.&lt;/strong&gt;</description><link>http://java-struts.blogspot.com/2010/06/glassfish-add-cluster-support.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-5548848563524136432</guid><pubDate>Fri, 10 Jul 2009 19:44:00 +0000</pubDate><atom:updated>2010-05-20T07:38:53.122-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><title>JQuery</title><description>jQuery is a Open source JavaScript Library.&lt;br /&gt;&lt;br /&gt;jQuery is easy to learn.&lt;br /&gt;&lt;br /&gt;Fast, Easy to use, Easy-to-use AJAX (I love the $.ajaxSetup() function)&lt;br /&gt;Nice Event handlers&lt;br /&gt;CSS selectors&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;features:&lt;br /&gt;&lt;br /&gt;   * HTML element selections&lt;br /&gt;   * HTML element manipulation&lt;br /&gt;   * CSS manipulation&lt;br /&gt;   * HTML event functions&lt;br /&gt;   * JavaScript Effects and animations&lt;br /&gt;   * HTML DOM traversal and modification&lt;br /&gt;   * AJAX&lt;br /&gt;   * Utilities&lt;br /&gt;&lt;br /&gt;</description><link>http://java-struts.blogspot.com/2009/07/using-freemarker-templates.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-1045839531460484997</guid><pubDate>Tue, 05 May 2009 15:39:00 +0000</pubDate><atom:updated>2009-05-05T10:21:07.210-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Birt Report</category><title>Integrate Birt Report Engine To Your Application</title><description>&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Setup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-family:arial;&quot; &gt;1. Download Birt Runtime&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-family:arial;&quot; &gt;2. Copy all the jars in the birt-runtime/ReportEngine/lib directory from the Report Engine download into your ApplicationRoot/WEB-INF/lib directory.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-family:arial;&quot; &gt;3. Create a directory named platform in your WEB-INF folder.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-family:arial;&quot; &gt;4. Copy the birt-runtime/Report Engine/plugins and birt-runtime/ReportEngine/configuration directories to the platform directory you just created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-family:arial;&quot; &gt;5. Copy iText.jar to the platform/plugins/com.lowagie.itext/lib directory. If the directory does not exist, create it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-family:arial;&quot; &gt;6. Copy servlet.jar into WEB-INF/lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   &lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;* BirtConfig.properties - Configuration properties for the Engine.Place it to /WEB-INF/classes folder&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);font-family:arial;&quot; &gt;   * BirtEngine.java - Class used to initialize the Report Engine.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);font-family:arial;&quot; &gt;   * WebReport.java - The servlet that handles report generation on a GET command.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);font-family:arial;&quot; &gt;* Copy Database driver class to&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;BirtConfig.properties&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;logDirectory=c:/temp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;logLevel=FINEST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;BirtEngine.java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.io.InputStream;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.io.IOException;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.util.Properties;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.util.logging.Level;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.EngineConfig;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.IReportEngine;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import javax.servlet.*;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.core.framework.PlatformServletContext;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.core.framework.IPlatformContext;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import  org.eclipse.birt.core.framework.Platform;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.core.exception.BirtException;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.IReportEngineFactory;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public class BirtEngine {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;private static IReportEngine birtEngine = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;private static Properties configProps = new Properties();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;private final static String configFile = &quot;BirtConfig.properties&quot;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public static synchronized void initBirtConfig() {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;loadEngineProps();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public static synchronized IReportEngine getBirtEngine(ServletContext sc) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;if (birtEngine == null)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; EngineConfig config = new EngineConfig();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; if( configProps != null){&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  String logLevel = configProps.getProperty(&quot;logLevel&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  Level level = Level.OFF;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  if (&quot;SEVERE&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.SEVERE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  } else if (&quot;WARNING&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.WARNING;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  } else if (&quot;INFO&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.INFO;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  } else if (&quot;CONFIG&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.CONFIG;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  } else if (&quot;FINE&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.FINE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  } else if (&quot;FINER&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.FINER;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  } else if (&quot;FINEST&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.FINEST;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  } else if (&quot;OFF&quot;.equalsIgnoreCase(logLevel))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   level = Level.OFF;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  config.setLogConfig(configProps.getProperty(&quot;logDirectory&quot;), level);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; config.setEngineHome(&quot;&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; IPlatformContext context = new PlatformServletContext( sc );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; config.setPlatformContext( context );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  Platform.startup( config );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; catch ( BirtException e )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;  e.printStackTrace( );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; IReportEngineFactory factory = (IReportEngineFactory) Platform&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; .createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; birtEngine = factory.createReportEngine( config );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;return birtEngine;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public static synchronized void destroyBirtEngine() {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;if (birtEngine == null) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; return;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;birtEngine.shutdown();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Platform.shutdown();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;birtEngine = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public Object clone() throws CloneNotSupportedException {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;throw new CloneNotSupportedException();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;private static void loadEngineProps() {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;try {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; //Config File must be in classpath&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; ClassLoader cl = Thread.currentThread ().getContextClassLoader();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; InputStream in = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; in = cl.getResourceAsStream (configFile);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; configProps.load(in);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; in.close();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;} catch (IOException e) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; e.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;WebReport.java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.io.IOException;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.io.PrintWriter;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.util.HashMap;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.util.logging.Level;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.util.logging.Logger;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import javax.servlet.ServletContext;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import javax.servlet.ServletException;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import javax.servlet.http.HttpServlet;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import javax.servlet.http.HttpServletRequest;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import javax.servlet.http.HttpServletResponse;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.EngineConstants;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.HTMLRenderContext;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.HTMLRenderOption;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.IReportRunnable;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.IRunAndRenderTask;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.eclipse.birt.report.engine.api.IReportEngine;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public class WebReport extends HttpServlet {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;private static final long serialVersionUID = 1L;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;* Constructor of the object.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;private IReportEngine birtReportEngine = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;protected static Logger logger = Logger.getLogger( &quot;org.eclipse.birt&quot; );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public WebReport() {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;super();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;* Destruction of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public void destroy() {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;super.destroy();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;BirtEngine.destroyBirtEngine();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;* The doGet method of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;*&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public void doGet(HttpServletRequest req, HttpServletResponse resp)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; throws ServletException, IOException {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;//get report name and launch the engine&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;resp.setContentType(&quot;text/html&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;//resp.setContentType( &quot;application/pdf&quot; );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;//resp.setHeader (&quot;Content-Disposition&quot;,&quot;inline; filename=test.pdf&quot;); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;String reportName = req.getParameter(&quot;ReportName&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;ServletContext sc = req.getSession().getServletContext();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;this.birtReportEngine = BirtEngine.getBirtEngine(sc);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;//setup image directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;HTMLRenderContext renderContext = new HTMLRenderContext();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;renderContext.setBaseImageURL(req.getContextPath()+&quot;/images&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;renderContext.setImageDirectory(sc.getRealPath(&quot;/images&quot;));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;logger.log( Level.FINE, &quot;image directory &quot; + sc.getRealPath(&quot;/images&quot;)); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;System.out.println(&quot;stdout image directory &quot; + sc.getRealPath(&quot;/images&quot;));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;HashMap contextMap = new HashMap();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT, renderContext );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;IReportRunnable design;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; //Open report design&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; design = birtReportEngine.openReportDesign( sc.getRealPath(&quot;/Reports&quot;)+&quot;/&quot;+reportName );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; //create task to run and render report&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask( design ); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; task.setAppContext( contextMap );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; //set output options&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; HTMLRenderOption options = new HTMLRenderOption();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; //options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_PDF);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; options.setOutputStream(resp.getOutputStream());&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; task.setRenderOption(options);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; //run report&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; task.run();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; task.close();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}catch (Exception e){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;e.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;throw new ServletException( e );&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;* The doPost method of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public void doPost(HttpServletRequest request, HttpServletResponse response)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; throws ServletException, IOException {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;response.setContentType(&quot;text/html&quot;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;PrintWriter out = response.getWriter();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.println(&quot;&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.println(&quot;&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.println(&quot;  &quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.println(&quot;  &quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.println(&quot; Post does nothing&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.println(&quot;  &quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.println(&quot;&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.flush();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;out.close();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;* Initialization of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;*&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;* @throws ServletException if an error occure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public void init() throws ServletException {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;BirtEngine.initBirtConfig();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;</description><link>http://java-struts.blogspot.com/2009/05/integrate-birt-report-engine-to-your.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-598507939403323736</guid><pubDate>Fri, 01 May 2009 21:11:00 +0000</pubDate><atom:updated>2010-05-27T12:30:59.093-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Struts 2 Help</category><title>Frameworks Comparision</title><description>&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;br /&gt;&lt;br /&gt;Ajax support&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JSF: No Ajax support, use ICEfaces and Ajax4JSF&lt;br /&gt;&lt;br /&gt;Stripes: No libraries, supports streaming results&lt;br /&gt;&lt;br /&gt;Struts 2: Dojo built-in, plugins for GWT, JSON&lt;br /&gt;&lt;br /&gt;Spring MVC: No libraries, use DWR&lt;br /&gt;&lt;br /&gt;Tapestry: Dojo built-in in 4.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Bookmarking and URLs&lt;/span&gt;&lt;br /&gt;JSF does a POST for everything - URLs not even considered&lt;br /&gt;&lt;br /&gt;Struts 2 has namespaces - makes it easy&lt;br /&gt;&lt;br /&gt;Spring MVC allows full URL control&lt;br /&gt;&lt;br /&gt;Tapestry still has somewhat ugly URLs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Validation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JSF has ugly default messages, but easiest to configure&lt;br /&gt;&lt;br /&gt;Spring MVC allows you to use Commons Validator - a mature solution&lt;br /&gt;&lt;br /&gt;Struts 2 uses OGNL for powerful expressions - clientside only works when specifying rules on Actions&lt;br /&gt;&lt;br /&gt;Tapestry has very robust validation - good messages without need to customize&lt;br /&gt;&lt;br /&gt;Stripes and Wicket do validation in Java - no client-side&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Testability&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Spring and Struts 2 allow easy testing with mocks (e.g. EasyMock, jMock, Spring Mocks)&lt;br /&gt;&lt;br /&gt;JSF page classes can be easily tested and actually look a lot like Struts 2 actions</description><link>http://java-struts.blogspot.com/2009/05/eclipse-birt-report.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-4589749559226882088</guid><pubDate>Fri, 01 May 2009 21:11:00 +0000</pubDate><atom:updated>2009-08-28T11:16:23.136-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Struts 1 Vs Struts 2</category><title>Struts 1 Vs Struts 2</title><description>&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CUsers%5Cmegmir%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C04%5Cclip_filelist.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; latentstylecount=&quot;156&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;;} tt 	{font-family:&quot;Courier New&quot;; 	mso-ascii-font-family:&quot;Courier New&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-hansi-font-family:&quot;Courier New&quot;; 	mso-bidi-font-family:&quot;Courier New&quot;;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1 Vs Struts 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Action classes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; requires Action classes to extend an abstract base class. A common problem in Struts 1 is programming to abstract classes instead of interfaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;An &lt;b style=&quot;&quot;&gt;Struts 2&lt;/b&gt; Action &lt;em&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;may&lt;/span&gt;&lt;/em&gt; implement an &lt;/span&gt;&lt;tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Action&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; interface, along with other interfaces to enable optional and custom services. Struts 2 provides a base ActionSupport class to implement commonly used interfaces. Albeit, the Action interface is &lt;b&gt;not&lt;/b&gt; required. Any POJO object with a &lt;/span&gt;&lt;tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;execute&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; signature can be used as an Struts 2 Action object. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Threading Model&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; Actions are singletons and must be thread-safe since there will only be one instance of a class to handle all requests for that Action. The singleton strategy places restrictions on what can be done with Struts 1 Actions and requires extra care to develop. Action resources must be thread-safe or synchronized.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; Action objects are instantiated for each request, so there are no thread-safety issues. (In practice, servlet containers generate many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Servlet Dependency&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; Actions have dependencies on the servlet API since the HttpServletRequest and HttpServletResponse is passed to the &lt;/span&gt;&lt;tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;execute&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; method when an Action is invoked.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; Actions are not coupled to a container. Most often the servlet contexts are represented as simple Maps, allowing Actions to be tested in isolation. Struts 2 Actions can still access the original request and response, if required. However, other architectural elements reduce or eliminate the need to access the HttpServetRequest or HttpServletResponse directly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Testability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;A major hurdle to testing &lt;b style=&quot;&quot;&gt;Struts 1&lt;/b&gt; Actions is that the &lt;/span&gt;&lt;tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;execute&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; method exposes the Servlet API. A third-party extension, Struts TestCase, offers a set of mock object for Struts 1. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; Actions can be tested by instantiating the Action, setting properties, and invoking methods. Dependency Injection support also makes testing simpler.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Harvesting Input&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; uses an ActionForm object to capture input. Like Actions, all ActionForms must extend a base class. Since  other JavaBeans cannot be used as ActionForms, developers often create redundant classes to capture input. DynaBeans can used as an alternative to creating conventional ActionForm classes, but, here too, developers may be redescribing existing JavaBeans.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; uses Action properties as input properties, eliminating the need for a second input object. Input properties may be rich object types which may have their own properties. The Action properties can be accessed from the web page via the taglibs. Struts 2 also supports the ActionForm pattern, as well as POJO form objects and POJO Actions. Rich object types, including business or domain objects, can be used as input/output objects. The ModelDriven feature simplifies taglb references to POJO input objects. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Expression Language&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; integrates with JSTL, so it uses the JSTL EL. The EL has basic object graph traversal, but relatively weak collection and indexed property support.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; can use JSTL, but the framework also supports a more powerful and flexible expression language called &quot;Object Graph Notation Language&quot; (OGNL).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Binding values into views&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; uses the standard JSP mechanism for binding objects into the page context for access.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; uses a &quot;ValueStack&quot; technology so that the taglibs can access values without coupling your view to the object type it is rendering. The ValueStack strategy allows reuse of views across a range of types which may have the same property name but different property types.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Type Conversion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; ActionForm properties are usually all Strings. Struts 1 uses Commons-Beanutils for type conversion. Converters are per-class, and not configurable per instance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; uses OGNL for type conversion. The framework includes converters for basic and common object types and primitives. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Validation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; supports manual validation via a &lt;/span&gt;&lt;tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;validate&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; method on the ActionForm, or through an extension to the Commons Validator. Classes can have different validation contexts for the same class, but cannot chain to validations on sub-objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; supports manual validation via the &lt;/span&gt;&lt;tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;validate&lt;/span&gt;&lt;/tt&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; method and the XWork Validation framework. The Xwork Validation Framework supports chaining validation into sub-properties using the validations defined for the properties class type and the validation context.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Control Of Action Execution&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; supports separate Request Processors (lifecycles) for each module, but all the Actions in the module must share the same lifecycle.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Struts 2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; supports creating different lifecycles on a per Action basis via Interceptor Stacks. Custom stacks can be created and used with different Actions, as needed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  </description><link>http://java-struts.blogspot.com/2009/05/struts-1-vs-struts-2.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-235357529560091039</guid><pubDate>Fri, 24 Apr 2009 20:37:00 +0000</pubDate><atom:updated>2009-04-24T13:51:35.411-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JDBC - JNDI</category><title>JDBC using JNDI</title><description>public class dbConnection {&lt;br /&gt;&lt;br /&gt;public void testConnection(){&lt;br /&gt;String sql = &quot;select * from emp&quot;; // query&lt;br /&gt;&lt;br /&gt;Connection con = null;&lt;br /&gt;Statement stmt = null;&lt;br /&gt;ResultSet rs = null;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;InitialContext cxt = new InitialContext();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;DataSource dataSource = (DataSource) cxt.lookup(&quot;jdbc/myEmpDB&quot;); // &quot;jdbc/&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;myEmpDB&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;&quot;get JNDI JDBC connection&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;con = dataSource.getConnection();&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;// run sql objects&lt;br /&gt;stmt = con.createStatement();&lt;br /&gt;rs = stmt.executeQuery(sql);&lt;br /&gt;&lt;br /&gt;while (rs.next()) {&lt;br /&gt;    System.out.println(&quot;Emp Name : &quot;+rs.getString(&quot;employeeName&quot;)));&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}</description><link>http://java-struts.blogspot.com/2009/04/jdbc-using-jndi_24.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-6432266845922433301</guid><pubDate>Fri, 24 Apr 2009 20:28:00 +0000</pubDate><atom:updated>2009-04-24T13:51:22.261-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JDBC - MYSQL</category><title>JDBC (Java Database Connectivity) with MySQL</title><description>public class dbConnection {&lt;br /&gt;&lt;br /&gt;public void testConnection(){&lt;br /&gt;&lt;br /&gt;String sql = &quot;select * from emp&quot;; // query&lt;br /&gt;String conURL = &quot;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;jdbc:mysql://localhost:3306/employeeDB&lt;/span&gt;&quot;; // &quot;employeeDB&quot; is database name&lt;br /&gt;&lt;br /&gt;Connection con = null;&lt;br /&gt;Statement stmt = null;&lt;br /&gt;ResultSet rs = null;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Class.forName(&quot;com.mysql.jdbc.Driver&quot;); // create instance of mysql driver&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;con = DriverManager.getConnection(conURL);                        &lt;/span&gt;&lt;br /&gt;                    &lt;br /&gt;stmt = con.createStatement();&lt;br /&gt;rs = stmt.executeQuery(sql);&lt;br /&gt;&lt;br /&gt;while (rs.next()) {&lt;br /&gt;     System.out.println(&quot;Emp Name : &quot;+rs.getString(&quot;employeeName&quot;)));&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}</description><link>http://java-struts.blogspot.com/2009/04/jdbc-using-jndi.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-7165198313978022806</guid><pubDate>Thu, 12 Feb 2009 14:44:00 +0000</pubDate><atom:updated>2010-06-07T07:40:53.858-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Jasper Reports</category><title>Jasper Report</title><description>&lt;ul  style=&quot;font-family:arial;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span class=&quot;nobr&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Jasper Reports&lt;/span&gt;&lt;a title=&quot;&#39;&quot; style=&quot;FONT-WEIGHT: bold&quot; href=&quot;http://jasperreports.sourceforge.net/&quot;&gt;&lt;sup&gt;&lt;span style=&quot;TEXT-DECORATION: none;color:blue;&quot; &gt;&lt;?xml:namespace prefix = v /&gt;&lt;v:shapetype id=&quot;_x0000_t75&quot; stroked=&quot;f&quot; filled=&quot;f&quot; path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; preferrelative=&quot;t&quot; spt=&quot;75&quot; coordsize=&quot;21600,21600&quot;&gt; &lt;v:stroke joinstyle=&quot;miter&quot;&gt;&lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;&gt;&lt;v:f eqn=&quot;sum @0 1 0&quot;&gt;&lt;v:f eqn=&quot;sum 0 0 @1&quot;&gt;&lt;v:f eqn=&quot;prod @2 1 2&quot;&gt;&lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;&gt;&lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;&gt;&lt;v:f eqn=&quot;sum @0 0 1&quot;&gt;&lt;v:f eqn=&quot;prod @6 1 2&quot;&gt;&lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;&gt;&lt;v:f eqn=&quot;sum @8 21600 0&quot;&gt;&lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;&gt;&lt;v:f eqn=&quot;sum @10 21600 0&quot;&gt;&lt;v:path connecttype=&quot;rect&quot; gradientshapeok=&quot;t&quot; extrusionok=&quot;f&quot;&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:lock aspectratio=&quot;t&quot; ext=&quot;edit&quot;&gt;&lt;/v:shapetype&gt;&lt;v:imagedata title=&quot;linkext7&quot; src=&quot;file:///C:\Users\megmir\AppData\Local\Temp\msohtmlclip1\01\clip_image001.gif&quot;&gt;&lt;/span&gt;&lt;/sup&gt;&lt;/a&gt;is an open-source Java reporting library.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;100% written in Java.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;It compiles &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;.jrxml (XML source) to &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;.jasper (compiled) files, which in turn can be transformed into several output types including PDF, HTML, CSV, and XLS.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;You can configure various data source: JDBC, EJB, POJO, Hibernate, XML.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Download Struts 2 Jasper Report Plugins&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;We need the following libraries: &lt;a href=&quot;http://www.sourceforge.net/projects/jasperreports&quot;&gt;http://www.sourceforge.net/projects/jasperreports&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;nobr&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul type=&quot;square&quot;  style=&quot;font-family:arial;&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;jasperreports-version.jar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;commons-*.jar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;itext-version.jar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;jdt-compiler.jar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Copy these libraries to your WEB-INF/lib directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Code&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Create Product JavaBean called &lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Product&lt;/span&gt;.java&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Create Action (MyJasperAction) which compiles and stream the datasource to jrxml which compiles and generate report.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:georgia;font-size:100%;&quot;&gt; class MyJasperAction &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;   style=&quot;font-family:georgia;font-size:100%;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;font-family:georgia;font-size:100%;&quot;&gt; ActionSupport {&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;    &lt;/span&gt;/** create List to use as our JasperReports dataSource. */&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; List&lt;person&gt; myList;&lt;/person&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;code-object&quot;  style=&quot;font-size:100%;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; execute() &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;throws&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; Exception {&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Product p1 = &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; Product(&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;code-object&quot;  style=&quot;font-size:100%;&quot;&gt;Long&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;(1), &lt;/span&gt;&lt;span class=&quot;code-quote&quot;  style=&quot;font-size:100%;&quot;&gt;&quot;Sony Camera&quot;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;code-quote&quot;  style=&quot;font-size:100%;&quot;&gt;&quot;149.99&quot;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Product p2 = &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; Product(&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;code-object&quot;  style=&quot;font-size:100%;&quot;&gt;Long&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;(2), &lt;/span&gt;&lt;span class=&quot;code-quote&quot;  style=&quot;font-size:100%;&quot;&gt;&quot;Fuji Camera&quot;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;code-quote&quot;  style=&quot;font-size:100%;&quot;&gt;&quot;99.99&quot;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;code-comment&quot;  style=&quot;font-size:100%;&quot;&gt;// Store product in our dataSource list (normally would come from database).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;myList = &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; ArrayList&lt;product&gt;();&lt;/product&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;myList.add(p1);&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;myList.add(p2);&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;code-comment&quot;  style=&quot;font-size:100%;&quot;&gt;// Normally we would provide a pre-compiled .jrxml file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;code-comment&quot;  style=&quot;font-size:100%;&quot;&gt;// or check to make sure we don&#39;t compile on every request.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;try {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;/span&gt;JasperCompileManager.compileReportToFile(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;span style=&quot;COLOR: rgb(51,51,255)&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;COLOR: rgb(51,51,255)&quot;&gt;&quot;myapp/reports/jasper_template.jrxml&quot;,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;span style=&quot;COLOR: rgb(51,51,255)&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;COLOR: rgb(51,51,255)&quot;&gt;&quot;myapp/reports/compiled_template.jasper&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;/span&gt;} catch (Exception e) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;/span&gt;e.printStackTrace();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;/span&gt;return ERROR;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normalfont-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; SUCCESS;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; List&lt;product&gt; getMyList() {&lt;/product&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;code-keyword&quot;  style=&quot;font-size:100%;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; myList;&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;LINE-HEIGHT: normal;font-family:arial;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b&gt;Struts.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;define the &lt;tt&gt;jasper&lt;/tt&gt; result type manually in struts.xml&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;textarea rows=&quot;22&quot; cols=&quot;47&quot;&gt;&lt;br /&gt;&lt;package name=&quot;default&quot; namespace=&quot;/&quot; extends=&quot;struts-default&quot;&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;/span&gt;&lt;br /&gt;&lt;/v:imagedata&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:stroke&gt;</description><link>http://java-struts.blogspot.com/2010/02/frameworks-comparision.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-6931097611690434240</guid><pubDate>Mon, 05 Jan 2009 20:19:00 +0000</pubDate><atom:updated>2010-06-23T15:17:36.879-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Jasper Reports</category><title>Jasper Reports Pagination</title><description>//IGNORE PAGINATION&lt;br /&gt;// if (!format.equals(ReportFormat.PDF.toString()))&lt;br /&gt;// parameters.put(JRParameter.IS_IGNORE_PAGINATION, Boolean.TRUE); // IGNORE PAGINATION BEFORE JRFillManager.fillReport&lt;br /&gt;&lt;br /&gt;//PAGINATION&lt;br /&gt;//exporter.setParameter(JRExporterParameter.PAGE_INDEX, new Integer(0));&lt;br /&gt;//JRVariable[] jrVariables jasperReport.getVariables();&lt;br /&gt;// retrive PAGE_COUNT Variable for total page and perfor paging on that</description><link>http://java-struts.blogspot.com/2009/07/freemarker-editor.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-6731101103879034255</guid><pubDate>Thu, 05 Jun 2008 18:50:00 +0000</pubDate><atom:updated>2009-05-18T14:29:23.697-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">MySQL</category><title>MySQL 5.0    Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation &#39;UNION&#39;</title><description>&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation &#39;UNION&#39;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;br /&gt;Above error in MySQL 5.0  &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Make change in &lt;span style=&quot;font-style: italic;&quot;&gt;my.cnf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;default-character-set=&lt;span style=&quot;color: rgb(102, 51, 255);&quot;&gt;latin1&lt;/span&gt; to  default-character-set=&lt;span style=&quot;color: rgb(102, 51, 255);&quot;&gt;utf8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;at two places&lt;br /&gt;&lt;br /&gt;Restart your mysql server your error will solved.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://java-struts.blogspot.com/2008/06/mysql-50-illegal-mix-of-collations.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-8361948960716897106</guid><pubDate>Thu, 29 Nov 2007 10:48:00 +0000</pubDate><atom:updated>2009-08-28T10:28:17.572-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Freemarker - Template Engine</category><title>Freemarker with sample code</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyJ6jlolmX_0pzJPu4X429M7OLqU_wzZX5BZLkfKWGoYAk2oAPSA9yZ1a8tRNQsUZ-1GGXLxgRnccM4gakNNkpEQ0keCmxu8qSojG5cQi0uO5sVoByZ_KbAGsd33Ay480D4-NGJ05Pbdc/s1600-h/overview.png&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyJ6jlolmX_0pzJPu4X429M7OLqU_wzZX5BZLkfKWGoYAk2oAPSA9yZ1a8tRNQsUZ-1GGXLxgRnccM4gakNNkpEQ0keCmxu8qSojG5cQi0uO5sVoByZ_KbAGsd33Ay480D4-NGJ05Pbdc/s320/overview.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5123316813114779042&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Freemarker:-    &lt;/h2&gt;          &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;FreeMarker&lt;/span&gt; &lt;/span&gt;is a &quot;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;template engine&lt;/span&gt;&quot;; a generic tool to generate text output (anything from HTML to auto generated source code) based on templates. It&#39;s a Java package, a class library for Java programmers. It&#39;s not an application for end-users in itself, but something that programmers can embed into their products.      &lt;p&gt;    &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;FreeMarker &lt;/span&gt;is designed to be practical for the generation of       &lt;em&gt;HTML Web pages&lt;/em&gt;, particularly by servlet-based applications       following the &lt;em&gt;MVC&lt;/em&gt; (Model View Controller) pattern. The idea behind using the MVC pattern for dynamic Web pages is that you separate the designers (HTML authors) from the programmers. Everybody works on what they are good at. Designers can change the appearance of a page without programmers having to change or recompile code, because the application logic (Java programs) and page design (FreeMarker templates) are separated. Templates do not become polluted with complex program fragments. This separation is useful even for projects where the programmer and the HTML page author is the same person, since it helps to keep the application clear and easily maintainable.&lt;/p&gt;&lt;p&gt;       Although &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;FreeMarker &lt;/span&gt;has some programming capabilities, it is &lt;em&gt;not&lt;/em&gt; a full-blown programming language like PHP. Instead, Java programs prepare the data to be displayed (like issue SQL queries), and &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;FreeMarker &lt;/span&gt;just generates        textual pages that display the prepared data using templates&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;FreeMarker is &lt;em&gt;not&lt;/em&gt; a Web application framework. It is suitable as a component in a Web application framework, but the FreeMarker engine itself knows nothing about HTTP or servlets. It simply generates text. As such, it is perfectly usable in non-web application environments as well. Note, however, that we provide out-of-the-box solutions for using FreeMarker as the view component of Model 2 frameworks (e.g. Struts), which also let you use JSP taglibs in the templates.&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Sample code for generate freemarker template&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);font-size:85%;&quot; &gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.io.File;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import java.io.StringWriter;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import freemarker.template.Template;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import freemarker.template.Configuration;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import org.apache.commons.io.FileUtils;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import com.custombeans.TemplateBean;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;import com.helper.GenerateFileHelper;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;class freemarkerDemo{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;public static synchronized void generateTemplate() {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;try {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   Configuration config =  new freemarker.template.Configuration().setServletContextForTemplateLoading(servletContext, &quot;/WEB-INF/templates/&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   Template tmpl =config.getTemplate(&quot;template.ftl&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   StringWriter sw = new StringWriter();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   Map bean = new HashMap();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   bean.put(&quot;id&quot;,1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   bean.put(&quot;FirstName&quot;,&quot;Amin&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   bean.put(&quot;LastName&quot;,&quot;Miral&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;tmpl.process(bean, sw);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   File resultFile = new File(CONTEXT.getRealPath(&quot;template.html&quot;));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   try {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;       FileUtils.writeStringToFile(resultFile, sw.getBuffer().toString(), &quot;UTF-8&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   } catch (Exception e) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;       e.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   }&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;} catch (Exception e) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;   e.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;EDITOR / IDE - Freemarker&lt;br /&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Eclipse 3.x&lt;/span&gt;   &lt;/span&gt; Syntax highlight, syntax error indicator, outline view, code completion for macro names and bean property names. &lt;/span&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;table  style=&quot;width: 696px; height: 154px;font-family:arial;&quot; border=&quot;0&quot; cellpadding=&quot;4&quot;&gt;&lt;tbody&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;a href=&quot;http://www.jetbrains.com/idea/&quot;&gt;IntelliJ IDEA 8.0&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;           &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;A well-known feature-rich commercial Java IDE.&lt;/span&gt;&lt;/td&gt;         &lt;/tr&gt;         &lt;tr valign=&quot;top&quot;&gt;           &lt;td style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;a href=&quot;http://www.jedit.org/&quot;&gt;jEdit 4.1&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;           &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;jEdit is a Free programmer&#39;s text editor written in Java. It is highly customizable, extensible, and has an easy-to-use interface.&lt;/span&gt;&lt;/td&gt;         &lt;/tr&gt;         &lt;tr valign=&quot;top&quot;&gt;           &lt;td style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;a href=&quot;http://www.modelworks.com/&quot;&gt;SitePad Pro 6&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;           &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;SitePad Pro is an Integrated Development Environment (IDE) for Java, HTML, VRML and other files. It&#39;s commercial software.&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align: top;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;img style=&quot;border: 1px solid blue; z-index: 90; opacity: 1; position: absolute; left: 195px; top: 27px;&quot; id=&quot;smallDivTip&quot; src=&quot;chrome://dictionarytip/skin/book.png&quot; /&gt;</description><link>http://java-struts.blogspot.com/2007/11/http-hypertext-transfer-protocol-status.html</link><author>noreply@blogger.com (Miral)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyJ6jlolmX_0pzJPu4X429M7OLqU_wzZX5BZLkfKWGoYAk2oAPSA9yZ1a8tRNQsUZ-1GGXLxgRnccM4gakNNkpEQ0keCmxu8qSojG5cQi0uO5sVoByZ_KbAGsd33Ay480D4-NGJ05Pbdc/s72-c/overview.png" height="72" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-7395416151946848445</guid><pubDate>Sat, 06 Oct 2007 10:19:00 +0000</pubDate><atom:updated>2009-08-28T10:40:48.493-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Struts 2 Help</category><title>Struts 2 Help</title><description>&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span&gt;&lt;iframe marginheight=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border: 1px solid rgb(221, 229, 233); margin: 3px; padding: 0pt; width: 240px; height: 66px; background-color: rgb(255, 255, 255);&quot; src=&quot;http://cid-09f424faae98bffc.skydrive.live.com/embedrowdetail.aspx/Struts%202%20Doc&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Interceptor:-&lt;/span&gt;&lt;br /&gt;&lt;p&gt;Interceptors can execute code before and after an Action is invoked. Most of the framework&#39;s core functionality is implemented as Interceptors. Features like double-submit guards, type conversion, object population, validation, file upload, page preparation, and more, are all implemented with the help of Interceptors. Each and every Interceptor is pluggable, so you can decide exactly which features an Action needs to support.&lt;/p&gt;  &lt;p&gt;Interceptors can be configured on a per-action basis. Your own custom Interceptors can be mixed-and-matched with the Interceptors bundled with the framework. Interceptors &quot;set the stage&quot; for the Action classes, doing much of the &quot;heavy lifting&quot; before the Action executes.&lt;/p&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Result Types&lt;/span&gt;&lt;br /&gt;&lt;p&gt;Most use cases can be divided into two phases. First, we need to change or query the application&#39;s state, and then we need to present an updated view of the application. The Action class manages the application&#39;s state, and the Result Type manages the view.&lt;/p&gt;  &lt;span style=&quot;font-weight: bold;&quot;&gt;Predefined Result Types&lt;br /&gt;&lt;/span&gt;  &lt;p&gt;The framework provides several implementations of the &lt;tt&gt;com.opensymphony.xwork2.Result&lt;/tt&gt; interface, ready to use in your own applications.&lt;/p&gt; &lt;table class=&quot;confluenceTable&quot;&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/chain-result.html&quot; title=&quot;Chain Result&quot;&gt;Chain Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used for &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/action-chaining.html&quot; title=&quot;Action Chaining&quot;&gt;Action Chaining&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/dispatcher-result.html&quot; title=&quot;Dispatcher Result&quot;&gt;Dispatcher Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used for web resource integration, including &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/jsp.html&quot; title=&quot;JSP&quot;&gt;JSP&lt;/a&gt; integration &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/freemarker-result.html&quot; title=&quot;FreeMarker Result&quot;&gt;FreeMarker Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used for &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/freemarker.html&quot; title=&quot;FreeMarker&quot;&gt;FreeMarker&lt;/a&gt; integration &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/httpheader-result.html&quot; title=&quot;HttpHeader Result&quot;&gt;HttpHeader Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used to control special HTTP behaviors &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/redirect-result.html&quot; title=&quot;Redirect Result&quot;&gt;Redirect Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used to redirect to another URL (web resource) &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/redirect-action-result.html&quot; title=&quot;Redirect Action Result&quot;&gt;Redirect Action Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used to redirect to another action mapping &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/stream-result.html&quot; title=&quot;Stream Result&quot;&gt;Stream Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used to stream an InputStream back to the browser (usually for file downloads) &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/velocity-result.html&quot; title=&quot;Velocity Result&quot;&gt;Velocity Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used for &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/velocity.html&quot; title=&quot;Velocity&quot;&gt;Velocity&lt;/a&gt; integration &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/xsl-result.html&quot; title=&quot;XSL Result&quot;&gt;XSL Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used for XML/XSLT integration &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/plaintext-result.html&quot; title=&quot;PlainText Result&quot;&gt;PlainText Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used to display the raw content of a particular page (i.e jsp, HTML) &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/S2PLUGINS/tiles-result.html&quot; title=&quot;Tiles Result&quot;&gt;S2PLUGINS:Tiles Result&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used to provide Tiles integration &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3&gt;&lt;a name=&quot;ResultTypes-Optional&quot;&gt;&lt;/a&gt;Optional&lt;/h3&gt;  &lt;table class=&quot;confluenceTable&quot;&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td class=&quot;confluenceTd&quot;&gt; &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/jasperreports-plugin.html&quot; title=&quot;JasperReports Plugin&quot;&gt;JasperReports Plugin&lt;/a&gt; &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Used for &lt;a href=&quot;http://struts.apache.org/2.0.9/docs/jasperreports-tutorial.html&quot; title=&quot;JasperReports Tutorial&quot;&gt;JasperReports Tutorial&lt;/a&gt; integration &lt;/td&gt; &lt;td class=&quot;confluenceTd&quot;&gt; Optional, third-party plugin &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;Additional Result Types can be created and plugged into an application by implementing the &lt;tt&gt;com.opensymphony.xwork2.Result&lt;/tt&gt; interface. Custom Result Types might include generating an email or JMS message, generating images, and so forth.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Editors / IDE for Struts 2&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol  style=&quot;font-family:arial;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;NetBeans&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;IDEA IntelliJ&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Eclipse&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Above Editors/IDE helps you to build your Struts 2 project.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Build your struts 2 project using above IDE.&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://java-struts.blogspot.com/2007/10/struts-2-validation.html</link><author>noreply@blogger.com (Miral)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-236553278252454438.post-9022061760284865740</guid><pubDate>Sat, 06 Oct 2007 06:33:00 +0000</pubDate><atom:updated>2009-04-24T13:46:45.780-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">HTTP Status Code Definitions</category><title>HTTP Status Code Definitions</title><description>&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;HTTP Status Code Definitions :&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;    HTTP, Hypertext Transfer Protocol, is the method by which clients (i.e. you) and servers communicate. &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Each Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Informational 1xx :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. There are no required headers for this class of status code. Since HTTP/1.0 did not define any 1xx status codes, servers MUST NOT send a 1xx response to an HTTP/1.0 client except under experimental conditions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;A client MUST be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a 100 (Continue) status message. Unexpected 1xx status responses MAY be ignored by a user agent.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Proxies MUST forward 1xx responses, unless the connection between the proxy and its client has been closed, or unless the proxy itself requested the generation of the 1xx response. (For example, if a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;proxy adds a &quot;Expect: 100-continue&quot; field when it forwards a request, then it need not forward the corresponding 100 (Continue) response(s).)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;100 Continue :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The client SHOULD continue with its request. This interim response is used to inform the client that the initial part of the request has been received and has not yet been rejected by the server. The client SHOULD continue by sending the remainder of the request or, if the request has already been completed, ignore this response. The server MUST send a final response after the request has been completed. See section 8.2.3 for detailed discussion of the use and handling of this status code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;101 Switching Protocols&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server understands and is willing to comply with the client&#39;s request, via the Upgrade message header field (section 14.42), for a change in the application protocol being used on this connection. The server will switch protocols to those defined by the response&#39;s Upgrade header field immediately after the empty line which terminates the 101 response.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The protocol SHOULD be switched only when it is advantageous to do so. For example, switching to a newer version of HTTP is advantageous over older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use such features.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Successful 2xx :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;This class of status code indicates that the client&#39;s request was successfully received, understood, and accepted.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;200 OK&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The request has succeeded. The information returned with the response is dependent on the method used in the request, for example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;GET an entity corresponding to the requested resource is sent in the response;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;HEAD the entity-header fields corresponding to the requested resource are sent in the response without any message-body;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;POST an entity describing or containing the result of the action;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;TRACE an entity containing the request message as received by the end server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;201 Created&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The request has been fulfilled and resulted in a new resource being created. The newly created resource can be referenced by the URI(s) returned in the entity of the response, with the most specific URI for the resource given by a Location header field. The response SHOULD include an entity containing a list of resource characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. The origin server MUST create the resource before returning the 201 status code. If the action cannot be carried out immediately, the server SHOULD respond with 202 (Accepted) response instead.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;A 201 response MAY contain an ETag response header field indicating the current value of the entity tag for the requested variant just created, see section 14.19.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;202 Accepted&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent&#39;s connection to the server persist until the process is completed. The entity returned with this response SHOULD include an indication of the request&#39;s current status and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;203 Non-Authoritative Information&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The returned metainformation in the entity-header is not the definitive set as available from the origin server, but is gathered from a local or a third-party copy. The set presented MAY be a subset or superset of the original version. For example, including local annotation information about the resource might result in a superset of the metainformation known by the origin server. Use of this response code is not required and is only appropriate when the response would otherwise be 200 (OK).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;204 No Content&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent&#39;s active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent&#39;s active view.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;205 Reset Content&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server has fulfilled the request and the user agent SHOULD reset the document view which caused the request to be sent. This response is primarily intended to allow input for actions to take place via user input, followed by a clearing of the form in which the input is given so that the user can easily initiate another input action. The response MUST NOT include an entity.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;206 Partial Content&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server has fulfilled the partial GET request for the resource. The request MUST have included a Range header field (section 14.35) indicating the desired range, and MAY have included an If-Range header field (section 14.27) to make the request conditional.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The response MUST include the following header fields:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      - Either a Content-Range header field (section 14.16) indicating&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        the range included with this response, or a multipart/byteranges&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        Content-Type including Content-Range fields for each part. If a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        Content-Length header field is present in the response, its&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        value MUST match the actual number of OCTETs transmitted in the&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        message-body.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      - Date&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      - ETag and/or Content-Location, if the header would have been sent&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        in a 200 response to the same request&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      - Expires, Cache-Control, and/or Vary, if the field-value might&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        differ from that sent in any previous response for the same&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        variant&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the 206 response is the result of an If-Range request that used a strong cache validator (see section 13.3.3), the response SHOULD NOT include other entity-headers. If the response is the result of an If-Range request that used a weak validator, the response MUST NOT include other entity-headers; this prevents inconsistencies between cached entity-bodies and updated headers. Otherwise, the response MUST include all of the entity-headers that would have been returned with a 200 (OK) response to the same request.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;A cache MUST NOT combine a 206 response with other previously cached content if the ETag or Last-Modified headers do not match exactly, see 13.5.4.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;A cache that does not support the Range and Content-Range headers MUST NOT cache 206 (Partial) responses.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Redirection 3xx&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. The action required MAY be carried out by the user agent without interaction with the user if and only if the method used in the second request is GET or HEAD. A client SHOULD detect infinite redirection loops, since such loops generate network traffic for each redirection.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: previous versions of this specification recommended a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      maximum of five redirections. Content developers should be aware&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      that there might be clients that implement such a fixed&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      limitation.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;300 Multiple Choices&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The requested resource corresponds to any one of a set of representations, each with its own specific location, and agent- driven negotiation information (section 12) is being provided so that the user (or user agent) can select a preferred representation and redirect its request to that location.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Unless it was a HEAD request, the response SHOULD include an entity containing a list of resource characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content- Type header field. Depending upon the format and the capabilities of&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;the user agent, selection of the most appropriate choice MAY be performed automatically. However, this specification does not define any standard for such automatic selection.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the server has a preferred choice of representation, it SHOULD include the specific URI for that representation in the Location field; user agents MAY use the Location field value for automatic redirection. This response is cacheable unless indicated otherwise.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;301 Moved Permanently&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The new permanent URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the 301 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: When automatically redirecting a POST request after&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      receiving a 301 status code, some existing HTTP/1.0 user agents&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      will erroneously change it into a GET request.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;302 Found&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: RFC 1945 and RFC 2068 specify that the client is not allowed&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      to change the method on the redirected request.  However, most&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      existing user agent implementations treat 302 as if it were a 303&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      response, performing a GET on the Location field-value regardless&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      of the original request method. The status codes 303 and 307 have&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      been added for servers that wish to make unambiguously clear which&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      kind of reaction is expected of the client.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;303 See Other&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource. This method exists primarily to allow the output of a POST-activated script to redirect the user agent to a selected resource. The new URI is not a substitute reference for the originally requested resource. The 303 response MUST NOT be cached, but the response to the second (redirected) request might be cacheable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The different URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: Many pre-HTTP/1.1 user agents do not understand the 303&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      status. When interoperability with such clients is a concern, the&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      302 status code may be used instead, since most user agents react&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      to a 302 response as described here for 303.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;304 Not Modified&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server SHOULD respond with this status code. The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The response MUST include the following header fields:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      - Date, unless its omission is required by section 14.18.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If a clockless origin server obeys these rules, and proxies and clients add their own Date to any response received without one (as already specified by [RFC 2068], section 14.19), caches will operate correctly.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      - ETag and/or Content-Location, if the header would have been sent&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        in a 200 response to the same request&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      - Expires, Cache-Control, and/or Vary, if the field-value might&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        differ from that sent in any previous response for the same&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;        variant&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the conditional GET used a strong cache validator (see section 13.3.3), the response SHOULD NOT include other entity-headers. Otherwise (i.e., the conditional GET used a weak validator), the response MUST NOT include other entity-headers; this prevents inconsistencies between cached entity-bodies and updated headers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If a 304 response indicates an entity not currently cached, then the cache MUST disregard the response and repeat the request without the conditional.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If a cache uses a received 304 response to update a cache entry, the cache MUST update the entry to reflect any new field values given in the response.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;305 Use Proxy&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The requested resource MUST be accessed through the proxy given by the Location field. The Location field gives the URI of the proxy. The recipient is expected to repeat this single request via the proxy. 305 responses MUST only be generated by origin servers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: RFC 2068 was not clear that 305 was intended to redirect a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      single request, and to be generated by origin servers only.  Not&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      observing these limitations has significant security consequences.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;306 (Unused)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The 306 status code was used in a previous version of the specification, is no longer used, and the code is reserved.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;307 Temporary Redirect&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The requested resource resides temporarily under a different URI. Since the redirection MAY be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s) , since many pre-HTTP/1.1 user agents do not understand the 307 status. Therefore, the note SHOULD contain the information necessary for a user to repeat the original request on the new URI.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the 307 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Client Error 4xx&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the server SHOULD include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents SHOULD display any included entity to the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the client is sending data, a server implementation using TCP SHOULD be careful to ensure that the client acknowledges receipt of the packet(s) containing the response, before the server closes the input connection. If the client continues sending data to the server after the close, the server&#39;s TCP stack will send a reset packet to the client, which may erase the client&#39;s unacknowledged input buffers before they can be read and interpreted by the HTTP application.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;400 Bad Request&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;401 Unauthorized&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in &quot;HTTP Authentication: Basic and Digest Access Authentication&quot; [43].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;402 Payment Required&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;This code is reserved for future use.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;403 Forbidden&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;404 Not Found&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;405 Method Not Allowed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;406 Not Acceptable&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed automatically. However, this specification does not define any standard for such automatic selection.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: HTTP/1.1 servers are allowed to return responses which are&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      not acceptable according to the accept headers sent in the&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      request. In some cases, this may even be preferable to sending a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      406 response. User agents are encouraged to inspect the headers of&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      an incoming response to determine if it is acceptable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the response could be unacceptable, a user agent SHOULD temporarily stop receipt of more data and query the user for a decision on further actions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;407 Proxy Authentication Required&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy. The proxy MUST return a Proxy-Authenticate header field (section 14.33) containing a challenge applicable to the proxy for the requested resource. The client MAY repeat the request with a suitable Proxy-Authorization header field (section 14.34). HTTP access authentication is explained in &quot;HTTP Authentication: Basic and Digest Access Authentication&quot; [43].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;408 Request Timeout&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;409 Conflict&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The response body SHOULD include enough&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;information for the user to recognize the source of the conflict. Ideally, the response entity would include enough information for the user or user agent to fix the problem; however, that might not be possible and is not required.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the entity being PUT included changes to a resource which conflict with those made by an earlier (third-party) request, the server might use the 409 response to indicate that it can&#39;t complete the request. In this case, the response entity would likely contain a list of the differences between the two versions in a format defined by the response Content-Type.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;410 Gone&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server&#39;s site. It is not necessary to mark all permanently unavailable resources as &quot;gone&quot; or to keep the mark for any length of time -- that is left to the discretion of the server owner.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;411 Length Required&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server refuses to accept the request without a defined Content- Length. The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request message.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;412 Precondition Failed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This response code allows the client to place preconditions on the current resource metainformation (header field data) and thus prevent the requested method from being applied to a resource other than the one intended.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;413 Request Entity Too Large&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server is refusing to process a request because the request entity is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the condition is temporary, the server SHOULD include a Retry- After header field to indicate that it is temporary and after what time the client MAY try again.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;414 Request-URI Too Long&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a URI &quot;black hole&quot; of redirection (e.g., a redirected URI prefix that points to a suffix of itself), or when the server is under attack by a client attempting to exploit security holes present in some servers using fixed-length buffers for reading or manipulating the Request-URI.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;415 Unsupported Media Type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;416 Requested Range Not Satisfiable&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;A server SHOULD return a response with this status code if a request included a Range request-header field (section 14.35), and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request did not include an If-Range request-header field. (For byte-ranges, this means that the first- byte-pos of all of the byte-range-spec values were greater than the current length of the selected resource.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;When this status code is returned for a byte-range request, the response SHOULD include a Content-Range entity-header field specifying the current length of the selected resource (see section 14.16). This response MUST NOT use the multipart/byteranges content- type.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;417 Expectation Failed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The expectation given in an Expect request-header field (see section 14.20) could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could not be met by the next-hop server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;Server Error 5xx&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Response status codes beginning with the digit &quot;5&quot; indicate cases in which the server is aware that it has erred or is incapable of performing the request. Except when responding to a HEAD request, the server SHOULD include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. User agents SHOULD display any included entity to the user. These response codes are applicable to any request method.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;500 Internal Server Error&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server encountered an unexpected condition which prevented it from fulfilling the request.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;501 Not Implemented&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;502 Bad Gateway&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;503 Service Unavailable&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: The existence of the 503 status code does not imply that a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      server must use it when becoming overloaded. Some servers may wish&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      to simply refuse the connection.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;504 Gateway Timeout&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      Note: Note to implementors: some deployed proxies are known to&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;      return 400 or 500 when DNS lookups time out.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;505 HTTP Version Not Supported&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt; :&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The server does not support, or refuses to support, the HTTP protocol version that was used in the request message. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described in section 3.1, other than with this error message. The response SHOULD contain an entity describing why that version is not supported and what other protocols are supported by that server. &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://java-struts.blogspot.com/2007/10/struts-mvc-frame-work.html</link><author>noreply@blogger.com (Miral)</author><thr:total>0</thr:total></item></channel></rss>