> [...] but really tat doesn't quite answer the > question. In general how do we access the request or
> session in the jsp? http://struts.apache.org/2.x/docs/ognl.html >> Tried what is given there and it was not working which was why I put in >> the post :( > Will what I have given below work Does it work? >> Nope :( > or what shud I be doing to make it work! I think the dot-notation will cause you problems, but I could be wrong about that--you might be able to coerce it somehow. Or you could set a flag in the action or expose an object that holds the request value. >> Could do this but really I think having a parameter for the purpose >> (explained below) is overkill! > The requirement is tat I need to access it in the jsp > and not in the action class method. Really? Or is the requirement that you be able to make decisions in the JSP based on which submit button was used? >> My page has few sections which will be either all shown or only one shown >> (hiding using css). Now to make all of them shown I have a "Display All >> Sections" link at the top clicking on which I show all the sections >> expanded. Now this is done using javascript. Now these sections contain >> lots of form data which needs to be filled in by the user. If user does >> not fill in all details and then submits the form by clicking the button >> at te bottom of the page then validator will throw errors which will be >> shown to the user, now if there are errors then the same page will be >> shown and all the sections need to be shown expanded on reload. If >> validation errors are present then we will not enter the action class >> method and so the question of setting a flag based on whether or not the >> buton was clicked does not arise as we won't anyway enter the action >> class method. (This can maybe be overriden by modifying the interceptor >> related to validation but really its an overkill for this!) Now te way I >> was thinking was to determine whether the button was clicked in the jsp >> and based on tat call a javascript function which wud set all sections to >> expanded mode. This was why I am trying to access the request in the jsp. >> Hope this made sense! Arup newton.dave wrote: > > --- afp <[EMAIL PROTECTED]> wrote: >> [...] but really tat doesn't quite answer the >> question. In general how do we access the request or > >> session in the jsp? > > http://struts.apache.org/2.x/docs/ognl.html > >> Will what I have given below work > > Does it work? > >> or what shud I be doing to make it work! > > I think the dot-notation will cause you problems, but > I could be wrong about that--you might be able to > coerce it somehow. > > Or you could set a flag in the action or expose an > object that holds the request value. > >> The requirement is tat I need to access it in the > jsp >> and not in the action class method. > > Really? Or is the requirement that you be able to make > decisions in the JSP based on which submit button was > used? > > d. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-to-access-request---session-objects-in-jsp-using-struts2-tags-tf4354438.html#a12412462 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]