Re: FW: accessing the request object from a beanshell script
Anthony Eden <[email protected]> Tue, 06 Apr 2004 21:24:44 -0500
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
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:[email protected]]
> *Sent:* Tuesday, April 06, 2004 7:45 PM
> *To:* '[email protected]'
> *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
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click