cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Carroll <...@micromuse.com>
Subject Re: SQLProcessor and WML problem
Date Fri, 31 Mar 2000 10:30:55 GMT
>

Hi,

To get the number first you need some sort of html form that gets submitted
to
cocoon and includes the user's number. You can then extract this number
within your xsp page and build it into your select statement ,something
like :

<?xml version="1.0" encoding="iso-8859-1"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?xml-stylesheet href="http://xx.xx.xx.xx/wap/res2.xsl"
type="text/xsl"?>
<?cocoon-process type="xslt"?>
<page>
 <connectiondefs>
  <connection name="www_odbc">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://xx.xx.xx.xx/myDB</dburl>
  </connection>
 </connectiondefs>
<xsp:logic>
    String number = request.getParameter("number");
</xsp:logic>
 <query connection="www_odbc">
  select icc from icc_search where id='<xsp:expr>number</xsp:expr>'
 </query>
</page>

Your first html page can be just a static html page that includes the form
for the user to use to login. This submitted html form then gets processed
by your
xml file using cocoon and the select statement will be based on the number
the
user entered.

Hope this helps,

John.



Mime
View raw message