Re: Action does not get executed
hi, To prepopulate the data,u need to call the Action class first,which will get the data from EJB , and redirect to the jsp.This jsp will read the values from bean and show them.For doing this,in struts-config.xml, you shouldn't use input attribute of the action tag,becoz first Action class needs to run. Hope it helps. regards, gitanjali. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action does not get executed
Point the hyperlink to the action specified in struts-config.xml (suffixed with .do). This will call the action. so your hyperlink will have href=/myAction.do and struts-config.xml will contain something like action path=/myAction class=blah ... forward name=/myJsp.jsp/ /action hth, tomK -Original Message- From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]] Sent: vrijdag 23 november 2001 9:35 To: Struts-User (E-mail) Subject: Action does not get executed Hello All, I have a menu, in which I put the a hyperlink to a jsp. When this jsp is displayed, some of the fields should have data pre-populated in it. This data which is used to pre-populate the form is fetched from ejbs. Now, I have written a struts Form class and a struts Action class and made correct entries in struts-config.xml. But when I click on the link and the jsp page is displayed then all values are null, because the Action never got executed. Is it that struts classes like ActionForm and Action are executed only when I do a POST from a FORM element? when I initially load my jsp there is no form, just a click on the menu to bring up the html. How can I pre-populate the data. one approach is that I write a simple java bean that fetched the data from ejb and use this bean in my jsp directly. But i want that only Action classes should make contact with ejbs for consistency sake. please help. regards, Abhishek. -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action does not get executed
Thank you Gitangali for your reply. I removed the input attribute from the action element. My menu points towards my jsp. html:link href='/jsp/applist.jsp'applications list/html:link if I click on it, the my action does not get executed. and the no values are prefilled when the jsp comes up. Now, If I write a dummy jsp called applistdummy.jsp here I have just one html form that html:form action=/AppList table border=1 width=60% align=center tr td align=center html:submitsubmit/html:submit /td td align=center html:resetreset/html:reset /td /tr /table now if I click submit, my action does get executed it forwards the control to /jsp/applist.jsp and it does come up with all the prepopulated data. Problem is that I do not want to have dummy html forms do get my main form with some pre filled data. Is it possible to pre-fil the form just by clicking on the menu and not having a dummy form in between? Thank you so much for your help. regards, Abhishek. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 23, 1999 2:11 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Action does not get executed hi, To prepopulate the data,u need to call the Action class first,which will get the data from EJB , and redirect to the jsp.This jsp will read the values from bean and show them.For doing this,in struts-config.xml, you shouldn't use input attribute of the action tag,becoz first Action class needs to run. Hope it helps. regards, gitanjali. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action does not get executed
To remove the dummy jsp page,u need to point to the action class directly instead of the jsp page and on success of this action forward ur request to the jsp page. regards, gitanjali. Abhishek Srivastava [EMAIL PROTECTED] on 11/23/2001 10:43:57 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: (bcc: Gitanjali Singh/Satyam) Subject RE: Action does not get executed : Thank you Gitangali for your reply. I removed the input attribute from the action element. My menu points towards my jsp. html:link href='/jsp/applist.jsp'applications list/html:link if I click on it, the my action does not get executed. and the no values are prefilled when the jsp comes up. Now, If I write a dummy jsp called applistdummy.jsp here I have just one html form that html:form action=/AppList table border=1 width=60% align=center tr td align=center html:submitsubmit/html:submit /td td align=center html:resetreset/html:reset /td /tr /table now if I click submit, my action does get executed it forwards the control to /jsp/applist.jsp and it does come up with all the prepopulated data. Problem is that I do not want to have dummy html forms do get my main form with some pre filled data. Is it possible to pre-fil the form just by clicking on the menu and not having a dummy form in between? Thank you so much for your help. regards, Abhishek. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 23, 1999 2:11 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Action does not get executed hi, To prepopulate the data,u need to call the Action class first,which will get the data from EJB , and redirect to the jsp.This jsp will read the values from bean and show them.For doing this,in struts-config.xml, you shouldn't use input attribute of the action tag,becoz first Action class needs to run. Hope it helps. regards, gitanjali. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action does not get executed
YAHHOOO IT WORKS!! Thank you Gitangali for your help. I really appreciate it. regards, Abhishek. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 23, 1999 6:04 PM To: [EMAIL PROTECTED] Subject: RE: Action does not get executed suppose following is ur entry in struts-config.xml file : action path=/SaveData type=SaveDataAction name=userForm scope=session validate=false forward name=success path=/form.jsp/ /action And in web.xml , if u have mapped ActionServlet to *.do then, the link for SaveDataAction will be SaveData.do. So the link will be like this: html:link href='/SaveData.do'App list/html:link Abhishek Srivastava [EMAIL PROTECTED] on 11/23/2001 11:11:35 PM Please respond to [EMAIL PROTECTED] To: Gitanjali Singh/Satyam@Satyam cc: Subject RE: Action does not get executed : Ahh I am still missing it I tried to configure my menu the 2 ways but both gave errors 1. I put the class of the Action in the href html:link href='/my-app/WEB-INF/classes/com/abhi/html/apps/action/AppLi stAction.class' App list /html:linkbr/ Resutl is that the tomcat says that it cannot find the class file. 2. Put the Action (same as what I put in the action of the dummy form). html:link href='/AppList'App List/html:linkbr/ now tomcat says that the requested resource is not available. On success condition I do forward the control to my jsp and this works fine so long as I come via the dummy form. From the menu it stops to work. Thanks a lot for your help. regards, Abhishek. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 23, 1999 5:20 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Action does not get executed To remove the dummy jsp page,u need to point to the action class directly instead of the jsp page and on success of this action forward ur request to the jsp page. regards, gitanjali. Abhishek Srivastava [EMAIL PROTECTED] on 11/23/2001 10:43:57 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: (bcc: Gitanjali Singh/Satyam) Subject RE: Action does not get executed : Thank you Gitangali for your reply. I removed the input attribute from the action element. My menu points towards my jsp. html:link href='/jsp/applist.jsp'applications list/html:link if I click on it, the my action does not get executed. and the no values are prefilled when the jsp comes up. Now, If I write a dummy jsp called applistdummy.jsp here I have just one html form that html:form action=/AppList table border=1 width=60% align=center tr td align=center html:submitsubmit/html:submit /td td align=center html:resetreset/html:reset /td /tr /table now if I click submit, my action does get executed it forwards the control to /jsp/applist.jsp and it does come up with all the prepopulated data. Problem is that I do not want to have dummy html forms do get my main form with some pre filled data. Is it possible to pre-fil the form just by clicking on the menu and not having a dummy form in between? Thank you so much for your help. regards, Abhishek. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 23, 1999 2:11 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Action does not get executed hi, To prepopulate the data,u need to call the Action class first,which will get the data from EJB , and redirect to the jsp.This jsp will read the values from bean and show them.For doing this,in struts-config.xml, you shouldn't use input attribute of the action tag,becoz first Action class needs to run. Hope it helps. regards
RE: Action does not get executed
Ahh I am still missing it I tried to configure my menu the 2 ways but both gave errors 1. I put the class of the Action in the href html:link href='/my-app/WEB-INF/classes/com/abhi/html/apps/action/AppLi stAction.class'App list /html:linkbr/ Resutl is that the tomcat says that it cannot find the class file. 2. Put the Action (same as what I put in the action of the dummy form). html:link href='/AppList'App List/html:linkbr/ now tomcat says that the requested resource is not available. On success condition I do forward the control to my jsp and this works fine so long as I come via the dummy form. From the menu it stops to work. Thanks a lot for your help. regards, Abhishek. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 23, 1999 5:20 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Action does not get executed To remove the dummy jsp page,u need to point to the action class directly instead of the jsp page and on success of this action forward ur request to the jsp page. regards, gitanjali. Abhishek Srivastava [EMAIL PROTECTED] on 11/23/2001 10:43:57 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: (bcc: Gitanjali Singh/Satyam) Subject RE: Action does not get executed : Thank you Gitangali for your reply. I removed the input attribute from the action element. My menu points towards my jsp. html:link href='/jsp/applist.jsp'applications list/html:link if I click on it, the my action does not get executed. and the no values are prefilled when the jsp comes up. Now, If I write a dummy jsp called applistdummy.jsp here I have just one html form that html:form action=/AppList table border=1 width=60% align=center tr td align=center html:submitsubmit/html:submit /td td align=center html:resetreset/html:reset /td /tr /table now if I click submit, my action does get executed it forwards the control to /jsp/applist.jsp and it does come up with all the prepopulated data. Problem is that I do not want to have dummy html forms do get my main form with some pre filled data. Is it possible to pre-fil the form just by clicking on the menu and not having a dummy form in between? Thank you so much for your help. regards, Abhishek. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 23, 1999 2:11 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Action does not get executed hi, To prepopulate the data,u need to call the Action class first,which will get the data from EJB , and redirect to the jsp.This jsp will read the values from bean and show them.For doing this,in struts-config.xml, you shouldn't use input attribute of the action tag,becoz first Action class needs to run. Hope it helps. regards, gitanjali. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action does not get executed
-Original Message- From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]] Sent: vrijdag 23 november 2001 13:31 To: Struts-User (E-mail) Subject: RE: Action does not get executed Ahh I am still missing it ... 2. Put the Action (same as what I put in the action of the dummy form). html:link href='/AppList'App List/html:linkbr/ html:link href='/AppList.do' hth, tomK -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]