View RSS Feed

All Blog Entries

  1. How to get e-mail with Java

    by , 02-29-2012 at 03:39 PM
    In the article “How to send e-mail with Java”, you are familiar with the JavaMail API on sending e-mail messages from a SMTP server. What about receiving e-mail messages? Well, that is the topic of this article. We will study how the JavaMail API exposes classes and interfaces for retrieving e-mail messages from a server, to write a utility class that checks for new messages in inbox of an e-mail account from Gmail server.

    Protocols for receiving e-mail

    There are two ...
    Categories
    Mail API
  2. How to send e-mail with Java

    by , 02-29-2012 at 03:05 PM
    Sending an e-mail is a trivial task in the information world today. Billions of e-mails are sent everyday on the earth. For those who are Java developers, the ability to send e-mail from within a Java program is trivial also. However the standard Java platform does not include any e-mail functionality by default. Instead, developers have to use a separate library for the e-mail things, it is the JavaMail API. This article will guide you on how to write an email utility to send an e-mail out with ...
    Tags: java, javamail, mail, send Add / Edit Tags
    Categories
    Mail API
  3. Working with SVN in Eclipse

    by , 02-29-2012 at 11:26 AM
    In a team work environment, using a version control system has been becoming standard approach to foster collaboration among team members, increase productivity, centralize resources management, reduce risks and development time…Subversion (SVN) is a version control system which is very popular and widely used in software development, and Subclipse is an Eclipse plug-in that supports Subversion within the Eclipses IDE. Subclipse has been widely used to develop Java projects in Eclipse IDE for team-oriented ...
  4. How to use properties file in Java

    by , 02-29-2012 at 09:57 AM
    Software programs may need to store its settings or configuration in a file on disk, such as database connection settings or user preferences. In Java, it is possible to use some classes in the java.io package such as FileReader and FileWriter to read/write the configuration file. However, that approach is tedious and error-prone, because it requires writing a lot of code from scratch. Fortunately, the Java platform provides an out-of-the-box utility class which is designed specifically for that ...
    Categories
    Properties
  5. How to work zip files in Java

    by , 02-29-2012 at 08:59 AM
    he Java platform provides powerful API to work with the most popular compressed file format – zip format. This article will show you how to write code to compress and decompress zip files using Java. And beyond the basics, the code that works with multiple files in a directory recursively is also provided.

    The Zip API

    The package java.util.zip provides classes for working with zip file format. Although the documentation states that the package also provides classes ...
    Tags: file, java, zip Add / Edit Tags
    Categories
    Zip
  6. How to use JTree in Java

    by , 02-29-2012 at 06:14 AM
    JTree is a Swing component that displays hierarchical data in a tree structure. The screen-shot below depicts a tree component:

    Name:  sample tree.png
Views: 6975
Size:  12.3 KB
    Figure: A tree component in Java

    This article will focus on how to implement such a tree component in Java, by walking through basic concepts to develop an interesting sample application.

    Fundamental concepts about Tree component

    • Node: A tree displays data vertically in rows,
    ...
    Tags: java, jtree, swing Add / Edit Tags
    Categories
    Tree
  7. Writing String array into text files

    by , 02-28-2012 at 02:52 PM
    Hai,
    I want the java code to write a string array into a text file...
    Categories
    Uncategorized
  8. Using Random class to generate two numbers

    by , 02-27-2012 at 10:42 PM
    Guys can you please help me out here, I'm using JOptionPane to receive two values from the user I then use these values as a range for my random generator. I then ask the user what's the answer based on a question randomly generated, but since I'm asking a division question how can I make sure that the first value is always bigger than the second?

    Random rand = new Random();
    it val1 = 0;
    it val2 = 0;
    it start = Integer.parseInt(JOptionPane.showInputDialog("enter ...
    Tags: java Add / Edit Tags
    Categories
    Uncategorized
  9. How to generate POPUPS From server

    by , 02-27-2012 at 01:49 PM
    Hi sir,

    I have been working with one application i dont know whats best and how to begin it please help me with it.

    Problem statement: I have a application it's a attendence application for teachers. Every person needs to submit the week's attendence
    by tueseday. few people are forgetting it. I have all the people list who have not submitted attendence by tueseday morning everyweek.
    the IP addresses of them. Now
    (1).I want to write a program which ...
    Categories
    Uncategorized
  10. Apache JMeter Features

    by , 02-25-2012 at 07:48 PM
    Following features are provided by the Apache JMeter.It might test different server types:
    1. Web – HTTP & HTTPS
    2. JMS
    3. Database through JDBC
    4. SOAP
    5. LDAP
    6. Mail - POP3(S) & IMAP(S)
    • 100% Java purity & complete portability.
    • Concurrent sampling is allowed by the full multithreading framework, by various threads or simultaneous sampling of functions by the help of separated thread groups.
    • Precise timings and fast operations
    ...
    Categories
    Apache JMeter
  11. Apache JMeter

    by , 02-25-2012 at 07:46 PM
    The Apache JMeter,being a desktop application has been designed in a way that it helps to load test client or server software. It is purely one hundred percent Java desktop application. Performance of the given could be tested by it.

    • Static files
    • CGI scripts
    • Java objects
    • FTP servers
    • Java Servlets
    • Databases

    JMeter is used in load testing simulation of a network, object or a server.
    Test scripts are also created by ...
    Categories
    Apache JMeter
  12. Overview of the Struts Framework

    by , 02-25-2012 at 07:45 PM
    Struts framework has been organized in twelve “top leveled packages”. It consists of three hundred interfaces and classes. Interfaces as well as classes are provided by struts framework to work along with controller or presentation, with custom tag libraries support.

    The Struts view is detailed here:

    • The Struts Controller Components: All user requests are handled by the Struts Action Servlet. A request is been received, URL is interpreted and Configuration files
    ...
    Categories
    Apache Struts
  13. Struts1 vs Struts2

    by , 02-25-2012 at 07:43 PM
    • Struts1 extends the abstract base class by its action class. The problem with struts1 is that it uses the abstract classes rather than interfaces.
    • While in Struts 2, an Action class implements an Action interface, along with other interfaces use optional and custom services. Struts 2 provides a base ActionSupport class that implements commonly used interfaces. Although an Action interface is notnecessary, any POJO object along with an execute signature can be used as an Struts 2 Action object.
    • Struts
    ...
  14. Struts2 features

    by , 02-25-2012 at 07:38 PM
    • Simple POJO based Actions
    • Thread Safe
    • Simplified testability
    • AJAX Support
    • jQuery Plugin
    • AJAX Client Side Validation
    • Dojo Plugin (deprecated)
    • Template Support
    • Easily extended with Plugins
    • Result types are supported
    • REST Plugin (Extension-less URLs, REST based Actions)
    • Spring Plugin (Dependency Injection)
    • JFreechart Plugin (Charts)
    • Rome Plugin (RSS Feeds)
    • Convention Plugin (Action Configuration through Annotations & Conventions)
    • Hibernate Plugin
    • jQuery Plugin
    ...
    Categories
    Apache Struts
  15. Apache Struts Design goals and overview

    by , 02-25-2012 at 07:36 PM
    By using web form in a typical or standard Java EE web application, information gets submitted to the server. Information is then sent on to the Java Servlet, which will be performing:

    • Information Processing
    • Interaction with a database
    • HTML formatted response is produced.

    This information could also be passed on to a JSP that brings out the similar results. For larger projects, they are not suitable and it becomes tough to do the separation of the ...
    Categories
    Apache Struts
  16. Apache Struts

    by , 02-25-2012 at 07:34 PM
    Apache Struts are used for development of the web based application, being an open sourced framework. It is free.

    Web based applications are entirely different as compared to the typical sites because the web applications make dynamic responses for request. They are dynamic in their nature and may interact with business logic engines and databases for customizations of responses.
    Web applications are based at:

    • Java Server Pages
    • Page design code ...
    Categories
    Apache Struts
  17. What is Tapestry 5?

    by , 02-24-2012 at 07:44 PM
    • Pure Java and Polyglot: It is written in Java language. Components and pages can be coded in Scala or Java Groovy.
    • Convention over Configuration: “Endless” XML configuration files are of no more use. Meta-programming & Dependency injection via naming conventions and annotations.
    • Highly productive: Live class reloading is the time b/w an error observations and fixing it in seconds.
    • Scalable: On a single server, it Scales up big. Also, it works good in a cluster.
    • Advanced Exception
    ...
  18. Apache Tapestry

    by , 02-24-2012 at 07:43 PM
    For Java web applications, Apache Tapestry is open source & component oriented framework for implementations of the applications according to the model view controller pattern, or architectural pattern. Basic focus of the Apache Tapestry is at easy usage and productivity of the developer. Following is being offered by it.

    • Focuses at the developer productivity.
    • Modular approaches for the web development
    • Focuses at easy usage.
    • XML configurations elimination. ...
    Categories
    Apache Tapestry
  19. Apache Velocity Uses

    by , 02-24-2012 at 07:42 PM
    Apache Velocity is used by various common application types, which are as following.
    • Web applications: HTML pages are created by the Web designers for dynamic information, with placeholders. Frameworks that support velocity or the VelocityViewServlet process the page.
    • Source code generation: Based at templates SQL, Java source code or PostScript are generated by the Velocity. Velocity is used by various commercial development software packages and open source.
    • Automatic emails:
    ...
  20. Apache Velocity

    by , 02-24-2012 at 07:41 PM
    Different technological combinations make an Apache Velocity. Template engine is the Apache velocity’s central component. Heavily adopted template engine is the Apache Velocity in Java industry. It is used widely by the Programmers.

    Template engine’s overview would be discussed in this post.

    A model is transformed to a resultant artifact by template engine, by using instructions which are referred as a template. Major components present are:

    1. Model ...
    Categories
    Apache Velocity
  21. Why should I use Apache POI?

    by , 02-24-2012 at 07:40 PM
    Clients of Apache POI API are index builders, content management system, web spiders and many other text extraction applications. Apache POI is used by these applications excessively so that to do the manipulation of their operations.

    Question arises that why one shall use POIFS, XSSF and HSSF?

    Answers to these questions are as following.

    • You can use POIFS in case your documents have been written in format OLE2. It makes you read the documents that
    ...
    Tags: apache poi Add / Edit Tags
    Categories
    Apache POI
  22. Apache POI Architecture

    by , 02-24-2012 at 07:38 PM
    Apache POI project consist of the following components.

    • Poor Obfuscation Implementation File System (POIFS): It is involved in writing and reading the format of the MS OLE 2 Compound document. All MS Office files are basically OLE files and this component is POI element’s basic building block. POIFS assist to read variety of files.
    • Horrible SpreadSheet Format (HSSF): Microsoft Excel (XLS) format file are read and written by it. Files could be read by it which is being written
    ...
    Categories
    Apache POI
  23. Apache POI

    by , 02-24-2012 at 07:37 PM
    Apache POI is apache project which provides the access of MS format files to Java APIs. POI means Poor Obfuscation Implementation. It is a great API for MS document format access. Java programmers find it to be a best solution. APIs are present in POI to manipulate different formats of files which are based at the MS OLE 2 Compound Document, using pure Java. By using Java, you can write/read MS Excel files. A spreadsheet could also be created through Cocoon serializer.
    HSSF is the pure Java ...
    Tags: apache poi Add / Edit Tags
    Categories
    Apache POI
  24. Why Tomcat?

    by , 02-24-2012 at 07:36 PM
    In market, various application servers are present. To make a choice b/w them is a tough task. B/w them, Tomcat is one of the best choice. Tomcat offers these features which make it different from other competing solutions.

    • Light and Fast: Tomcat is a highly optimized and light weighted servlet container. While it servers JSPs, everything is outperformed which includes open source based projects like JBoss and Geronimo.
    • Scalable and Flexible - Tomcat is preferred by the developers
    ...
    Tags: why tomcat? Add / Edit Tags
    Categories
    Apache Tomcat
  25. Apache Tomcat

    by , 02-24-2012 at 07:35 PM
    Apache Tomcat is considered to be open sourced “software implementation” of the JavaServer Pages technologies & Java Servlet. Java community process is involved in development of JavaServer Pages & Java Servlets.

    Apache Tomcat gets developed in open participatory environment. This is released in Apache License version 2. Best of breed developers worldwide are collaborated to create it. You can take an active part in this development project.

    Mission critical ...
    Categories
    Apache Tomcat
  26. Log4J Logging Exceptions

    by , 02-24-2012 at 07:27 PM
    Usually it has been seen that user don’t stay bound to follow the rules. Therefore it is general rule to deal, with exceptions. Different exceptions would be discussed in this post which are based upon those boundaries which are crossed by them.
    • External Boundaries /Expected Exceptions: Example of this exception is FileNotFoundException. API boundries are crossed by it and gets exposed to users. Such kind of exceptions are enlisted in clause “throws”.They shall be handled with proper
    ...
    Categories
    Commons Lang
  27. Log4J Message Priorities/Levels

    by , 02-24-2012 at 07:26 PM
    Levels and priorities for the messages are supported by logging. Content severity shall be made sure. Use these guidelines to describe the messages severity.

    • fatal – Severe kind of errors which would result into premature termination. Expect them to be visible instantly at the status console. Internationalization shall also be seen.
    • error - Other unexpected conditions or runtime errors. Expect them to be visible immediately at the status console.
    • warn - Depreciated APIs usage,
    ...
  28. Jars Included in the Standard Log4J Distribution

    by , 02-24-2012 at 07:24 PM
    Standard distribution includes these jars.
    • commons-logging.jar: Following are included in the commons-logging.jar


    o Java commons logging API
    o For Log4J, thin wrapper Log implementations
    o LogFactory implementations

    • commons-logging-api.jar: Java Commons Logging API, built-in Log simpleLog implementations & LogFactory implementation are included.


    • Commons-logging-adapters.jar: Adapters are included in it to 3rd part log
    ...
    Tags: log4j jars Add / Edit Tags
    Categories
    Commons Lang
  29. Jars Included in the Standard Log4J Distribution

    by , 02-24-2012 at 07:23 PM
    Standard distribution includes these jars.
    • commons-logging.jar: Following are included in the commons-logging.jar


    o Java commons logging API
    o For Log4J, thin wrapper Log implementations
    o LogFactory implementations

    • commons-logging-api.jar: Java Commons Logging API, built-in Log simpleLog implementations & LogFactory implementation are included.


    • Commons-logging-adapters.jar: Adapters are included in it to 3rd part log
    ...
    Tags: log4j jars Add / Edit Tags
    Categories
    Uncategorized
  30. Logging a Message

    by , 02-24-2012 at 07:21 PM
    To a logger, all messages get logged. Such messages logging is dependent at the methods which correspond to the priority. The interface org.apache.commons.logging.Log details these methods to be used for writing log.
    Java Code:
        log.fatal(Object message);
        log.fatal(Object message, Throwable t);
        log.error(Object message);
        log.error(Object message, Throwable t);
        log.warn(Object message);
        log.warn(Object message, Throwable t);
    ...
    Categories
    Commons Lang
Page 20 of 48 FirstFirst ... 10181920212230 ... LastLast