cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gorillacommunications" <>
Subject help with XSP, maybe actions
Date Fri, 31 May 2002 16:48:45 GMT
Hi All,

I am having trouble getting some XSP to run. I have a small login form:

    <form action="login" method="POST">
      UserID:<input size="" value="" name="userID" type="text">
      Password:<input size="" value="" name="pwd" type="password">
      <input value="Login" name="Login" type="submit">
      <input value="Reset" name="Reset" type="reset">

and a pipleline:

    <map:match pattern="login">
      <map:generate src="login.xml"/>
      <map:serialize type="html"/>

and a login.xml page (stripped down to show essentials):

<?xml version="1.0" encoding="utf-8"?>
<xsp:page language="java"


      String strUserID;
      String strPwd;

      strUserID = request.getParameter("userID");
      strPwd = request.getParameter("pwd");


        // some code for validating the userID and pwd
      catch (Exception e)

      // redirect to login page or summary
     String strHttp;
      if (// login failed)
        strHttp = "http://localhost:8080/GS/gs.xml?fail=true";
        strHttp = "http://localhost:8080/GS/gs.xml?pagename=summary";

      catch (Exception e)

The problem is that when I enter a userID and pwd and click on "Login", the
Java code is not executed, rather it is just displayed in the browser like:

java.lang.* java.util.** String strUserID; String strPwd; strUserID
= request.getParameter("userID");strPwd = request.getParameter("pwd");
try{// some code for validating the userID and pwd) catch (Exception e)

and so on.

Can anyone tell me what I'm doing wrong? I've read in the docs and archives
maybe I should be doing this with actions, but the sample I found for a
login page
uses the FormValidator, and I don't think I need that.

The reason I am doing it this way, is because I have this application
running in
C1 and would like to reuse much of the XSP. In that version my form
and it works just fine.

Also, if anyone knows of a good tutorial for actions, I would love to see
it. To me, this
is the most confusing part of C2 so far. I have done extensive searches and
come up
with little.

Many thanks,
Leona Slepetis

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message