开发者

Can anybody explain the request-response cycle in a struts application?

I am developing a struts based application but i regularly get stucked with the requests or variables unable to be resolved.

I think this is because i still don't understand the request a开发者_StackOverflow社区nd response cycle of the Struts application.

Can anybody help me out ??


awesome explanation here please go throught this link http://rollerjm.free.fr/pro/Struts11.html#2

Basically struts app will run on three components

a) ActionServlet b) struts-config.xml c) Controler

When an user request for an request by having url as *.do , Actionservlet will lookup of that .do configuration in struts-config.xml, you can see those in "form-beans" and "action-mapping" tags

First when user request for request as "http/:....../user.do" this "user" you can also see in that "action-mapping" tag, under this "action" tag with attribute "path" .

So ActionServlet will look for this attribute when ever an request is requested. After that it will check the name attribute "name=userform". At this stage, it will look for with this name is there any form-bean containing same name attribute as "name=userform".

So you can find action tag name attribute and formbean tag name attributes are same.

after it identifies, it will create the form object by send it to Requestprocessor and roots the request to particaular action class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜