|
|
![]() |
|
|
1. Configuring JDBC DataSources in Struts
|
|
By: Barbara : 2008-12-10
|
|
Description: You can define any number of JDBC javax.sql.DataSource objects for the application in the configuration file under the element . Every data source is defined within the element using the element. The element defines a number of attributes, the most important of which are listed in Table below. |
|
Read the full article
|
|
2. Struts Classes
|
|
By: Barbara : 2008-12-09
|
|
Description: As you'd expect in an MVC framework, every request starts at the Struts controller, the heart of which is the ActionServlet class. This servlet is usually mapped to the extension *.do. For example, a request for /process.do would end up with the ActionServlet and tell it that the user has submitted a pizza order: |
|
Read the full article
|
|
3. FAQ: Why was reload removed from Struts (since 1.1)?
|
|
By: Apache Foundation : 2008-09-20
|
|
Description: The problem with ReloadAction was that Struts was trying to act like a container, but it couldn't do a proper job of it. For example, you can't reload classes that have been modified, or (portably) add new classes to a running web application (even if the container supported it). |
|
Read the full article
|
|
4. FAQ: Why are my checkboxes not being set from ON to OFF?
|
|
By: Apache Foundation : 2008-09-20
|
|
Description: A problem with a checkbox is that the browser will only include it in the request when it is checked. If it is not checked, the HTML specification suggests that it not be sent (i.e. omitted from the request). If the value of the checkbox is being persisted, either in a session bean or in the model, a checked box can never unchecked by a HTML form -- because the form can never send a signal to uncheck the box. The application must somehow ascertain that since the element was not sent that the corresponding value is unchecked. |
|
Read the full article
|
|
5. Using JavaScript to submit a form in Struts
|
|
By: Apache Foundation : 2008-09-20
|
|
Description: This is just one of many ways to achieve submitting a form and decoding the intended action. Once you get used to the framework you will find other ways that make more sense for your coding style and requirements. Just remember this example is completely non-functional without JavaScript. |
|
Read the full article
|
|
6. How to prepopulate a form in Struts
|
|
By: Apache Foundation : 2008-09-20
|
|
Description: The simplest way to prepopulate a form is to have an Action whose sole purpose is to populate an ActionForm and forward to the servlet or JSP to render that form back to the client. A separate Action would then be use to process the submitted form fields, by declaring an instance of the same form bean name. |
|
Read the full article
|
|
8. Chaining actions in Struts
|
|
By: Apache Foundation : 2008-09-20
|
|
Description: Chaining actions can be done by simply using the proper mapping in your forward entries in the struts-config.xml file. Assume you had the following two classes: |
|
Read the full article
|
Next
|
|
![]() |
|