cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Dupuy <>
Subject RE: Help in java
Date Wed, 16 Aug 2000 07:38:51 GMT
well..firstly of all it's <![CDATA[ instead of <!CDATA[ and moreover i don't
think you need that in your sample code. Secondly, be carreful with  your
select query. It must be String id="'12345'"; instead of String id="12345";
Tell me if it works or give me the exact error message.

-----Original Message-----
From: Wong Shin Neng []
Sent: 16. august 2000 07:05
Subject: Help in java

Hello people out there,
Can someone help me out there?  I'm new in this cocoon stuff but I'm trying
to get a wholesale ordering system up as soon as possible.  I'm no good in
java so lots of help is appreciated.
I've written the code below to try some testing to match a user's submitted
password and verify it with a database and return results like OK and NOT OK
Here's the code:
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>

<xsp:page language="java" xmlns:xsp="">
<page title="Password">
<xsp:include> java.text.*></xsp:include>
  String url = jdbc:postgresql.Driver;
  String usr = postgres;
  String id="12345";
  Connection db = DriverManager.getConnection(url, usr, pwd);
  Statement  st = db.createStatement();
  ResultSet rs = st.executeQuery("select password from customer where
    if(rs!=null) {
      String password = rs.getString("password");
I get some error code of the code not well-formed.  What's wrong?  
Thanks in advance

View raw message