cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yann" <>
Subject Re: login concept
Date Thu, 22 Jun 2000 12:06:49 GMT
> Sounds good but how does your XSLT/XSP looks like then?
> Could you send a snipped for demonstration


Here is one of my XSP page that does the trick. Note that the Access bean
takes the session as a constructor parameter so that it can access session
variables like username. It is totally hidden from the XSP.

<?xml version="1.0" ?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="../presentation/etape.xsl" type="text/xsl"?>
<?xml-logicsheet href="../main/menulogic.xsl"?>

<xsp:page language="java" xmlns:xsp="">


 <page title="Book a Tape In">
   String sDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
   String sDatabase = "jdbc:odbc:Tape";

   ltd.ims.etape.Access access = new ltd.ims.etape.Access(session, request,
sDriver, sDatabase);
   if (!access.allow()) {


   String sUserID = access.getUser().getID();

   try {
    Tape tape = new Tape(sDriver, sDatabase);
    String sTapeNo = tape.bookin(sUserID);
     response.sendRedirect("doaddjob.xml?tapeno=" + sTapeNo + "&lineno=0");
   } catch (ETapeException e) {
      <p>There was a problem booking a tape in:</p>


View raw message