accessing the request object from a beanshell script
"Adrian Klingel" <[email protected]> Tue, 6 Apr 2004 19:44:44 -0400
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Organization | Exaweb |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
------=_NextPart_000_0014_01C41C0F.9C900D70
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
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_0014_01C41C0F.9C900D70
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>
<!--
/* 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;}
@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 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_0014_01C41C0F.9C900D70--
-------------------------------------------------------
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