Thursday, April 16, 2009

Found good site for java developers

http://seguide.blogspot.com/

Monday, July 7, 2008

Struts 1.2 validator framework tutorial

Hey guys I search for this topic but i couln't find a simple tutorial for this topic.

so i thought to post what i know on this...

i recomend u to practice Struts basics tutorial on before this Netbeans official site.

1. new project>web>web application
2.struts1.2.9
3.new JSP>anyname
i named mine as 'sampleJSP.jsp'














4.add html taglib
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h" %>

5. Add a form tag to JSP using tag lib
< action=" " onsubmit=" ">
< property="name">
< value="OK">
< / html:form>
6.Create New StrutsActionForm
*important: superclass should be org.apache.struts.validator.ValidatorForm

7. Make getters and setters for text field in JSP

(if u create a propety called 'name' you dont need to do this, bcoz
Netbeans defaultly create for String 'name and int 'number'
8.Create New StrutsAction
*important: Action path should be same as JSP forms action
(the Action path you give here can give in JSP)

9.edit validation.xml

< name="NameForm">
< property="name" depends="required">
< key="NameForm.name">
< /field>

< /form>

10.add 'NameForm.name' to properties file

11.Add these to JSP page
< formname="NameForm">
< /head>

< action="name" onsubmit="return validatenameForm(this);">

12. Add Server side validation to work in browsers where javascript doesn't work

< html:errors/>


Final view of sampleJSP...

12. Now run your application

try it and comment plz...

Monday, April 7, 2008

"Shared Library" functionality in NetBeans 6.1 beta

In new NetBeans 6.1-beta When creating a project you now get the offer to enable "sharable

libraries".
When enabling this feature you are asked to specify the location where the libraries should be

saved. By default it will suggest ..\libraries, which is a bit strange considering that it is

outside the project folder.

NetBeans Day 2008

NetBeans Day San Francisco 2008 at the CommunityOne Conference

Monday, May 5, 2008
9:30 am - 6:00 pm
Moscone Center,


San Francisco, California
Register now

Wednesday, April 2, 2008

Little NetBeans IDE 6.1 Beta



The NetBeans IDE is a modular, standards-based, integrated development environment (IDE) written in the Java programming language. The NetBeans project consists of an open source IDE and an application platform, which can be used as a generic framework to build any kind of application.

Noticed Favorite Features....

* JavaScript;

o Semantic Highlighting

o Code Completion and Type Analysis
tutorial on official site

* Performance Enhancements;

o Up to 40% faster startup


* New MySQL Support in Database Explorer

o Register MySQL servers

o View, create, and delete databases

o Easy launch of the administration tool for MySQL

* Java Beans;

o Bean Patterns in Navigator

o Generate Bean Property

o BeanInfo Editor

Thursday, March 6, 2008

Setting up a JDBC Connection Pool

In order to specify how the web server allows an application to communicate with the database, we need to set up a database connection pool. A database connection pool is basically a group of reusable connections that a server maintains for a specific database. Web applications requesting a connection to a database obtain that connection from the pool. When an application closes a connection, the connection is returned to the pool.

In order to set up a connection pool on the server, a JDBC resource (also called a data source) must first be created. A JDBC resource provides applications with a connection to a database. Depending on whether you're using Tomcat or SJSAS, do the following:


see more here

How to RENAME a Java package...

if the 'package' statement at the top needs to change..


1.Projects > Source Packages > (Expand)
2.Right-click > Refactor > Rename
3.window
new name-new package name
comments
4.Next > Refactor