<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>StudyJava.org &#187; Jsp</title>
	<atom:link href="http://studyjava.org/category/jsp/feed" rel="self" type="application/rss+xml" />
	<link>http://studyjava.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 05 Apr 2010 11:49:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Date showing wrong in JSF outputText or with dataTable</title>
		<link>http://studyjava.org/jsp/date-showing-wrong-in-jsf-outputtext-or-with-datatable</link>
		<comments>http://studyjava.org/jsp/date-showing-wrong-in-jsf-outputtext-or-with-datatable#comments</comments>
		<pubDate>Fri, 26 Feb 2010 16:30:45 +0000</pubDate>
		<dc:creator>rathi</dc:creator>
				<category><![CDATA[Java Tools]]></category>
		<category><![CDATA[Jsp]]></category>
		<category><![CDATA[Date showing wrong in JSF outputText]]></category>
		<category><![CDATA[with dataTable]]></category>

		<guid isPermaLink="false">http://studyjava.org/?p=428</guid>
		<description><![CDATA[Date showing wrong in JSF outputText or with dataTable Some times in , h:outputText with dataTable or without , java.util.Date showing wrong, means one date before the actual date is showing. We can solve this problem using Converter. One example&#8230; Some times in , h:outputText with dataTable or without , java.util.Date showing wrong, means one [...]]]></description>
			<content:encoded><![CDATA[<p>Date showing wrong in JSF outputText or with dataTable<br />
Some times in , h:outputText with dataTable or without , java.util.Date showing wrong, means one date before the actual date is showing. We can solve this problem using Converter. One example&#8230;<br />
Some times in , h:outputText with dataTable or without , java.util.Date showing wrong, means one date before the actual date is showing.<br />
<strong> We can solve this problem using Converter.</strong><br />
One example :</p>
<p>DateConverter.java</p>
<p>package com.converter;<br />
import java.text.SimpleDateFormat;<br />
import java.util.Date;<br />
import javax.faces.component.UIComponent;<br />
import javax.faces.context.FacesContext;<br />
import javax.faces.convert.Converter;<br />
import javax.faces.convert.ConverterException;<br />
/**<br />
* This class is is used to convert a date to dd-MMM-yyyy format<br />
*<br />
*/<br />
public class DateConverter implements Converter {<br />
public String getAsString(FacesContext context, UIComponent c, Object object)<br />
throws ConverterException {<br />
if(object!=null &amp;&amp; !object.toString().equals(&#8220;&#8221;)){<br />
final Date date = (Date) object;<br />
String dt=null;<br />
if(date!=null){<br />
SimpleDateFormat formatter=new SimpleDateFormat(&#8220;dd-MMM-yyyy&#8221;);<br />
dt=formatter.format(date);<br />
return dt;<br />
}}<br />
return null;<br />
}<br />
public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2)<br />
throws ConverterException {<br />
return null;<br />
}<br />
}</p>
<p>In  faces-config.xml</p>
<p>dateConvert<br />
com.converter.DateConverter</p>
<p>In your jsp page</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fdate-showing-wrong-in-jsf-outputtext-or-with-datatable', 'Date+showing+wrong+in+JSF+outputText+or+with+dataTable')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fdate-showing-wrong-in-jsf-outputtext-or-with-datatable', title: '+Date+showing+wrong+in+JSF+outputText+or+with+dataTable+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://studyjava.org/jsp/date-showing-wrong-in-jsf-outputtext-or-with-datatable/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Allow Numbers/Digits in textbox  in javascript</title>
		<link>http://studyjava.org/jsp/allow-numbersdigits-in-textbox-in-javascript</link>
		<comments>http://studyjava.org/jsp/allow-numbersdigits-in-textbox-in-javascript#comments</comments>
		<pubDate>Thu, 05 Nov 2009 16:39:38 +0000</pubDate>
		<dc:creator>rathi</dc:creator>
				<category><![CDATA[Jsp]]></category>
		<category><![CDATA[textbox  in javascript]]></category>

		<guid isPermaLink="false">http://studyjava.org/?p=315</guid>
		<description><![CDATA[Allow Numbers/Digits in textbox  in javascript &#60;HTML&#62; &#60;HEAD&#62; &#60;SCRIPT language=Javascript&#62; &#60;!&#8211; function isNumberKey(evt) { var unicode=e.charCode? e.charCode : e.keyCode if (unicode!=8){ if (unicode&#60;48&#124;&#124;unicode&#62;57) return false;} return true; } //&#8211;&#62; &#60;/SCRIPT&#62; &#60;/HEAD&#62; &#60;BODY&#62; &#60;INPUT id=&#8221;txtChar&#8221; onkeypress=&#8221;return isNumberKey(event)&#8221; type=&#8221;text&#8221; name=&#8221;txtChar&#8221;&#62; &#60;/BODY&#62; &#60;/HTML&#62; Here this above coding shows to use Javascript to allow only numbers to be entered [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Allow Numbers/Digits in textbox  in javascript</strong><br />
&lt;HTML&gt;<br />
&lt;HEAD&gt;<br />
&lt;SCRIPT language=Javascript&gt;<br />
&lt;!&#8211;<br />
function isNumberKey(evt)<br />
{<br />
var unicode=e.charCode? e.charCode : e.keyCode<br />
if (unicode!=8){<br />
if (unicode&lt;48||unicode&gt;57)<br />
return false;}</p>
<p>return true;<br />
}<br />
//&#8211;&gt;<br />
&lt;/SCRIPT&gt;<br />
&lt;/HEAD&gt;<br />
&lt;BODY&gt;<br />
&lt;INPUT id=&#8221;txtChar&#8221; onkeypress=&#8221;return isNumberKey(event)&#8221; type=&#8221;text&#8221; name=&#8221;txtChar&#8221;&gt;<br />
&lt;/BODY&gt;<br />
&lt;/HTML&gt;<br />
Here this above coding shows to use Javascript to allow only numbers to be entered in a textbox. This is useful for phone numbers, IDs, ZipCodes.</p>
<p>This solution works in both IE and Netscape/Mozilla.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fallow-numbersdigits-in-textbox-in-javascript', 'Allow+Numbers%2FDigits+in+textbox++in+javascript')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fallow-numbersdigits-in-textbox-in-javascript', title: '+Allow+Numbers%2FDigits+in+textbox++in+javascript+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://studyjava.org/jsp/allow-numbersdigits-in-textbox-in-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding Javascript error in JSP</title>
		<link>http://studyjava.org/jsp/hiding-javascript-error-in-jsp</link>
		<comments>http://studyjava.org/jsp/hiding-javascript-error-in-jsp#comments</comments>
		<pubDate>Thu, 03 Sep 2009 16:05:43 +0000</pubDate>
		<dc:creator>rathi</dc:creator>
				<category><![CDATA[Jsp]]></category>
		<category><![CDATA[Hiding]]></category>
		<category><![CDATA[Javascript error in JSP]]></category>

		<guid isPermaLink="false">http://studyjava.org/?p=173</guid>
		<description><![CDATA[Hiding Javascript error in JSP &#60;script type=&#8221;text/javascript&#8221;&#62; function handleError() {        return true; } window.onerror = handleError; &#60;/script&#62;]]></description>
			<content:encoded><![CDATA[<p><strong>Hiding Javascript error in JSP</strong></p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;</p>
<p>function handleError() {<br />
       return true;<br />
}</p>
<p>window.onerror = handleError;</p>
<p>&lt;/script&gt;</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fhiding-javascript-error-in-jsp', 'Hiding+Javascript+error+in+JSP')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fhiding-javascript-error-in-jsp', title: '+Hiding+Javascript+error+in+JSP+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://studyjava.org/jsp/hiding-javascript-error-in-jsp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jsp</title>
		<link>http://studyjava.org/jsp/jsp</link>
		<comments>http://studyjava.org/jsp/jsp#comments</comments>
		<pubDate>Sun, 28 Jun 2009 15:05:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Jsp]]></category>

		<guid isPermaLink="false">http://studyjava.org/?p=3</guid>
		<description><![CDATA[The prerequisites for the tutorial are: HTML. You should be able to put together HTML pages. Java. You should be able to program in Java. This tutorial teaches JSP by progressing from very simple examples to complex examples. For best progress, it is recommended that you type in all the examples presented and get them [...]]]></description>
			<content:encoded><![CDATA[<p>The prerequisites for the tutorial are: HTML.  You should be able to put together HTML pages. Java.  You should be able to program in Java. This tutorial teaches JSP by progressing from very simple examples to complex examples. For best progress, it is recommended that you type in all the examples presented and get them working.  The early examples might seem very simple; please have patience.  By actually typing in the examples and getting them to work, you will gain familiarity with the actual practical issues.  Also spend some time on the exercises, these are designed to solidify your grasp of the material.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fjsp', 'jsp')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fstudyjava.org%2Fjsp%2Fjsp', title: '+jsp+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://studyjava.org/jsp/jsp/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

