"Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to."
"I don't much care where"
"Then it doesn't much matter which way you go."
"so long as I get somewhere."
"Oh, you're sure to do that, if only you walk long enough."
The framework's binary distribution needs three other software packages installed to operate. You may already have these installed on your system. To build the framework from source you may need to acquire and install several others. The complete list is as follows:
Unpack the Library distribution into a convenient directory. (If you are building from the source distribution, the result of the build will already be an unpacked binary distribution for you). The distribution consists of the following contents:
struts-core.jarfile into the shared repository supported by your container. Be advised that this may cause ClassNotFoundException problems unless all of your application classes are stored in the shared repository.
To use Struts Library in your own application, you will need to follow these steps:
lib/*.jarfiles from the Library distribution into the
WEB-INF/libdirectory of your web application.
WEB-INF/web.xmlfile for your web application to include a
<servlet>element to define the controller servlet, and a
<servlet-mapping>element to establish which request URIs are mapped to this servlet. Use the
WEB-INF/web.xmlfile from the Struts Mailreader application for a detailed example of the required syntax.
WEB-INF/struts-config.xmlthat defines the action mappings and other characteristics of your specific application. You can use the
struts-config.xmlfile from the Struts Blank application for examples of the required syntax.
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
For most containers, you need only to:
/webappsdirectory to your containers
Many application servers execute web applications under the control of a Java security manager, with restricted permissions on what classes in the web application can do. If you utilize form beans with mapped properties, you may encounter security exceptions unless you add the following permission to the set of permissions granted to your application's codebase:
permission java.lang.RuntimePermission "accessDeclaredMembers";
Consult the documentation on your application server for more information about how to configure additional security manager permissions.
Next: FAQs and HowTos