• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What do I need for Struts?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a java application with classes ready to serve as a model, but I don't really know how I can fit the JSP's and ?actionfor/beanS? together to make a proper struts application

Basically could someone list the things I need for everything to work. and also could someone explain how the struts-config, and web.xml files work I really am lost. using Struts 1 btw but any library is fine I just need someone to start me off so I can integrate my java classes with some forms on a few jsp's and run it all in tomcat6 thanks.
 
Ranch Hand
Posts: 37
Hibernate Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may first need to decide on which version you need to use Struts 1 or Struts 2. Then you need to download the jar files accordingly.

You can download the latest version of Struts from the apache site

http://struts.apache.org/download.cgi

Few samples are available in the below tutorial link
http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-tutorial.html
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To get everything to work, you would need the following:

1. Learn how to use the Struts Frameworks to build the web components of an application, i.e. View and Controller.

2. Get a copy of the Struts class library

3. Get a copy of a Java Web server


In regards to struts-config.xml, the Struts Framework defines an XML-based markup language for
describing configuration data. This data is needed to configure the application's Controller and
add your specific Controller behavior, i.e. actions. In order to create an instance of a struts-
config
document, you first need to learn the elements and attributes of the language. And
then you need to learn the objects which are created with the configuration data and how they work,
what they do, etc.

In regards to web.xml, the Java Servlet Framework defines an XML-based markup language for
describing configuration data. This data is used to configure a Java Web server so that
it can serve your web application. Here again, you need to learn the language, the elements and
attributes in order to create a web-app document.

Good luck and Welcome to the JavaRanch - A Friendly Place for Java Greenhorns!
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joshua Jones wrote:using Struts 1



Unless you have a compelling reason to use Struts 1 (i.e. you are maintaining an existing application) I would strongly recommend you use Struts 2. Struts 1 has several intractable problems that make it much less useful than the current generation of framework (to include Stripes, Spring, Wicket, et al).
That said, we have a FAQ for whichever version of Struts you choose. Spend some time with one of the tutorials or books. You'll find that's a better use of your time than trying to shoehorn your current app into the framework and coming to the forum every time you hit a wall.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic