(1) Struts Getting Started
1. Letten talk about Struts learning, from me, Struts has brought me the following benefits:
l Self-confidence, currently use Struts in China, there are not many people, walking in the technical waves, how can I confident?
l The English level has grown, Struts-related information is basically in English, watching the thick English materials every day, browsing the English website, feeling very good.
l Trough for retrieval. It used to use English search when using Google, and now you can search in English, so solve the issue of the problem to the world.
l Among the object, the three-layer structure has a deeper understanding. Recently, I have written a small project with PHP, I can't tolerate code, HTML language mixed, so I use Struts's spirit, using Template all rewritten, code and form separation, feeling really good.
L also has a shortcoming, that is, physical labor when encoding is really heavy, realizing a functional module, usually writing 4, 5 files.
2. Getting started
I am using jbuilder8.0, the weapon is not bad, bring Struts 1.0. It is to compile time consumption, my computer often because it is dead. However, 不 不 瑜, its class prompt function, help function, debugging tracking function, especially press "Tab" automatic version of the function, deeply.
But JBuilder 8 has some problems.
First, the cursor is not allowed to question: Solution is to set Tools-Editors Options to "Song" under Tools-Editors Options, and remove the bold in the Screen Element item of the Color item.
Second, the JSP file cannot be saved after writing, and the solution is to replace the JDK package under jbuilder using the JDK installation package you install. There is also a solution that don't use JBuilder to write JSP files, use EditPlus, very nice.
3. Getting Started Cheats
Now I am remembering my original introduction, it is a Struts small example "struts cross reason" recommended to me. Contains Web.xml, Struts-Config.xml, ActionForm, Action, JSP, Properties These several basic source files constituting the Struts three-layer structure, each of which has the relationship between the identification file, which is indeed entry A good information. (Website: http://www.projectrefinery.com/strutscrossReference.pdf)
Another is the "JSP Programming Guide (First Edition)" of Electronic Industry Press, and there is a chapter that specializes in struts and has a good example. EXAMPLE can download only to Wrox's website. It is more than the first data interaction with the database.
Learning: Some netizens seem to translate the tagged instructions, but it is recommended to go directly to http://jakarta.apache.org/struts/userguide/struts-bean.html to study the original description. Maybe I am not serious enough, every reading, there are surprises to gain! For example, there is a friend asking me how to display a piece of text in the JSP page branch. If you use Other books and articles: "Struts in action": Very good, especially Chapter 10, "Programming in Jakarta Struts" did not study carefully "Mastering Jakarta Struts" is not bad "Thinking in Java" Seven experiences of Jakarta Struts applications Example Application: http://husted.com/struts/resources/example-spec.html Struts tips: http://husted.com/struts/tips/index.html My collection website: http://www.chinajavaworld.net/forum/leoboard.cgi Http://jakarta.apache.org/struts/ http://www.javaworld.com/ http://www.javafaq.nu/downloads.html http://husted.com/struts/ http://java.sun.com/ 4. Getting started: Picture of cats: According to the two examples provided by the cheat, move the two examples to the JBuilder, and then make a step-by-step modification, or do your own attempt on the example. But moved the example to JBuilder, but also to have a hard work. First, create an ExampleTestSt project on JBuilder and build a web application. Then, establish a corresponding package and source code according to the content of the source code, the source code cannot be imported directly, you need a file to create, then copy the source code to :(. Small ON 1: How to build on JBuilder, such as com.test.rechi.util, just type the String of Package directly in the package column. Small Opter 2: Configuration of Form, Action, JSP file, and struts-config.xml in the structure of Struts, and a problem, the page is also displayed. For example, the following fewer mistakes that make me scratch the ear: a) b) Struts-config.xml If Form is not defined, the value of Form is not available in the action. c) Java is strictly written in strict alphabetically, once the test.jsp is Test.jsp, how can it come. Therefore, when the report file is not found, the file is first checked whether the file exists, and after the file name is consistent.