<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4760812210561924403</id><updated>2011-10-05T15:51:50.863-07:00</updated><title type='text'>Programming tips</title><subtitle type='html'>Programming tips for various technologies.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://patton-prog-tips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4760812210561924403/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://patton-prog-tips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Patton</name><uri>http://www.blogger.com/profile/16660264147101958866</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4760812210561924403.post-3276191007849384472</id><published>2009-09-28T02:31:00.001-07:00</published><updated>2009-09-29T03:27:48.915-07:00</updated><title type='text'>Tomahawk's library and managing tables.</title><content type='html'>&lt;span style="font-family:arial;"&gt;One of the useful thing while working with some technology is trying to use the provided libraries to avoid every time to "reinvent the Hot Water".&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I chose to use Myfaces to develop the web interface so i began to look at its related developing libraries. One of the library is &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;TomaHawk&lt;/span&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Anyway i would like to discuss about displaying Tables and how to manage them in the correct way.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;So when you work with databases and data, the things that you would like to do are:&lt;/span&gt;&lt;br /&gt;&lt;ol style="font-family: arial;"&gt;&lt;li&gt;Display the data in tabular way&lt;/li&gt;&lt;li&gt;Manage the pagination on the data&lt;/li&gt;&lt;li&gt;Manage the ordering of the data inside the table&lt;/li&gt;&lt;li&gt;Manage the data in the correct way&lt;/li&gt;&lt;li&gt;As usual write quickly maintainable code&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-family:arial;"&gt;Using Tomahawk to cope with this problem was a very nice solution but i had again to fight against the lack of &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;documentation&lt;/span&gt;&lt;span style="font-family:arial;"&gt; (or outdated documentation as well).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I won't post links to various documentation because there is a lot of documentation and blogs that talk about managing tabular data and the list would be too long.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);font-family:arial;font-size:130%;"  &gt;Displaying data with tables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;What do we need to code to solve this problem? As always you will need to write down a back bean, the web interface code and some more needed java code.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;First of all we need a class that will store the fields from the database.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div  style="background: rgb(200, 200, 200) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:arial;"&gt;public class &lt;span style="font-weight: bold;"&gt;TableItem&lt;/span&gt; {&lt;br /&gt;&lt;br /&gt;private String field1;&lt;br /&gt;//List of fields here&lt;br /&gt;public TableItem(String field1) {&lt;br /&gt;this.field1=field1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Date getField1() {&lt;br /&gt;return field2;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setField1(String field1) {&lt;br /&gt;this.field1 = field1;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;After that we code our Back Bean that will keep the data loaded from DB or File and will setup our table. We will use this bean in the JSP or Facelets code to display the data in a table. You basically will need to implement one method to achieve the objective.&lt;br /&gt;For the interface we will use a datascroller to manage the pagination and more we will use a commandSortHeader to manage column sort.&lt;br /&gt;Finally a trick i found after about 2 months of searching. We can handle the latest page visited in the pagination so that when returning to the list (the displayed table) we can remeber the latest visited page inside the paginated table. When you have a list of thousands of records this will be very useful (it is a lot annoying to start always from the first record when we reload the table page).&lt;/span&gt;&lt;br /&gt;&lt;pre  style="background: rgb(200, 200, 200) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:arial;"&gt;public class &lt;span style="font-weight: bold;"&gt;TableBackBean&lt;/span&gt; {&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;private Integer latestpageindex;&lt;/span&gt;&lt;br /&gt;private transient ListDataModel model = null;&lt;br /&gt;// This field is transient because it cannot be serialized&lt;br /&gt;// and JSF must be aware of it&lt;br /&gt;&lt;br /&gt;public TableBackBean() {&lt;br /&gt;// we load data at the creation of the Bean&lt;br /&gt;model=new ListDataModel(getList());             &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public List&lt; TableItem &gt; getList(){&lt;br /&gt;List&lt; YourDBObject &gt; datalistfromdb = null;&lt;br /&gt;List&lt; TableItem &gt; dataitems = new ArrayList&lt;&gt;();&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;// You can load data from DB or File or whatever into datalistfromdb&lt;br /&gt;// and after that you must create the List to be returned to JSF&lt;br /&gt;// here is the generic code&lt;br /&gt;if(!datalistfromdb.isEmpty()) {&lt;br /&gt;Iterator it = datalistfromdb.iterator();&lt;br /&gt;while(it.hasNext()) {&lt;br /&gt;YourDBObject dbob = (YourDBObject) it.next();&lt;br /&gt;dataitems.add(new TableItem(dbobj.getFirstField()));&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;return items;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Integer getLatestpageindex() {&lt;br /&gt;return latestpageindex;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setLatestpageindex(Integer latestpageindex) {&lt;br /&gt;this.latestpageindex = latestpageindex;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);font-family:arial;" &gt;Now to the interface code. The dataTable has got 2 parameters, &lt;span style="font-weight: bold;"&gt;first&lt;/span&gt; and&lt;span style="font-weight: bold;"&gt; rowIndexVar&lt;/span&gt;; rowIndexVar will save the first index of the record displayed in the paginated table into a property in the session (you must pass the property name as parameter), while &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(102, 102, 102);font-family:arial;" &gt;first&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-family:arial;" &gt;  will pass this saved property as the first index to display next time the page is loaded. So we have done each time we leave the table page and reload it, it will remember latest paginated index.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);font-family:arial;" &gt;To sort the list by a field of the record we must add &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102); font-weight: bold;font-family:arial;" &gt;defaultSorted="true" sortable="true"&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-family:arial;" &gt; to the column that we want to sort with, and remeber to use&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-family:arial;" &gt;&lt;span style="font-weight: bold;"&gt; t:commandSortHeader&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102);"&gt;inside the column code as below.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="background: rgb(200, 200, 200) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:arial;"&gt;&lt; t: dataTable id="table1" first="#{TableBackBean.indicepagina}" rowIndexVar="indicepaginastudi" rows="10" value="#{TableBackBean.items}" var="item" &gt;&lt;br /&gt;&lt; t : column defaultsorted="true" sortable="true"&gt;&lt;br /&gt;   &lt; f : facet name="header"&gt;&lt;br /&gt;       &lt; t : commandSortHeader arrow="true" propertyName="field1" &gt;&lt;br /&gt;           &lt; h: outputText value="Field1" /&gt;&lt;br /&gt;       &lt; /t: commandSortHeader &gt;&lt;br /&gt;   &lt; /f : facet &gt;&lt;br /&gt;   &lt; h : outputText value="#{item.field1}" /&gt;&lt;br /&gt;&lt; /t : column &gt;&lt;br /&gt;&lt; /t:dataTable &gt;&lt;br /&gt;&lt; t : dataScroller id="scroller" for="table1" paginator="true" paginatormaxpages="10" immediate="true"&gt;&lt;br /&gt;&lt; name="first"&gt;First&lt; /f:facet&gt;&lt;br /&gt;&lt; name="last"&gt;Last&lt; /f:facet&gt;&lt;br /&gt;&lt; name="previous"&gt;&amp;amp; lt;&lt; /f:facet &gt;&lt;br /&gt;&lt; name="next"&gt;&amp;amp; gt;&lt; /f:facet &gt;&lt;br /&gt;&lt; / t : dataScroller &gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now remember to register  properly the backing bean into faces-config.xml as a &lt;span style="font-weight: bold;"&gt;session bean&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;That worked very well to me. Hope you won't have any problem in running this .&lt;br /&gt;Please comment if you have any problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4760812210561924403-3276191007849384472?l=patton-prog-tips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patton-prog-tips.blogspot.com/feeds/3276191007849384472/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4760812210561924403&amp;postID=3276191007849384472' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4760812210561924403/posts/default/3276191007849384472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4760812210561924403/posts/default/3276191007849384472'/><link rel='alternate' type='text/html' href='http://patton-prog-tips.blogspot.com/2009/09/tomahawks-library-and-managing-tables.html' title='Tomahawk&apos;s library and managing tables.'/><author><name>Patton</name><uri>http://www.blogger.com/profile/16660264147101958866</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4760812210561924403.post-1667099543494714625</id><published>2008-10-28T07:10:00.000-07:00</published><updated>2008-10-29T04:24:39.561-07:00</updated><title type='text'>MyFaces: handling the ViewExpiredException</title><content type='html'>I am developing some Java Server Faces' technologies related applications from about one year. I have studied for long time this very interesting web framework and i must say i really like it. However even JSF can be very problematic while trying to handle complex things.&lt;br /&gt;&lt;br /&gt;The main drawback i had to fight against is the &lt;span style="font-weight: bold;"&gt;documentation&lt;/span&gt;. JSF's specifications had many revisions. We now are at the 1.2 specifications version and browsing the web for fresh documentation is very difficoult. You can find over the network a lot of useful articles and pieces of code but you can also find a lot of old useless things and outdated news.&lt;br /&gt;Usually people tend to help you (if you use Mailing Lists) but sometimes they don't.&lt;br /&gt;&lt;br /&gt;Anyway one of the problems I wanted to solve is the &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;ViewExpiredException&lt;/span&gt; handling. I studied this problem a lot and tried to document myself the best i could. I also found out some useful articles and blogs related to this problem.&lt;br /&gt;&lt;br /&gt;I post these link here for completeness :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=697"&gt;JSF dev archive&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://forums.sun.com/thread.jspa?messageID=10169564"&gt;Sun's forum&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.jroller.com/mert/entry/handling_errors_with_an_errror"&gt;Mert Caliskan's weblog (opened my eyes)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.apache.org/myfaces/Handling_Server_Errors"&gt;Myfaces wiki&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);font-size:130%;" &gt;Now to My solution.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I am using Apache MyFaces cause it is heavily developed and it has a lot of useful add-on libraries such as Tomahawk, Trinidad and others. Even if Mert Caliskan's articles was really almost the solution it does not work with Myfaces. And honestly i was not able to implement it under Sun's JSF 1.2 as well.&lt;br /&gt;&lt;br /&gt;The main problem here is that the JSF 1.2 implementation have somehow a bug (actually i did not understand how come) and the simple solution to this problem&lt;span style="font-weight: bold;"&gt; does not work&lt;/span&gt; at all even on Myfaces and Sun's JSF 1.2.&lt;br /&gt;&lt;br /&gt;&lt;div style="background: rgb(200, 200, 200) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   Simple solution&lt;/span&gt; : put into web.xml the following code&lt;br /&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt; error-page&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;br /&gt;&lt; &lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;exception-type&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;javax.faces.application.ViewExpiredException&lt; /exception-type&gt;&lt;br /&gt;&lt; &lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;location&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;/error.jsp&lt; /location&gt;&lt;br /&gt;&lt; /error-page&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The real working solution is a bit tricky. It is based to the fact that Sun's JSF main Servlet does have some code that handles exceptions. So the proposed solution was to use the Servlet in some way. Now JSF's Servlet cannot be subclassed so we must use the Delegation as perfectly described by &lt;a href="http://www.jroller.com/mert/entry/handling_errors_with_an_errror"&gt;Mert Caliskan&lt;/a&gt;.&lt;br /&gt;I could not anyway figure out how to configure web.xml to let the application deploy without problems (and this is still an open problem to me).&lt;br /&gt;&lt;br /&gt;So i decided to try with MyFaces (it works with 1.2.22 and later, I did not test with earlier versions).&lt;br /&gt;&lt;br /&gt;Here the job is even simplier cause we have already a delegated Servlet that is MyFacesServlet.java. So i only needed to subclass it. Here is the code:&lt;br /&gt;&lt;pre style="background: rgb(200, 200, 200) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;public class MyFacesServletWrapper extends MyFacesServlet&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;private static final String SYSTEM_ERROR_URI = "/systemerror.jsf";&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt; private static final String VIEWEX_ERROR_URI = "/viewexpiredexception.jsf";&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;@Override&lt;br /&gt;public void service(ServletRequest request, ServletResponse response) throws IOException,ServletException&lt;br /&gt;{&lt;br /&gt;try {&lt;br /&gt;super.service(request, response);&lt;br /&gt;}&lt;br /&gt;catch(ServletException e) {&lt;br /&gt;HttpServletRequest req = (HttpServletRequest)request;&lt;br /&gt;HttpServletResponse res = (HttpServletResponse)response;&lt;br /&gt;if (e.getCause().getClass().equals(javax.faces.application.ViewExpiredException.class))&lt;br /&gt;{&lt;br /&gt;// here there is the ViewExpiredException&lt;br /&gt;res.sendRedirect(req.getContextPath() + &lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;VIEWEX_ERROR_URI&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;);&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;// any other exception&lt;br /&gt;req.getSession().invalidate();&lt;br /&gt;res.sendRedirect(req.getContextPath() + &lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;SYSTEM_ERROR_URI&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;However we still haven't finished the job. We must modify in the correct way the web.xml in order to really catch those exceptions. Finally adding the following lines does the job:&lt;br /&gt;&lt;br /&gt;&lt;div style="background: rgb(200, 200, 200) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;br /&gt;&lt;div style="background: rgb(200, 200, 200) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;context-param&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;description&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Use this to suppress Facelets error page&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;description&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;param-name&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;org.apache.myfaces.ERROR_HANDLING&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;param-name&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;br /&gt;&lt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;param-value&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;false&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;param-value&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;br /&gt;&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;context-param&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;servlet&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;servlet-name&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Use this to suppress Facelets error page&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;servlet-name&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;servlet-class&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;MyFacesServletWrapper&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;servlet-class&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;br /&gt;&lt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;load-on-startup&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;1&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;load-on-startup&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;br /&gt;&lt; /&lt;/span&gt;&lt;span style="font-size:85%;"&gt;servlet&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;That worked to me. Hope you won't have any problem in running this trick.&lt;br /&gt;Please comment if you have any problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4760812210561924403-1667099543494714625?l=patton-prog-tips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patton-prog-tips.blogspot.com/feeds/1667099543494714625/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4760812210561924403&amp;postID=1667099543494714625' title='10 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4760812210561924403/posts/default/1667099543494714625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4760812210561924403/posts/default/1667099543494714625'/><link rel='alternate' type='text/html' href='http://patton-prog-tips.blogspot.com/2008/10/myfaces-handling-viewexpiredexception.html' title='MyFaces: handling the ViewExpiredException'/><author><name>Patton</name><uri>http://www.blogger.com/profile/16660264147101958866</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry></feed>
