Originally posted by Ashwini Kulkarny:
Hi, I had already tried that. It gives me this error - Error 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No target servlet configured for uri: /gonext
No, i do not have 4 years. I have n no of years, and this no will be known at runtime. all i know is tht they have 4 columns. thats y i cant use a form bean directly. i did try using a form bean having a List as its member. eg - YearList. Yearlist was a bean and had 4 properties (1 for each qtr).but that too does not work as the form does not get populated.
Originally posted by Raj Kamal:
Hi,
Try out the suggestion Amit made. I feel that should do it.
They way I understood your problem is that you have 4 years with their corresponding quarter columns. You fetch them from the database and so you know which year is currently referenced and which quarters belong to which years. Why use the actual year values in the form element names? Would not a Year1Quarter1, Year2Quarter2....... suffice? You can then have matching fields in the Form bean too. In case you wont be able to make out which year Year1 refers to why not have a hidden field called Year1 in your form holding that value? Now from the Action you should be able to get what you want done right?
Cheers,
Raj.
Originally posted by Ashwini Kulkarny:
Hi Amit,Raj,
Thanks for your reply
Sorry for the bad formatting, actually this is the first time i am using javaranch.. Actually i did try using a submit button instead of a link an wrote a javascript function for the onclick event of the button -
function goForward()
{
document.forms[0].action = "gonext.do";
document.forms[0].submit();
}
However, somehow in this case too the form was not getting submitted and the action class was not getting called. So i decided to try and use a link. It did call the action, but then as you said, the request would not be populated.
Originally posted by Raj Kamal:
Yes the link wont act like a form Submit thats why the parameters are not present in the request.. Speaking about STRUTS, are you not defeating the whole point about STRUTS by making calls to request.getParameter() while it already provides the mapping for FORM elements to Form bean properties (which have to be defined in the struts-config.xml)?
Cheers,
Raj.
Originally posted by Amit Ghorpade:
Hi Ashwini Kulkarny welcome to Javaranch
Firstly please UseCodeTags.Unformatted code is hard to read and will generate less responses. You can edit your post by clicking the .
Simply because its not passed with the request.
Hope this helps
Originally posted by Amit Ghorpade:
Hi Ashwini Kulkarny welcome to Javaranch
Firstly please UseCodeTags.Unformatted code is hard to read and will generate less responses. You can edit your post by clicking the .
Simply because its not passed with the request.
Hope this helps