cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "loc-at-soft" <loc-at-s...@wanadoo.fr>
Subject Fw: Authentification + Forward
Date Tue, 26 Jun 2001 11:00:40 GMT

----- Original Message ----- 
From: loc-at-soft 
To: cocoon-users-help@xml.apache.org 
Sent: Tuesday, June 26, 2001 10:26 AM
Subject: Authentification + Forward





Hello, 

I'm trying to create an authentification XML page for Web users connecting to a MySQL database.

Here is my source code
-----------------------
login.xml
--------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="login-html.xsl" type ="text/xsl"?>  
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
 <page>
 <xsp:logic>
      String login = request.getParameter("login");
          String password = request.getParameter("password");
          Boolean loginException=false
 try {   
  <esql:connection>      
   <esql:driver> org.gjt.mm.mysql.Driver</esql:driver>
          <esql:dburl>jdbc:mysql://192.36.253.1/lims</esql:dburl> 
         <esql:username><xsp:expr>login</xsp:expr></esql:username>
     <esql:password><xsp:expr>password</xsp:expr></esql:password>

     </esql:connection>  
    }
   catch (Exception e) { 
 loginException=true;
}  
     </xsp:logic>
</page>
</xsp:page
-----------------------------------------------------

This code doesn't work ! I'm not able to use "loginException"  . I want to forward connection
errors on an error page !
Does anyone have an exemple of such an authentification XML page connecting to a database
?

Thanks for your help !

;-[



Mime
View raw message