I just read the Manning book on Struts 2 and understand the theory behind
Struts but am a little bit confused as to how to actually implement my first
app in practice.  The locations of the config files, etc are a little
confusing.

For my development environment I'm using Maven 2 + Ecplise IDE. I'm not
compiling in Eclipse at all, I want to package and everything using Maven
for compatibility purposes.

I have already read this tutorial:
http://struts.apache.org/2.0.11.2/docs/struts-2-spring-2-jpa-ajax.html
as well as the sample app in Manning's book. The files are relatively
similar but always placed in different locations.

For my first app, all I want to do is create a form and have the submitted
values placed in a database table. Simple.


For my current webapp, I have used a command like this I've had to add a few
modules like hibernate to the pom.xml:

mvn archetype:create   -DgroupId=tutorial \
                       -DartifactId=tutorial \
                       -DarchetypeGroupId=org.apache.struts \
                       -DarchetypeArtifactId=struts2-archetype-starter \
                       -DarchetypeVersion=2.0.3-SNAPSHOT \

-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository



How do I compile the webapp? I have been using 'mvn package' but it never
seems to generate any errors.

I have used the Ecplise plugin to reverse engineer the database I've built
and each class comes with an *.hbm.xml file, do I need to worry about these?

How do I know where to put config files like applicationContext.xml, every
sample app I look at they seem to be in a different place?

If anyone could login to my system that would be great, it would probably
take anyone who knew what they were doing a very short amount of time.



-thanks

Reply via email to