2013年9月15日星期日

Learning struts2.X doubts

Recently started learning struts2.x looked Refbacks teacher video think this thing hard to understand

I do not know how to combat unlike JSP servlet can be used directly to make website

do not know how to get out of the ..... ask doubts
------ Solution -------------------- ------------------------
start from the most simple ,
1, import jar package
2, configure the core controller
3, create an Action class , inheritance ActionSupport or implement Action, in execute do a simple output operation.
4, add struts.xml, configure the look of this Action class. .
5, start the server , enter the address accessed. . . .

------ Solution ------------------------------------ --------
struts2 online next project , look at the source code.
framework of this thing is a routine activity , use reflective technology .
------ Solution ---------------------------------------- ----
struts2 really easy. Mainly five members , Action, Result, ValueSatck, interceptors , as well as labels. You will then learn servlet struts very easy, but you have to watch your servlet learn Zeyang . It can be directly used to make websites, and it just works . struts2 is mvc framework , m, and v, and no difference between the traditional web model , is to break down the controller , the original all requests with a servlet solution , not the division of labor is also difficult to maintain, but struts2 replaced after a request corresponds to a action, plain and simple , a better division of labor , but also better maintained
------ Solution -------------------------- ------------------
 jsp.servlet master , Struts2 good grasp.
------ Solution ---------------------------------------- ----
struts2 not difficult , if you know struts2 spring learn how easy
------ Solution ---------------- ----------------------------
learned servlet is relatively easy learning struts2
term framework landlord do not be frightened, is actually a bunch of configuration files plus some logic java code
first understand the configuration file , you know how it works , then look at what specific code
------ Solution --------------- -----------------------------
do a very simple suggestion landing page ; verify the password is correct name and then returns a correct jsp
------ Solution -------------------------- ------------------


justified . +1


------ For reference only ---------------------------------- -----
do not always look at the video , do it yourself do it, recommended reading and then knock example , do the following exercise , it will deepen the impression.
------ For reference only -------------------------------------- -
ah taught the

没有评论:

发表评论