Wednesday, June 08, 2005

Quick Struts

This is Part 1 of the article.

A. Assumptions -
1. This article is meant for Java programmers wanting to try out the Struts Framework. There are many good books available on Struts like Programming Jakarta Struts, Second Edition by Chuck Cavaness and you must be aware of the theory behind Struts. This article is a no-nonsense, hands-on guide to get you started with Struts. The application is quite trivial, as I would like to concentrate on the Struts aspect. Undoubtedly, some aspects of what I write here could be improved upon, but that's not important right now.

2. You would be using this application on a Windows 2000/XP operating system. I have tested the application on Windows XP.

3. You have installed, configured and set the various environment variables for the following software on your PC.

a. J2SE 5.0
b. JBoss Application Server Ver 4.0.2
c. Struts Ver 1.2.7 Framework
d. mySQL Ver 4.0.24 open source database
e. mySQL Connector/J Ver 3.1.8 open source JDBC driver for the above database
f. Apache ANT Ver 1.6.5 open source automated build tool
g. Jakarta Standard Taglib (JSTL) Ver 1.1

B. The Application
Upon starting the application, the user is presented with a simple screen with two fields -

Login ID
Password

and a Submit button.

C. Tables
We just have one table called login created in mySQL. It has three fields: loginID (primary), name, password - all varchar fields. You can enter some records in this table.

Part 2 of this article will follow soon.
For those who have a problem with the installation and settings or have any other question/suggestions, please post a comment on this blog with full details.
Technorati Tags: , ,
Blogs linking to this article

4 Comments:

Blogger Adaptive Software said...

I had created a short course on Struts called Pre-Struts for some clients. It dealt with the philosophy and design of Struts. I started with an explanation of the MVC design pattern, then designed a controller that could be used with a specific application. Then the drawbacks of the controller were pointed out, and ech drawback was ellimnated. As we elliminated each drawback, we had a design which was the Struts class design. This way they understood why Struts was designed the way it was and exactly what role each class played in the overall architecture.
Such an introduction may add value to your article.

Parag

12:17 PM  
Blogger SatishTalim said...

Parag, I have emailed you and waiting for the article.

8:15 PM  
Blogger swapnil said...

sir,
what is the difference between arraylist and vector?
dose they have some default size?

8:08 PM  
Blogger SatishTalim said...

Swapnil, this has been discussed in many forums. Here are some urls you can check out -
http://www.javaworld.com/javaworld/javaqa/2001-06/03-qa-0622-vector.html
http://forum.java.sun.com/thread.jspa?threadID=572344&start=0
http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.html

Hope this helps.

7:26 AM  

Post a Comment

Links to this post:

Create a Link

<< Home