To start developing in Struts, we must first start with
basic concepts.
1 .- first let's create our project in netbeans
Action Servlet name: Here are
deployment descriptor web.xml
, contains a entry for the servlet and specifies Struts action and its specific parameters,
as the path to the servlet class in the library and
Struts struts-config.xml configuration . Action Url Pattern: Specifies patterns
input applications that are mapped to controller actions Struts
Aplication Resource: Specifies packages will be used for struts-config.xml
struts TLDs Add: Allows you to generate
descriptors tag library, A tag library descriptor
is an XML document that contains additional information.
good now generated the project are the following:
here we can see that we struts.xml config-file, this file
is where we will save your configurations, with a
xml format, here We confgurar the action-mappings, form-beans and much
more.
This configuration file is the coordinator of our project.
we can also see the file: ApplicationResource.propierties,
this file we will save properties that will be called
mediente the implementation of our project, eg
errors.usuario = The user variable entered does not match.
more files there are good and we can see, but only
're starting.
Another very important process in the development of our project is to create ActionFormbeans
and Action
these we can find it here:
To end and to better understand this framework, we can see in the following figure
as is the behavior of our
future project.
0 comments:
Post a Comment