The directories and files of a Struts application

By: Gokul Verma Emailed: 1608 times Printed: 2079 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

You'll need to know the directory structure of a Struts application, and what's put in the directories. The "struts-blank" application is well-suited for this presentation, since it contains a minimum number of files:

The Struts directory structure - 

File or Directory name

Purpose

META-INF

Contains meta information. Used by utilities etc.

WEB-INF/classes

This is where you place you own Java classes.

WEB-INF/classes/ApplicationResources.properties

Contains the messages (fixed texts) of the application. Error messages are also put here.

WEB-INF/lib/struts.jar

Contains the Struts servlet, helper classes, taglib code etc.

WEB-INF/*.tld

The Struts tag libraries.

WEB-INF/struts-config.xml

A Struts configuration file. More on this later.

WEB-INF/web.xml

The usual configuration file for the servlet container. More on this later.

index.jsp

The jsp-files (and html-files) may be placed in the root of the application directory. "struts-blank" contains this single jsp-file.

The files and directories in a Struts application -


Struts Home | All Struts Tutorials | Latest Struts Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Gokul Verma
Creating the first application using Struts 2
Editing struts-config.xml in a Struts Application
Editing web.xml in a Struts Application
The directories and files of a Struts application
Downloading and installing Struts

More Tutorials in Struts
Configuring JDBC DataSources in Struts
Struts Classes
FAQ: Why was reload removed from Struts (since 1.1)?
FAQ: Why are my checkboxes not being set from ON to OFF?
Using JavaScript to submit a form in Struts
How to prepopulate a form in Struts
Simple example of using the requiredif Validator rule in Struts
Chaining actions in Struts
When is the best time to validate input in Struts
What is a Plug-in and how to use Java plug-ins with Struts?
7 Best Practices of Struts
Origin and Architecture of Struts
ActionErrors and ActionError in Struts
Tutorial on Struts Configuration File - struts-config.xml in Struts - from the book: Struts Survival Guide. Basics to Best Practices
Handling multiple buttons in HTML Form in Struts

More Latest News
Most Viewed Articles (in Struts )
Tutorial on Struts Configuration File - struts-config.xml in Struts - from the book: Struts Survival Guide. Basics to Best Practices
Handling Duplicate Form Submissions in Struts
What is Struts? Which Version of Struts to use?
Model 1 Architecture
ForwardAction in Struts
Configuring JDBC DataSources in Struts
Editing web.xml in a Struts Application
Struts 1 vs Struts 2
MVC Architecture (Model 2 Architecture)
Writing the first Struts application
ActionErrors and ActionError in Struts
What is a Plug-in and how to use Java plug-ins with Struts?
FAQ: Why are my checkboxes not being set from ON to OFF?
What is a Model View Controller (MVC) Model?
Struts Classes
Most Emailed Articles (in Struts)
What is Struts? Which Version of Struts to use?
Use ImageButtonBean for Image based Form Submits in Struts
WebWork 2 is now Apache Struts 2
Using Checkbox & Radio Tags, html:select, html:options in Struts Forms
Tutorial on Struts Configuration File - struts-config.xml in Struts - from the book: Struts Survival Guide. Basics to Best Practices
Simple example of using the requiredif Validator rule in Struts
Is Struts the most popular web application framework for Java?
What is a Model View Controller (MVC) Model?
Struts 1 vs Struts 2
Using Multibox in Struts
Using Multiple Message Resource Bundles in Struts
ForwardAction in Struts
IncludeAction in Struts
FAQ: Why was reload removed from Struts (since 1.1)?
Handling multiple buttons in HTML Form in Struts