validation using java

August 4, 2010

Reguler Expression in java:

String NAME_REGEX = “([A-Za-z0-9]+[\\_]?[A-Za-z0-9]{1,})”;

String SITENAME_REGEX = “((([\\D]?[\\d]?)+[ ]?([\\D]?[\\d]?){1,})+)”;

String PHONE_REGEX = “^(\\+)?(\\d[-| ]?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?” +
“((\\d\\-?\\s?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?)?” +
“((\\d\\-?\\s?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?)?” +
“((\\d\\-?\\s?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?)?” +
“(\\d){2,}$”;
/*
* The phone number regular expression accepts phone number in both local format (eg. 02 1234 5678 or 123 123 4567) or international format (eg. +61 (0) 2 1234 5678 or +1 123 123 4567). It also accepts an optional extension of up to five digits prefixed by x or ext (eg. 123 123 4567 x89).
*/
String PHONE_REGEX = “((((\\+)?(\\(?\\d{1,}\\))*?(\\d{1,})*?(-| )?(\\(?\\d{1,}\\))*?(-| )?\\d{0,})|(\\(?\\d{1,}\\)?))(-| )?(\\d{0,})(-| )?(\\d{0,})(( x| ext)\\d{0,}){0,1})?(\\d{1,})”;

String ZIP_REGEX = “[A-Za-z0-9]+[\\-]?[A-Za-z0-9]+”;

Pattern namePattern = Pattern.compile(NAME_REGEX);
//condition checking
if (!namePattern.matcher(newpartner.getUserName()).matches()) {
setMessage(Messages.getString(MSGK_ERR_VALIDUSERNAME));
return returnString;
}

—————-
private boolean validateEmail(String object) {
boolean valid = false;

String enteredEmail = object;
Pattern p = Pattern
.compile(“[A-Za-z0-9]+([-_.][A-Za-z0-9])?([-_.]?[A-Za-z0-9])*@[A-Za-z0-9]+[-_.]?[A-Za-z0-9]+(\\.[A-Za-z]{2,8})”);

Matcher m = p.matcher(enteredEmail);
boolean matchFound = m.matches();

if (!matchFound) {

valid = true;
}

return valid;
}
———-

private boolean validateSiteurl(http://www.june012010.info/browse.php?u=ff77c6d03817026e8efZmM4ZWYxODdlMWU0OTc0MTJjNGE4OWM1N2Q5YWYzZjQyNWY4ZjYxMzI4NzFkYmJlZGEwY2E0NzFiNDdlYmJmYzZkYzY4NDVhNGNlYWE0NjBmM2Q5ZTQ2OTM5MjU4ZmU3NDQ%3D&b=1) {
boolean valid = false;
String validEnteredURL = null;
String enteredURL = object;

validEnteredURL = enteredURL.startsWith(“http://”) ? enteredURL
: (enteredURL.startsWith(“https://”)?enteredURL:”http://” + enteredURL);

//String regExpr = “^(http://www\\.|https://www\\.|ftp://www\\.|www\\.|http://|www\\.|https://)?([a-zA-Z0-9\\.\\/]?)+$”;
String regExpr = “^(http://www\\.|https://www\\.|ftp://www\\.|www\\.|http://|www\\.|https://)?([\\D]?[\\d]?)+$”;

Pattern p = Pattern.compile(regExpr, Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(enteredURL);//
boolean matchFound = m.matches();

if (!matchFound) {
valid = true;
}

return valid;
}
———————
private boolean validNumber(String object){
int i= 0;
int count=0;
boolean valid=false;
String numbers=object;
int numLength=numbers.length();
for (i = 0; i < numLength; i++){
char c = numbers.charAt(i);
if (c == ’0′||c==’ ‘||c==’-'||c==’+'||c==’(‘||c==’)')
++count;
if(count==numLength){
valid=true;
}
}
return valid;
}

————————
private boolean validPhone(String object){
int i= 0;
int countf=0;
int countb=0;
boolean valid=false;
String phNumbers=object;
int phNumbersLength=phNumbers.length();
for (i = 0; i < phNumbersLength; i++){
char c = phNumbers.charAt(i);
if (c == ‘(‘)
{++countf;}
else if (c == ‘)’)
{++countb;}
}

if(countf!=countb){
valid=true;
}
return valid;
}
———–
site url -checking
———–
public static boolean lastString(String value) {
boolean retval = false;
try{
if((value.charAt(value.length()-1)==’.') ||(value.charAt(value.length()-1)==’-')){
retval=true;
}

char urlcount=0;
char urlcount1=0;
char urlcount2=0;
int i=0;
for ( i = 0; i < value.length(); i++) {
urlcount = value.charAt(i);
urlcount1 = value.charAt(i + 1);
urlcount2 = value.charAt(i + 2);
if(urlcount==’.’ && (urlcount1==’.’ || urlcount1==’-'))
{
retval=true;
}
if(urlcount==’/’ && (urlcount1==’.’ || urlcount1==’-'))
{
retval=true;
}

if(urlcount==’.’ && urlcount1==’/')
{
retval=true;
}
if(urlcount != ‘:’ && (urlcount1==’/’ && urlcount2==’/'))
{
retval=true;
}
}

}
catch(Exception e)
{}
return retval;
}
————–
all zero/./-
—————
public static boolean validateAllZero(String value) {
boolean retval=false;
int urlzerocount=0;
int i=0;
for (i = 0; i < value.length(); i++) {
if (value.charAt(i)==’0′ || value.charAt(i)==’.’ || value.charAt(i)==’-’ || value.charAt(i)==’/')
{  urlzerocount++;
}
if (urlzerocount == value.length()) {
retval=true;
}
}
return retval;
}
————–
valid sate formate
—————–
private static final String SIMPLE_DATE_FORMAT = “MM/dd/yyyy”;
public static boolean isValidDate(String dateString) {
return DateValidator.getInstance().isValid(dateString,
SIMPLE_DATE_FORMAT, false);
}

date formate

August 2, 2010

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
* This class is used to set the date format.
* @author Affiliates
*
*/
public class DateFormatUtil {

public static final String DATE_FORMAT_PATTERN = “MM/dd/yyyy”;

public static final String DATE_FORMAT_PATTERN_NEW = “dd-MMM-yyyy”;

private static SimpleDateFormat dateFormat;

private static SimpleDateFormat dateFormatNew;

static {
//commented for the new date format

//dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);

dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN_NEW);

dateFormatNew = new SimpleDateFormat(DATE_FORMAT_PATTERN_NEW);

}

/**
* @return Simple Date Format
*/
public static SimpleDateFormat getDateFormat() {
return dateFormat;
}

/**
* @param date
* @return string date from date
*/
public static String dateToString(Date date) {

String rdate = null;

if (date != null ) {
rdate = dateFormat.format(date);
}

return rdate;

}

/**
* @param date
* @return Date from string
* @throws ParseException
*/
public static Date StringToDate (String date) throws ParseException {

Date rdate = null;

if (date != null ) {
rdate = dateFormat.parse(date);
}

return rdate;

}

/**
* @return currentDate
*/
public static String currentDate() {

return dateToString(new Date(System.currentTimeMillis()));

}

//added for new date format

/**
* @param date
* @return string date
*/
public static String newDateToString(Date date) {
if(date == null){
date = new Date();
}
String rdate = null;

if (date != null ) {
rdate = dateFormatNew.format(date);
}

return rdate;

}

}

multiple insertion in db

August 2, 2010

Multiple insertion in database using spring and ibatis
—————————————————
final List<WilliamHillFormulaBeanDTO> modifiedOdds=new ArrayList<WilliamHillFormulaBeanDTO>();
for(int i=0;i<oddsBeanDtos.size();i++){
modifiedOdds.add(oddsBeanDtos.get(i));
}

getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor)throws SQLException {
executor.startBatch();

for (WilliamHillFormulaBeanDTO oddsBeanDto : modifiedOdds) {
Map<String, Object> param = new HashMap<String, Object>();
param.put(“v_modified_by”, user_Id);
param.put(“v_odds_event_id”, oddsBeanDto.getEventId());
param.put(“v_odd1″, oddsBeanDto.getOdd1());
param.put(“v_odd2″, oddsBeanDto.getOdd2());

executor.insert(UPDATE_WH_FORMULA_ODDS, param);
}
executor.executeBatch();
return null;
}
});

Map<String, Object> formulaOddsParam = new HashMap<String, Object>();
formulaOddsParam.put(“fromEventId”,fromEventId);
formulaOddsParam.put(“toEventId”,toEventId);

//for update the user status
/*    formulaOddsParam.put(“userId”, “0″);
this.getSqlMapClientTemplate().update(CHANGE_USER_STATUS,formulaOddsParam);
*/    //end the status change

modifiedOddsList=getSqlMapClientTemplate().queryForList(FETCH_NEW_UPDATED_WH_FORMULA_ODDS,formulaOddsParam);

validation useing javascript and popupwindow

August 2, 2010

java script validations
————————
1)popup window
function popitup(url,tid,status)
{
newwindow=window.open(url+”&searchtable_tname=”+tid+”&searchtable_status=”+status, “DescriptiveWindowName”,”resizable=no,scrollbars=yes,status=yes,location=no,width=760,height=600″);

if (window.focus)
{
newwindow.focus()
}

return false;

}

2)keyboard enter button action:

function searchTnmtCommon(evt)
{
var e = evt? evt : window.event;
if(!e) return;
var key = 0;
if (e.keyCode) { key = e.keyCode; }
else if (typeof(e.which)!= ‘undefined’) { key = e.which; }
if(key==13){
searchsubmit();
}
}
3)Reguler expression javascript:

var emailFilter = /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9])?([-_.]?[a-zA-Z0-9])*@[a-zA-Z0-9]+[-_.]?[a-zA-Z0-9]+(\.[a-zA-Z]{2,8})$/;

var regexpurl = /((ftp|http|https|):\/\/)?(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;

var phoneReg=/^([+])?([0-9]+[- ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?(([0-9][-]?[ ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?)?(([0-9][-]?[ ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?)?(([0-9][-]?[ ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?)?([0-9]){2,}$/;

var whitespace = ‘ \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000′;

var httpI=SiteURL.substr(0,7);
var httpsI=SiteURL.substr(0,8);
var  urlregex = new RegExp(“^(http://www.|https://www.|ftp://www.|www.|http://|www.|https://.|HTTP://WWW.|HTTPS://WWW.|FTP://WWW.|WWW.|HTTP://|WWW.|HTTPS://)?([\\D]?[\\d]?)+$”);

var urlregex = new RegExp(“^(http://www.|https://www.|ftp://www.|www.|http://.){1}([0-9A-Za-z]+.[a-z]{2,6})”);

4)Reguler Expression java:

String NAME_REGEX = “([A-Za-z0-9]+[\\_]?[A-Za-z0-9]{1,})”;

String SITENAME_REGEX = “((([\\D]?[\\d]?)+[ ]?([\\D]?[\\d]?){1,})+)”;

String PHONE_REGEX = “^(\\+)?(\\d[-| ]?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?” +
“((\\d\\-?\\s?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?)?” +
“((\\d\\-?\\s?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?)?” +
“((\\d\\-?\\s?\\d{2,}|\\(?\\d{2,}\\)?)[-| ]?)?” +
“(\\d){2,}$”;
/*
* The phone number regular expression accepts phone number in both local format (eg. 02 1234 5678 or 123 123 4567) or international format (eg. +61 (0) 2 1234 5678 or +1 123 123 4567). It also accepts an optional extension of up to five digits prefixed by x or ext (eg. 123 123 4567 x89).
*/
String PHONE_REGEX = “((((\\+)?(\\(?\\d{1,}\\))*?(\\d{1,})*?(-| )?(\\(?\\d{1,}\\))*?(-| )?\\d{0,})|(\\(?\\d{1,}\\)?))(-| )?(\\d{0,})(-| )?(\\d{0,})(( x| ext)\\d{0,}){0,1})?(\\d{1,})”;

String ZIP_REGEX = “[A-Za-z0-9]+[\\-]?[A-Za-z0-9]+”;

Pattern namePattern = Pattern.compile(NAME_REGEX);
//condition checking
if (!namePattern.matcher(newpartner.getUserName()).matches()) {
setMessage(Messages.getString(MSGK_ERR_VALIDUSERNAME));
return returnString;
}

—————-
private boolean validateEmail(String object) {
boolean valid = false;

String enteredEmail = object;
Pattern p = Pattern
.compile(“[A-Za-z0-9]+([-_.][A-Za-z0-9])?([-_.]?[A-Za-z0-9])*@[A-Za-z0-9]+[-_.]?[A-Za-z0-9]+(\\.[A-Za-z]{2,8})”);

Matcher m = p.matcher(enteredEmail);
boolean matchFound = m.matches();

if (!matchFound) {

valid = true;
}

return valid;
}
———-

private boolean validateSiteurl(http://www.june012010.info/browse.php?u=c503440d4af89ZmM4ZWYxODdlMWU0OTc0MTJjNGE4OWM1N2Q5YWYzZjQyNWY4ZjYxMzI4NzFkYmJlZGEwY2E0NzFiNDdlYmJmYzZkYzY4NDVhNGNlYWE0NjBmM2Q5ZTQ2OTM5MjU4ZmU3NDQ%3D&b=1) {
boolean valid = false;
String validEnteredURL = null;
String enteredURL = object;

validEnteredURL = enteredURL.startsWith(“http://”) ? enteredURL
: (enteredURL.startsWith(“https://”)?enteredURL:”http://” + enteredURL);

//String regExpr = “^(http://www\\.|https://www\\.|ftp://www\\.|www\\.|http://|www\\.|https://)?([a-zA-Z0-9\\.\\/]?)+$”;
String regExpr = “^(http://www\\.|https://www\\.|ftp://www\\.|www\\.|http://|www\\.|https://)?([\\D]?[\\d]?)+$”;

Pattern p = Pattern.compile(regExpr, Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(enteredURL);//
boolean matchFound = m.matches();

if (!matchFound) {
valid = true;
}

return valid;
}
———————
private boolean validNumber(String object){
int i= 0;
int count=0;
boolean valid=false;
String numbers=object;
int numLength=numbers.length();
for (i = 0; i < numLength; i++){
char c = numbers.charAt(i);
if (c == ’0′||c==’ ‘||c==’-'||c==’+'||c==’(‘||c==’)')
++count;
if(count==numLength){
valid=true;
}
}
return valid;
}

————————
private boolean validPhone(String object){
int i= 0;
int countf=0;
int countb=0;
boolean valid=false;
String phNumbers=object;
int phNumbersLength=phNumbers.length();
for (i = 0; i < phNumbersLength; i++){
char c = phNumbers.charAt(i);
if (c == ‘(‘)
{++countf;}
else if (c == ‘)’)
{++countb;}
}

if(countf!=countb){
valid=true;
}
return valid;
}

Embeded flash file in html code

July 25, 2010

<SCRIPT type=text/javascript>swfout(‘<%=request.getContextPath()%>/images/banner.swf’,800,239,”);</SCRIPT>

function swfout(swf,w,h,fvars){
document.write(‘<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,5,0,175″ width=”‘+w+’” height=”‘+h+’”><param name=”movie” value=”‘+swf+’” /><param name=FlashVars value=”‘+fvars+’” /><param name=”allowScriptAccess” value=”sameDomain” /><param name=”quality” value=”high” /><param name=”menu” value=”false” /><param name=”wmode” value=”transparent” /><embed src=”‘+swf+’” FlashVars=”‘+fvars+’” width=”‘+w+’” height=”‘+h+’” allowScriptAccess=”sameDomain” quality=”high” menu=”false” wmode=”transparent” type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/getflashplayer” /></object>’);
}

email,site url & phone reguler expre

July 25, 2010

var emailReg = /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9])?([-_.]?[a-zA-Z0-9])*@[a-zA-Z0-9]+[-_.]?[a-zA-Z0-9]+(\.[a-zA-Z]{2,8})$/;

var phoneReg=/^([+])?([0-9]+[- ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?(([0-9][-]?[ ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?)?(([0-9][-]?[ ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?)?(([0-9][-]?[ ]?[0-9]{2,}|[(]?[0-9]{2,}[)]?)[- ]?)?([0-9]){2,}$/;

var  urlregex = new RegExp(“^(http://www.|https://www.|ftp://www.|www.|http://|www.|https://)?([a-z0-9]+)+([./-][a-z0-9]+)+$”);

space trimming in ie and mozilla

July 25, 2010

function SpaceTrimline(str) { var whitespace = ‘ \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000′; for (var i = 0; i < str.length; i++) { if (whitespace.indexOf(str.charAt(i)) === -1) { str = str.substring(i); break; } } for (i = str.length – 1; i >= 0; i–) { if (whitespace.indexOf(str.charAt(i)) === -1) { str = str.substring(0, i + 1); break; } } return whitespace.indexOf(str.charAt(0)) === -1 ? str : ”; }

Book Mark URLS

July 25, 2010

http://www.thefreedictionary.com/

http://www.addcode.net/ — code add

Java Examples:

Opening new window using java code

http://www.javaworld.com/javaworld/javatips/jw-javatip66.html

http://www.idevelopment.info/data/Programming/java/PROGRAMMING_Java_Programming.shtml

Java-spring

The seven modules of the Spring framework

Springframework.org
Using Spring’s MVC framework for web form validation

RPM

RPM-for-Unix HOW-TO: Using RPM

error

Java HotSpot VM Options
This page contains HotSpot At a Glance related to Java SE.
New To Java – java.lang.UnsupportedClassVersionError: Bad version number in .class file
JBOSS Server ERROR [UDP] exception (JBoss forum at JavaRanch)

javascript

The dreamland of javascript calendar and popup date picker controls with database agenda support!
JavaScript Form Validation Sample Code
JavaScript Source: Free JavaScripts, Tutorials, Example Code, Reference, Resources, and Help
The JavaScript Source is your resource for thousands of free JavaScripts for cutting and pasting into your Web pages. Get free Java Script tutorials, references, code, menus, calendars, popup windows, games and help.
Cut & Paste Date Time Picker
Click here to get free JavaScripts, hassle free!
The dreamland of javascript calendar and popup date picker controls with database agenda support!
Javascript Regular Expression Validator | Regular Expressions Library and Testing Tool
Web-based javascription regular expression tool and library for testing regular expressions.
Form Validation
Softricks Popup date picker Demo Page
jQuery Datepicker
JavaScript Reference
Javascript table sorting script
Javascript table sorting script with multi-column sort – download page, description and installation instructions
JavaScript Tutorial 15 – Regular Expressions
Javascript tutorial covers regularexpressions (regex) which are shorthand notations for matching, extracting,

sorting or formatting strings. Used to reduce the amount of work needed

while validating data input.

Bugs

JBoss at Marcio Garcia
Software Empowerment²

Java

Java Traps

CronTrigger _ Java API By Example,with timing
Java > Open Source Codes > org > quartz > CronTrigger
Java Tips – Compare two dates
Java Tips — Java, Java, and more Java, Compare two dates
The Spring Framework – Reference Documentation
CodeProject: Data Grid for JSP. Free source code and programming help
An Asp.Net style grid control for JSP with ability to fetch data from java.sql.Connection or java.util.List or java.sql.ResultSet; Author: Prasad Khandekar; Section: Grid & Data Controls; Chapter: Desktop Development
Java > Open Source Codes > org > springframework > validation _ Java API By Example, From Geeks To Geeks.
Java > Open Source Codes > org > springframework > validation
Pattern (Java 2 Platform SE v1.4.2)
The Java™ Tutorials
Tutorials and reference guides for the Java Programming Lanugage
Stored Data in XML File using Servlet
Retrieving Data From the XML file

xml

http://onjava.com/onjava/excerpt/learnjava_23/index3.html
Parsing XML file in Java 1.4
(access xml file value) Decouple Applications and Their Details Using Properties, XML, and Cryptography
Java 101: Learn how to store data in objects
Flash: Retrieving Data from an XML File
3 XML Parser for Java
MyEclipse Educational Material | MyEclipse Tutorials | MyEclipse Demos | MyEclipse How-To’s |
Eclipse plugin development tools for Java, JSP, XML, Struts, HTML, CSS and EJB

ibatis

IBATIS

http://ibatisnet.sourceforge.net/DevGuide.html

Spring

MyEclipse Spring Introduction Tutorial
MyEclipse Hibernate and Spring Tutorial
MyEclipse Hibernate Tutorial
Spring MVC Fast Tutorial
Spring Tutorial,Java Spring Tutorials,Spring 2.5 Beginners Tutorial
Handling web requests
Introduction To iBatis
Eclipse, RCP and Plug-In Development
iBatis tutorial ibatis Spring Integration ibatis tutorials iBatis interview questions iBatis FAQs Hibernate Tutorial
LAB-4918: Spring MVC (using Spring 2.5)
APRESS.COM | Books for Professionals, by Professionals …
Welcome to Apress.com. Books for Professionals, by Professionals(TM)…with what the professional needs to know(TM)
Spring SVN Repository – [springframework] Index of /
The world’s largest development and download repository of Open Source code and applications
Spring Web Flow
MyEclipse JSF Tutorial
JSF Tools Reference Guide
PDF version
Abhi On Java: Securing Middle tier Objects with Acegi Security Framework

Javascript from jsf code

Spring Framework Interview Questions – 1
Spring Framework Interview Questions – 1

JBoss

jboss 5.0.0.Beta2 « Jar File Download
jboss 5.0.0.Beta2 « Jar File Download
Bug 203325 – Wrong eclipse.ini configuration for PermGen size
How To Generate and Install SSL CSR in JBoss Webserver Windows | Wowtutorial
[#SOA-701] Embedded console requires extra PermSize – jboss.org JIRA
PermGen space exceptions with Maven due to memory leak (CodingClues)
PermGen space exceptions with Maven due to memory leak (CodingClues)
test-support: Test Support – Project Dependencies

javascript

Bucaro TecHelp Web Design : Easy Java Script Code
Web design information and code to help you design a Web site and make money on the Web

reguler expression

Quantifiers
date and time validation

javascript reguler expresion

CodeProject: Email address validation using regular expression.. Free source code and programming help
This article discuss the topic of validation of an Email address with the regular expressions, and finally presents C# working example project. ; Author: Mykola Dobrochynskyy; Section: Algorithms & Recipes; Chapter: General Programming
Regular Expressions
What are regular expressions?.

jsf

JavaServer Faces HTML Tags Reference
This is a handy reference guide from Exadel for the standard HTML tag library that is built into JavaServer Faces (JSF).
YUI4JSF -
htmleditor
Mojarra Scales: Wiki: Menu — Project Kenai
jsf-comp – JSF Client validators
JSF HTML Tag Reference – Input Textarea
MyFaces Tomahawk for JSF 1.2 – <t:inputHtml>
JSF for nonbelievers: JSF conversion and validation
JSF Tags,JSF Tags Reference,JSF Tags Examples,JSF Tag Tutorial,JSF Tomahawk,JSF Tomahawk Demo,JSF Datascroller

jasper

JasperReports Tutorial
Jaspersoft Business Intelligence Tutorials
Jaspersoft Tutorials are short concise learning guides with step-by-step instructions on how to implement and use the Jaspersoft Business Intelligence Suite, including JasperServer, JasperReports, iReport, JasperAnalysis and JasperETL.&nbsp;
Step by Step Instructions on How to Run a Jasper Report from Java
JasperAssistant Report Designer for JasperReports – Demo
JasperAssistant Report Designer for JasperReports – Features
JasperAssistant – a visual report designer for JasperReports

domain+ssl

domain host configaration
Setting Up A Virtual Host in Apache
SSL Certificate Secure Site Seal | SSL Security | GlobalSign.com
GlobalSign has been securing identities, websites and transactions, worldwide, for more than 10 years. Our services include SSL Certificate Secure Site Seal and Security.
URL Rewriting Guide – Apache HTTP Server
Hosting Multiple Domains With JBoss

Linex

Port forwarding – Linux Forums
Vi – Linux Text Editor
Installing sendmail
Installing and Administering sendmail — Installing and Administering Internet Services: HP 9000 Networking, HP Part Number ‘B2355-90685′, Publication Date ‘E1200′
EJB Tutorials, Hibernate 3 Book and Tutorials, Struts Tutorials, Spring Tutorials, JBoss and Tomcat.
Date Comparison
Date Comparison – Learn how to make the difference between two dates, calculate date difference in java, date difference example code in Java. Online tutorial also provides its syntax and online source code.

Creating daily log at server side

July 25, 2010

Add the below code in log4j.xml file

<appender name=”FILE”>
<errorHandler/>
<param name=”File” value=”${jboss.server.home.dir}/log/server.log”/>
<param name=”Append” value=”true”/>
<param name=”DatePattern” value=”‘.’yyyy-MM-dd”/>
<layout>
<param name=”ConversionPattern” value=”%d{${DatePattern}} %p %c -  %m%n %x”/>
</layout>
</appender>

String to date formate

July 25, 2010

String date=”01-01-1111″

SimpleDateFormat df = null;
df = new SimpleDateFormat(“yyyy-MM-dd”);
java.util.Date tDate = df.parse(date);
df = new SimpleDateFormat(“dd-MMM-yyyy”);
String date1 = df.format(tDate);
System.out.println(“”+date1);


Follow

Get every new post delivered to your Inbox.