View RSS Feed

All Blog Entries

  1. Struts Action Class

    by , 11-15-2011 at 07:39 PM (My Java Tips)
    In this article let us see how to use Struts Action Class and forward a jsp file through it.



    Introduction

    An Action class in the struts application extends Struts 'org.apache.struts.action.Action" Class. Action class acts as wrapper around the business logic and provides an interface to the application's Model layer. It acts as glue between the View and Model layer. It also transfers the data from the view layer to the specific business process layer and ...
  2. Sending files from Servlet

    by , 11-15-2011 at 07:35 PM (My Java Tips)
    In this post, I will present an example which will show how to move the selected file (drop down menu) form a servlet to another servlet which performs operations on the file.


    I have created 3 Javafiles namely:

    - HelloServlet(Servlet)
    - GetImg (Servlet)
    - ImgCompare (simpleJava class)

    HelloServlet contains a HTML form that has a dropdown menu. Menu contains 2 JPG files. You should have following images at the given path:

    C:\image1.jpg ...
    Categories
    Java EE
  3. Java Generics with legacy code

    by , 11-15-2011 at 07:31 PM (My Java Tips)
    In this post, I will write about how Java generics help us in using legacy code.


    Generics are new in Java and now developers understand the importance of it and it is being used as required. Question arises, what about the legacy code? Consider an IT firm that is working on an application for 5 years, and they used Java 1.4 for development. They the plan to use 1.5 for development simply because it is better than 1.4. Are they supposed to convert the old code to 1.5 also? This is ...
  4. Using tags in Struts

    by , 11-15-2011 at 07:26 PM (My Java Tips)
    Web applications differ from conventional websites in that web applications can create a dynamic response. To make it easier to reference dynamic data from a page, the Struts framework offers a set of tags. Some of the tags mimic standard HTML tag while providing added value. Other tags create non-standard, but useful controls. While HTML provides a simple a tag for creating hyperlinks, the HTML tag often requires us to include redundant information. Also the HTML tag cannot easily access dynamic ...
    Categories
    Struts
  5. Struts”Hello World”

    by , 11-15-2011 at 07:15 PM (My Java Tips)
    Lets make a HelloWorld example using Struts.


    Suppose you want to create a simple "Hello World" example that displays a welcome message. To create a "Hello World" example, you need to do three things:

    1. Create a server page HelloWorld.jsp to present the messages

    Java Code:
    <%@ taglib prefix="s" uri="/struts-tags" %>
    <h2><s:property value="message"></s:property></h2>
    ...

    Updated 11-15-2011 at 07:21 PM by Java Tip

    Categories
    Struts
  6. Setup a Struts 2 application

    by , 11-15-2011 at 07:08 PM (My Java Tips)
    in this post, I will write about how to setup a Struts 2 application from scratch. This will be interesting for the developer who are using Struts for the very first time.


    Download the latest struts framework from the http://struts.apache.org. To get started with a new application you can setup a web infrastructure from scratch.

    Setup the Web Application File Structure as follows within webapps folder. (This tutorial assumes that you are using Apache Tomcat as a web ...
  7. Apache Struts

    by , 11-15-2011 at 07:03 PM (My Java Tips)
    Apache Struts is a free open-source framework for creating Java web applications. In this post, I will write about Apache Struts.


    In a standard Java EE web application, the client will typically submit information to the server via a web form. The information is then either handed over to a Java Servlet which processes it, interacts with a database and produces an HTML-formatted response, or it is given to a JavaServer Pages (JSP) document which intermingles HTML and Java code to ...
Page 36 of 48 FirstFirst ... 26343536373846 ... LastLast