Monthly Archives: May 2011

ADF

Advertisements

Posted in ADF | Leave a comment

Use Timer to schedule periodic tasks

The java.util.Timer and java.util.TimerTask classes can be used for many simple thread related tasks. Use them to perform an action either periodically or just once. As well, the first execution can be delayed to a specific time in the future. … Continue reading

Posted in java | Tagged , | Leave a comment

Abstract Factory Design Pattern

1-This pattern is one level of abstraction higher than factory pattern. 2-the abstract factory returns the factory of classes. Like Factory pattern returned one of the several sub-classes, this returns such factory which later will return one of the sub-classes. … Continue reading

Posted in Design Patterns, java | Tagged | Leave a comment

Factory Design Pattern

if we have a super class and n sub-classes, and based on data provided, we have to return the object of one of the sub-classes, we use a factory pattern. Example: Let’s suppose an application asks for entering the name … Continue reading

Posted in Design Patterns, java | Tagged | Leave a comment

How To Use Command Line Arguments in Eclipse

Detailed Instructions for Command Line Arguments in Eclipse Example: Welcome.java run->run configuration->java application->your project main ->Arguments->set  u arguments Basically, it’s simple. Click on Run -> Run (not Run Last Launched).In the window shown below, notice that the Welcome Java application … Continue reading

Posted in java | Tagged , | Leave a comment

List category posts wordpress plugin

About: List Category Posts is a simple WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode. It accepts a category name or id, the order in which you want the posts … Continue reading

Posted in wordpress | Leave a comment

How to add error page

just add this in web.xml <error-page> <error-code>404</error-code> <location>/resourceNotFound.jsp</location> </error-page> <error-page> <error-code>500</error-code> <location>/errorPage.jsp</location> </error-page>

Posted in java | Leave a comment