Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles
Articles_pt
CreateActions_zh
CreateManager
CreateManager_es
SpringControllers_ko
ValidationAndList




JSPWiki v2.2.33

[RSS]


Hide Menu

CreateActions


Difference between version 36 and version 35:

At line 38 changed 2 lines.
* Execute __ant webdoclet__ - this generates the PersonForm.java from the Person.java POJO.
* From the command-line, navigate to "extras/jspgen"
* Execute __ant compile__ - this generates the PersonForm.java from the Person.java POJO.
* From the command-line, navigate to "extras/viewgen"
At line 63 changed 1 line.
At this point, you won't be able to view the JSP in your browser because the <html:form> tag in personForm.jsp has ''action="savePerson"'' - and this action-mapping doesn't exist (yet) in struts-config.xml. You can try it yourself (cd ../.. first) by setting up AppFuse on Tomcat using __ant setup-db setup-tomcat deploy__.
At this point, you won't be able to view the JSP in your browser because the <html:form> tag in personForm.jsp has ''action="editPerson"'' - and this action-mapping doesn't exist (yet) in struts-config.xml. You can try it yourself (cd ../.. first) by setting up AppFuse on Tomcat using __ant setup-db setup-tomcat deploy__.
At line 67 changed 1 line.
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /savePerson
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /editPerson
At line 100 changed 1 line.
Everything should compile at this point (ant compile-web) since we're not referring to the PersonAction directly in our test. However, if you try to run __ant test-cactus -Dtestcase=PersonAction__, it won't work (make sure Tomcat is ''not'' running if you decide to try this).
Everything should compile at this point (ant compile) since we're not referring to the PersonAction directly in our test. However, if you try to run __ant test-cactus -Dtestcase=PersonAction__, it won't work (make sure Tomcat is ''not'' running if you decide to try this).
At line 121 removed 4 lines.
* Implementation of <strong>Action</strong> that interacts with the {@link
* PersonForm} and retrieves values. It interacts with the {@link
* PersonManager} to retrieve/persist values to the database.
*
At line 157 removed 8 lines.
Now we need to change the "action" attribute in the &lt;personForm.jsp&gt; to be ''action="editPerson"''.
[{Java2HtmlPlugin
<html:form action="editPerson" method="post" styleId="personForm"
focus="" onsubmit="return validatePersonForm(this)">
}]
At line 175 changed 1 line.
;:''There is also a __deploy-web__ target in build.xml that will allow you to just deploy the files in the web directory. Nothing gets compiled or generated when you use this target.''
;:''There is also a __deploy-web__ target in build.xml that will allow you to just deploy the files in the web directory. Nothing gets compiled or generated when you use this target. If you'd like, you can [learn more about available ant targets|AppFuseAntTasks].''
At line 182 changed 1 line.
;:''Look in your console's log for <span style="color: purple">PersonAction.execute(33) | Entering 'execute' method</span>. This is the log.debug statement we put in our execute method. You should also be able to [view personForm.jsp|http://localhost:8080/appfuse/personForm.jsp] (make sure Tomcat is running and you've logged into AppFuse) and click the "Save" button to see the same debug message.''
;:''Look in your console's log for <span style="color: purple">PersonAction.execute(33) | Entering 'execute' method</span>. This is the log.debug statement we put in our execute method. You should also be able to [view personForm.jsp|http://localhost:8080/appfuse/personForm.jsp] (make sure Tomcat is running and you've logged into AppFuse) and click the "Save" button to see the same debug message. You may have to login after clicking "Save" since all actions are protected.''

Back to CreateActions, or to the Page History.