Re: [JPublish-developer] FW: accessing the request object from a beanshell script
Brought to you by:
aeden
From: Anthony E. <me...@an...> - 2004-04-07 01:26:52
|
Another option is to use the request object's getParameter() method: id = request.getParameter("id"); The following Servlet objects are exposed in every page action: HttpServletRequest = request HttpServetResponse = response HttpSession = session ServletContext = application In addition the following JPublish objects are exposed in every page action: RequestContext = context SiteContext = site Page = page Sincerely, Anthony Eden Adrian Klingel wrote: > Thanks, I was able to figure this one by parsing the output of > request.getQueryString(). > > > > Adrian Klingel > > > > > > -----Original Message----- > *From:* Adrian Klingel [mailto:Adr...@ex...] > *Sent:* Tuesday, April 06, 2004 7:45 PM > *To:* 'jpu...@li...' > *Subject:* accessing the request object from a beanshell script > > > > Does anyone know of a way to access the request object from a > Beanshell script deployed as a JPublish action? > > > > Basically, the webserver receives a request for a url like: > > > > http://myserver.com/MyApp/customer.html?id=279 > > > > In customer.xml, I specify a <page-action> of loadCustomer.bsh. I > want to launch a JDBC query from this beanshell, passing that id value > 279. Can I do this? > > > > Thanks for any help you can offer. > > > > I will say that after working with JPublish for only a couple of days, > my productivity has gone through the roof. I love the true separation > of the MVC layers. So much cleaner than JSP. > > > > Thanks very much, > > Adrian Klingel > > > |