FW: accessing the request object from a beanshell script
"Adrian Klingel" <[email protected]> Tue, 6 Apr 2004 20:40:07 -0400
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Organization | Exaweb |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C41C17.5BC6D780 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0010_01C41C17.5BC6D780 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html> <head> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3DUS-ASCII"> <meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)"> <style> <!-- /* Font Definitions */ @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.emailstyle17 {font-family:Arial; color:windowtext;} span.EmailStyle18 {font-family:Arial; color:navy;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} --> </style> </head> <body lang=3DEN-US link=3Dblue vlink=3Dpurple> <div class=3DSection1> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'>Thanks, I was able to figure this = one by parsing the output of request.getQueryString().</span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'> </span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'>Adrian Klingel</span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'> </span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DTahoma><span = style=3D'font-size:10.0pt; font-family:Tahoma'>-----Original Message-----<br> <b><span style=3D'font-weight:bold'>From:</span></b> Adrian Klingel [mailto:[email protected]] <br> <b><span style=3D'font-weight:bold'>Sent:</span></b> </span></font><font = size=3D2 face=3DTahoma><span = style=3D'font-size:10.0pt;font-family:Tahoma'>Tuesday, April 06, 2004</span></font><font size=3D2 face=3DTahoma><span = style=3D'font-size:10.0pt; font-family:Tahoma'> </span></font><font size=3D2 face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>7:45 = PM</span></font><font size=3D2 face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'><br> <b><span style=3D'font-weight:bold'>To:</span></b> '[email protected]'<br> <b><span style=3D'font-weight:bold'>Subject:</span></b> accessing the = request object from a beanshell script</span></font></p> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span = style=3D'font-size: 12.0pt'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Does anyone know of a way to access the request = object from a Beanshell script deployed as a JPublish action?</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Basically, the webserver receives a request for a url = like:</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><a = href=3D"http://myserver.com/MyApp/customer.html?id=3D279">http://myserver= .com/MyApp/customer.html?id=3D279</a></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>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?</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Thanks for any help you can offer.</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>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.</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Thanks very much,</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Adrian Klingel</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> </div> </body> </html> ------=_NextPart_000_0010_01C41C17.5BC6D780-- ------------------------------------------------------- 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