when i enter the url in the browser, it will be .do page? suppose it is login.do.
this then goes to the Url-Pattern : <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping>? after that it maps to the actionServlet using this: <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> </servlet>
in the Web.Xml file? then it goes to struts-config.xml file using : <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> after it goes to struts-config.xml
the .do page will be mapped to the path attribute in the
now this /path attribute in <action input="/LoginForm.jsp" name="LoginActionForm" path="/login" scope="request" type="com.myapp.struts.LoginAction" validate= "true">
should the same as
<html:form action="login">in the <action input="/LoginForm.jsp"> so that this will show the LoginForm.jsp?
after i enter the login id and password in this page these values will be stored in LoginActionForm formbean? if validations are to be performed,they will be performed in the validate method of the form bean itself?
after the validations are performed, it will go to <type="com.myapp.struts.LoginAction> action class where the business logic is to be performed and the forwarding decisions are made? after this if success then it will forward to cust_reg.jsp using <forward name="success" path="/Cust_Reg.jsp"/>?
please explain me where i am correct and where i am wrong and then interpret the full flow in this way.?
Yeah , I know that it is a difficult question to answer,but actually i don't want the meaning of those terms,but i want the explaination of the flow and the location of message-resources,Struts Controller or ActionServlet,RequestProcessor. and i just want to know the 1.Struts Controller or ActionServlet? 2.RequestProcessor? 3.Action? 4.ActionForm? 5.Business Delegate? 6.Helper? 7.View?
author & internet detective
Pankaj, Repeating the question doesn't make it shorter to answer.
The Struts manual has three paragraphs about the page view including the location and several pages on the flow.
Try to answer your questions from the manual and then post more specifically which ones you still have questions on - including what you understand about it so far. Seven general questions requires an essay to answer.
There is form.It as three fields and one button.client will enter the three fields and press the submit button. at the time,the request goes to the controller. The controller reads the Structs-config.xml.The controller will check where exactly matches the request that related form bean ,action class will be executed.then related forward page will be display on the browser.
Hello every one, Thanks to all those who tried to help me... I have got answer, i.e flow of struts. but i am not able to guess where the ActionServlet and ProcessController lie. if i ll be able to actually access those files so that i can know the contents of the same, i would be able to understand in detail. I refered to the journal from javaranch web page