My LoginView.jsp Displays A Blank Page

2003-07-05 Thread Caroline Jen
My LogonView.jsp displays a blank page.  I have no
idea why nothing is written while the
MessageResources.properties file is found.
 
I would have gotton HTTP Status 500 if the
MessageResources.properties is not found or the value
of the corresponding key in the bean:message tag
cannot be picked up.  I did not get any error message.
 I cannot figure out the reason.  Please help.

Here is my web.xml file:
[CODE]


;


  Struts Blank
Application
  
  
  
action
   
org.apache.struts.action.ActionServlet

  application
 
resources.version1.MessageResources


  mapping
 
org.apache.struts.action.RequestActionMapping


  config
 
/WEB-INF/struts-config.xml


  debug
  2


  detail
  2

2
  


  
  
action
*.do
  


  
  
index.jsp
  


  
  
   
/WEB-INF/struts-bean.tld
   
/WEB-INF/struts-bean.tld
  

  
   
/WEB-INF/struts-html.tld
   
/WEB-INF/struts-html.tld
  

  
   
/WEB-INF/struts-logic.tld
   
/WEB-INF/struts-logic.tld
  

  
   
/WEB-INF/struts-nested.tld
   
/WEB-INF/struts-nested.tld
  

  
   
/WEB-INF/struts-tiles.tld
   
/WEB-INF/struts-tiles.tld
  

  
   
/WEB-INF/struts-template.tld
   
/WEB-INF/struts-template.tld
  


[/CODE]

Here is my MessageResources.properties file:
[CODE]
button.submit=Send for Verification
button.reset=Clear the Form
logonForm.userId=User Name
logonForm.password=Password
logonForm.confirm_password=Confirm Password
logonForm.emailAddress=E-mail Address
logonForm.hear_from_us=How did you hear about the
StudentScholar.org?
logonForm.subscriber=Subscribe to the
StudentScholar.org newsletter
logonForm.send_updates=Occassionally send me updates
logonForm.fname=First Name
logonForm.lname=Last name
logonForm.streetAddress=Street Address
logonForm.city=City
logonForm.state=State
logonForm.zip=Zip Code
logonForm.country=Country
logonForm.phone=Telephone
logonForm.degree_type=Degree Type(s)
logonForm.major=Majoring Field(s)
logonForm.cumulativeGPA=Cumulative GPA
logonForm.collegeID=College ID
logonForm.permissionID=Permission ID
logonForm.last_logon_date=Last Logon Date
heading.logon=

Enter your user information

title.logon=Logon Screen error.invalid.logon=
  • The User ID and/or Password are invalid. Please try again.
  • errors.header=

    Validation Error

    You must correct the following error(s) before proceeding:
      title.mainmenu=Welcome heading.mainmenu=

      Welcome!

      label.userType=

      You are authorized to use this system as a

      errors.prefix=
    • errors.suffix=
    • errors.footer=

    errors.minlength={0} can not be less than {1} characters. errors.required={0} is required. errors.date={0} is not a date. errors.double={0} must be an double. errors.email={0} is an invalid e-mail address. [/CODE] Here is my LogonView.jsp: [CODE] <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <bean:message key="title.logon" />
    :

    My LogonView.jsp Displays A Blank Page

    My LogonView.jsp displays a blank page. I have no idea
    why nothing is written while the
    MessageResources.properties file is found. 
    
    I would have gotton HTTP Status 500 if the
    MessageResources.properties is not found or the value
    of the corresponding key in the bean:message tag
    cannot be picked up.  I did not get any error message.
     I cannot figure out the reason.  Please help.
    
    Here is my web.xml file:
    
    
    code:
    ---
    
    
    http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
    
    
      Struts Application
      
      
      
    action
       
    org.apache.struts.action.ActionServlet
    
      application
     
    resources.version1.MessageResources
    
    
      mapping
     
    org.apache.struts.action.RequestActionMapping
    
    
      config
     
    /WEB-INF/struts-config.xml
    
    
      debug
      2
    
    
      detail
      2
    
    2
      
    
    
      
      
    action
    *.do
      
    
    
      
      
    index.jsp
      
    
    
      
      
    /WEB-INF/struts-bean.tld
       
    /WEB-INF/struts-bean.tld
      
    
      
    /WEB-INF/struts-html.tld
       
    /WEB-INF/struts-html.tld
      
    
      
    /WEB-INF/struts-logic.tld
       
    /WEB-INF/struts-logic.tld
      
    
      
       
    /WEB-INF/struts-nested.tld
       
    /WEB-INF/struts-nested.tld
      
    
      
    /WEB-INF/struts-tiles.tld
       
    /WEB-INF/struts-tiles.tld
      
    
      
       
    /WEB-INF/struts-template.tld
       
    /WEB-INF/struts-template.tld
      
    
    
    
    ---
    
    Here is my MessageResources.properties file:
    
    
    code:
    --
    button.submit=Send for Verification
    button.reset=Clear the Form
    logonForm.userId=User Name
    logonForm.password=Password
    logonForm.confirm_password=Confirm Password
    logonForm.emailAddress=E-mail Address
    logonForm.hear_from_us=How did you hear about the
    StudentScholar.org?
    logonForm.subscriber=Subscribe to the
    StudentScholar.org newsletter
    logonForm.send_updates=Occassionally send me updates
    logonForm.fname=First Name
    logonForm.lname=Last name
    logonForm.streetAddress=Street Address
    logonForm.city=City
    logonForm.state=State
    logonForm.zip=Zip Code
    logonForm.country=Country
    logonForm.phone=Telephone
    logonForm.degree_type=Degree Type(s)
    logonForm.major=Majoring Field(s)
    logonForm.cumulativeGPA=Cumulative GPA
    logonForm.collegeID=College ID
    logonForm.permissionID=Permission ID
    logonForm.last_logon_date=Last Logon Date
    heading.logon=Enter your user information
    title.logon=Logon Screen
    error.invalid.logon=The User ID and/or Password
    are invalid. Please try again.
    errors.header=Validation
    ErrorYou must correct the following
    error(s) before proceeding:
    title.mainmenu=Welcome
    heading.mainmenu=Welcome!
    label.userType=You are authorized to use this
    system as a
    errors.prefix=
    errors.suffix=
    errors.footer=
    errors.invalid={0} is invalid.
    errors.maxlength={0} can not be greater than {1}
    characters.
    errors.minlength={0} can not be less than {1}
    characters.
    errors.range={0} is not in the range {1} through {2}.
    errors.required={0} is required.
    errors.byte={0} must be an byte.
    errors.date={0} is not a date.
    errors.double={0} must be an double.
    errors.float={0} must be an float.
    errors.integer={0} must be an integer.
    errors.long={0} must be an long.
    errors.short={0} must be an short.
    errors.creditcard={0} is not a valid credit card
    number.
    errors.email={0} is an invalid e-mail address.
    errors.cancel=Operation cancelled.
    errors.detail={0}
    errors.general=The process did not complete. Details
    should follow.
    errors.token=Request could not be completed. Operation
    is not in sequence.
    welcome.title=Struts Blank Application
    welcome.heading=Welcome!
    welcome.message=To get started on your own
    application, copy the struts-blank.war to a new WAR
    file using the name for your application. Place it in
    your container's "webapp" folder (or equivalent), and
    let your container auto-deploy the application. Edit
    the skeleton configuration files as needed, restart
    your container, and you are on your way! (You can find
    the application.properties file with this message in
    the /WEB-INF/src/java/resources folder.)
    
    ---
    
    Here is my LogonView.jsp:
    
    
    code:
    ---
    
    
    <%@ taglib uri="/WEB-INF/struts-html.tld"
    prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld"
    prefix="bean" %>
    
    
    
    
    
    
    
    
    
    
       :
       
    
       :
       
    
    
    
    
    
    
    
    
    
    
    
    
    ---
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: How can I set the defualt selection?

    I have similar questions.  What is the syntax of the
     tag?
    
    Just take the example given by you, are the codes
    shown below correct?  Will the default selection
    shown?
    
    
     
     
     
    
    
    JPJ
    
    --- leonZ <[EMAIL PROTECTED]> wrote:
    > I make it more clear here:
    > 
    > A normal html:
    > 
    >   first
    >   second
    >   third
    > 
    > 
    > how can I use the 'SELECTED' to set a defualt option
    > with struts tags.
    > 
    > 
    > ...
    > 
    > 
    > "leon" <[EMAIL PROTECTED]> wrote in message
    > news:[EMAIL PROTECTED]
    > > I am a beginner of struts. I can't use the
    > 'selected' property of the
    > select
    > > tag in struts to set the default selection like I
    > used it in a normal
    > html.
    > > It's happened in 'checked' property of struts
    > radio tag. Could you tell me
    > > how to set a defualt selection.
    > 
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    How To Specify Error Messages For Self-Provided Validation Rules: "mask"

    I am trying to insert entries in the
    MessageResources.properties file for 
    the error messages generated by automatic validation.
    I could find examples for email and date (see below):
    
    errors.email={0} is an invalid e-mail address.
    errors.date={0} is not a date.
    
    What should the messages look like for "mask" in the
    MessageResources.properties? I used "mask" to provide
    a number of validation rules.  How do I specify those
    error messages? (I used mask several times.)
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: How can I set the defualt selection?

    Leon:
    
     I am working on the same thing.  Could you show
    me your example of setting default selection?  
    
    CJen
    --- leonZ <[EMAIL PROTECTED]> wrote:
    > Thank you very much! I have made it.
    > 
    > "Adam Hardy" <[EMAIL PROTECTED]>
    > wrote in message
    > news:[EMAIL PROTECTED]
    > > You don't need to submit a form (HTTP PUT) to get
    > a request object. You
    > > can do an HTTP GET, with no form submit in HTML
    > client-side, by clicking
    > > on the URL, but to the servlet container and
    > struts this is irrelevant.
    > > The request object will be created for a GET just
    > as for a PUT.
    > >
    > > And struts will also create a form bean for you
    > depending entirely on
    > > your action mapping in struts-config, regardless
    > of whether you did a
    > > GET or a PUT.
    > >
    > > GET and PUT are just HTTP internet transfer
    > protocol formats. I believe
    > > a GET has only got a HTTP header, whereas PUT has
    > a body too, which
    > > means you can send more bytes in your parameters.
    > (GET parameters are on
    > > the query string, PUT params are the form fields).
    > >
    > > Adam
    > >
    > > leonZ wrote:
    > > > But how do you set the defualt option without
    > submit the form?
    > > > action.execute() need the HttpServletRequest
    > object, and this object is
    > got
    > > > from a submitting of a form in jsp.
    > > > Maybe I am wrong, could give me a valid code
    > segment example?
    > > >
    > > > "Adam Hardy" <[EMAIL PROTECTED]>
    > wrote in message
    > > > news:[EMAIL PROTECTED]
    > > >
    > > >>Struts will automatically mark the selected
    > option when the value of the
    > > >>select box field/property in the actionform is
    > set.
    > > >>
    > > >>So if you want to set one option as default in a
    > blank form, set the
    > > >>actionform property to the value of the option
    > you want. Preferably in
    > > >>the action.execute() so you don't muddle your
    > jsp unnecessarily.
    > > >>
    > > >>Adam
    > > >>
    > > >>Caroline Jen wrote:
    > > >>
    > > >>>I have similar questions.  What is the syntax
    > of the
    > > >>> tag?
    > > >>>
    > > >>>Just take the example given by you, are the
    > codes
    > > >>>shown below correct?  Will the default
    > selection
    > > >>>shown?
    > > >>>
    > > >>>
    > > >>>  labelProperty="first">
    > > >>>  labelProperty="second">
    > > >>>  labelProperty="third">
    > > >>>
    > > >>>
    > > >>>JPJ
    > > >>>
    > > >>>--- leonZ <[EMAIL PROTECTED]> wrote:
    > > >>>
    > > >>>
    > > >>>>I make it more clear here:
    > > >>>>
    > > >>>>A normal html:
    > > >>>>
    > > >>>> first
    > > >>>>  SELECTED>second
    > > >>>> third
    > > >>>>
    > > >>>>
    > > >>>>how can I use the 'SELECTED' to set a defualt
    > option
    > > >>>>with struts tags.
    > > >>>>
    > > >>>>   
    > > >>>>   ...
    > > >>>>
    > > >>>>
    > > >>>>"leon" <[EMAIL PROTECTED]> wrote in message
    > > >>>>news:[EMAIL PROTECTED]
    > > >>>>
    > > >>>>
    > > >>>>>I am a beginner of struts. I can't use the
    > > >>>>
    > > >>>>'selected' property of the
    > > >>>>select
    > > >>>>
    > > >>>>
    > > >>>>>tag in struts to set the default selection
    > like I
    > > >>>>
    > > >>>>used it in a normal
    > > >>>>html.
    > > >>>>
    > > >>>>
    > > >>>>>It's happened in 'checked' property of struts
    > > >>>>
    > > >>>>radio tag. Could you tell me
    > > >>>>
    > > >>>>
    > > >>>>>how to set a defualt selection.
    > > >>>>
    > > >>>>
    > > >>>>
    > > >>>>
    > > >>>>
    > >
    >
    >>>-
    > > >>>
    > > >>>
    > > >>>>To unsubscribe, e-mail:
    > > >>>>[EMAIL PROTECTED]
    > > >>>>For additional commands, e-mail:
    > > >>>>[EMAIL PROTECTED]
    > > >>>>
    > > >>>
    > > >>>
    > > >>>
    > > >>>__
    > > >>>Do you Yahoo!?
    > > >>>SBC Yahoo! DSL - Now only $29.95 per month!
    > > >>>http://sbc.yahoo.com
    > > >>>
    > >
    >
    >>>-
    > > >>>To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > > >>>For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > > >>>
    > > >>>
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    >
    -
    > > > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > > > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > > >
    > > >
    > 
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Specify Error Messages For Automatic Validation

    I am trying to put entries in the
    MessageResource.properties file for the error messages
    generated by the automatic validation. 
    
    I used "mask" to provide a number of validation rules.
    
    How do I specify those error messages?  (I used "mask"
    for a number of text field to report various errors.) 
    I would like to see an example.
    
    I could find examples for email and date:
    errors.email={0} is an invalid e-mail address.
    errors.date={0} is not a date.
    
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    What Is The Proper Location To Place Inputs For Creating A Drop-Down Menu

    I want to put the "label and value" pairs of the 51
    states of the U.S. in a file, read in the file into an
    ArrayList, and then create a drop-down menu in a .jsp
    file.
    
    Question 1.  Where is the proper place to put those
    "label and value" pairs?  Create a table in the
    database? or put those pairs in a properties file? 
    Which directory does this properties file go?
    
    Question 2.  Do I read those pairs into an ArrayList
    in the controller servlet?   
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    package org.apache.struts.action Does Not Exist?

    I have been using Struts (jakarta-struts-1.1-rc2) for
    about two weeks. I have tested a number of things and
    made them work.
    
    Today, while I was trying to compile a model bean (I
    have compiled it before without any problem), I got
    compilation error: 
    package org.apache.struts.action does not exist
    
    I double checked that the struts.jar is in the
    $TOMCATHOME\webapps\MyApplication\WEB-INF\lib
    directory. What could have happened?
    
    The source code of my model bean is:
    
    package resources.version1;
    
    import javax.servlet.http.*;
    import org.apache.struts.action.*;
    
    
    public class LogonBean {
    
    String userType, userID ,password;
    
    public LogonBean() {}
    
    public void setParameters(HttpServletRequest request)
    {
    userID = request.getParameter("userID");
    password = request.getParameter("password");
    }
    
    public ActionErrors validate() {
    
    if (!userID.equals(password)) {
    ActionErrors ae = new ActionErrors();
    ae.add("userID", new
    ActionError("error.invalid.logon"));
    return ae;
    }
    
    if (userID.equals("admin")) {
    userType = "Adminstrator";
    } else
    if (userID.equals("user")) {
    userType = "User";
    } else {
    ActionErrors ae = new ActionErrors();
    ae.add("userID", new
    ActionError("error.invalid.logon"));
    return ae;
    }
    
    return null;
    }
    
    public String getUserType() {
    return userType;
    }
    
    public void setUserType(String userType) {
    this.userType = userType;
    }
    }   
    
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: package org.apache.struts.action Does Not Exist?

    Jimmy, thanks for your reminder and sorry for my
    stupid question.  I worked late last night (after
    mid-night) and was not thinking well.
    
    Now, I put the struts.jar file back to the CLASSPATH
    (not $TOMCATHOME/webapps\MyApplication\WEB-INF\lib)
    and everything works.
    
    
    --- Jimmy Emmanual <[EMAIL PROTECTED]> wrote:
    > are you sure struts.jar is in your classpath? It
    > doesn't matter that
    > struts.jar is in
    > $TOMCATHOME\webapps\MyApplication\WEB-INF\lib when
    > you are
    > compiling. only that it is in your classpath.
    > 
    > echo $CLASSPATH or echo %CLASSPATH% and see if you
    > see struts.jar.
    > 
    > -----Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > Sent: Friday, July 18, 2003 8:15 PM
    > To: [EMAIL PROTECTED]
    > Subject: package org.apache.struts.action Does Not
    > Exist?
    > 
    > 
    > I have been using Struts (jakarta-struts-1.1-rc2)
    > for
    > about two weeks. I have tested a number of things
    > and
    > made them work.
    > 
    > Today, while I was trying to compile a model bean (I
    > have compiled it before without any problem), I got
    > compilation error: 
    > package org.apache.struts.action does not exist
    > 
    > I double checked that the struts.jar is in the
    > $TOMCATHOME\webapps\MyApplication\WEB-INF\lib
    > directory. What could have happened?
    > 
    > The source code of my model bean is:
    > 
    > package resources.version1;
    > 
    > import javax.servlet.http.*;
    > import org.apache.struts.action.*;
    > 
    > 
    > public class LogonBean {
    > 
    >   String userType, userID ,password;
    > 
    >   public LogonBean() {}
    > 
    >   public void setParameters(HttpServletRequest
    > request)
    > {
    >   userID = request.getParameter("userID");
    >   password = request.getParameter("password");
    >   }
    > 
    >   public ActionErrors validate() {
    > 
    >   if (!userID.equals(password)) {
    >   ActionErrors ae = new ActionErrors();
    >   ae.add("userID", new
    > ActionError("error.invalid.logon"));
    >   return ae;
    >   }
    > 
    >   if (userID.equals("admin")) {
    >   userType = "Adminstrator";
    >   } else
    >   if (userID.equals("user")) {
    >   userType = "User";
    >   } else {
    >   ActionErrors ae = new ActionErrors();
    >   ae.add("userID", new
    > ActionError("error.invalid.logon"));
    >   return ae;
    >   }
    > 
    >   return null;
    >   }
    > 
    >   public String getUserType() {
    >   return userType;
    >   }
    > 
    >   public void setUserType(String userType) {
    >   this.userType = userType;
    >   }
    > } 
    > 
    > 
    > 
    > __
    > Do you Yahoo!?
    > SBC Yahoo! DSL - Now only $29.95 per month!
    > http://sbc.yahoo.com
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Error Using select tag To Create Drop-Down Menu

    I am doing testings step by step. I simply want to add
    a drop-down menu feature to something that works OKay.
    I am a newbie to struts. I do not know where to look
    for my mistakes when I encounter problems. 
    Something is wrong in my .jsp page. This .jsp page had
    worked fine before ...
    tags were added. The error message is:
    
    
    code:
    --
    
    2003-07-21 01:24:51
    StandardWrapperValve[action]:Servlet.service() for
    servlet action threw
    exceptionorg.apache.jasper.JasperException: Cannot
    find bean under name
    org.apache.struts.taglib.html.BEAN
    
    ---
    
    Here is the source code of my MainMenu.jsp:
    
    
    code:
    ---
    
    <%@ taglib uri="/WEB-INF/struts-html.tld"
    prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld"
    prefix="bean" %>
    
    
    
    
    
    
    
     
    :
    
    
    State: 
    
       
      
    
    
    
    
    ---
    
    
    In the LogonBean.java, I inserted in the
    setParameters() method the following code:
    
    
    code:
    ---
    
    public void setParameters( HttpServletRequest request
    ){   userID = request.getParameter("userID");  
    password = request.getParameter("password");  
    ArrayList states = new ArrayList();   states.add(new
    LabelValueBean("Virginia", "VA"));   states.add(new
    LabelValueBean("Maryland", "MD"));   states.add(new
    LabelValueBean("Ohio", "OH"));   states.add(new
    LabelValueBean("Rode Island", "RI"));   states.add(new
    LabelValueBean("New York", "NY"));  
    request.setAttribute("STATES", states);}
    
    --
    
    I would appreciate if anybody could point out my
    mistakes.
    
    
    
    __
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: AW: Error Using select tag To Create Drop-Down Menu

    Hi, Dirk:  Thanks for your help.  My code works now. 
    I am able to see the drop-down menu in the browser.
    
    --- Dirk Behrendt <[EMAIL PROTECTED]> wrote:
    > Hello!
    >  
    > I had the same problem...
    >  
    > You have to include the  tag into
    >  tags.  Look:
    >  
    >  
    > 
    >  
    >  onchange="javascript: submit ()">
    >   value="Englisch"/>
    > 
    >  
    >   
    >  
    > I have an ActionBean and a FormBean for the action
    > "/language".
    >  
    > Without that you will get the exception 
    > "Cannot find bean under name
    > org.apache.struts.taglib.html.BEAN" 
    >  
    > Hope, that will help!
    >  
    > Dirk
    >  
    >  
    > -Ursprüngliche Nachricht-
    > Von: Caroline Jen [mailto:[EMAIL PROTECTED] 
    > Gesendet: Montag, 21. Juli 2003 21:18
    > An: [EMAIL PROTECTED]
    > Betreff: Error Using select tag To Create Drop-Down
    > Menu
    >  
    > I am doing testings step by step. I simply want to
    > add
    > a drop-down menu feature to something that works
    > OKay.
    > I am a newbie to struts. I do not know where to look
    > for my mistakes when I encounter problems. 
    > Something is wrong in my .jsp page. This .jsp page
    > had
    > worked fine before ...
    > tags were added. The error message is:
    >  
    >  
    > code:
    >
    --
    >  
    > 2003-07-21 01:24:51
    > StandardWrapperValve[action]:Servlet.service() for
    > servlet action threw
    > exceptionorg.apache.jasper.JasperException: Cannot
    > find bean under name
    > org.apache.struts.taglib.html.BEAN
    >  
    >
    ---
    >  
    > Here is the source code of my MainMenu.jsp:
    >  
    >  
    > code:
    >
    ---
    >  
    > <%@ taglib uri="/WEB-INF/struts-html.tld"
    > prefix="html" %>
    > <%@ taglib uri="/WEB-INF/struts-bean.tld"
    > prefix="bean" %>
    >  class="resources.version1.LogonBean" /> 
    > 
    > 
    >   
    > 
    > :
    >  property="userType" />
    > 
    > State: 
    >   
    >  
    > property="value"   
    >labelProperty="label" /> 
    >  
    >   
    > 
    > 
    > 
    >  
    >
    ---
    >  
    >  
    > In the LogonBean.java, I inserted in the
    > setParameters() method the following code:
    >  
    >  
    > code:
    >
    ---
    >  
    > public void setParameters( HttpServletRequest
    > request
    > ){   userID = request.getParameter("userID");  
    > password = request.getParameter("password");  
    > ArrayList states = new ArrayList();   states.add(new
    > LabelValueBean("Virginia", "VA"));   states.add(new
    > LabelValueBean("Maryland", "MD"));   states.add(new
    > LabelValueBean("Ohio", "OH"));   states.add(new
    > LabelValueBean("Rode Island", "RI"));  
    > states.add(new
    > LabelValueBean("New York", "NY"));  
    > request.setAttribute("STATES", states);}
    >  
    >
    --
    >  
    > I would appreciate if anybody could point out my
    > mistakes.
    >  
    >  
    >  
    > __
    > Do you Yahoo!?
    > SBC Yahoo! DSL - Now only $29.95 per month!
    > http://sbc.yahoo.com
    > <http://sbc.yahoo.com/> 
    >  
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: drop-down list help

    Hi, Rick:
    
     Take a look at
    http://www.reumann.net/do/struts/main
    
    In Lesson II, you'll find an example of how to use the
    html:select tag
    
    Lesson II-4 Create ActionForm - The UI element for
    entering a value into the department field will be a
    drop-down list.
    
    Lesson II-6 Create DepartmentBean - This bean will be
    used to represent options for the drop-down list.
    
    Lesson II-8 Create EmployerService - shows how the
    list of departments is created. 
    
    Lesson II-9 Create SetUpEmployerAction - this is where
    the list of options is put into the session context.
    
    
    code:
    --
    
      Collection departments = service.getDepartments();
      HttpSession session = request.getSession();
      session.setAttribute( "departments", departments );
    
    --
    
    Lesson II-14 Create employeeForm.jsp - shows how the
    html:select and html:options is used to present a
    drop-down list of departments. 
    
    Note the property and labelProperty attributes in the
    html:options tag: both id and description are
    properties of the DepartmentBean created in II-6. The 
    collection attribute is the name "departments" which
    was used when the list of DepartmentBeans was added to
    the session context (II-9).
    
    --- Rick Col <[EMAIL PROTECTED]> wrote:
    > Hi, Swaroop:
    > 
    > I have a question about your implementation, do we
    > still need to implement an actionForm class for the
    > following drop down list? 
    > 
    > regards,
    > 
    > 
    > 
    > --- Swaroop George <[EMAIL PROTECTED]> wrote:
    > >  > class="com.xxx.DropdownCollections">
    > >
    > > 
    > > 
    > >  > property="months"
    > > toScope="request"/>
    > > 
    > >  > labelProperty="value"/>
    > > 
    > > 
    > > 
    > > Hi this is a part of the page I developed..
    > > (Ofcourse a commercial
    > > application..) I have a class called
    > > DropDownCollections.java
    > > Now in the class I have a method getMonths() which
    > > will return me a
    > > collection of months..
    > > 
    > > I am using the months collection to populate the
    > > options..
    > > You can actually use an html:select instead of a
    > > nested:select
    > > 
    > > The getMonths() returns a set of beans having two
    > > attributes key and
    > > value..
    > > Key will be the month numbers 1,2,3,4..
    > > While value will be month names Jan, Feb,..
    > > While the dropdown is rendered the month name will
    > > be shown.. When the
    > > page is submitted the month num(key) will be set
    > to
    > > the property 'month'
    > > 
    > > Hope it helps..
    > > Swaroop
    > > 
    > > -Original Message-
    > > From: Rick Col [mailto:[EMAIL PROTECTED] 
    > > Sent: Tuesday, July 22, 2003 6:24 PM
    > > To: Struts Users Mailing List
    > > Subject: drop-down list help
    > > 
    > > Hi, guys:
    > > 
    > > I am a struts newbie. I have spent sevaral days
    > > trying
    > > build a struts page with several drop-down lists
    > in
    > > vain. I am wondering there are any struts drop
    > down
    > > lists examples out there. I appreciate your help. 
    > > 
    > > regards,
    > > 
    > > 
    > > __
    > > Do you Yahoo!?
    > > SBC Yahoo! DSL - Now only $29.95 per month!
    > > http://sbc.yahoo.com
    > > 
    > >
    >
    -
    > > To unsubscribe, e-mail:
    > > [EMAIL PROTECTED]
    > > For additional commands, e-mail:
    > > [EMAIL PROTECTED]
    > > 
    > > 
    > >
    >
    -
    > > To unsubscribe, e-mail:
    > > [EMAIL PROTECTED]
    > > For additional commands, e-mail:
    > > [EMAIL PROTECTED]
    > > 
    > 
    > 
    > __
    > Do you Yahoo!?
    > SBC Yahoo! DSL - Now only $29.95 per month!
    > http://sbc.yahoo.com
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Logon "Submit" returns a blank page

    What is in the log file?  Log files records errors. 
    There may be a clue.
    --- todd thorner <[EMAIL PROTECTED]> wrote:
    > Hi and thanks,
    > 
    > Ok, I have reached this far in my logon page
    > development...
    > 
    > The first JSP page comes up fine, showing me a form
    >  with a rendered
    >  tag for each required field (username
    > and password), plus a "Reset" and a "Submit" button.
    >  Code sample below comes from my struts-config.xml
    > file:
    > 
    > 
    >   type="mystrutsforms.LogonForm"/>
    > 
    > 
    > 
    >  
    > 
    > 
    > 
    >   type="org.apache.struts.actions.ForwardAction"
    > parameter="/pages/Logon.jsp"/>
    >   type="mystrutsactions.LogonAction" name="logonForm"
    > scope="request" validate="true"
    > input="/pages/Logon.jsp">
    > path="/pages/LogonSuccess.jsp"/>
    > path="/pages/LogonFail.jsp"/>
    >   
    > 
    > 
    > ** struts-config.xml code above
    > **
    > 
    > I can enter data into the  fields and
    > they will erase if I click "Reset"
    > I can click "Submit" with nothing filled in (passing
    > nulls with the request), and the proper
    >  are displayed
    > However,
    > 
    > If I enter any values for the "username" and
    > "password" fields, then click "Submit," a blank page
    > is always returned.
    > 
    > What's up with that?  The browser says it's trying
    > to display results from "LogonSubmit.do" (which is
    > what I expect).  I have a file called
    > "users.properties" in the directory
    > "WEB-INF/classes" and in my LogonAction.java code:
    > 
    > public final class LogonAction extends Action {
    > 
    > public ActionForward execute( ActionMapping
    > mapping,
    > ActionForm form,
    > HttpServletRequest request,
    > HttpServletResponse response )
    > throws Exception {
    > 
    > String username = ( ( LogonForm ) form
    > ).getUsername();
    > String password = ( ( LogonForm ) form
    > ).getPassword();
    > boolean validated = false;
    >   
    > try {
    > 
    > validated = isUserLoggedOn( username,
    > password );
    > }
    > catch ( SimpleUserDirectoryException sudexc
    > ) {
    > ActionErrors errors = new
    > ActionErrors();
    > errors.add( ActionErrors.GLOBAL_ERROR,
    > new ActionError( "error.logon.connect" )
    > );
    > saveErrors( request, errors );
    > return ( new ActionForward(
    > mapping.getInput() ) );
    > }
    > 
    > if ( !validated ) {
    > 
    > ActionErrors errors = new
    > ActionErrors();
    > errors.add( ActionErrors.GLOBAL_ERROR,
    > new ActionError( "error.logon.invalid" )
    > );
    > saveErrors( request, errors );
    > return ( new ActionForward(
    > mapping.getInput() ) );
    > }
    > 
    > HttpSession session = request.getSession();
    > session.setAttribute( Constants.USER_KEY,
    > form );
    >   
    > return ( mapping.findForward(
    > Constants.SUCCESS ) );
    > }
    > 
    > public boolean isUserLoggedOn( String username,
    > String password ) throws
    > SimpleUserDirectoryException {
    > 
    > return (
    > SimpleUserDirectory.getInstance().passwordIsValid(
    > username, password ) );
    > }
    > }
    > 
    > ** mystrutsactions.LogonAction.java
    > code above **
    > 
    > Note: The LogonAction.java file above makes use of
    > the following SimpleUserDirectory.java code:
    > 
    >   private static final String
    > SimpleUserDirectoryFilepath = "users.properties";
    >   InputStream ips =
    >
    this.getClass().getClassLoader().getResourceAsStream(
    > SimpleUserDirectoryFilepath );
    >   
    > ** mystrutsforms.LogonForm.java code
    > above **
    > 
    > Also, my web.xml file has:
    > 
    > 
    >  application
    >  application
    > 
    > 
    > ** web.xml code above
    > **
    > 
    > Any suggestions or guesses are appreciated.
    > 
    > 
    >
    
    > Get advanced SPAM filtering on Webmail or POP Mail
    > ... Get Lycos Mail!
    > http://login.mail.lycos.com/r/referral?aid=27005
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: File "/WEB-INF/struts-bean.tld" not found

    Did you put:
    
    <%@ taglib uri="/WEB-INF/struts-bean.tld"
    prefix="bean" %>
    
    in your FileName.jsp?
    --- message message <[EMAIL PROTECTED]> wrote:
    > 
    > You probably need to reload your application after
    > having made
    > the entry in the web.xml file.
    > 
    > 
    > >From: "Vinayak Birari"
    > <[EMAIL PROTECTED]>
    > >Reply-To: "Struts Users Mailing List"
    > <[EMAIL PROTECTED]>
    > >To: <[EMAIL PROTECTED]>
    > >Subject: File "/WEB-INF/struts-bean.tld" not found
    > >Date: Mon, 28 Jul 2003 14:08:08 +0530
    > >
    > >hi all,
    > >I am new to Struts, I have downloaded sample
    > banking application
    > >oreilly
    >
    site.(http://www.oreilly.com/catalog/jakarta/banking-dev.zip)
    > >I have unzipped the entire code in webapps\ROOT
    > directory if
    > >  I m getting following error
    > >  org.apache.jasper.JasperException: File
    > >"/WEB-INF/struts-bean.tld" not found
    > >
    > >I have kept all the .tld file in WEB-INF folder
    > >in web.xml i have made the entry and given the path
    > as
    > >/WEB-INF/struts-bean.tld
    > >i wanted to know is it necessary to make its entry
    > anywhere else.
    > >
    > >thanks in advance.
    > >Vinayak.
    > >
    >
    >-
    > >To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > >For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > >
    > 
    >
    _
    > MSN 8 helps eliminate e-mail viruses. Get 2 months
    > FREE*. 
    > http://join.msn.com/?page=features/virus
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Converting Data Types On the Business Bean Side

    Does the Struts 1.1 BeanUtils class supports
    transferring data between String and native types on
    the business bean side?
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    ActionForm Design Question

    Hi, I am building a web site.  The primary functions
    of this site are for authors to submit their research
    papers.  The research papers will go through a
    screening process (screened by peers in the field). 
    Visiors can view the published articles online.
    
    Authors and peers are the registered users of the web
    site.
    
    Therefore, there is not much data manipulation at the
    web site except that authors may be requested to
    revise their papers and re-submit.  And both authors
    and peers have to fill out registration forms to
    become members of the web site.
    
    The content of the registration form is pretty
    standard: name, address, phone number, academic
    background information and achievements, etc.  Most of
    them are Strings.  A couple of checkboxes, three sets
    of radio buttons (to indicate preferences), and a
    primitive double.  Of course, I have a text field for
    loading research papers.
    
    Question 1: Do I use conventional ActionForm?
    Map-backed ActionForm? or DynaActionForm for this
    project?
    
    Question 2: Which strategy should I use to transfer
    values between tiers?  Setting an immutable value
    object?  or transferring values by reflection
    (BeanUtil)? or passing a Map?
    
    I highly value your opinions and advices.  Thanks.
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Need Instructions To Setup The Artimus Example

    Hi, I am new to Struts.  I would like to get a "look
    and feel" of the Artimus example (artimus_1_1.war) in
    the "Struts in Action" provided by Husted.
    
    I have the Tomcat 4.1.18 installed and functioning in
    my machine.  I also have downloaded the Ant.
    
    Where can I find instructions to quickly deploy the
    Artimus example to see all the features offered, such
    as users can add, edit, or delete articles,  Any
    visitor to the site can view the articles online using
    various search features, including full text and by
    author, title, or time span?
    
    Thank you very much.
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: Need Instructions To Setup The Artimus Example

    Thanks for sympathizing and taking care of a newbie.  
    
    I am using Struts-1.1-rc2.  Tomcat-4.1.18-LE-jdk14 is
    up and running in my machine.
    
    Hoping Ted noticed my post and provides guidance to
    setup the Artimus example for someone new like me to
    get the "look and feel" of all the features.
    
    Caroline
    --- Mark Galbreath <[EMAIL PROTECTED]> wrote:
    > Unfortunately, Struts has changed significantly
    > since "Struts In Action" was
    > published and I do not know the relevance of your
    > question.  I think Ted
    > (the author) will probably see your post and answer.
    >  Just didn't want to
    > leave a newbie hanging
    > 
    > Can you gives us more information, like what version
    > of Struts you are using
    > and what application container you are employing?
    > 
    > Mark
    > 
    > -Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
    > Sent: Wednesday, August 20, 2003 5:36 PM
    > To: [EMAIL PROTECTED]
    > Subject: Need Instructions To Setup The Artimus
    > Example
    > 
    > 
    > Hi, I am new to Struts.  I would like to get a "look
    > and feel" of the Artimus example (artimus_1_1.war)
    > in
    > the "Struts in Action" provided by Husted.
    > 
    > I have the Tomcat 4.1.18 installed and functioning
    > in
    > my machine.  I also have downloaded the Ant.
    > 
    > Where can I find instructions to quickly deploy the
    > Artimus example to see all the features offered,
    > such
    > as users can add, edit, or delete articles,  Any
    > visitor to the site can view the articles online
    > using
    > various search features, including full text and by
    > author, title, or time span?
    > 
    > Thank you very much.
    > 
    > __
    > Do you Yahoo!?
    > Yahoo! SiteBuilder - Free, easy-to-use web site
    > design software
    > http://sitebuilder.yahoo.com
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Need Instructions To Setup The Artimus Example

    I have gone to his book site but cannot find a
    discussion forum.  I am hoping that Ted would notice
    my post here and give a hand.
    --- Rick Reumann <[EMAIL PROTECTED]> wrote:
    > On Wed, Aug 20,'03 (04:55 PM GMT-0700), Caroline
    > wrote: 
    >  
    > > Hoping Ted noticed my post and provides guidance
    > to
    > > setup the Artimus example for someone new like me
    > to
    > > get the "look and feel" of all the features.
    > 
    > Have you checked out his book's site? and posted
    > there? I think he's
    > pretty good at responding to questions on that forum
    > (if it still
    > exists.. been a long while since I was there). I
    > never got around to
    > actually running the Artimus example so I might not
    > be of much help to
    > you. I think I remember other posts on that forum
    > helping with it
    > though. Good luck.
    > 
    > -- 
    > Rick
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Need Instructions To Setup The Artimus Example

    Rick, thanks a lot for taking the trouble to find the
    web link to the Husted discussion forum.  I have
    posted my question there and hoping to get some
    instructions soon.  I appreciate your help.
    
    Caroline
    --- Rick Reumann <[EMAIL PROTECTED]> wrote:
    > On Wed, Aug 20,'03 (10:38 PM GMT-0700), Caroline
    > wrote: 
    > 
    > > I have gone to his book site but cannot find a
    > > discussion forum.  
    > 
    > You can get to the forum here: 
    > 
    >
    http://www.manning.com/getpage.html?project=husted&filename=forum.html
    > 
    > Click on "author online"
    > 
    > (I admit not easy to find from his personal site.
    > Took me a while).
    >  
    > -- 
    > Rick
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    artimus_1_1

    I tried to deploy the artimus_1_1 application and I
    followed the instructions in the README file that was
    bundled with the artimus_1_1.war.
    
    I successfully logged into the application, using the
    username: artimus and password: g0rd0n. 
    
    I continued to followed the instructions.  I  selected
    "Create Resources" from the Manager's Options, and
    press GO. At this point, I got the following message
    on the top of the screen:
    
    The process did not complete. Details should follow. 
    ERROR: java.lang.NullPointerException
    
    Please advise me what to do with it.  Thanks a lot. 
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: datasource connection problem.

    Hi, in my opinion, you should pay attention to this
    part of your log file:
    
    Unable to connect to any hosts due to exception.
    
    and 
    
    java.net.BindExceptioncom.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346
    
    It says that the jdbc driver is not registered.
    --- Rajat Pandit <[EMAIL PROTECTED]> wrote:
    > hello,
    > i am using mysql as a datasource in the
    > app,everything
    > is working fine but when make changes in the class
    > files and reload the application the application
    > ceazes to work and i got the followng messages in my
    > log file. can some one help me figure out where am i
    > going wrong. am a newbie.
    > thanks in advance
    > rajat
    > 
    > --> SNIP <--
    > [INFO] PropertyMessageResources - -Initializing,
    > config='resources.application',
    >  returnNull=true
    > [INFO] GenericDataSource - -   createConnection()
    > [ERROR] ActionServlet - -Initializing application
    > data
    > source org.apache.struts.action.DATA_SOURCE
    >  hosts
    > due to exception: java.net.BindException: Address in
    > use: no further information>java.
    > sql.SQLException: Unable to connect to any hosts due
    > to exception: java.net.Bind
    > Exception: Address in use: no further information
    > at
    >
    com.mysql.jdbc.Connection.createNewIO(Connection.java:1622)
    > at
    >
    com.mysql.jdbc.Connection.(Connection.java:491)
    > at
    >
    com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
    > at
    >
    org.apache.struts.legacy.GenericDataSource.createConnection(GenericDataSource.java:805)
    > at
    >
    org.apache.struts.legacy.GenericDataSource.open(GenericDataSource.java:741)
    > at
    >
    org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1085)
    > at
    >
    org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
    > at
    >
    javax.servlet.GenericServlet.init(GenericServlet.java:256)
    > at
    >
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
    > at
    >
    org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
    > at
    >
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
    > at
    >
    org.apache.catalina.core.StandardContext.reload(StandardContext.java:2567)
    > at
    >
    org.apache.catalina.servlets.ManagerServlet.reload(ManagerServlet.java:740)
    > at
    >
    org.apache.catalina.servlets.HTMLManagerServlet.reload(HTMLManagerServlet.java:325)
    > at
    >
    org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.java:143)
    > at
    >
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    > at
    >
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    > at
    >
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    > at
    >
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    > at
    >
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    > --> SNIP <--
    > 
    >
    
    > Yahoo! India Matrimony: Find your partner online.
    > Go to http://yahoo.shaadi.com
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Confused by index.jsp, welcome.jsp, and logon.jsp

    Hi, I am new to Struts.  I have read the logon example
    presented in Husted's "Struts in Action" and deployed
    the logon.war on my machine.  Everything works exactly
    like what says in the book.
    
    However, I am confused -- 
    My question is why I entered
    http://localhost:8080/logon
    and the welcome.jsp is invoked and displayed in the
    browser?
    
    In my mind, http://localhost:8080/logon tells to look
    for logon.do.  According to the action mappings:
    
    
    
    the Logon.jsp should be invoked.  Could anybody shed
    some light on it?
    
    I can understand if I enter
    http://localhost:8080/logon/index.jsp
    the welcome.jsp is invoked because the logic.forward
    tag in the index.jsp: 
    
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    
    
    
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    NullPointerException While Deploying the Artimus_1_1

    I have 
     
     1. Tomcat 4.1.18-LE-jdk14 up and running in the
    Windows XP Pro environment;
     2. I am using Struts-1.1-rc2; 
     3. I have MySQL installed in my machine. And I have
    used the Tomcat connection pool to retrieve data
    from the MySQL database before.
    
    I tried to deploy the artimus_1_1 application and I
    followed the instructions in the README file that was
    bundled with the artimus_1_1.war:
    
     4. I have jdbc2_0-stdext.jar, jta-spec1_0_1.jar, and 
    
    xerces.jar in my 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\common\lib
    folder
    
       I hope that jta-spec1_0_1.jar is equivalent to 
       jta.jar
     5. I did not fully understand this instruction:
    
       "Create a /var/lucene/artimus folder"; therefore,  
    
       in my machine, I have both folders created
       C:\var\lucene\artimus 
       and 
      
    C:\jakarta-tomcat-4.1.18-LE-jdk14\var\lucene\artimus
    
     6. I exactly followed the rest of the instructions in
    
    the README.txt 
    
    I successfully logged into the application, using the
    username: artimus and password: g0rd0n. 
    
    I continued to followed the instructions.  I  selected
    "Create Resources" from the Manager's Options, and
    press GO. At this point, I got the following message
    on the top of the screen:
    
    The process did not complete. Details should follow. 
    ERROR: java.lang.NullPointerException
    
    Please advise me what to do with it.  Thanks a lot
    
    Shown below is what in the Tomcat log:
    
    2003-09-05 18:02:52 action: Creating Helper
    org.apache.artimus.CreateResources
    2003-09-05 18:02:52 action: Helper created class:
    org.apache.artimus.CreateResources
    2003-09-05 18:02:52 action: Executing helper beans 
    2003-09-05 18:02:52 action: Processing helper beans 
    2003-09-05 18:02:52 action: Executing helper beans 
    2003-09-05 18:02:53 action: *** ACTION EXCEPTION: 
    java.lang.NullPointerException
    at org.apache.artimus.article.Access.index(Unknown
    Source)
    at org.apache.artimus.CreateResources.execute(Unknown
    Source)
    at
    org.apache.struts.scaffold.ProcessAction.executeLogic(Unknown
    Source)
    at
    org.apache.struts.scaffold.BaseHelperAction.executeLogic(Unknown
    Source)
    at
    org.apache.struts.scaffold.BaseAction.execute(Unknown
    Source)
    at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    at
    org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
    at
    org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
    at
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1014)
    at
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:257)
    at
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:417)
    at
    org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
    at
    org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:390)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catal

    Menu Forwards?

    This is the application I am studying.  The index.jsp
    of the application contains two lines:
    
    
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    
    
    
    What is the meaning of this redirect forward?  Is the
    browser asked to submit a new request to the path with
    logical name "welcome"?
    
    I then searched the config.xml file, 
    
    
      
    
    
     
    
    
    
     
    
     
    
     
    
     ...
    
      
    
    The path of the logical name "welcome" is "do/Menu". 
    However, there is no Menu ActionServlet in the
    application.  
    
    There is Menu.jsp in the application.  Does this
    application displays the Menu.jsp file when first
    deployed?
    
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Please Help Me To Understand "forward"

    I am studying the code in Artimus_1_1 to make sure
    that I understand how things actually work.  I am lost
    at the beginning of the application.  Please kindly
    help me.  The index.jsp of the application contains
    two lines:
    
    code:
    --
    
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    
    
    ---
    
    Does this redirect forward tells the browser to submit
    a new request to the path with logical name "welcome"?
    
    I then searched the config.xml file, 
    
    
    code:
    ---
    
    
    
     
    
     
     
     
     ...
    
    
    ---
    
    The path of the logical name "welcome" is "do/Menu"
    (note it is upper case Menu).  The other place that
    "do/Menu" appears in the config.xml is:
    
    
       
    
    
    
    There is no Menu ActionServlet in the application.
    
    There is a menu.jsp (note it is lower case menu) file
    in the application. Does this application display
    menu.jsp when it is first launched? Apparently, it
    does. This menu.jsp is in the
    artimus_1_1/WEB-INF/src/pages/article/content folder.
    I am confused - does /do/Menu locate the menu.jsp 
    
    1. in the /src/pages/article/content folder?
    2. regardless upper or lower cases? 
    
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Confused - Scaffold and Action Mapping

    I have problem to understand the action mapping shown
    below:
    
    code:
    -
    
     
    
    
     
    
    -
    
    It looks to me that 
    
    1. menuForm is the logical name for the form bean as 
       given in the form-bean segment of the 
       struts-config.xml file.  
    
    Question 1: What is the rational of having 'menuForm'
    in the org.apache.struts.scaffold folder in
    ActionMapping? 
    
    2. the action that is going to be executed is 
       the ExistsAttributeAction in the 
       org.apache.struts.scaffold folder.  If the 
       condition returned in that action is 'success', the
    
       article.Menu tile will render the next page. 
    
       The code of ExistsAttributeAction.java shows:
    
       mapping.findForward(Tokens.SUCCESS);
    
    Question 2: Where can I find Tokens.SUCCESS maps to
    'success'?
    
    Thank you for your help.
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Installation of Artimus_1_1 Was Stuck When Tried to "Create Resources"

    I successfully got the Artimus_1_1 welcome page.  I
    clicked LOGON buttion and the next page was displayed.
     I selected "Create Resources" from the Manager
    options and clicked on GO.  I had
    http://localhost:8080/artimus_1_1/do/menu/Manager
    displayed in the address bar with the following
    message shown on the screen:
    
    . The process did not complete. Details should follow.
    
    . ResourceException: A required resource is not
    available. Caused by: java.sql.SQLException: General
    error, message from server: "Table 'artimus_keys'
    already exists" 
    
    How do I fix the problem?
    
    
    Part of the messages in the Tomcat log file is shown
    below:
     
    2003-09-19 03:27:09 action: Creating Helper
    org.apache.artimus.CreateResources
    2003-09-19 03:27:09 action: Helper created class:
    org.apache.artimus.CreateResources
    2003-09-19 03:27:09 action: Executing helper beans 
    2003-09-19 03:27:09 action: Processing helper beans 
    2003-09-19 03:27:09 action: Executing helper beans 
    2003-09-19 03:27:10 action: *** ACTION EXCEPTION: 
    org.apache.commons.scaffold.lang.ResourceException:
    ResourceException: A required resource is not
    available.
    at
    org.apache.commons.scaffold.sql.AccessBase.executeUpdate(Unknown
    Source)
    at org.apache.artimus.keys.Access.createTable(Unknown
    Source)
    at org.apache.artimus.CreateResources.execute(Unknown
    Source)
    at
    org.apache.struts.scaffold.ProcessAction.executeLogic(Unknown
    Source)
    at
    org.apache.struts.scaffold.BaseHelperAction.executeLogic(Unknown
    Source)
    at
    org.apache.struts.scaffold.BaseAction.execute(Unknown Source)
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Do Not Understand "/tags/struts-logic" not found

    I double checked that 
    
    1. struts-logic.tld is in the 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\MyApplication\WEB-INF\lib
    folder
    
    2. in my web.xml file, I have  
    
    /tags/struts-logic
       
    /WEB-INF/lib/struts-logic.tld
      
    
    3. in my .jsp files, I have
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    
    When I ran the application, I had
    
    org.apache.jasper.JasperException: File
    "/tags/struts-logic" not found 
    
    displayed in the browser.
    
    I looked at the tomcat log file, it seems to say
    something else is going on.  I do not have the ability
    diagnose the proble and hereby post the problem for
    help.  The log message is in the attachment.  Thank
    you.
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com2003-09-19 22:18:04 WebappLoader[]: Deploying class repositories to work directory 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\_
    2003-09-19 22:18:04 WebappLoader[]: Deploy class files /WEB-INF/classes to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\ROOT\WEB-INF\classes
    2003-09-19 22:18:04 StandardManager[]: Seeding random number generator class 
    java.security.SecureRandom
    2003-09-19 22:18:04 StandardManager[]: Seeding of random number generator has been 
    completed
    2003-09-19 22:18:04 StandardWrapper[:default]: Loading container servlet default
    2003-09-19 22:18:04 StandardWrapper[:invoker]: Loading container servlet invoker
    2003-09-19 22:18:04 HostConfig[localhost]: Deploying configuration descriptor admin.xml
    2003-09-19 22:18:12 HostConfig[localhost]: Deploying configuration descriptor 
    manager.xml
    2003-09-19 22:18:12 WebappLoader[/manager]: Deploying class repositories to work 
    directory C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\manager
    2003-09-19 22:18:12 ContextConfig[/manager]: Configured an authenticator for method 
    BASIC
    2003-09-19 22:18:12 StandardManager[/manager]: Seeding random number generator class 
    java.security.SecureRandom
    2003-09-19 22:18:12 StandardManager[/manager]: Seeding of random number generator has 
    been completed
    2003-09-19 22:18:12 StandardWrapper[/manager:default]: Loading container servlet 
    default
    2003-09-19 22:18:12 StandardWrapper[/manager:invoker]: Loading container servlet 
    invoker
    2003-09-19 22:18:12 HostConfig[localhost]: Expanding web application archive 
    artimus_1_1.war
    2003-09-19 22:18:12 StandardHost[localhost]: Installing web application at context 
    path /artimus_1_1 from URL file:C:/jakarta-tomcat-4.1.18-LE-jdk14/webapps/artimus_1_1
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploying class repositories to work 
    directory C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\artimus_1_1
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy class files /WEB-INF/classes to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\classes
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-beanutils.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-beanutils.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-collections.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-collections.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-dbcp.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-dbcp.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-digester.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-digester.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-fileupload.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-fileupload.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-lang.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-lang.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-logging.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-logging.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-pool.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-pool.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-resources.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-resources.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-scaffold.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-scaffold.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-services.jar to 
    C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-services.jar
    2003-09-19 22:18:12 WebappLoader[/artimus_1_1]: Deploy JAR 
    /WEB-INF/lib/commons-validator.jar to 
    C:\jakarta-tomca

    Re: Do Not Understand "/tags/struts-logic" not found

    I am following Ted Husted's example code and setup;
    therefore, I do not think it is the problem.  Those
    TLD files can be in the WEB-INF/lib folder.
    --- John Cavacas <[EMAIL PROTECTED]> wrote:
    > Shouldn't those TLD files be in WEB-INF/ ? not
    > WEB-INF/lib ...
    > 
    > At 07:49 PM 19/09/2003 -0700, you wrote:
    > >I double checked that
    > >
    > >1. struts-logic.tld is in the
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\MyApplication\WEB-INF\lib
    > >folder
    > >
    > >2. in my web.xml file, I have
    > >
    > > /tags/struts-logic
    > >
    >
    >/WEB-INF/lib/struts-logic.tld
    > >   
    > >
    > >3. in my .jsp files, I have
    > ><%@ taglib uri="/tags/struts-logic" prefix="logic"
    > %>
    > >
    > >When I ran the application, I had
    > >
    > >org.apache.jasper.JasperException: File
    > >"/tags/struts-logic" not found
    > >
    > >displayed in the browser.
    > >
    > >I looked at the tomcat log file, it seems to say
    > >something else is going on.  I do not have the
    > ability
    > >diagnose the proble and hereby post the problem for
    > >help.  The log message is in the attachment.  Thank
    > >you.
    > >
    > >
    > >__
    > >Do you Yahoo!?
    > >Yahoo! SiteBuilder - Free, easy-to-use web site
    > design software
    > >http://sitebuilder.yahoo.com
    > >2003-09-19 22:18:04 WebappLoader[]: Deploying class
    > repositories to work 
    > >directory
    >
    C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\_
    > >2003-09-19 22:18:04 WebappLoader[]: Deploy class
    > files /WEB-INF/classes to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\ROOT\WEB-INF\classes
    > >2003-09-19 22:18:04 StandardManager[]: Seeding
    > random number generator 
    > >class java.security.SecureRandom
    > >2003-09-19 22:18:04 StandardManager[]: Seeding of
    > random number generator 
    > >has been completed
    > >2003-09-19 22:18:04 StandardWrapper[:default]:
    > Loading container servlet 
    > >default
    > >2003-09-19 22:18:04 StandardWrapper[:invoker]:
    > Loading container servlet 
    > >invoker
    > >2003-09-19 22:18:04 HostConfig[localhost]:
    > Deploying configuration 
    > >descriptor admin.xml
    > >2003-09-19 22:18:12 HostConfig[localhost]:
    > Deploying configuration 
    > >descriptor manager.xml
    > >2003-09-19 22:18:12 WebappLoader[/manager]:
    > Deploying class repositories 
    > >to work directory 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\manager
    > >2003-09-19 22:18:12 ContextConfig[/manager]:
    > Configured an authenticator 
    > >for method BASIC
    > >2003-09-19 22:18:12 StandardManager[/manager]:
    > Seeding random number 
    > >generator class java.security.SecureRandom
    > >2003-09-19 22:18:12 StandardManager[/manager]:
    > Seeding of random number 
    > >generator has been completed
    > >2003-09-19 22:18:12
    > StandardWrapper[/manager:default]: Loading container
    > 
    > >servlet default
    > >2003-09-19 22:18:12
    > StandardWrapper[/manager:invoker]: Loading container
    > 
    > >servlet invoker
    > >2003-09-19 22:18:12 HostConfig[localhost]:
    > Expanding web application 
    > >archive artimus_1_1.war
    > >2003-09-19 22:18:12 StandardHost[localhost]:
    > Installing web application at 
    > >context path /artimus_1_1 from URL 
    >
    >file:C:/jakarta-tomcat-4.1.18-LE-jdk14/webapps/artimus_1_1
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploying class 
    > >repositories to work directory 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\localhost\artimus_1_1
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy class files 
    > >/WEB-INF/classes to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\classes
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-beanutils.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-beanutils.jar
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-collections.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-collections.jar
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-dbcp.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-dbcp.jar
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-digester.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-digester.jar
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-fileupload.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-fileupload.jar
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-lang.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-lang.jar
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-logging.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-logging.jar
    > >2003-09-19 22:18:12 WebappLoader[/artimus_1_1]:
    > Deploy JAR 
    > >/WEB-INF/lib/commons-pool.jar to 
    >
    >C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\artimus_1_1\WEB-INF\lib\commons-pool.jar
    > >2003

    What Could Lead To NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource?

    Your help is greatly appreciated: what could lead to
    NoClassDefFound Error:
    org/apache/struts/legacy/GenericDataSource?
    
    the error message is HTTP Status 500.  The root cause
    is:
    java.lang.NoClassDefFoundError:
    org/apache/struts/legacy/GenericDataSource
    
    Here is the log:
    
    description: The server encountered an internal error
    () that prevented it from fulfilling this request.
    
    exception 
    
    javax.servlet.ServletException: Servlet.init() for
    servlet action threw exception
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
    at
    org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
    at
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
    at java.lang.Thread.run(Thread.java:536)
    
    
    root cause 
    
    java.lang.NoClassDefFoundError:
    org/apache/struts/legacy/GenericDataSource
    at java.lang.ClassLoader.defineClass0(Native Method)
    at
    java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at
    org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
    at
    org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
    at
    org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
    at
    org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
    at
    org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1079)
    at
    org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
    at
    javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
    at
    org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline

    What Could Lead To NoClassDefFound Error: org/apache/struts/legacy/GenericDataSource?

    Your help is greatly appreciated: what could lead to
    NoClassDefFound Error:
    org/apache/struts/legacy/GenericDataSource?
    
    the error message is HTTP Status 500.  The root cause
    is:
    java.lang.NoClassDefFoundError:
    org/apache/struts/legacy/GenericDataSource
    
    Here is the log:
    
    description: The server encountered an internal error
    () that prevented it from fulfilling this request.
    
    exception 
    
    javax.servlet.ServletException: Servlet.init() for
    servlet action threw exception
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
    at
    org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
    at
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
    at java.lang.Thread.run(Thread.java:536)
    
    
    root cause 
    
    java.lang.NoClassDefFoundError:
    org/apache/struts/legacy/GenericDataSource
    at java.lang.ClassLoader.defineClass0(Native Method)
    at
    java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at
    org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
    at
    org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
    at
    org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
    at
    org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
    at
    org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1079)
    at
    org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
    at
    javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
    at
    org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline

    What Could Lead To NoClassDefFound Error?

    Your help is greatly appreciated: what could lead to
    NoClassDefFound Error:
    org/apache/struts/legacy/GenericDataSource?
    
    the error message is HTTP Status 500.  The root cause
    is:
    java.lang.NoClassDefFoundError:
    org/apache/struts/legacy/GenericDataSource
    
    Here is the log:
    
    description: The server encountered an internal error
    () that prevented it from fulfilling this request.
    
    exception 
    
    javax.servlet.ServletException: Servlet.init() for
    servlet action threw exception
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
    at
    org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at
    org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
    at
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
    at java.lang.Thread.run(Thread.java:536)
    
    
    root cause 
    
    java.lang.NoClassDefFoundError:
    org/apache/struts/legacy/GenericDataSource
    at java.lang.ClassLoader.defineClass0(Native Method)
    at
    java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at
    org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
    at
    org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
    at
    org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
    at
    org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
    at
    org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1079)
    at
    org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
    at
    javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
    at
    org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline

    RE: What Could Lead To NoClassDefFound Error?

    James and Nate, thank you very much.  My application
    works now after I placed the struts-legacy.jar in the
    ContextRoot/WEB-INF/lib directory.
    
    -Caroline
    --- James Childers <[EMAIL PROTECTED]> wrote:
    > 99 times out of 100 this is due to a classpath
    > issue, usually due to a misplaced or nonexistant jar
    > file. I don't believe the legacy components are
    > included in the Struts 1.1 jar, so if you're using
    > that stuff you'll need to get it separately:
    > 
    >
    http://archive.apache.org/dist/jakarta/struts/struts-legacy/
    > 
    > HTH,
    > 
    > -= J
    > 
    > > -Original Message-
    > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > > Sent: Monday, September 22, 2003 2:21 PM
    > > To: [EMAIL PROTECTED]
    > > Subject: What Could Lead To NoClassDefFound Error?
    > > 
    > > 
    > > Your help is greatly appreciated: what could lead
    > to
    > > NoClassDefFound Error:
    > > org/apache/struts/legacy/GenericDataSource?
    > > 
    > > the error message is HTTP Status 500.  The root
    > cause
    > > is:
    > > java.lang.NoClassDefFoundError:
    > > org/apache/struts/legacy/GenericDataSource
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    No Error Message But A Blank Page Is Displayed.

    I am experimenting a basic application - logon.  I got
    the first two screens working without problem. 
    However, the third screen displays a blank page (no
    error message).  I am having a very difficult time to
    figure out the problem; henceforth, seeking help. 
    Here is the history of my application:
    
    1. http://localhost:8080/LogonPractice/index.jsp (no
    problem and I clicked on "Sign in")
    2.
    http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
    (no problem and the screen asked for username and
    password.  I filled out the information and clicked on
    "Submit")  
    3. http://localhost:8080/LogonPractice/LogonSubmit.do
    (displayed a blank page)
    
    The Tomcat log file shows the following (no error
    message at all):
    
    2003-09-29 23:29:26 action: Processing a GET for
    /Logon
    2003-09-29 23:29:26 action:  Looking for Action
    instance for class
    org.apache.struts.actions.ForwardAction
    2003-09-29 23:29:26 action:   Double checking for
    Action instance already there
    2003-09-29 23:29:26 action:   Creating new Action
    instance
    2003-09-29 23:29:35 action: Processing a POST for
    /LogonSubmit
    2003-09-29 23:29:35 action:  Looking for ActionForm
    bean under attribute 'logonForm'
    2003-09-29 23:29:35 action:  Creating new ActionForm
    instance of class 'org.apache.artimus.logon.LogonForm'
    2003-09-29 23:29:35 action:  Storing instance under
    attribute 'logonForm' in scope 'request'
    2003-09-29 23:29:35 action:  Populating bean
    properties from this request
    2003-09-29 23:29:35 action:  Validating input form
    properties
    2003-09-29 23:29:35 action:   No errors detected,
    accepting input
    2003-09-29 23:29:35 action:  Looking for Action
    instance for class
    org.apache.artimus.logon.LogonAction
    2003-09-29 23:29:35 action:   Double checking for
    Action instance already there
    2003-09-29 23:29:35 action:   Creating new Action
    instance
    
    in my struts-config.xml, I have:
    
    
    
    
    
    and my LogonAction.java is:
    
    package org.apache.artimus.logon;
    
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionServlet;
    
    import org.apache.artimus.lang.Constants;
    
    public final class LogonAction extends Action {
    
    public boolean isUserLogon(String username,
    String password) throws UserDirectoryException
    {
    
    return
    (UserDirectory.getInstance().isValidPassword(username,password));
    // return true;
    
    }
    
    
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    
    // Obtain username and password from web tier
    String username = ((LogonForm)
    form).getUsername();
    String password = ((LogonForm)
    form).getPassword();
    
    // Validate credentials with business tier
    boolean validated = false;
    try {
    
    validated =
    isUserLogon(username,password);
    }
    
    catch (UserDirectoryException ude) {
    // couldn't connect to user directory
    ActionErrors errors = new ActionErrors();
    errors.add(ActionErrors.GLOBAL_ERROR,
    new ActionError("error.logon.connect"));
    saveErrors(request,errors);
    // return to input page
    return (new
    ActionForward(mapping.getInput()));
    }
    
    if (!validated) {
    // credentials don't match
    ActionErrors errors = new ActionErrors();
    errors.add(ActionErrors.GLOBAL_ERROR,
    new ActionError("error.logon.invalid"));
    saveErrors(request,errors);
    // return to input page
    return (new
    ActionForward(mapping.getInput()));
    }
    
    // Save our logged-in user in the session,
    // because we use it again later.
    HttpSession session = request.getSession();
    session.setAttribute(Constants.USER_KEY,
    form);
    
    // Log this event, if appropriate
    if (servlet.getDebug() >= Constants.DEBUG) {
    StringBuffer message =
    new StringBuffer("LogonAction: User
    '");
    message.append(username);
    message.append("' logged on in session ");
    message.append(session.getId());
    servlet.log(message.toString());
    }
    
    // Return success
    return (mapping.findForward(Constants.VALID));
    
    }
    
    } // End LogonAction
    
    
    The Constants.class is in the
    ApplicationRoot/WEB-INF/classes/org/apache/artimus/lang
    directory.  And I have 
    public static final String VALID = "valid";
    
    My Welcome.jsp in the 

    Re: No Error Message But A Blank Page Is Displayed.

    Which resource file needs to be updated?  I have
    checked the application.properties.  Nothing in that
    file is relevant to my problem.
    --- Abhijeet Mahalkar
    <[EMAIL PROTECTED]> wrote:
    > have u updated the Resource files... ?
    > abhijeet
    >  
    > - Original Message - 
    > From: "Caroline Jen" <[EMAIL PROTECTED]>
    > To: <[EMAIL PROTECTED]>
    > Sent: Tuesday, September 30, 2003 9:45 AM
    > Subject: No Error Message But A Blank Page Is
    > Displayed.
    > 
    > 
    > I am experimenting a basic application - logon.  I
    > got
    > the first two screens working without problem. 
    > However, the third screen displays a blank page (no
    > error message).  I am having a very difficult time
    > to
    > figure out the problem; henceforth, seeking help. 
    > Here is the history of my application:
    > 
    > 1. http://localhost:8080/LogonPractice/index.jsp (no
    > problem and I clicked on "Sign in")
    > 2.
    >
    http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
    > (no problem and the screen asked for username and
    > password.  I filled out the information and clicked
    > on
    > "Submit")  
    > 3.
    > http://localhost:8080/LogonPractice/LogonSubmit.do
    > (displayed a blank page)
    > 
    > The Tomcat log file shows the following (no error
    > message at all):
    > 
    > 2003-09-29 23:29:26 action: Processing a GET for
    > /Logon
    > 2003-09-29 23:29:26 action:  Looking for Action
    > instance for class
    > org.apache.struts.actions.ForwardAction
    > 2003-09-29 23:29:26 action:   Double checking for
    > Action instance already there
    > 2003-09-29 23:29:26 action:   Creating new Action
    > instance
    > 2003-09-29 23:29:35 action: Processing a POST for
    > /LogonSubmit
    > 2003-09-29 23:29:35 action:  Looking for ActionForm
    > bean under attribute 'logonForm'
    > 2003-09-29 23:29:35 action:  Creating new ActionForm
    > instance of class
    > 'org.apache.artimus.logon.LogonForm'
    > 2003-09-29 23:29:35 action:  Storing instance under
    > attribute 'logonForm' in scope 'request'
    > 2003-09-29 23:29:35 action:  Populating bean
    > properties from this request
    > 2003-09-29 23:29:35 action:  Validating input form
    > properties
    > 2003-09-29 23:29:35 action:   No errors detected,
    > accepting input
    > 2003-09-29 23:29:35 action:  Looking for Action
    > instance for class
    > org.apache.artimus.logon.LogonAction
    > 2003-09-29 23:29:35 action:   Double checking for
    > Action instance already there
    > 2003-09-29 23:29:35 action:   Creating new Action
    > instance
    > 
    > in my struts-config.xml, I have:
    > 
    >  path="/LogonSubmit"
    >
    > type="org.apache.artimus.logon.LogonAction"
    > name="logonForm"
    > scope="request"
    > validate="true"
    > input="/signin/Logon.jsp">
    >  name="valid"
    > path="/signin/Welcome.jsp"/>
    > 
    > 
    > and my LogonAction.java is:
    > 
    > package org.apache.artimus.logon;
    > 
    > import java.io.IOException;
    > import javax.servlet.ServletException;
    > import javax.servlet.http.HttpServletRequest;
    > import javax.servlet.http.HttpSession;
    > import javax.servlet.http.HttpServletResponse;
    > import org.apache.struts.action.Action;
    > import org.apache.struts.action.ActionError;
    > import org.apache.struts.action.ActionErrors;
    > import org.apache.struts.action.ActionForm;
    > import org.apache.struts.action.ActionForward;
    > import org.apache.struts.action.ActionMapping;
    > import org.apache.struts.action.ActionServlet;
    > 
    > import org.apache.artimus.lang.Constants;
    > 
    > public final class LogonAction extends Action {
    > 
    > public boolean isUserLogon(String username,
    > String password) throws
    > UserDirectoryException
    > {
    > 
    > return
    >
    (UserDirectory.getInstance().isValidPassword(username,password));
    > // return true;
    > 
    > }
    > 
    > 
    > public ActionForward execute(ActionMapping
    > mapping,
    > ActionForm form,
    > HttpServletRequest request,
    > HttpServletResponse response)
    > throws IOException, ServletException {
    > 
    > // Obtain username and password from web
    > tier
    > String username = ((LogonForm)
    > form).getUsername();
    > String password = ((LogonForm)
    > form).getPassword();
    > 
    > // Validate credentials with business tier
    > boolean validated = false;
    > try {
    > 
    > validated =
    > isUserLogon(username,password);
    > }
    > 
    > catch (UserDirectoryException ude) {
    &g

    Re: No Error Message But A Blank Page Is Displayed.

    My welcome page "is displayed" as the very first
    screen without any problem.  The page has
     and  tags, which
    test if any registered user has logged on.  
    
    The problem occurred after I filled out username, and
    clicked the "Submit" button.  Thereafter, the welcome
    page was not shown.  My welcome page looks like the
    following:
    
    Welcome.jsp
    
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    
    
    Welcome!
    
    
    
    
    Welcome !
    
    
    Welcome World!
    
    
    
    Sign
    in
    
    Sign
    out
    
    
    
    
    
    --- Kwok Peng Tuck <[EMAIL PROTECTED]> wrote:
    > You might want to put System.out.println("Line
    > [number]") ; to see
    > the flow in your action. BTW did you actually put
    > anything(like hello 
    > world) in Welcome.jsp ?
    > 
    > 
    > Caroline Jen wrote:
    > 
    > >Which resource file needs to be updated?  I have
    > >checked the application.properties.  Nothing in
    > that
    > >file is relevant to my problem.
    > >--- Abhijeet Mahalkar
    > ><[EMAIL PROTECTED]> wrote:
    > >  
    > >
    > >>have u updated the Resource files... ?
    > >>abhijeet
    > >> 
    > >>- Original Message - 
    > >>From: "Caroline Jen" <[EMAIL PROTECTED]>
    > >>To: <[EMAIL PROTECTED]>
    > >>Sent: Tuesday, September 30, 2003 9:45 AM
    > >>Subject: No Error Message But A Blank Page Is
    > >>Displayed.
    > >>
    > >>
    > >>I am experimenting a basic application - logon.  I
    > >>got
    > >>the first two screens working without problem. 
    > >>However, the third screen displays a blank page
    > (no
    > >>error message).  I am having a very difficult time
    > >>to
    > >>figure out the problem; henceforth, seeking help. 
    > >>Here is the history of my application:
    > >>
    > >>1. http://localhost:8080/LogonPractice/index.jsp
    > (no
    > >>problem and I clicked on "Sign in")
    > >>2.
    > >>
    > >>
    > >>
    >
    >http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
    > >  
    > >
    > >>(no problem and the screen asked for username and
    > >>password.  I filled out the information and
    > clicked
    > >>on
    > >>"Submit")  
    > >>3.
    > >>http://localhost:8080/LogonPractice/LogonSubmit.do
    > >>(displayed a blank page)
    > >>
    > >>The Tomcat log file shows the following (no error
    > >>message at all):
    > >>
    > >>2003-09-29 23:29:26 action: Processing a GET for
    > >>/Logon
    > >>2003-09-29 23:29:26 action:  Looking for Action
    > >>instance for class
    > >>org.apache.struts.actions.ForwardAction
    > >>2003-09-29 23:29:26 action:   Double checking for
    > >>Action instance already there
    > >>2003-09-29 23:29:26 action:   Creating new Action
    > >>instance
    > >>2003-09-29 23:29:35 action: Processing a POST for
    > >>/LogonSubmit
    > >>2003-09-29 23:29:35 action:  Looking for
    > ActionForm
    > >>bean under attribute 'logonForm'
    > >>2003-09-29 23:29:35 action:  Creating new
    > ActionForm
    > >>instance of class
    > >>'org.apache.artimus.logon.LogonForm'
    > >>2003-09-29 23:29:35 action:  Storing instance
    > under
    > >>attribute 'logonForm' in scope 'request'
    > >>2003-09-29 23:29:35 action:  Populating bean
    > >>properties from this request
    > >>2003-09-29 23:29:35 action:  Validating input form
    > >>properties
    > >>2003-09-29 23:29:35 action:   No errors detected,
    > >>accepting input
    > >>2003-09-29 23:29:35 action:  Looking for Action
    > >>instance for class
    > >>org.apache.artimus.logon.LogonAction
    > >>2003-09-29 23:29:35 action:   Double checking for
    > >>Action instance already there
    > >>2003-09-29 23:29:35 action:   Creating new Action
    > >>instance
    > >>
    > >>in my struts-config.xml, I have:
    > >>
    > >> >>path="/LogonSubmit"
    > >>   
    > >>type="org.apache.artimus.logon.LogonAction"
    > >>name="logonForm"
    > >>scope="request"
    > >>validate="true"
    > >>input="/signin/Logon.jsp">
    > >> >>name="valid"
    > >>path="/signin/Welcome.jsp"/>
    > >>
    > >>
    &

    RE: No Error Message But A Blank Page Is Displayed.

    I am very grateful for the overwhelming help that I
    have received.  
    
    I followed the advices given by all of you and paid
    special attention to possible mis-spelling in forward
    mapping.  I did not find any mis-spelling or mixing up
    of lower case/upper case.
    
    Finally, I re-typed all the key words in the forward
    mapping parts of the program.  Everything worked -  I
    got the expected page displayed in the browser.
    
    I still do not have any idea why I got a blank page
    last night.  I would be more than happy to share my
    experience with all of you if I knew the root cause of
    the problem.  But, I do not know.
    
    -Caroline
    --- "Richard J. Duncan" <[EMAIL PROTECTED]> wrote:
    > In my experience, this is because your
    > execute/perform is returning null as the result of
    > findForward("forwardname") not finding anything.
    > Usually, this is because I misspelled the forward
    > name.
    > 
    > Returning null from execute/perform tells struts
    > that your method wrote the response itself.
    > 
    > Regards,
    >  
    > Rich
    > 
    > -Original Message-
    > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
    > Sent: Tuesday, September 30, 2003 3:05 AM
    > To: Struts Users Mailing List
    > Subject: Re: No Error Message But A Blank Page Is
    > Displayed.
    > 
    > Your missing html:form
    > > My welcome page "is displayed" as the very first
    > > screen without any problem.  The page has
    > >  and  tags, which
    > > test if any registered user has logged on.
    > >
    > > The problem occurred after I filled out username,
    > and
    > > clicked the "Submit" button.  Thereafter, the
    > welcome
    > > page was not shown.  My welcome page looks like
    > the
    > > following:
    > >
    > > Welcome.jsp
    > >
    > > <%@ taglib uri="/tags/struts-bean" prefix="bean"
    > %>
    > > <%@ taglib uri="/tags/struts-html" prefix="html"
    > %>
    > > <%@ taglib uri="/tags/struts-logic" prefix="logic"
    > %>
    > > 
    > > 
    > > Welcome!
    > > 
    > > 
    > > 
    > > 
    > > Welcome  > property="username"/>!
    > > 
    > > 
    > > Welcome World!
    > > 
    > > 
    > > 
    > > Sign
    > > in
    > > 
    > > Sign
    > > out
    > > 
    > > 
    > > 
    > > 
    > > 
    > > --- Kwok Peng Tuck <[EMAIL PROTECTED]> wrote:
    > >> You might want to put System.out.println("Line
    > >> [number]") ; to see
    > >> the flow in your action. BTW did you actually put
    > >> anything(like hello
    > >> world) in Welcome.jsp ?
    > >>
    > >>
    > >> Caroline Jen wrote:
    > >>
    > >> >Which resource file needs to be updated?  I have
    > >> >checked the application.properties.  Nothing in
    > >> that
    > >> >file is relevant to my problem.
    > >> >--- Abhijeet Mahalkar
    > >> ><[EMAIL PROTECTED]> wrote:
    > >> >
    > >> >
    > >> >>have u updated the Resource files... ?
    > >> >>abhijeet
    > >> >>
    > >> >>- Original Message -
    > >> >>From: "Caroline Jen" <[EMAIL PROTECTED]>
    > >> >>To: <[EMAIL PROTECTED]>
    > >> >>Sent: Tuesday, September 30, 2003 9:45 AM
    > >> >>Subject: No Error Message But A Blank Page Is
    > >> >>Displayed.
    > >> >>
    > >> >>
    > >> >>I am experimenting a basic application - logon.
    >  I
    > >> >>got
    > >> >>the first two screens working without problem.
    > >> >>However, the third screen displays a blank page
    > >> (no
    > >> >>error message).  I am having a very difficult
    > time
    > >> >>to
    > >> >>figure out the problem; henceforth, seeking
    > help.
    > >> >>Here is the history of my application:
    > >> >>
    > >> >>1.
    > http://localhost:8080/LogonPractice/index.jsp
    > >> (no
    > >> >>problem and I clicked on "Sign in")
    > >> >>2.
    > >> >>
    > >> >>
    > >> >>
    > >>
    >
    >>http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C
    > >> >
    > >> >
    > >> >>(no problem and the screen asked for username
    > and
    > >> >>password.  I filled out the information and
    > >> clicked
    > >> >>on
    > >> >>"Submit")
    > >> >>3.
    > >>
    > >>http://localhost:8080/LogonPractice/LogonSubmit.do
    > >> >>(displayed a blank page)
    &g

    How To Use Connection Pooling in Struts 1.1?

    Before I started converting my web app to STRUTS, I
    used a DataSource to do connection pooling. I had the
    Tomcat server.xml file configured. My servlet accessed
    a helper class in which I had Context.lookup for the
    JNDI name.  All worked well.
    
    Now that I am using STRUTS. I try to authenticate the
    logon information against "database".  Should I keep
    Connection, ResultSet, Statement in an Action or in a
    business bean?  How should I utilize a DataSource and
    Connection Pooling in STRUTS 1.1?
    
    
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: My Mail is Bombing

    Todd,
    
     I am uncertain if this piece of information will
    be of any use to you -- when I first tried to setup
    JavaMail, I followed the online instruction and put
    the mail.jar and activation.jar in my
    j2sdk1.4.1_02\jre\li\ext folder.  The JavaMail did not
    work.  Thereafter, I got an advise from someone saying
    that it was a class loader problem.  I then put the
    location of the mail.jar and activation.jar explicitly
    in the CLASSPATH.  It worked well.
    
    -Caroline
    --- todd thorner <[EMAIL PROTECTED]> wrote:
    > Thanks for helping me, I appreciate the ideas and
    > thoughts.
    > 
    > I have activation.jar and mail.jar in
    > TOMCAT-HOME/common/lib and nowhere else on the
    > machine I am using.  Is this right or wrong?  Are
    > there other .jar files that I should make sure are
    > in (or not in) the common/lib directory?  Does
    > activation.jar or mail.jar also need to be in my
    > webapp's WEB-INF/lib directory?
    > 
    > I think I'm doing something wrong with the
    > MimeMessage object (passing an invalid Session
    > object to the constructor or something like that). 
    > Does anyone know what circumstances would prevent a
    > new MimeMessage from being created properly?  What
    > should I do about setContentType() for my
    > request/response ("text/plain" or "text/html")?
    > 
    > Much of my headache is that I have only one machine
    > with which to work, and it runs Windows ME (my Linux
    > machine blew a motherboard recently).
    > 
    > Can you learned Struts-Users help me with further
    > suggestions?  I am another one of those whose
    > timeframe is "urgent" (I have a job opportunity that
    > hinges on my ability to demonstrate Struts
    > knowledge).
    > 
    > Thanks for anything you can offer.
    > --
    > 
    > - Original Message -
    > 
    > DATE: Sun, 5 Oct 2003 14:09:21 
    > From: "Yann Cébron" <[EMAIL PROTECTED]>
    > To: [EMAIL PROTECTED]
    > Cc: 
    > 
    > >Todd,
    > >
    > >you need to add activation.jar to your webapp or TC
    > (common/lib)
    > >
    > >d/l:
    > >
    >
    >http://java.sun.com/products/javabeans/glasgow/jaf.html
    > >
    > >HTH,
    > >Yann
    > >
    > >
    > >
    > >
    >
    >-
    > >To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > >For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > >
    > >
    > 
    > 
    > 
    >
    
    > Get advanced SPAM filtering on Webmail or POP Mail
    > ... Get Lycos Mail!
    > http://login.mail.lycos.com/r/referral?aid=27005
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Container-Managed Authentication in web.xml vs. Specifying Paths in the struts-config.xml

    I use the Tomcat.  I configured the Tomcat JDBCRealm
    so that I can use programmic security testing, such as
    isUserInRole(), in my program.
    
    Because Tomcat JDBCRealm is form based, I inserted the
     and its sub-elements in my web.xml file
    (see below).  As we know, the  and
     are required.
    
    My question is that the container-managed
    authentication does not seem to be consistent with
    what we usually do in struts; e.g. we state the
    logical name and path for each .jsp page in the
    struts-config.xml file.  
    
    What is the Struts convention in dealing with user
    authentication?  Should we specify the paths for the
    logon page and error page in the struts.config.xml or
    we should use the  and
     in the web.xml file?
    
    ==
    
       
      SalesInfo
      /SalesInfo/*
      GET
      POST
       
       
      manager  
       
       
      NONE
       
    
    
    
       FORM
       
      
    /authentication/login.html
      
    /authentication/error.html
    
    
    
    
    
       manager
    
    
    
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: Container-Managed Authentication in web.xml vs . Specifying Paths in the struts-config.xml

    But, I do not want to use BASIC authentication.  I
    have many different roles and hundreds of people per
    role.  Users' name, role, etc. are stored in a
    database.
    --- Matt Raible <[EMAIL PROTECTED]> wrote:
    > A JDBCRealm can use BASIC authentication - it
    > doesn't require form-based.
    > Here's an example app that might help you out:
    > 
    >
    http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
    > 
    > HTH,
    > 
    > Matt
    > 
    > -Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > Sent: Monday, October 06, 2003 4:45 PM
    > To: [EMAIL PROTECTED]
    > Subject: Container-Managed Authentication
    >  in web.xml vs.
    > Specifying Paths in the struts-config.xml
    > 
    > 
    > I use the Tomcat.  I configured the Tomcat JDBCRealm
    > so that I can use programmic security testing, such
    > as
    > isUserInRole(), in my program.
    > 
    > Because Tomcat JDBCRealm is form based, I inserted
    > the
    >  and its sub-elements in my web.xml
    > file
    > (see below).  As we know, the  and
    >  are required.
    > 
    > My question is that the container-managed
    > authentication does not seem to be consistent with
    > what we usually do in struts; e.g. we state the
    > logical name and path for each .jsp page in the
    > struts-config.xml file.  
    > 
    > What is the Struts convention in dealing with user
    > authentication?  Should we specify the paths for the
    > logon page and error page in the struts.config.xml
    > or
    > we should use the  and
    >  in the web.xml file?
    > 
    >
    ==
    > 
    >
    >  
    > SalesInfo
    >   /SalesInfo/*
    >   GET
    >   POST
    >
    >
    >   manager  
    >
    >
    >  
    > NONE
    >
    > 
    > 
    > 
    >FORM
    >
    >   
    >
    /authentication/login.html
    >   
    >
    /authentication/error.html
    > 
    > 
    > 
    > 
    > 
    >manager
    > 
    > 
    > 
    > 
    > 
    > __
    > Do you Yahoo!?
    > The New Yahoo! Shopping - with improved product
    > search
    > http://shopping.yahoo.com
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Container-Managed Authentication in web.xml vs . Specifying Paths in the struts-config.xml

    People answer questions without reading my original
    post.  Therefore, I must re-type my original question
    again.
    
    Before I posted my question, I had configured the
    Tomcat JDBCRealm following the instructions at
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    so that I can do security testing programmically, such
    as isUserInRole(), in my program.
    
    If I use form based authentication, I insert the
     and its sub-elements in my web.xml file
    (see below).  As we know, the  and
     are required.
    
    My question is that the container-managed
    authentication (we provide login page and error page
    in the web.xml) does not seem to be consistent with
    what we usually do in struts; e.g. we state the
    logical name and path for each .jsp page in the
    struts-config.xml file.  
    
    What is the Struts convention in dealing with user
    authentication?  Should we specify the paths for the
    logon page and error page in the struts.config.xml or
    we should use the  and
     in the web.xml file?
    
    Thanks.
    --- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
    > Caroline Jen wrote:
    > 
    > >But, I do not want to use BASIC authentication.  I
    > >have many different roles and hundreds of people
    > per
    > >role.  Users' name, role, etc. are stored in a
    > >database.
    > >
    > How authentication is performed (BASIC, form-based,
    > DIGEST, or SSL 
    > client certificates) and how users are stored
    > (database, directory 
    > server, local XML file, ...) are two separate
    > questions.  For most 
    > servers , any combination is possible.  With Tomcat,
    > for example, you 
    > can configure JDBCRealm to point at your user and
    > role definitions in a 
    > database, and then use those users with any of the
    > authentication 
    > methods.  For more information, see:
    > 
    >
    >
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    > 
    > The choice between BASIC and form-based
    > authentication, then, can be 
    > based on user interface related concerns, rather
    > than worrying about a 
    > database.
    > 
    > Craig
    > 
    > >--- Matt Raible <[EMAIL PROTECTED]> wrote:
    > >  
    > >
    > >>A JDBCRealm can use BASIC authentication - it
    > >>doesn't require form-based.
    > >>Here's an example app that might help you out:
    > >>
    > >>
    > >>
    > >>
    >
    >http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
    > >  
    > >
    > >>HTH,
    > >>
    > >>Matt
    > >>
    > >>-Original Message-
    > >>From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > >>Sent: Monday, October 06, 2003 4:45 PM
    > >>To: [EMAIL PROTECTED]
    > >>Subject: Container-Managed Authentication
    > >> in web.xml vs.
    > >>Specifying Paths in the struts-config.xml
    > >>
    > >>
    > >>I use the Tomcat.  I configured the Tomcat
    > JDBCRealm
    > >>so that I can use programmic security testing,
    > such
    > >>as
    > >>isUserInRole(), in my program.
    > >>
    > >>Because Tomcat JDBCRealm is form based, I inserted
    > >>the
    > >> and its sub-elements in my web.xml
    > >>file
    > >>(see below).  As we know, the 
    > and
    > >> are required.
    > >>
    > >>My question is that the container-managed
    > >>authentication does not seem to be consistent with
    > >>what we usually do in struts; e.g. we state the
    > >>logical name and path for each .jsp page in the
    > >>struts-config.xml file.  
    > >>
    > >>What is the Struts convention in dealing with user
    > >>authentication?  Should we specify the paths for
    > the
    > >>logon page and error page in the struts.config.xml
    > >>or
    > >>we should use the  and
    > >> in the web.xml file?
    > >>
    > >>
    > >>
    > >>
    >
    >==
    > >  
    > >
    > >>
    > >>   
    > >> 
    > >>SalesInfo
    > >>  /SalesInfo/*
    > >>  GET
    > >>  POST
    > >>   
    > >>   
    > >>  manager  
    > >>   
    > >>   
    > >> 
    > >>NONE
    > >>   
    > >>
    > >>
    > >>
    > >>   FORM
    > >>   
    > >>  
    > >>
    > >>
    > >>
    >
    >/authentication/login.html
    > >  
    > >
    > >>  
    > >>
    > >>
    > >>
    >
    >/authentication/error.html
    > >  
    > >
    > >>
    > >>
    > >>
    > >>
    > >>
    > >>   manager
    > >>
    > >>
    > >>
    > >>
    > >>
    > >>__
    > >>Do you Yahoo!?
    > >>

    Re: Container-Managed Authentication in web.xml vs . Specifying Paths in the struts-config.xml

    Thanks a lot, Andrew.  I got the idea.
    --- Andrew Shirk <[EMAIL PROTECTED]> wrote:
    > Logical paths work fine for me in web.xml (using
    > tomcat 4.1.x):
    > 
    >
    >   FORM
    >   
    >  
    > /do/login/edit
    >  
    >  
    > /do/login/fail
    >  
    >   
    >
    > 
    > Andrew
    > 
    > At 03:11 PM 10/7/2003, you wrote:
    > >People answer questions without reading my original
    > >post.  Therefore, I must re-type my original
    > question
    > >again.
    > >
    > >Before I posted my question, I had configured the
    > >Tomcat JDBCRealm following the instructions at
    >
    >http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    > >so that I can do security testing programmically,
    > such
    > >as isUserInRole(), in my program.
    > >
    > >If I use form based authentication, I insert the
    > > and its sub-elements in my web.xml
    > file
    > >(see below).  As we know, the  and
    > > are required.
    > >
    > >My question is that the container-managed
    > >authentication (we provide login page and error
    > page
    > >in the web.xml) does not seem to be consistent with
    > >what we usually do in struts; e.g. we state the
    > >logical name and path for each .jsp page in the
    > >struts-config.xml file.
    > >
    > >What is the Struts convention in dealing with user
    > >authentication?  Should we specify the paths for
    > the
    > >logon page and error page in the struts.config.xml
    > or
    > >we should use the  and
    > > in the web.xml file?
    > >
    > >Thanks.
    > >--- "Craig R. McClanahan" <[EMAIL PROTECTED]>
    > wrote:
    > > > Caroline Jen wrote:
    > > >
    > > > >But, I do not want to use BASIC authentication.
    >  I
    > > > >have many different roles and hundreds of
    > people
    > > > per
    > > > >role.  Users' name, role, etc. are stored in a
    > > > >database.
    > > > >
    > > > How authentication is performed (BASIC,
    > form-based,
    > > > DIGEST, or SSL
    > > > client certificates) and how users are stored
    > > > (database, directory
    > > > server, local XML file, ...) are two separate
    > > > questions.  For most
    > > > servers , any combination is possible.  With
    > Tomcat,
    > > > for example, you
    > > > can configure JDBCRealm to point at your user
    > and
    > > > role definitions in a
    > > > database, and then use those users with any of
    > the
    > > > authentication
    > > > methods.  For more information, see:
    > > >
    > > >
    > > >
    >
    >http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    > > >
    > > > The choice between BASIC and form-based
    > > > authentication, then, can be
    > > > based on user interface related concerns, rather
    > > > than worrying about a
    > > > database.
    > > >
    > > > Craig
    > > >
    > > > >--- Matt Raible <[EMAIL PROTECTED]>
    > wrote:
    > > > >
    > > > >
    > > > >>A JDBCRealm can use BASIC authentication - it
    > > > >>doesn't require form-based.
    > > > >>Here's an example app that might help you out:
    > > > >>
    > > > >>
    > > > >>
    > > > >>
    > > >
    > >
    >
    >http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
    > > > >
    > > > >
    > > > >>HTH,
    > > > >>
    > > > >>Matt
    > > > >>
    > > > >>-Original Message-
    > > > >>From: Caroline Jen
    > [mailto:[EMAIL PROTECTED]
    > > > >>Sent: Monday, October 06, 2003 4:45 PM
    > > > >>To: [EMAIL PROTECTED]
    > > > >>Subject: Container-Managed Authentication
    > > > >> in web.xml vs.
    > > > >>Specifying Paths in the struts-config.xml
    > > > >>
    > > > >>
    > > > >>I use the Tomcat.  I configured the Tomcat
    > > > JDBCRealm
    > > > >>so that I can use programmic security testing,
    > > > such
    > > > >>as
    > > > >>isUserInRole(), in my program.
    > > > >>
    > > > >>Because Tomcat JDBCRealm is form based, I
    > inserted
    > > > >>the
    > > > >> and its sub-elements in my
    > web.xml
    > > > >>file
    > > > >>(see below).  As we know, the
    > 
    > > > and
    > > > >> are required.
    > > > >>
    > > > >>My question is that the container-managed
    > > > >>authentication does not seem to be consistent
    > with
    > > > >>what we usually do in struts; e.g. we state
    > the
    > > > >>logical name and path for each .jsp page in
    > the
    > > > >>struts-config.xml file.
    > > > >>
    > > > >>What is the Struts convention in dealing with
    > user
    > > > >>authentication?  Should we specify the paths
    > for
    > > > the
    > > > >>logon page and error page in the
    > struts.config.xml
    > > > >>or
    > > > >>we should use the  and
    > > > >> in the web.xml file?
    > > > >>
    > > > >>
    > > > >>
    > > > >>
    > > >
    > >
    >
    >==
    > > > >
    > > > >
    > > > >>
    > > > >>   
    > > > >>
    > > >
    > >>SalesInfo
    > > > >>  /SalesInfo/*
    > > > >>  GET
    > > > >>  POST
    > > > >>   
    > > > >>   
    > > > >>  manager
    > > > >>   
    > > > >>   
    > > > >>
    > > >
    > >>NONE
    > > > >>   
    > > > >>
    > > > >>
    > > > >>
    > > > >>   FORM
    > > > >>   
    > > > >>
    > > > >>
    > > > >>
    > > > >>
    > > >
    > >
    >
    >/authentication/login.html
    > > > >
    > 
    === message truncated ===
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    What Is Wrong With My web.xml File (Struts)

    My Struts application worked well until I added
    security in the web.xml file.  I got the error message
    shown below and I cannot spot any mistake with my
    eyes:
    
    [QUOTE]
    2003-10-08 23:33:25 Exception initializing
    TldLocationsCache: XML parsing error on file
    /WEB-INF/web.xml: (line 137, col 19): The content of
    element type "security-role" must match
    "(description?,role-name)".
    [/QUOTE]
    
    and my web.xml file is:
    [CODE]
    
    http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
    
    
      
      
    artimus
       
    org.apache.artimus.http.ArtimusServlet
    
    
      default
     
    resources/artimus.properties
    
    
    
      adaptor
     
    org.apache.commons.scaffold.sql.PoolmanAdaptor
    
    
      adaptor.key
      jdbc-artimus
    
    
    
    1
      
    
      
      
    action
    
       
    org.apache.struts.action.ActionServlet
    
      config
     
    /WEB-INF/struts-config.xml
    
    
      debug
      2
    
    
      detail
      2
    
    
      null
      false
    
      
    2
      
    
      
      
    action
    /do/*
      
      
    index.jsp
      
    
      
      
    /tags/struts-bean
       
    /WEB-INF/lib/struts-bean.tld
      
      
    /tags/struts-html
       
    /WEB-INF/lib/struts-html.tld
      
      
    /tags/struts-logic
       
    /WEB-INF/lib/struts-logic.tld
      
      
    /tags/tiles
       
    /WEB-INF/lib/struts-tiles.tld
      
      
    /tags/request
       
    /WEB-INF/lib/request.tld
      
    
      
      
    
     
    Administrative
    
    /*
    
    
      
      administrator
      advisor
      editor
      contributor
    
    
      NONE
    
      
    
      
    FORM 
     
     
    /signin/logon.jsp  
     
    /signin/logon.jsp?error=true
      
       
    
      
      
    Registered Members
    administrator
    advisor
    editor
    contributor
     // line 137 is here
    
    
    [/CODE]
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    HTTP Status 404 After Inserting In The web.xml

    I think this is more of a problem in the area of
    Servlets/JSPs.  Nonetheless, it happened when I ran my
    Struts application and I decided to give a try at this
    forum.
    
    My application worked well with 
    
    
     FORM
      
      
    /signin/logon.jsp
      
    /signin/logon.jsp?error=true
      
     
    
    in the web.xml file. Thereafter,I inserted
     preceding the 
    element, and inserted  following the
     element. The application stopped
    functioning.  I got:
    
    HTTP Status 404 -/PracticeVersion
    description: The requested resource(/PracticeVersion)
    is not availabe.
    
    in the browser, and I have this message in the Tomcat
    log file:
    
    LifecycleException: Container
    StandardContext[/PracticeVersion] has not been started
    
    This was what my web.xml looked like when the problem
    happened:
    
    
     
      
    Administrative 
    
    /do/admin/*
     
     
    
    administrator
    contributor
     
    
    
    
     FORM
     
      /signin/logon.jsp
     
    /signin/logon.jsp?error=true
     
    
    
    
     administrator
    
    
     contributor
    
    
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    How To Work Out This Action Mapping?

    Because there is such a statement (shown below) in my
    signinForm.jsp:
    
    
    
    I put 
    
     
    
    in my struts-config.xml file.
    
    When I ran the application, I got:
    
    [ServletException in:/article/content/signinForm.jsp]
    Cannot retrieve mapping for action /j_security_check' 
    
    I know that I did not specify the action properly. 
    What is the correct way to do it? 
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: How To Work Out This Action Mapping?

    Thank you for your reply.  I am using container
    managed authentication.
    
    My problem is "how to go from j_security_check back to
    my Struts framework."
    
    I have my Tomcat JDBCRealm configured and users,
    user_roles tables prepared in the database.
    
    In my struts-config.xml file, I did this forward when
    users click on the LOGON button:
    
     
    
    and in my web.xml file, I have:
    
    
     FORM 
      
      /signin/logon.jsp
     
     
    /signin/logon.jsp?error=true
       
    
    
    The Tomcat server found the signinForm.jsp through the
    /signin/logon.jsp without problem.
    
    and my signinForm.jsp is correctly prepared:
    
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    
    
    Container Managed Authentication
    
    
    
    
    
    
    User Name:
    
    
    
    Password:
    
    
    
    
    
    
    
    
    
    
    
    --Caroline   
    --- Sasha Borodin <[EMAIL PROTECTED]> wrote:
    > I think you may be doing two things wrong:
    > 
    > 1.  j_security_check is a special URL.  If you have
    > a security realm defined
    > in your web application, and authentication method
    > specified as FORM, then
    > the container will automatically forward any
    > requests for protected
    > resources to a configurable login form.  This login
    > form collects the
    > username and password, and posts to this special
    > URL; the post to
    > j_security_check gets intercepted by your servlet
    > container, which performs
    > Container Managed Authentication - it looks for the
    > j_username and
    > j_password, authenticates the combination, and
    > forwards to the originally
    > requested resource, or to a configurable error page
    > if the authentication
    > fails.
    > 
    > All this to say that you can not map an action to
    > j_security_check.
    > Furthermore, you can't even aggressively
    > authenticate using CMA (Container
    > Managed Authentication) - if you go directly to your
    > login page (without
    > being forwarded there by you container), and try to
    > submit the form, you'll
    > get an error.
    > 
    > 2.  If you were trying to map a legitimate URL, then
    > you'd have your
    >  properties wrong.
    > 
    > 
    > path="/someLegitimatePath"
    > 
    >     type="your.action.class"
    > 
    > name="name of a previously defined ActionForm if
    > needed for this action"
    > 
    > 
    > HTH,
    > 
    > -Sasha
    > 
    > 
    > On 10/10/03 20:21, "Caroline Jen"
    > <[EMAIL PROTECTED]> wrote:
    > 
    > > Because there is such a statement (shown below) in
    > my
    > > signinForm.jsp:
    > > 
    > >  > focus="j_username">
    > > 
    > > I put 
    > > 
    > > >   name="j_security_check"
    > >   path="/do/admin/Menu"/>
    > > 
    > > in my struts-config.xml file.
    > > 
    > > When I ran the application, I got:
    > > 
    > > [ServletException
    > in:/article/content/signinForm.jsp]
    > > Cannot retrieve mapping for action
    > /j_security_check'
    > > 
    > > I know that I did not specify the action properly.
    > > What is the correct way to do it?
    > > 
    > > __
    > > Do you Yahoo!?
    > > The New Yahoo! Shopping - with improved product
    > search
    > > http://shopping.yahoo.com
    > > 
    > >
    >
    -
    > > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: How To Work Out This Action Mapping?

    Thank you very much for the detailed explanation. 
    Yet, I still have hard time to make my application
    work -- I am "able" to display the welcome page (no
    problem). And I have
    http://localhost:8080/PracticeVersion/do/Menu;jsessionid=0A6E76A8F3E849BC8DAAC45BFB72F72E
    in the address bar.
    
    However, after I click on the LOGON button in the
    welcome page, the welcome page remains in the browser.
     The logon.jsp, which collects j-username, j_passwor,
    does not get displayed and
    http://localhost:8080/PracticeVersion/do/admin/Menu
    shows in the address bar.
    
    I do not know what went wrong.  Could it be that the
    JDBCRealm is not configured correctly?
    
    Because the LOGON button links to a forward: 
    LOGON
     
    and in my struts-config.xml, I have 
    
     
    
    The /do/admin/Menu is my protected resources.  I keep
    it unchanged.
    
    1. I configured the Tomcat JDBCRealm and prepared the
    users table, user-roles table according the
    instructions found at
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    
    2. Because I want to use FORM based container managed
    authentication, I inserted 
    
    
     FORM 
       
      
    /signin/logon.jsp  
      
    /signin/logon.jsp?error=true
    
    
    
    in the web.xml file.
    
    3. I put logon.jsp in the ApplicationRoot/signin
    folder.  Here is the code of the logon.jsp (I took out
    all the Struts tags) and I know the code works well
    because I have tested it:
    
    
    
    
    Container Managed Authentication
    
    
    Sign in, Please
    
    
    
    
    User Name:
    
    
    
    Password:
    
    
    
    
    
    
    
    
      
    
    --Caroline
    --- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
    > Caroline Jen wrote:
    > 
    > >Thank you for your reply.  I am using container
    > >managed authentication.
    > >
    > >My problem is "how to go from j_security_check back
    > to
    > >my Struts framework."
    > >  
    > >
    > 
    > That turns out to not be your problem ... that is
    > the container's problem.
    > 
    > The key thing to remember is that the user should
    > never access your 
    > login page (whatever it's URL is) directly. 
    > Instead, form-based login 
    > is triggered the first time that an unauthenticated
    > user requests a URL 
    > that is protected by a security constraint.  What
    > happens next goes like 
    > this:
    > 
    > (1) Unauthenticated user requests a protected
    > resource (*NOT* the login 
    > page!)
    > 
    > (2) Container remembers the protected resource that
    > was requested
    >  in a private variable.
    > 
    > (3) Container displays the login page, which must
    > have a destination
    >  of "j_security_check", and waits for the user
    > submit.  For some 
    > containers,
    >  including Tomcat, this is the one-and-only time
    > that submitting to
    >  "j_security_check" will not return a 404.
    > 
    > (4) User enters username and password, and presses
    > the submit button.
    > 
    > (5) Container authenticates the username and
    > password combination.
    >  If valid, container recalls the resource saved
    > in (2) and displays 
    > *that*
    >  to the user in response to the login submit.
    > 
    > If this doesn't make sense, temporarily switch your
    > app to use BASIC 
    > authentication instead, and walk through the
    > process.  The user 
    > experience will be identical except that the "login
    > page" will be a 
    > popup dialog box instead of your configured login
    > page.  (Technically, 
    > it's different in one other respect -- it's the
    > *browser* that does the 
    > remembering in step (2) and the restoring in step
    > (5), but the user 
    > doesn't know that).
    > 
    > The important point is that, at no time, did anyone
    > ever submit a 
    > request to the URL of the login page, because there
    > is no such thing 
    > when using BASIC authentication.  You should pretend
    > there is no such 
    > thing when using form based login, also; think of
    > the login page as part 
    > of the container, not part of your app.
    > 
    > In answer to your original question, the simplest
    > thing to do on a login 
    > page is just use the standard HTML form element
    > instead of the Struts 
    >  tag.  Then, you can just say:
    > 
    >   
    > ...
    >   
    > 
    > Craig
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: How To Work Out This Action Mapping?

    To answer your questions:
    
    1. The LOGON button links to a forward: 
       LOGON
     
       and in my struts-config.xml, I have 
    
     
    
    2. the  in my web-xml is:
    
      
    
     
    Administrative
    
    /do/admin/*
    
      
    
    administrator
    contributor
      
      
    
    By the way, there is another problem -- after the
    insertion of the , the
    application totally stops functioning.  No welcome
    page displayed.  In the browser, I have
    
    HTTP Status 404 -/PracticeVersion
    description: The requested resource(/PracticeVersion)
    is not availabe.
    
    and in the Tomcat log file, I have:
    
    LifecycleException: Container
    StandardContext[/PracticeVersion] has not been started
      
    Thereafter, I deleted the 
    element from the web.xml file.  I have the welcome
    page displayed.  After I click on the LOGON button in
    the welcome page, the welcome page remains in the
    browser.  The logon.jsp, which collects j-username,
    j_password, does not get displayed and
    http://localhost:8080/PracticeVersion/do/admin/Menu
    shows in the address bar.
    
    --Caroline
    
    --- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
    > Caroline Jen wrote:
    > 
    > >Thank you very much for the detailed explanation. 
    > >Yet, I still have hard time to make my application
    > >work -- I am "able" to display the welcome page (no
    > >problem). And I have
    >
    >http://localhost:8080/PracticeVersion/do/Menu;jsessionid=0A6E76A8F3E849BC8DAAC45BFB72F72E
    > >in the address bar.
    > >
    > >However, after I click on the LOGON button in the
    > >welcome page, the welcome page
    > >
    > Where does this LOGON button submit to?  If it
    > submits to 
    > "j_security_check", you are doing this wrong.  It
    > should submit to some 
    > resource that is protected by a security constraint.
    > 
    > > remains in the browser.
    > > The logon.jsp, which collects j-username,
    > j_passwor,
    > >does not get displayed and
    > >http://localhost:8080/PracticeVersion/do/admin/Menu
    > >shows in the address bar.
    > >
    > >I do not know what went wrong.  Could it be that
    > the
    > >JDBCRealm is not configured correctly?
    > >
    > >Because the LOGON button links to a forward: 
    > >LOGON
    > > 
    > >and in my struts-config.xml, I have 
    > >
    > >  >name="logon"
    > >path="/do/admin/Menu"/>
    > >
    > >The /do/admin/Menu is my protected resources.  I
    > keep
    > >it unchanged.
    > >  
    > >
    > It's only protected if it's listed in a
    >  in web.xml.
    > 
    > >1. I configured the Tomcat JDBCRealm and prepared
    > the
    > >users table, user-roles table according the
    > >instructions found at
    >
    >http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    > >  
    > >
    > Which Realm you use does not make any difference.
    > 
    > >2. Because I want to use FORM based container
    > managed
    > >authentication, I inserted 
    > >
    > >
    > > FORM 
    > >   
    > >  
    >
    >/signin/logon.jsp
    >  
    > >  
    >
    >/signin/logon.jsp?error=true
    > >
    > >
    > >
    > >in the web.xml file.
    > >  
    > >
    > What does your  in web.xml look
    > like?  This is the 
    > critical ingredient.
    > 
    > >3. I put logon.jsp in the ApplicationRoot/signin
    > >folder.  Here is the code of the logon.jsp (I took
    > out
    > >all the Struts tags) and I know the code works well
    > >because I have tested it:
    > >
    > > >Transitional//EN">
    > >
    > >
    > >Container Managed Authentication
    > >
    > >
    > >Sign in, Please
    > >
    > > >focus="j_username">
    > > >cellpadding=2>
    > >
    > >User Name:
    > > >SIZE="25"/>
    > >
    > >
    > >Password:
    > > >NAME="j_password" SIZE="10"/>
    > >
    > >
    > > >VALUE="Submit">
    > > VALUE="Reset">
    > >
    > >
    > >
    > >  
    > >
    > >--Caroline
    > >
    > Craig
    > 
    > >--- "Craig R. McClanahan" <[EMAIL PROTECTED]>
    > wrote:
    > >  
    > >
    > >>Caroline Jen wrote:
    > >>
    > >>
    > >>
    > >>>Thank you for your reply.  I am using container
    > >>>managed authentication.
    > >>>
    > >>>My problem is "how to go from j_security_check
    > back
    > >>>  
    > >>>
    > >>to
    > >>
    > >>
    > >>>my Struts framework."
    > >>> 
    > >>>
    > >>>  
    > >>>
    > >>That turns out to not be your problem ... that is
    > >>the container's problem.
    > >>
    > >>The key thi

    Re: How To Work Out This Action Mapping?

    Craig, thank you for your very strong support in the
    past day or two to guide me through problems with the
    container-managed authentication.
    
    I looked at my web.xml file again and again.  There is
    nothing wrong with the order of the elements in that
    file.  And there is no stack trace in the log files
    that talks about an XML parsing error.
    
    I did some experiments.  I found that as long as I
    have the JDBCRealm in the
    $TOMCAT_HOME/conf/server.xml, the Tomcat does not
    accept  element in the
    application's web.xml file.  And the Tomcat gives me
    "the required resouce /MyApplication is not availabel"
    HTTP Status 404. 
    
    Have you seen this kind of problem before?  I have
    posted the question at the tomcat-user discussion
    forum.
    
    --Caroline
    
    --- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
    > Caroline Jen wrote:
    > 
    > >To answer your questions:
    > >
    > >1. The LOGON button links to a forward: 
    > >   LOGON
    > > 
    > >   and in my struts-config.xml, I have 
    > >
    > >  >name="logon"
    > >path="/do/admin/Menu"/>
    > >  
    > >
    > Well, that's the first problem ... security
    > constraints are only applied 
    > on an original request from the client, not on a
    > forward.  You'll need 
    > to add redirect="true" to this, in order to get the
    > client to request it.
    > 
    > >2. the  in my web-xml is:
    > >
    > >  
    > >
    > > 
    >
    >Administrative
    > >
    > >/do/admin/*
    > >
    > >  
    > >
    > >administrator
    > >contributor
    > >  
    > >  
    > >
    > >By the way, there is another problem -- after the
    > >insertion of the , the
    > >application totally stops functioning.  No welcome
    > >page displayed.  In the browser, I have
    > >
    > >HTTP Status 404 -/PracticeVersion
    > >description: The requested
    > resource(/PracticeVersion)
    > >is not availabe.
    > >
    > >and in the Tomcat log file, I have:
    > >
    > >LifecycleException: Container
    > >StandardContext[/PracticeVersion] has not been
    > started
    > >  
    > >
    > That means you did not obey the required element
    > order in the web.xml 
    > file.  You'll undoubtedly see a stack trace in the
    > log files that talks 
    > about an XML parsing error.
    > 
    > The correct order is defined by the DTD for web.xml
    > files.  Among other 
    > places, you'll find a copy of the DTDs for Servlet
    > 2.2 and Servlet 2.3 
    > in the "lib" directory of your Struts distribution. 
    > Open either 
    > web_app_2_2.dtd or web_app_2_3.dtd (depending on
    > which version you're 
    > using) and look for the line that starts  webapp ...>.  The 
    > list of element names in parentheses is the required
    > order for elements 
    > in your own web.xml files.
    > 
    > >  
    > >Thereafter, I deleted the 
    > >element from the web.xml file.  I have the welcome
    > >page displayed.  After I click on the LOGON button
    > in
    > >the welcome page, the welcome page remains in the
    > >browser.  The logon.jsp, which collects j-username,
    > >j_password, does not get displayed and
    > >http://localhost:8080/PracticeVersion/do/admin/Menu
    > >shows in the address bar.
    > >  
    > >
    > Change your  to add redirect="true" and put
    > the security 
    > constraint in the correct order, and you should be
    > good to go.
    > 
    > >--Caroline
    > >
    > Craig
    > 
    > >
    > >--- "Craig R. McClanahan" <[EMAIL PROTECTED]>
    > wrote:
    > >  
    > >
    > >>Caroline Jen wrote:
    > >>
    > >>
    > >>
    > >>>Thank you very much for the detailed explanation.
    > 
    > >>>Yet, I still have hard time to make my
    > application
    > >>>work -- I am "able" to display the welcome page
    > (no
    > >>>problem). And I have
    > >>>  
    > >>>
    >
    >>http://localhost:8080/PracticeVersion/do/Menu;jsessionid=0A6E76A8F3E849BC8DAAC45BFB72F72E
    > >>
    > >>
    > >>>in the address bar.
    > >>>
    > >>>However, after I click on the LOGON button in the
    > >>>welcome page, the welcome page
    > >>>
    > >>>  
    > >>>
    > >>Where does this LOGON button submit to?  If it
    > >>submits to 
    > >>"j_security_check", you are doing this wrong.  It
    > >>should submit to some 
    > >>resource that is protected by a security
    > constraint.
    > >>
    > >>
    > >>
    > >>>remains in the browser.
    > >>>The logon.jsp, which collects j-username,
    > >>>  
    

    Where Do I Create Session, Set Attributes in Struts?

    I use container-managed form-based authentication to
    verify users (it works well).  
    
    Now, I want to create a session and set user's name
    after users successfully log in:
    
    HttpSession session = request.getSession( true );
    if ( session.isNew() ) 
    {
       student.setName(request.getParameter("username"));
       session.setAttribute("student", student);
       Student stud =
    (Student)session.getAttribute("student");
    }
    
    First of all, in the context of container managed
    authentication, can I write:
     
       student.setName(request.getParameter("username"));
    
    Second, what is the proper place to insert the
    aforementioned codes.  
    
    The container intercepts and takes care of the
    authentication when
    
     
    
    and the action controller is in the scaffold folder:
    
    
    
    
    
    
    where .article.Menu is a tile.
     
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Compilation Problem. Help!

    I have all the required jar files in the
    MyApp/WEB-INF/lib directory.  Please help me in
    identifying the problems with compilation:
    
    1. For example, I have the commons-scaffold.jar in my
    $TOMCAT_HOME/webapps/MyApp/WEB-INF/lib folder.
    
    2. I have the struts.jar in the
    j2sdk1.4.1_02/jre/lib/ext folder
    
    3. in my java class, I
    import org.apache.commons.scaffold.text.ConvertUtils;
    import
    org.apache.commons.scaffold.util.ProcessBeanBase;
    import org.apache.commons.scaffold.lang.Tokens;
    
    But, I get compilation error:
    
    package org.apache.commons.scaffold.text does not
    exist
    
    package org.apache.commons.scaffold.util does not
    exist
    
    package org.apache.commons.scaffold.lang does not
    exist
    
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Keep Them In the Database Or In the Properties File?

    I have to prepare many drop down lists for visitors of
    the website to make selections.  For example, I have
    the 51 states of the United States prepared like
    Virginia=VA, ., etc.  Do I keep the data in a
    database or in a properties file?
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Java Compiler Cannot Find the Required JAR File in the Classpath

    I posted this problem before.  Max and Carey answered
    my post right away.  I tried and tried   I must be
    missing something.
    
    I really do not understand why all of a sudden that
    the java compiler cannot find the required JARs in the
    classpath.  I have done some similar compilation
    before successfully.  My head is not sober enough to
    pinpoint the problem this time.  
    
    I am doing the compilation manually (I am not using
    ANT or any IDE).
    
    1. I have the commons-scaffold.jar in my
    $TOMCAT_HOME/webapps/PracticeVersion/WEB-INF/lib
    folder.
    
    2. I have the struts.jar in both
    $TOMCAT_HOME/webapps/PracticeVersion/WEB-INF/lib
    folder and j2sdk1.4.1_02/jre/lib/ext folder
    
    3. in my java program (Bean.java), I
    import org.apache.commons.scaffold.text.ConvertUtils;
    import
    org.apache.commons.scaffold.util.ProcessBeanBase;
    import org.apache.commons.scaffold.lang.Tokens;
    
    4. I first set the classpath 
    C:\>set
    CLASSPATH=C:\jakarta-tomcat-4.1.18-LE-jdk14/webapps/PracticeVersion/WEB-INF/src/java;%CLASSPATH%
    
    then, I go to the folder where Bean.java is
    
    C:\>cd
    jakarta-tomcat-4.1.18-LE-jdk14/webapps/PracticeVersion/WEB-INF/src/java/org/apache/artimus/article
    
    then, I try to compile and put the class file in the
    destination folder
    
    C:\jakarta-tomcat-4.1.18-LE-jdk14/webapps/PracticeVersion/WEB-INF/src/java/org/apache/artimus/article>javac
    -d
    C:\jakarta-tomcat-4.1.18-LE-jdk14/webapps/PracticeVersion/WEB-INF/classes
    Bean.java
    
    But, I get compilation error:
    
    package org.apache.commons.scaffold.text does not
    exist
    package org.apache.commons.scaffold.util does not
    exist
    package org.apache.commons.scaffold.lang does not
    exist
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: User Authentication implemented in Struts

    My question is similar.  I use container-managed
    "role"-based security checking.  I put "role" property
    in Action Mapping and use isUserInRole in my JSPs. 
    For example, John can view the sales reports if he has
    the "sales role". Now, I want to further restrict John
    to view the sales reports in is "region" only.
    
    People say that I can use the servlet filter. I need
    guidance to see some examples.
    
    
    --- Adam Hardy <[EMAIL PROTECTED]>
    wrote:
    > 
    > 
    > On 10/22/2003 10:21 PM Ramadoss Chinnakuzhandai
    > wrote:
    > > apologize for repeating my question againI'm
    > newbie to Struts and hv basic doubt in security
    > level implemented using Struts framework.
    > > 
    > > we are aware that in normal J2EE application we
    > are authenticating user based on user access level
    > specified in web-app in web.xml(web container)
    > > 
    > > My Questions are
    > > 
    > > 1.Are we following the same process of
    > authenticating a user against his/her access level
    > as that of the above...? if not pls explain how you
    > are authentication a user in your struts-based
    > application.
    > > 
    > > 2.If yes to the above question Is there someother
    > way of authenticating a user available in Sturts? If
    > so pls explain how you are authentication a user?
    > 
    > Yes to both: struts leverages the built-in container
    > managed security as 
    > specified by the servlet spec from Sun.
    > 
    > Adam
    > 
    > -- 
    > struts 1.1 + tomcat 5.0.12 + java 1.4.2
    > Linux 2.4.20 RH9
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope (URGENT)

    I am also in trouble.  My problem is sort of related
    to yours although not directly relevant.  I am also
    looking for org.apache.struts.taglib.html.BEAN
    
    I am trying to modify Ted Husted's artimus_1_1 example
    -  I want to add one more property to his articleForm.
    
    To submit an article in the artimus_1_1 example, his
    form.jsp in the /article/content folder asks for
    title, author, and article.  I inserted one more text
    field:
    
     
    Journal Category:
    
    
    
    
    to indicate the academic field of the article.  I got
    the error message:
    
    ServletException in: /article/content/form.jsp
    No getter method for property journal_category of bean
    org.apache.struts.taglib.html.BEAN
    
    Really wish someone could help me out.
    
    --- lover birds <[EMAIL PROTECTED]> wrote:
    > I did not get single reply, so thought of posting
    > this mail again.
    > I hope I am making some sense by asking this
    > question.Please guide me ASAP as I am newbie and
    > stuck very badly
    > 
    > lover birds <[EMAIL PROTECTED]> wrote:
    > 
    > Hi folks,
    > 
    > I am getting this error.
    > 
    > "Cannot find bean org.apache.struts.taglib.html.BEAN
    > in any scope"
    > 
    > I am trying something as follows:
    > 
    > input="/pages/count/List.jsp" path="/New"
    > scope="request"/>
    > 
    > 
    > content of List.jsp is
    > 
    > 
    > 
    > 
    > 
    > New.jsp is absolutely blank:
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > Click on the New image of the List JSP gives me this
    > error.
    > 
    > I would appreciate help in this regard.
    > 
    > I would like to know the best way to forward to a
    > specific page on an image click.
    > 
    > 
    > 
    > 
    > 
    > -
    > Do you Yahoo!?
    > The New Yahoo! Shopping - with improved product
    > search
    > 
    > -
    > Do you Yahoo!?
    > The New Yahoo! Shopping - with improved product
    search
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    To the Person Asked About Form-Based Container-Managed (JDBCRealm) Authentication Question

    Hi, I saw your message asking me about the form-based
    container-managed authentication in Struts.  I
    accidentally deleted your message and could not find
    your name and e-mail address.
    
    The following steps are what should be done:
    
    1. configure the JDBCRealm in the Tomcat server.xml,
    see
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    
    2. container-managed, form-based authentication is
    completely handled by the server.  That is to say, it
    is none of Struts business.  Prepare your logon.jsp
    and error.jsp (do not use Struts tags).  There is
    nothing wrong with your j_security_check, ..., etc.
    
    3. in your web.xml, you have
    
      
    FORM 
     
     
    /signin/logon.jsp  
     
    /signin/error.jsp
      
       
    
    4. Do not change your action forward in the
    struts-config.xml file (i.e. do not forward anything
    to logon.jsp because it has nothing to do with Struts)
    except add redirect="true".  For example:
    
     
    
    Craig McClanahan wrote a detailed explanation on how
    it works (I am quoting what Craig said below):
    
    form-based login is triggered the first time that an
    unauthenticated user requests a URL that is protected
    by a security constraint.
    (1) Unauthenticated user requests a protected resource
    (*NOT* the login page!) 
    (2) Container remembers the protected resource that
    was requested in a private variable. 
    (3) Container displays the login page, which must have
    a destination of "j_security_check", and waits for the
    user submit. For some containers, including Tomcat,
    this is the one-and-only time that submitting to
    "j_security_check" will not return a 404. 
    (4) User enters username and password, and presses the
    submit button.
    (5) the post to j_security_check is intercepted by
    your servlet container, which performs Container
    Managed Authentication - it looks for the j_username
    and j_password, authenticates the combination, and
    forwards to the originally requested resource, or to a
    configurable error page if the authentication 
    (6) Container authenticates the username (j_username)
    and password (j_password) combination. If valid,
    container recalls the originally requested resource
    saved in (2) and displays *that* to the user in
    response to the login submit.  Or forwards to a
    configurable error page if the authentication fails.
    The important point is that, at no time, did anyone
    ever submit a request to the URL of the login page,
    because there is no such thing.  Also think of the
    login page as part of the container, not part of your
    app. 
    
    
    Let me know if you have further questions.
    
    -Caroline
    
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    How To Use request.tld?

    Where can I find any doc regarding how to use
    request.tld?  
    
    I have seen request.tld be imported in a JSP and the
    role of the logged-in user is validated this way: 
    
    
    
    I would like to find out how to use the request.tld to
    express this statement:
    
    user.setName( request.getRemoteUser );
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Tiles And Images

    I use tiles and stylesheet to display my web pages.  I
    also try to insert some images in those pages.
    
    The tiles work fine.  I have header, footer, navbar,
    content, etc. displayed without problem.  But, I am
    curious to know if anybody has had difficulties in
    inserting images.  I have tried various ways and
    cannot succeed.  
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Tile and html:img

    Thanks for the advices that have been given to my
    earlier question regarding inserting images while
    using tiles.  
    
    The tiles part works fine.  The browser still has
    problem to pick up the image that I try to insert. 
    This is what I do:
    
    1. I have  inside the  tage in the
    main JSP page.
    
    2. I use the following code in the header.jsp
    
    
    
    
    
    3. The header.jsp is in the
    ApplicationRoot/article/common folder
    
    4. The images folder is where the header.jsp is; i.e.,
    in the 
    ApplicationRoot/article/common folder
    
    5. I checked the spelling; including upper/lower
    cases, of the path and the name of the image.  I also
    checked the extension of the image.
    
    I sort of think it is the path problem.  Please
    comment on what I did.  Thank you. 
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: Tile and html:img

    Thanks a lot, Cal.  I did "View Source" and saw my
    mistake.  The path of the image should be relative to
    the application root.
    --- "Holman, Cal" <[EMAIL PROTECTED]> wrote:
    > Where is the template.jsp?  Can you do view source
    > and provide the generated link for the image tag?
    > 
    > Cal
    > 
    > -----Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > Sent: Friday, October 24, 2003 21:10
    > To: [EMAIL PROTECTED]
    > Subject: Tile and html:img
    > 
    > Thanks for the advices that have been given to my
    > earlier question regarding inserting images while
    > using tiles. 
    > 
    > The tiles part works fine.  The browser still has
    > problem to pick up the image that I try to insert.
    > This is what I do:
    > 
    > 1. I have  inside the  tage in the
    > main JSP page.
    > 
    > 2. I use the following code in the header.jsp
    > 
    > 
    >border="0"
    >   alt="[goldbrush]"/>
    > 
    > 
    > 3. The header.jsp is in the
    > ApplicationRoot/article/common folder
    > 
    > 4. The images folder is where the header.jsp is;
    > i.e.,
    > in the
    > ApplicationRoot/article/common folder
    > 
    > 5. I checked the spelling; including upper/lower
    > cases, of the path and the name of the image.  I
    > also
    > checked the extension of the image.
    > 
    > I sort of think it is the path problem.  Please
    > comment on what I did.  Thank you.
    > 
    > __
    > Do you Yahoo!?
    > The New Yahoo! Shopping - with improved product
    > search
    > http://shopping.yahoo.com
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    >   
    > Learn more about Paymentech's payment processing
    > services at www.paymentech.com
    > THIS MESSAGE IS CONFIDENTIAL.  This e-mail message
    > and any attachments are proprietary and confidential
    > information intended only for the use of the
    > recipient(s) named above.  If you are not the
    > intended recipient, you may not print, distribute,
    > or copy this message or any attachments.  If you
    > have received this communication in error, please
    > notify the sender by return e-mail and delete this
    > message and any attachments from your computer.
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Tiles And Images

    Hi, everybody.  I have my problem solved.  The images
    should be relative to the application root (it is
    where my mistake was).
    
    Nonetheless, if you do not mind, why it does not work
    at all when I tried to put image in the style sheet:
    
    td.bar { 
      background:
    url('http://localhost:8080/PracticeVersion/article/assets/styles/images/goldbrush.gif');
    }
    
    and I did the following in my JSP:
    
    
    
    --- "Ruth, Brice" <[EMAIL PROTECTED]> wrote:
    > Just an FYI (and correct me if I'm wrong), but just
    > doing  
    > will pretty much do what all the stuff you have
    > below there does - what 
    > you have in there is the default behavior of the
    > Struts-HTML base tag.
    > 
    > Holman, Cal wrote:
    > 
    > >Try searching the archives this is a common issue. 
    > The requests for images are based on where the
    > template tiles is using is located - not the
    > location of the jsp being inserted in the template. 
    > One approach is to use the base tag - I do the
    > following to ensure all images and links are rooted
    > at the same level in the application - the root. 
    > This is the simplest, but there are other
    > suggestions as well.
    > >
    > >This line is in the base template - or any
    > template.
    > >
    > >
    > >Images then are referenced from the root of the web
    > app - this is from the footer jsp
    > >
    > > width="95" height="37" border="0" alt="struts"/>
    > >
    > >My directory structure is
    > >
    > >App
    > >--> web (web stuff)
    > >-->WEB-INF
    > >
    > >Others like the WEB-INF capability to protect
    > resources.
    > >
    > >Cal 
    > >
    > >http://www.calandva.com/Last update
    > 08/01/03
    > >
    > >-Original Message-
    > >From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > >Sent: Friday, October 24, 2003 14:42
    > >To: [EMAIL PROTECTED]
    > >Subject: Tiles And Images
    > >
    > >I use tiles and stylesheet to display my web pages.
    >  I
    > >also try to insert some images in those pages.
    > >
    > >The tiles work fine.  I have header, footer,
    > navbar,
    > >content, etc. displayed without problem.  But, I am
    > >curious to know if anybody has had difficulties in
    > >inserting images.  I have tried various ways and
    > >cannot succeed. 
    > >
    > >__
    > >Do you Yahoo!?
    > >The New Yahoo! Shopping - with improved product
    > search
    > >http://shopping.yahoo.com
    > >
    >
    >-
    > >To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > >For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > >
    > >  
    > >Learn more about Paymentech's payment processing
    > services at www.paymentech.com
    > >THIS MESSAGE IS CONFIDENTIAL.  This e-mail message
    > and any attachments are proprietary and confidential
    > information intended only for the use of the
    > recipient(s) named above.  If you are not the
    > intended recipient, you may not print, distribute,
    > or copy this message or any attachments.  If you
    > have received this communication in error, please
    > notify the sender by return e-mail and delete this
    > message and any attachments from your computer.
    > >
    >
    >-
    > >To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > >For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > >
    > >  
    > >
    > 
    > -- 
    > Brice D. Ruth
    > Sr. IT Analyst
    > Fiskars Brands, Inc.
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    My logic Tag Does Not Seem To Work

    Please point out my mistakes.  Does the 'name'
    attribute of the logic tag accept an object only?  For
    example, I created a session this way:
    
    HttpSession session = request.getSession();
    String username = request.getRemoteUser();
    session.setAttribute( "user", username );
    
    In the LogoffAction, I invalidate the session and want
    to forward the visitor to the welcome page.  This is
    what I did:
    
    HttpSession session = request.getSession(false);
    String username = (String)session.getAttribute( "user"
    );
    if (username != null) 
    {
       session.removeAttribute( "user" );
       session.invalidate();
       return (mapping.findForward( "success" ));
    }
    
    I used the logic tag in my welcome.jsp.  It does seem
    to work because the LOGOFF button is still displayed.
    
    
    LOGON 
    
    | 
    LOGOUT
    
    
    -Caroline
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Why the Forward Does Not Achieve In One Step?

    Hi, I have the following code in the navbarMenu.jsp:
    
    LOGOUT
    
    and in the struts-config.xml, I have:
    
    
    
    and 
    
    
     
    
    
    In the LogoffAction.java, I invalidate the session and
    I want the user to go back the welcome page.
    
    The problem is that it takes two steps for the user to
    go back to the welcome page - After the first click,
    the same screen remains in the browser.  The only
    change is what is shown in the address bar.  I have to
    click the LOGOFF button again and then the welcome
    page is displayed.  
    
    What should I do to go back to the welcome page in one step?
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Forward Cannot Be Achieved In One Step

    Hi, I have the following code in the navbarMenu.jsp:
    
    LOGOUT
    
    and in the struts-config.xml, I have:
    
    
    
    and 
    
    
     
    
    
    In the LogoffAction.java, I invalidate the session and
    I want the user to go back the welcome page.
    
    The problem is that it takes two steps for the user to
    go back to the welcome page - After the first click,
    the same screen remains in the browser.  The only
    change is what is shown in the address bar.  I have to
    click the LOGOFF button again and then the welcome
    page is displayed.  
    
    What should I do to go back to the welcome page in one step?
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Forward Cannot Be Achieved In One Step

    The do/Menu "does" display my welcome page.  The
    LOGOUT button and forward "does" eventually lead the
    visitor to the welcome page.  The problem is that it
    takes two steps intead of going straight to the
    welcome page.  Let me re-state my problem:
    
    I have the following code in the navbarMenu.jsp:
    
    LOGOUT
    
    and in the struts-config.xml, I have:
    
    
    
    and 
    
    
     
    
    
    In the LogoffAction.java, I invalidate the session and
    I want the user to go back the welcome page.  And 
    
    
    
    
    
    The .article.Menu is my tile that displays the welcome
    page.
    
    The problem is that it takes two steps for the user to
    go back to the welcome page - After the first click,
    the same screen remains in the browser.  The only
    change is what is shown in the address bar.  I have to
    click the LOGOFF button "again" and then the welcome
    page is displayed.  
    
    What should I do to go back to the welcome page in one
    step?
    
    --- "Ruth, Brice" <[EMAIL PROTECTED]> wrote:
    > Is your "Menu" actionforward the welcome screen you
    > want to get to? And 
    > does your Action return an ActionForward to this?
    > 
    > Caroline Jen wrote:
    > 
    > >Hi, I have the following code in the
    > navbarMenu.jsp:
    > >
    > >LOGOUT
    > >
    > >and in the struts-config.xml, I have:
    > >
    > > >   name="exit"
    > >   path="/do/Logoff"/>
    > >
    > >and 
    > >
    > > >   path="/Logoff"
    > >  
    > type="org.NameOfOrganization.signoff.LogoffAction">
    > >  > name="success"
    > > path="/do/Menu"/>
    > >
    > >
    > >In the LogoffAction.java, I invalidate the session
    > and
    > >I want the user to go back the welcome page.
    > >
    > >The problem is that it takes two steps for the user
    > to
    > >go back to the welcome page - After the first
    > click,
    > >the same screen remains in the browser.  The only
    > >change is what is shown in the address bar.  I have
    > to
    > >click the LOGOFF button again and then the welcome
    > >page is displayed.  
    > >
    > >What should I do to go back to the welcome page in
    > one step?
    > >
    > >__
    > >Do you Yahoo!?
    > >Exclusive Video Premiere - Britney Spears
    > >http://launch.yahoo.com/promos/britneyspears/
    > >
    >
    >-
    > >To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > >For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > >
    > >  
    > >
    > 
    > -- 
    > Brice D. Ruth
    > Sr. IT Analyst
    > Fiskars Brands, Inc.
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: Forward Cannot Be Achieved In One Step

    Thanks for the reply.  Now, I understand that I have
    two actions.  However, I do quite understand what you
    suggested.  You said:
    
    u can also use 
    logoff
    where logoff is ur global forward.
    logoff
    
    I still have two actions if I use 
    logoff
    
    because I have
    
    
     
    
     
    In the LogoffAction.java, I invalidate the session
    and I want the user to go back the welcome page.  And
    
    
     
     
     
    The .article.Menu is my tile that displays the welcome
    page.
    
    
    
    --- [EMAIL PROTECTED] wrote:
    > u can also use 
    > logoff
    > where logoff is ur global forward.
    > logoff
    > hence it wont be a 2 step stuff but directly calling
    > ur Action class which does cleanup work for the log
    > off process as session cleaning up and invalidating
    > the other objects (probably signing off the user),
    > And forwards later on to one of the jsp's 
    > U can create a global forward for the same too which
    > represents an action.
    > I guess its only available in 1.1 version of Struts.
    > 
    > 
    > -Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > Sent: 28 October 2003 17:05
    > To: Struts Users Mailing List
    > Subject: Re: Forward Cannot Be Achieved In One Step
    > 
    > 
    > The do/Menu "does" display my welcome page.  The
    > LOGOUT button and forward "does" eventually lead the
    > visitor to the welcome page.  The problem is that it
    > takes two steps intead of going straight to the
    > welcome page.  Let me re-state my problem:
    > 
    > I have the following code in the navbarMenu.jsp:
    > 
    > LOGOUT
    > 
    > and in the struts-config.xml, I have:
    > 
    > name="exit"
    >path="/do/Logoff"/>
    > 
    > and 
    > 
    > path="/Logoff"
    >   
    > type="org.NameOfOrganization.signoff.LogoffAction">
    >name="success"
    >  path="/do/Menu"/>
    > 
    > 
    > In the LogoffAction.java, I invalidate the session
    > and
    > I want the user to go back the welcome page.  And 
    > 
    >path="/Menu"
    >   name="menuForm"
    > 
    >
    type="org.apache.struts.scaffold.ExistsAttributeAction"
    >   parameter="application;HOURS">
    > name="success"
    >path=".article.Menu"/>
    > name="failure"
    >path="/do/MenuCreate"/>
    > 
    > The .article.Menu is my tile that displays the
    > welcome
    > page.
    > 
    > The problem is that it takes two steps for the user
    > to
    > go back to the welcome page - After the first click,
    > the same screen remains in the browser.  The only
    > change is what is shown in the address bar.  I have
    > to
    > click the LOGOFF button "again" and then the welcome
    > page is displayed.  
    > 
    > What should I do to go back to the welcome page in
    > one
    > step?
    > 
    > --- "Ruth, Brice" <[EMAIL PROTECTED]> wrote:
    > > Is your "Menu" actionforward the welcome screen
    > you
    > > want to get to? And 
    > > does your Action return an ActionForward to this?
    > > 
    > > Caroline Jen wrote:
    > > 
    > > >Hi, I have the following code in the
    > > navbarMenu.jsp:
    > > >
    > > >LOGOUT
    > > >
    > > >and in the struts-config.xml, I have:
    > > >
    > > > > >   name="exit"
    > > >   path="/do/Logoff"/>
    > > >
    > > >and 
    > > >
    > > > > >   path="/Logoff"
    > > >  
    > >
    > type="org.NameOfOrganization.signoff.LogoffAction">
    > > >  > > name="success"
    > > > path="/do/Menu"/>
    > > >
    > > >
    > > >In the LogoffAction.java, I invalidate the
    > session
    > > and
    > > >I want the user to go back the welcome page.
    > > >
    > > >The problem is that it takes two steps for the
    > user
    > > to
    > > >go back to the welcome page - After the first
    > > click,
    > > >the same screen remains in the browser.  The only
    > > >change is what is shown in the address bar.  I
    > have
    > > to
    > > >click the LOGOFF button again and then the
    > welcome
    > > >page is displayed.  
    > > >
    > > >What should I do to go back to the welcome page
    > in
    > > one step?
    > > >
    > > >__
    > > >Do you Yahoo!?
    > > >Exclusive Video Premiere - Britney Spears
    > > >http://launch.yahoo.com/promos/britneyspears/
    > > >
    > >
    >
    >-
    > > >To unsubscribe, e-mail:
    > > [EMAIL PROTECTED]
    > > >For additional commands, e-mail:
    > &

    RE: Forward Cannot Be Achieved In One Step

    Let me re-phrase my question.
    
    Upon the user click on the LOGOUT buttion, I have two
    actions - the first one of the actions is Logoff.java
    in which I invalidate the session, ..., etc. and the
    second action upon success will lead the user to the
    welcome page in which choices for unregistered member
    plus a LOGON buttion is provided.
     
    As long as two actions are involved, the user does not
    get back to the welcome page by just click on the
    LOGOFF button "only once". 
    
    Need your guidance on how such a situation is usually
    handled? 
    
    
    --- Caroline Jen <[EMAIL PROTECTED]> wrote:
    > Thanks for the reply.  Now, I understand that I have
    > two actions.  However, I do quite understand what
    > you
    > suggested.  You said:
    > 
    > u can also use 
    > logoff
    > where logoff is ur global forward.
    > logoff
    > 
    > I still have two actions if I use 
    > logoff
    > 
    > because I have
    > 
    > path="/Logoff"
    >   
    > type="org.NameOfOrganization.signoff.LogoffAction">
    >   name="success"
    > path="/do/Menu"/>
    > 
    >  
    > In the LogoffAction.java, I invalidate the session
    > and I want the user to go back the welcome page. 
    > And
    > 
    >path="/Menu"
    >   name="menuForm"
    >
    type="org.apache.struts.scaffold.ExistsAttributeAction"
    >   parameter="application;HOURS">
    >   name="success"
    > path=".article.Menu"/>
    >   name="failure"
    > path="/do/MenuCreate"/>
    >  
    > The .article.Menu is my tile that displays the
    > welcome
    > page.
    > 
    > 
    > 
    > --- [EMAIL PROTECTED] wrote:
    > > u can also use 
    > > logoff
    > > where logoff is ur global forward.
    > > logoff
    > > hence it wont be a 2 step stuff but directly
    > calling
    > > ur Action class which does cleanup work for the
    > log
    > > off process as session cleaning up and
    > invalidating
    > > the other objects (probably signing off the user),
    > > And forwards later on to one of the jsp's 
    > > U can create a global forward for the same too
    > which
    > > represents an action.
    > > I guess its only available in 1.1 version of
    > Struts.
    > > 
    > > 
    > > -Original Message-
    > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > > Sent: 28 October 2003 17:05
    > > To: Struts Users Mailing List
    > > Subject: Re: Forward Cannot Be Achieved In One
    > Step
    > > 
    > > 
    > > The do/Menu "does" display my welcome page.  The
    > > LOGOUT button and forward "does" eventually lead
    > the
    > > visitor to the welcome page.  The problem is that
    > it
    > > takes two steps intead of going straight to the
    > > welcome page.  Let me re-state my problem:
    > > 
    > > I have the following code in the navbarMenu.jsp:
    > > 
    > > LOGOUT
    > > 
    > > and in the struts-config.xml, I have:
    > > 
    > >  >name="exit"
    > >path="/do/Logoff"/>
    > > 
    > > and 
    > > 
    > >  >path="/Logoff"
    > >   
    > >
    > type="org.NameOfOrganization.signoff.LogoffAction">
    > >   >  name="success"
    > >  path="/do/Menu"/>
    > > 
    > > 
    > > In the LogoffAction.java, I invalidate the session
    > > and
    > > I want the user to go back the welcome page.  And 
    > > 
    > >  >   path="/Menu"
    > >   name="menuForm"
    > > 
    > >
    >
    type="org.apache.struts.scaffold.ExistsAttributeAction"
    > >   parameter="application;HOURS">
    > >  >name="success"
    > >    path=".article.Menu"/>
    > >  >name="failure"
    > >path="/do/MenuCreate"/>
    > > 
    > > The .article.Menu is my tile that displays the
    > > welcome
    > > page.
    > > 
    > > The problem is that it takes two steps for the
    > user
    > > to
    > > go back to the welcome page - After the first
    > click,
    > > the same screen remains in the browser.  The only
    > > change is what is shown in the address bar.  I
    > have
    > > to
    > > click the LOGOFF button "again" and then the
    > welcome
    > > page is displayed.  
    > > 
    > > What should I do to go back to the welcome page in
    > > one
    > > step?
    > > 
    > > --- "Ruth, Brice" <[EMAIL PROTECTED]> wrote:
    > > > Is your "Menu" actionforward the welcome screen
    > > you
    > > > want to get to? And 
    > > > does your Action return an ActionForward to
    >

    RE: Forward Cannot Be Achieved In One Step

    I have tried your suggestion.  It still takes two
    steps to go back to the welcome page.  
    
    As long as there are two actions in between, it does
    not seem that I can go directly from "clicking the
    LOGOUT buttion" to "have the welcome page displayed".
    
    I really wish to learn what people usually do - the
    first one of those two actions is Logoff.java in which
    I invalidate the session, ..., etc. and the second
    action upon success will lead the user to the welcome
    page in which choices available for unregistered
    members plus a LOGON buttion are provided.
    
    -Caroline
    
    --- Yansheng Lin <[EMAIL PROTECTED]> wrote:
    > At the end of your first action execute() method, do
    > 
    > a redirect to the second action. Something like the 
    > following:
    >   return new ActionForward("secondAction.do");
    > 
    > Hope this helps!
    > 
    > -Yan
    > 
    > -Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
    > Sent: October 28, 2003 2:51 PM
    > To: Struts Users Mailing List
    > Subject: RE: Forward Cannot Be Achieved In One Step
    > 
    > 
    > Let me re-phrase my question.
    > 
    > Upon the user click on the LOGOUT buttion, I have
    > two
    > actions - the first one of the actions is
    > Logoff.java
    > in which I invalidate the session, ..., etc. and the
    > second action upon success will lead the user to the
    > welcome page in which choices for unregistered
    > member
    > plus a LOGON buttion is provided.
    >  
    > As long as two actions are involved, the user does
    > not
    > get back to the welcome page by just click on the
    > LOGOFF button "only once". 
    > 
    > Need your guidance on how such a situation is
    > usually
    > handled? 
    > 
    > 
    > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
    > > Thanks for the reply.  Now, I understand that I
    > have
    > > two actions.  However, I do quite understand what
    > > you
    > > suggested.  You said:
    > > 
    > > u can also use 
    > > logoff
    > > where logoff is ur global forward.
    > > logoff
    > > 
    > > I still have two actions if I use 
    > > logoff
    > > 
    > > because I have
    > > 
    > >  >path="/Logoff"
    > >   
    > >
    > type="org.NameOfOrganization.signoff.LogoffAction">
    > >   > name="success"
    > > path="/do/Menu"/>
    > > 
    > >  
    > > In the LogoffAction.java, I invalidate the session
    > > and I want the user to go back the welcome page. 
    > > And
    > > 
    > >  >   path="/Menu"
    > >   name="menuForm"
    > >
    >
    type="org.apache.struts.scaffold.ExistsAttributeAction"
    > >   parameter="application;HOURS">
    > >   > name="success"
    > > path=".article.Menu"/>
    > >   > name="failure"
    > > path="/do/MenuCreate"/>
    > >  
    > > The .article.Menu is my tile that displays the
    > > welcome
    > > page.
    > > 
    > > 
    > > 
    > > --- [EMAIL PROTECTED] wrote:
    > > > u can also use 
    > > > logoff
    > > > where logoff is ur global forward.
    > > > logoff
    > > > hence it wont be a 2 step stuff but directly
    > > calling
    > > > ur Action class which does cleanup work for the
    > > log
    > > > off process as session cleaning up and
    > > invalidating
    > > > the other objects (probably signing off the
    > user),
    > > > And forwards later on to one of the jsp's 
    > > > U can create a global forward for the same too
    > > which
    > > > represents an action.
    > > > I guess its only available in 1.1 version of
    > > Struts.
    > > > 
    > > > 
    > > > -Original Message-
    > > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > > > Sent: 28 October 2003 17:05
    > > > To: Struts Users Mailing List
    > > > Subject: Re: Forward Cannot Be Achieved In One
    > > Step
    > > > 
    > > > 
    > > > The do/Menu "does" display my welcome page.  The
    > > > LOGOUT button and forward "does" eventually lead
    > > the
    > > > visitor to the welcome page.  The problem is
    > that
    > > it
    > > > takes two steps intead of going straight to the
    > > > welcome page.  Let me re-state my problem:
    > > > 
    > > > I have the following code in the navbarMenu.jsp:
    > > > 
    > > > LOGOUT
    > > > 
    > > > and in the struts-config.xml, I have:
    > > > 
    > > >  > >name="exit"
    > > >path="/do/Logoff"/>
    > > > 
    > > > and 
    > > > 
    > >

    Re: Forward Cannot Be Achieved In One Step

    Excellent!  It is the way to do it.  Thank you for
    your guidance.  It is very dumb of me not to think of
    it.
    --- Barry Volpe <[EMAIL PROTECTED]> wrote:
    > I go directly to the welcome page this way:
    > 
    > 
    > struts-config:
    > 
    >  type="com.childrencare.LogoffAction">
    >  name="success"
    > path="/index.jsp"/>
    >   
    > 
    > In action:
    > public final class LogoffAction extends Action {
    > 
    > public ActionForward execute(ActionMapping mapping,
    > 
    > ActionForm form,
    > 
    > HttpServletRequest request,
    > 
    > HttpServletResponse response)
    > 
    > throws IOException, ServletException {
    > 
    > // Extract attributes we will need
    > 
    > HttpSession session = request.getSession();
    > 
    > 
    > 
    > String user = (String)
    > 
    > session.getAttribute(Constants.USER_KEY);
    > 
    > // Remove user login
    > 
    > session.removeAttribute(Constants.USER_KEY);
    > 
    > // Return success
    > 
    > return (mapping.findForward(Constants.SUCCESS));
    > 
    > Barry
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > - Original Message - 
    > From: "Caroline Jen" <[EMAIL PROTECTED]>
    > To: "Struts Users Mailing List"
    > <[EMAIL PROTECTED]>
    > Sent: Tuesday, October 28, 2003 6:02 PM
    > Subject: RE: Forward Cannot Be Achieved In One Step
    > 
    > 
    > > I have tried your suggestion.  It still takes two
    > > steps to go back to the welcome page.  
    > > 
    > > As long as there are two actions in between, it
    > does
    > > not seem that I can go directly from "clicking the
    > > LOGOUT buttion" to "have the welcome page
    > displayed".
    > > 
    > > I really wish to learn what people usually do -
    > the
    > > first one of those two actions is Logoff.java in
    > which
    > > I invalidate the session, ..., etc. and the second
    > > action upon success will lead the user to the
    > welcome
    > > page in which choices available for unregistered
    > > members plus a LOGON buttion are provided.
    > > 
    > > -Caroline
    > > 
    > > --- Yansheng Lin <[EMAIL PROTECTED]> wrote:
    > > > At the end of your first action execute()
    > method, do
    > > > 
    > > > a redirect to the second action. Something like
    > the 
    > > > following:
    > > > return new ActionForward("secondAction.do");
    > > > 
    > > > Hope this helps!
    > > > 
    > > > -Yan
    > > > 
    > > > -Original Message-
    > > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > 
    > > > Sent: October 28, 2003 2:51 PM
    > > > To: Struts Users Mailing List
    > > > Subject: RE: Forward Cannot Be Achieved In One
    > Step
    > > > 
    > > > 
    > > > Let me re-phrase my question.
    > > > 
    > > > Upon the user click on the LOGOUT buttion, I
    > have
    > > > two
    > > > actions - the first one of the actions is
    > > > Logoff.java
    > > > in which I invalidate the session, ..., etc. and
    > the
    > > > second action upon success will lead the user to
    > the
    > > > welcome page in which choices for unregistered
    > > > member
    > > > plus a LOGON buttion is provided.
    > > >  
    > > > As long as two actions are involved, the user
    > does
    > > > not
    > > > get back to the welcome page by just click on
    > the
    > > > LOGOFF button "only once". 
    > > > 
    > > > Need your guidance on how such a situation is
    > > > usually
    > > > handled? 
    > > > 
    > > > 
    > > > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
    > > > > Thanks for the reply.  Now, I understand that
    > I
    > > > have
    > > > > two actions.  However, I do quite understand
    > what
    > > > > you
    > > > > suggested.  You said:
    > > > > 
    > > > > u can also use 
    > > > > logoff
    > > > > where logoff is ur global forward.
    > > > >  forward="/Logoff">logoff
    > > > > 
    > > > > I still have two actions if I use 
    > > > >  action="/do/Logoff">logoff
    > > > > 
    > > > > because I have
    > > > > 
    > > > >  > > >path="/Logoff"
    > > > >   
    > > > >
    > > >
    > type="org.NameOfOrganization.signoff.LogoffAction">
    > > > >   > > > name="success"
    > > > > path="/do/Menu"/>
    > > > > 
    > > > >  
    > > > > In the LogoffAction.java, I invalidate the
    > session
    > > > > and I want the user to go back the welcome
    > page. 
    > > > > And
    > > > > 
    > > > >  > > >   path="/Menu"
    > > > >   name="menuForm"
    > > > >
    > > >
    > >
    >
    type="org.apache.struts.scaffold.ExistsAttributeAction"
    > > > >   parameter="application;HOURS">
    > > > >   > > > name="success"
    > > > > path=".article.Menu"/>
    > > > >   > > > name="failure"
    > > > > path="/do/MenuCreate"/>
    > > > >  
    > > > > The .article.Menu is my tile that displays the
    > > > > welcome
    > > > > page.
    > > > > 
    > > > > 
    > > > > 
    > > > > --- [EMAIL PROTECTED] wrote:
    > > > > > u can also use 
    > > > > >  action="/Logoff">logoff
    > > > > > where logoff is ur global forward.
    > > > > >  forward="/Logoff">logoff
    > > > > > hence it wont be a 2 step stuff but directly
    > > > > calling
    > > > > > ur Action class which does cleanup work for
    > the
    > 
    === message truncated ===
    
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    isUerInRole and request.tld

    I have checked the syntax of the isUserInRole in the
    request.tld, which is:
    
     
    <%-- do something --%>
    
    
    Is it possible to specify more than one role?  What is
    the syntax of specifying that?  My application has
    many roles.  In some cases, both "administrator" and
    say, "contributor" share doing the same thing.
    
    
    
    
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    How To Submit A Propery/Value Pair That Is Not Selected/Filled-Out By Visitors of the Website?

    In the welcome page, all visitors of the web site can
    choose to view any article that is available in the
    database.  But, visitors will not be able to delete or
    update any of those articles (DELETE, UPDATE, etc.
    buttons are not provided).  This part of my struts
    application works well.  I have a drop-down list
    enclosed in  for visitors to make a
    selection and submit it for an action to be taken:
    
    
    
    Find articles by: 
    
    
    
    
    
    
    
    GO
    
     
    
    Visitor can choose articles by title, author,
    category, content, or article ID.  If "author" is
    selected from the drop-down list and the name of the
    author "Victor Hugo" is supplied, keyName will be set
    as creator and keyValue will be set as Victor Hugo for
    further processing as shown in my struts-config.xml
    below:
    
    
    
    
    
    
    
    
    
    
    After a registered visitor successfully logs in, a
    user specific page is displayed.  For example, after
    the author Victor Hugo who has submitted several of
    his articles at the web site logs in, he will see a
    page with "Submit Article" and "View Article" (IT IS A
    LINK OR A BUTTON.  IT IS NOT A DROP DOWN LIST), etc. 
    The author can view his own articles only because
    DELETE, UPDATE, etc. buttons will be provided.
    
    I am stuck here.  There is no drop-down list for
    Victor Hugo.  How do I supply keyName (which is
    "creator") and keyValue (request.getRemoteUser) to the
    action below if Victor Hugo clicks on the "View
    Article" button?
    
    
    
    
    
    
    
    
    
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    findByProperty() in the scaffold.sql.AccessBase - Need One Additional Parameter to the Pair of Property/Value

    I am using the findByProperty method in the
    org.apache.commons.scaffold.sql.AccessBase.  The
    findByProperty method takes "one" pair of
    property/value as it parameters.  As such, visitors of
    the web site can query all articles in the database by
    providing 'author' as the property and supply the name
    of the author (xyz) as value.
    
    public static final Collection findByProperty
    (
    Object target,
    String property,
    String value
    ) throws ParameterException, PopulateException,
    ResourceException
    
    I have this field "category" in my database.  I want
    to search and get all the articles written by
    author(property) with name xyz (value) within the
    HISTORY category.  The value of the category will be
    supplied by the application developer (NOT BY THE
    VISITOR of the web site via selecting from a drop-down
    list and fill out the value in the text field).
    
    I need help in handling this kind of situation. 
    Thanks in advance.
    
    -Caroline
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Modifying the ParameterAction Class in the org.apache.struts.scaffold

    I am trying to modify the behavior of the
    ParameterAction.java in the org.apache.struts.scaffold
    to tailor it to my specific need.  
    
    I put the struts.jar and struts-scaffold.jar in my
    classpath while compiling the sub-class.  Nonetheless,
    I got 
    
    cannot resolve symbol
    symbol: class ParameterAction
    
    Here is my AuthorParameterAction that extends
    ParameterAction:
    
    package org.apache.artimus.article;
    
    import java.io.IOException;
    import java.util.Map;
    
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    import org.apache.commons.scaffold.lang.Tokens;
    
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionServlet;
    
    public class AuthorParameterAction extends
    ParameterAction {
    
    protected ActionForward findSuccess(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) {
    
    // Get "dispatch" parameter
    String parameter =
    request.getParameter(Tokens.DISPATCH);
    
       // Get stub URI from mapping
    (/do/whatever?paramName=)
    StringBuffer path = new StringBuffer(64);
       
    path.append(mapping.findForward(parameter).getPath());
    // Append the value passed
    (/do/whatever?paramName=paramProperty)
    path.append(request.getRemoteUser());
    
    // Return a new forward based on
    stub+value
    return new ActionForward(path.toString());
    
    }
    
    } // end AuthorParameterAction
    
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Hidden Field

    
    works well because "author" is expected literally as
    the value of a property called "dispatch".
    
    I also want to pass 
    String username = request.getRemoteUser(); 
    as the value of a property called "keyValue".
    
    But,
    
    or
    
    
    gives me problems.  What is the proper way of doing it?
    
    __
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: findByProperty() in the scaffold.sql.AccessBase - Need One Additional Parameter to the Pair of Property/Value

    Please help.  Need your clever ideas.  Thank you.
    --- Caroline Jen <[EMAIL PROTECTED]> wrote:
    > I am using the findByProperty method in the
    > org.apache.commons.scaffold.sql.AccessBase.  The
    > findByProperty method takes "one" pair of
    > property/value as it parameters.  As such, visitors
    > of
    > the web site can query all articles in the database
    > by
    > providing 'author' as the property and supply the
    > name
    > of the author (xyz) as value.
    > 
    > public static final Collection findByProperty
    > (
    > Object target,
    > String property,
    > String value
    > ) throws ParameterException, PopulateException,
    > ResourceException
    > 
    > I have this field "category" in my database.  I want
    > to search and get all the articles written by
    > author(property) with name xyz (value) within the
    > HISTORY category.  The value of the category will be
    > supplied by the application developer (NOT BY THE
    > VISITOR of the web site via selecting from a
    > drop-down
    > list and fill out the value in the text field).
    > 
    > I need help in handling this kind of situation. 
    > Thanks in advance.
    > 
    > -Caroline
    > 
    > __
    > Do you Yahoo!?
    > Exclusive Video Premiere - Britney Spears
    > http://launch.yahoo.com/promos/britneyspears/
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Buttons in Struts

    We have  for the submit buttion in
    struts.  I am trying to add some additional features
    to the submit button:
    
    Read/Send Mails
    
    I wonder if there is something like it in struts.
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Session Times Out

    I check if session expires for each action in the
    application.  If the session times out, I forward the
    user to index.jsp so that the user can log on again.  
    
    How do I inform the user with a message that he/she is
    at the welcome page because the session has expired?
    
    __
    Do you Yahoo!?
    Exclusive Video Premiere - Britney Spears
    http://launch.yahoo.com/promos/britneyspears/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Why the Action Mapping Cannot Be Retrieved?

    I got this message in the browser:
    [ServletException in:/article/content/menu.jsp] Cannot
    retrieve mapping for action /do/editor/Category'
     
    The menu.jsp is a tile in my application.  This is my
    tile menu.jsp:
    
    
    
    
    
    View
    Articles
    
    
    
    
    
    If I change the statement that causes the
    ServletException to 
    
    
    
    I got 
    [ServletException in:/article/content/menu.jsp] Cannot
    retrieve definition for form bean null' 
    
    However, I have no problem if menu.jsp is like:
    
    
    
    
    
    View
    Articles
    
    
    
    
    
    The /menu/Find in my struts-config.xml is
    
    
    
    
    
    
    
    
    
    And, /editor/Category in my struts-config.xml is like:
    
    
    
    
    
    
    
    __
    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard
    http://antispam.yahoo.com/whatsnewfree
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: Handling Session Timeout

    People have suggested servlet filter is a good choice
    to check session time-out that if I want all servlets
    and JSPs remain intact.
    
    I do not have any idea how it works in Struts.  First
    of all, I think this servlet filter has to be declared
    in the web.xml.  I have many actions in the struts
    application.  How do I call this servlet filter
    whenever the flow goes to an action?  Do I code 
    
    HttpSession session = request.getSession( false );
    if ( session != null) 
    {
       session.removeAttribut( ... );
       session.invalidate();
    }
    
    in the doFilter(); ?
    
    
    --- "Seyhan BASMACI (Internet Yazilimlari Yetkilisi)"
    <[EMAIL PROTECTED]> wrote:
    > 
    > try this  :)
    > 
    > 
    > public class SessionRequestProcessor extends
    > TilesRequestProcessor{
    >   protected String processPath(HttpServletRequest
    > request,
    >
    > HttpServletResponse response)
    > throws IOException 
    >  {
    >   
    >   String origPath = request.getRequestURI();
    > 
    >if(!origPath.endsWith("/Login.do")){
    > 
    >   HttpSession session =  
    > request.getSession(false);  // get session only if
    > it exists 
    > 
    > 
    >   if (session != null ) {// session
    > available, 
    > 
    >   return super.processPath(request,
    > response);  
    > 
    >   }
    >   
    >   else// redirect to login
    > page 
    >   
    >   return "/Login"; // returns without .do
    >   } 
    > 
    >   else {
    > 
    >   HttpSession session = 
    > request.getSession(false);  // get session only if
    > it exists 
    > 
    >   if (session != null)   
    >   session.invalidate(); 
    > 
    >   return super.processPath(request, response); 
    > // process login page request
    >   
    >   }
    >   
    >   }
    > 
    >   
    > 
    > -Original Message-
    > From: Samanth Athrey
    > [mailto:[EMAIL PROTECTED]
    > Sent: Wednesday, November 05, 2003 5:26 PM
    > To: [EMAIL PROTECTED]
    > Subject: Handling Session Timeout
    > 
    > 
    > Hello Gurus
    > 
    > I am trying to handle session timeout by extending
    > RequestProcessor. Since
    > the processPreprocess(...) method is called before
    > the Action.execute(..)
    > method, am trying to add that piece of code to check
    > if the session is
    > valid. The problem am facing is, if i return false
    > from this method, the
    > requestProcessor will stop processing and return the
    > control back to doGet
    > or doPost method in ActionServlet. How do I redirect
    > it to login.jsp or
    > index.jsp from there? Any help/tips would be really
    > great.
    > 
    > Thanx.
    > Sam
    > 
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard
    http://antispam.yahoo.com/whatsnewfree
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    FAQ (Passing Variables Between Actions); But, Stuck and Need Help

    Passing variables from one action to another is a
    frequently asked question.  The answer is to use
    either hidden fields or a session object.  
    
    The story starts with searching the database.  My
    application offers options to search the database by
    author, title of the article, article ID, or . I
    have a drop-down list in my JSP for visitors to make a
    selection.  By clicking on one of those options, the
    property "dispatch" is set.  And the visitor fills out
    the text field to set "keyValue".  With both
    "dispatch" and keyValue forwarded to an "action"; say,
    Action ONE, the desired articles can be retrieved from
    the database.  So far so good.
    
    What I have handled next is the "author's page" of the
    web site.  An author can only view his own articles
    and perform update, delete, save, ... functions.  I
    use the hidden field technique to handle it.  The
    property "dispatch" is arbitrarily set as "author"
    (needless to say) and keyValue can be obtained by
    
    String username = request.getRemoteUser();
    
    And,
    
    
    
    
    are forwarded to the same action (Action ONE) for
    processing.  Again, no problem.
    
    Now, the application has another user case -  editors.
     An editor only retrieve and view all articles in
    his/her own field of specialization.  I arbitrarily
    set "dispatch" as "field_of_specialization" and use
    the hidden field technique:
    
    
    
    Nonetheless, the way to get the "value" the editor's
    field of specialization is from the database.  Because
    editors are registered members of the web site, the
    application should be able to look for his/her profile
    and obtain his/her field of specialization in the
    database once an editor successfully logs into the web
    site.  Therefore, it takes an "action" (Action TWO)
    that tells the business tier to find the "keyValue" in
    the database.  And should I put the "keyValue" in a
    session object.  
    
    I have tried to handle this situation again and again
    in many different ways.  I am very frustrated and need
    help -- how does a user go from by clicking a button
    in a JSP to go to Action TWO (get the keyValue) and
    then forward this keyValue and 
    
    
     
    to Action ONE for retrieving the desired articles from
    the database?
    
    
    
    
    
    __
    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard
    http://antispam.yahoo.com/whatsnewfree
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: FAQ (Passing Variables Between Actions); But, Stuck and Need Help

    Thank you for the very useful and constructive
    feedbacks.
    
    I think I am going for the first method that you
    suggested - create a user bean and store it in a 
    session object at login.  My concern is that I use
    container managed authentication at login.  After the
    container does its job, is there any way other than
    using an Action that delegates the business tier to
    search the database and obtain the value of
    field_of_specialization?  If an action has to be
    involved at this point to form a session object, does
    it suffer the the disadvantage of being overwritten if
    the user has more than one browser window opened?
    
    In regard to the two-action approach that you
    discussed toward the end of your message, I
    encountered some problems.  If you would take a look
    at the problem -  I provide a buttion in editor's
    page, which is a JSP tile:
    
    
    
    View Articles
    
    
    
    If the button is clicked, I attempt to use an Action
    (via the path /editor/Category) to search the database
    for the field_of_specialization.  However, I got this
    message in the browser:
    
    [ServletException in:/article/content/menu.jsp] Cannot
    retrieve mapping for action /do/editor/Category'
    
    and in my struts-config.xml
    
    
    
    
     
    -Caroline
    --- Adam Hardy <[EMAIL PROTECTED]>
    wrote:
    > On 11/06/2003 08:26 AM Caroline Jen wrote:
    > > Passing variables from one action to another is a
    > > frequently asked question.  The answer is to use
    > > either hidden fields or a session object.  
    > > 
    > [snip...]
    > > Now, the application has another user case - 
    > editors.
    > >  An editor only retrieve and view all articles in
    > > his/her own field of specialization.  I
    > arbitrarily
    > > set "dispatch" as "field_of_specialization" and
    > use
    > > the hidden field technique:
    > > 
    > >  > value="field_of_Specialization"/>
    > > 
    > > Nonetheless, the way to get the "value" the
    > editor's
    > > field of specialization is from the database. 
    > Because
    > > editors are registered members of the web site,
    > the
    > > application should be able to look for his/her
    > profile
    > > and obtain his/her field of specialization in the
    > > database once an editor successfully logs into the
    > web
    > > site.  Therefore, it takes an "action" (Action
    > TWO)
    > > that tells the business tier to find the
    > "keyValue" in
    > > the database.  And should I put the "keyValue" in
    > a
    > > session object.  
    > 
    > One method that I use is to create a user bean and
    > store that in the 
    > session at login. This bean could include your
    > editor's field of 
    > specialization, so that you don't need an extra
    > action.
    > 
    > Secondly, you could drop the Action One by
    > incorporating the field of 
    > specialization as a part of one SQL statement, so
    > that you never 
    > actually extract the field of specialization from
    > the DB. I.e. something 
    > like this:
    > 
    > SELECT article_title, article_text FROM app_user,
    > article
    > WHERE app_user.user_name = ?
    > AND app_user.field_of_specialization =
    > article.field_of_specialization
    > 
    > Alternatively if you still want to do 2 actions, I
    > have seen people 
    > handle it in various ways: (1) get the
    > action-forward in your action and 
    > modify the path to add a query_string with your
    > keyValue on it (2) put 
    > the keyValue in a cookie (3) as you said, put it in
    > the session. 2 & 3 
    > have the disadvantage that they could be overwritten
    > if the user has 
    > more than one browser window open.
    > 
    > HTH
    > Adam
    > 
    > -- 
    > struts 1.1 + tomcat 5.0.12 + java 1.4.2
    > Linux 2.4.20 RH9
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    
    __
    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard
    http://antispam.yahoo.com/whatsnewfree
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Off Topic, Problem With Passing Business Bean in Between Classes As Part of My Struts Application

    It is not a Struts problem.  But, it is the problem I
    encounter in my Struts application.  Please help.  I
    am NOT showing all my code.  For example, I skip the
    DAO interface, and the class that returns a connection
    object from the connection pool.  Nonetheless, those
    classes are irrelevant to my question.
    
    The root of my problem is that I do not know how to
    pass data that are wrapped in a business bean in
    between classes.  THE JAVA COMPILER DOES NOT RECOGNIZE
    THE BUSINESS BEAN!
    
    1. I have a controller Servlet that reads the
    "username" that is supplied by a visitor of the web
    site. I want to search the database by the "username"
    and get some information about that user; such as
    userrole, category, etc. A business bean sits in
    between the controller servlet and the database. Here
    is the partial code of the controller servlet:
    [code]
    // the statement below has problems
    EditorBean editorData;
    // Obtain username and password from web tier
    String username = request.getParameter( username );
    // find the editor's information via the business tier
    
    // Again, the parameters that I supplied in the method
    below have problems
    EditorBean editor = EditorBean.findEditorData(
    username, editorData );
    // wrap the information found in the database in a
    session object and go on
    HttpSession session = request.getSession();
    editor.setUserrole( request.getParameter( "userrole" )
    );
    editor.setCategory( request.getParameter( "category" )
    );
    session.setAttribute( "editor", editor );
    [/code]
    2. I have this EditorBean class. This EditorBean is a
    business bean. I am struggling with how the EditorBean
    pass the data in between the controller and the
    database.
    [code]
    import org.apache.artimus.logon.dao.*;
    public class EditorBean 
    {   
       private String username;
       private String userrole;
       private String category;
       EditorDAO ed = new MySQLEditorDAO();
       public EditorBean() {}
       public EditorBean( String username, String
    userrole, String category )
       {
      setUsername( username );
      setUserrole( userrole );
      setCategory( category );
       }
       public String getUsername(){ return username; }
       public void setUsername( String username ) {
    this.username = username; }
       public String getUserrole(){ return userrole; }
       public void setUserrole( String userrole ) {
    this.userrole = userrole; }
       public String getcategory(){ return category; }
       public void setCategory( String category ) {
    this.category = category; }
       // the parameters in the method below have problems
       public EditorBean findEditorData( String username,
    EditorBean editorData )
       {
      // What do I do here?
      ed.findEditor( String username, ?? );
      // I am not sure what to return here
      return ?;
       }
    }
    [/code]
    3. Here is my data access class:
    [code]
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.sql.SQLException;
    import
    org.apache.artimus.logon.exceptions.EditorDAOSysException;
    import org.apache.artimus.ConnectionPool.DBConnection;
    
    public class MySQLEditorDAO implements EditorDAO{
       // the parameters of the method below have problems
       public EditorBean findEditor( String username,
    ?? )
    throws EditorDAOSysException
       {
      Connection conn = null;
      Statement stmt = null;
      ResultSet rs = null;
      try
      {
     conn = DBConnection.getDBConnection();
     stmt = conn.createStatement();
     String query = "SELECT user_role,
    journal_category FROM members WHERE user_name = '" +
    username + "'";
     rs = stmt.executeQuery( query );
     if (rs.next())
     {
    // something is wrong in returning the
    information about that editor
    return new EditorBean( username,
    rs.getString( "user_role" ), rs.getString(
    "journal_category") );
     }
     else
     {
    System.out.println( "invalid user name" );
    return null;
     }
      }
      catch (SQLException se)
      {
     throw new
    EditorDAOSysException("SQLException: " +
    se.getMessage());
      }
      finally
      {
     if ( conn != null )
     {
    try
    {
       rs.close();
       rs = null;
       stmt.close();
       stmt = null;
       conn.close();
    }
    catch( SQLException sqlEx )
    {
       System.out.println( "Problem occurs
    while closing " + sqlEx );
    }
    conn = null;
     }
      }
       }
    }
    [/code]
    
    
    __
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    http://companion.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    re: Getting ArrayList of objects from my form bean into my drop down list -> solution

    What a good timing to see this post.  I was about to
    do the same thing in the next day or two.
    
    I have an ArrayList of JavaBean objects created from
    accessing the database:
    
    while(rs.next())
    {
       editorBean=new
    EditorBean(rs.getString("user_name"));
       editors.add(editorBean);
    }
       return editors;
    
    Obviously, each EditorBean object is the value of the
    "user_name".  If I have this 
    request.setAttribute( "EDITORS", editors );
    
    How do I create a drop-down list?  Please comment the
    way I tend to code:
    
    
      
      
    
    
    What should I do with those places I marked with the
    question marks (?)
    --- Janice <[EMAIL PROTECTED]> wrote:
    > Just in case some other newbies are doing the same
    > thing, this was my
    > solution:
    > 
    > 
    >property="projCodeNames"/>
    >labelProperty="name"/>
    > 
    > 
    > Its making a new bean on the .jsp page with my
    > ArrayList that was in my form
    > bean, and then I can easily get the values from it.
    > 
    > (I can't wait until this stuff is all second nature!
    >  I haven't even started
    > doing anything difficult yet!)
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    http://companion.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    How To Display the Information That Is Wrapped In a Session Object

    1. I my action class, I reference a bean 
    
    EditorBean editor = EditorBean.findEditorData(
    username );
    
    2. this bean accesses the data access logic and the
    bean gets populated by information fetched from the
    database (see the code below)
    
    3. In the action class, I then wrap editor in a
    session object:
    
    HttpSession session = request.getSession();
    editor.setUserrole( request.getParameter( "userrole" )
    );
    editor.setCategory( request.getParameter( "category" )
    );
    session.setAttribute( "editor", editor );
    
    4. In the JSP, how do I get userrole and category from
    the session object and how to display them in Struts?
    
    Here is my EditorBean class:
    
    public class EditorBean {
    
       private String username;
       private String userrole;
       private String category;
    
       // UserDAO and MySQLUserDAO are in another package.
     Must import that package.
       // should not instantiate an interface because it
    does not have a constructor
       static EditorDAO ed = new MySQLEditorDAO();
    
       public EditorBean() {}
       public EditorBean( String username, String
    userrole, String category )
       {
      setUsername( username );
      setUserrole( userrole );
      setCategory( category );
       }
       public String getUsername() {
      return username;
       }
       public void setUsername( String username ) {
      this.username = username;
       }
       public String getUserrole() {
      return userrole;
       }
       public void setUserrole( String userrole ) {
      this.userrole = userrole;
       }
       public String getcategory() {
      return category;
       }
       public void setCategory( String category ) {
      this.category = category;
       }
       public static EditorBean findEditorData( String
    username ) 
       {
      return ed.findEditor( username );
       } 
    }
    
    
    
    __
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    http://companion.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    How Do I Create This Drop-Down List in Struts?

    My ArrayList is a collection of bean object.  The
    ArrayList is created this way:
    
    public Collection findEditors( String userrole, String
    category ) 
    {
       ..
       EditorBean editorBean = null;
       ArrayList editors = new ArrayList();
       // database access code
       while( rs.next() )
       {
      editorBean = new EditorBean(
    rs.getString("user_name") );
      editors.add( editorBean );
       }
       return editors;
       ...
    }
    
    and my EditorBean is like:
    
    public class EditorBean 
    {
       private String name;
    
       public EditorBean() {}
    
       public EditorBean( String name )
       {
      this.name = name;
       }
       public String getName() {
      return Name;
       }
       public void setName( String name ) {
      this.name = name;
       }
    }
    
    After "editors" is returned, I create a session
    object:
    
    session.setAttribute( "EDITORS", editors );
    
    How do I create a drop-down list for this collection
    of editors?
    
    
    
    
    
    
    
    __
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    http://companion.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Drop-Down List - Cannot Retrieve Definition From Form Bean Null

    My drop-down list got an error message:
    org.apache.jasper.JasperException: Cannot retrieve
    definition for form bean null
    
    I have tried to display the drop-down list in two
    ways:
    
    First:
    
    
    
    
    Second:
    
    
    
       
    
    The editors is a Collection of EditorBean passed to
    the JSP this way:
    HttpSession session = request.getSession();
    session.setAttribute( "editors", editors );
    
    and Editor Bean is:
    public class EditorBean 
    {
       private String name;
    
       public EditorBean() {}
    
       public EditorBean( String name )
       {
      this.name = name;
       }
       public String getName() {
      return name;
       }
       public void setName( String name ) {
      this.name = name;
       }
    } 
    
    
    
    __
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    http://companion.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Please Give Me A Clue - ClassCast Exception

    My application got a ClassCastException at scaffold,
    ProcessAction.executeLogic.  I have no idea about how
    and where to detect the problem.  I would appreciate
    if someone could provide a clue.
    
    2003-12-04 23:08:38 action: *** ACTION EXCEPTION: 
    java.lang.ClassCastException
    at
    org.apache.struts.scaffold.ProcessAction.executeLogic(Unknown
    Source)
    at
    org.apache.struts.scaffold.BaseHelperAction.executeLogic(Unknown
    Source)
    at
    org.apache.struts.scaffold.BaseAction.execute(Unknown Source)
    
    __
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    http://companion.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Very Troubled in Finding Ways to Pass a Variable to a Class

    I have a class FindEditorData.java.  I want to pass a
    vairable 'username' to this class for some processing.
     This class is invoked from a JSP:
    
    
    View Articles
    
    and the value of the 'username' is obtained this way:
    
    String username = request.getRemoteUser();
    
    Due to my limited knowledge in Struts,  I cannot
    figure out what to do.  Let me explain the problem:
    
    1. This class has this method:
    
       public Object execute() throws Exception { ... }
    
       I do not make this class extends HttpServlet or
    extends Action.  I cannot nest a method inside a
    doGet/doPost or the Action's excute().
    
    2. The action mapping in the struts-config.xml is this
    way:
    
       
       
    
    I am stuck because I do not know how to pass
    'username' to the FindEditorData.java.  I cannot
    state:
    
       String username = request.getRemoteUser(); 
       or 
       String username = (String)session.getAttribute(
    "EditorName" );
    
       because the FindEditorData is not a servlet and
    does not extend Action.
    
    I cannot pass a hidden variable from the JSP because I
    do not know how to retrieve the value of a hidden
    variable in a Java class.
    
    Need clever ideas.  Please help.
     
    
       
    
    __
    Do you Yahoo!?
    New Yahoo! Photos - easier uploading and sharing.
    http://photos.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Very Troubled in Finding Ways to Pass a Variable to a Class

    I know how to pass a hidden field.  The problem is how
    to retrieve it in my Java class.  I have illustrated
    that my Java class does not extend HttpServlet or
    Action.
    
    This Java class has a mapping in the struts-config.xml
    file:
    
    type="org.apache.struts.scaffold.ProcessAction"
    parameter="org.XYZ.article.FindEditorData"
    name="articleForm"
    
    -Caroline
    --- Timo <[EMAIL PROTECTED]> wrote:
    > Caroline,
    > The best way I use it to pass parameters to the
    > action class is via a hidden
    > attribute in the form, in your case the
    > "articleForm"
    > you can define the hidden attribute using
    > 
    >  value="<%=request.getRemoteUser();%>"/>
    > Good luck.
    > 
    > - Original Message - 
    > From: "Caroline Jen" <[EMAIL PROTECTED]>
    > To: <[EMAIL PROTECTED]>
    > Sent: Friday, December 05, 2003 8:17 PM
    > Subject: Very Troubled in Finding Ways to Pass a
    > Variable to a Class
    > 
    > 
    > > I have a class FindEditorData.java.  I want to
    > pass a
    > > vairable 'username' to this class for some
    > processing.
    > >  This class is invoked from a JSP:
    > >
    > > 
    > > View Articles
    > >
    > > and the value of the 'username' is obtained this
    > way:
    > >
    > > String username = request.getRemoteUser();
    > >
    > > Due to my limited knowledge in Struts,  I cannot
    > > figure out what to do.  Let me explain the
    > problem:
    > >
    > > 1. This class has this method:
    > >
    > >public Object execute() throws Exception { ...
    > }
    > >
    > >I do not make this class extends HttpServlet or
    > > extends Action.  I cannot nest a method inside a
    > > doGet/doPost or the Action's excute().
    > >
    > > 2. The action mapping in the struts-config.xml is
    > this
    > > way:
    > >  > roles="editor"
    > > path="/find/Category"
    > >
    > > type="org.apache.struts.scaffold.ProcessAction"
    > > parameter="org.XYZ.article.FindEditorData"
    > > name="articleForm"
    > > validate="false">
    > > > name="success"
    > > path=".article.Result"/>
    > > 
    > >
    > > I am stuck because I do not know how to pass
    > > 'username' to the FindEditorData.java.  I cannot
    > > state:
    > >
    > >String username = request.getRemoteUser();
    > >or
    > >String username = (String)session.getAttribute(
    > > "EditorName" );
    > >
    > >because the FindEditorData is not a servlet and
    > > does not extend Action.
    > >
    > > I cannot pass a hidden variable from the JSP
    > because I
    > > do not know how to retrieve the value of a hidden
    > > variable in a Java class.
    > >
    > > Need clever ideas.  Please help.
    > >
    > >
    > >
    > >
    > > __
    > > Do you Yahoo!?
    > > New Yahoo! Photos - easier uploading and sharing.
    > > http://photos.yahoo.com/
    > >
    > >
    >
    -
    > > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > >
    > >
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    New Yahoo! Photos - easier uploading and sharing.
    http://photos.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: Very Troubled in Finding Ways to Pass a Variable to a Class

    It is wonderful to know that there are some ActionForm
    methods that holds true in the
    scaffold.ProcessAction's execute() method.  It gives
    the hope that my problem could be resolved.  
    
    Via a submit button in my JSP, I try to pass two
    variables; username and keyName, to my Java class
    (FindEditorData.java) with the
    type="org.apache.struts.scaffold.ProcessAction", and
    this Java class has this method:
    
       public Object execute() throws Exception { ... }
    
    1. if I use the hidden field technique (see below)
    inside the JSP  tag:
    <% String username = request.getRemoteUser();%>
    
    
    
    How do I retrieve the value of username and keyName in
    the Java class?  Probably due to my lack of knowledge
    of the ActionForm, I got compilation error "cannot
    resolve symbol: request" or "cannot resolve symbol:
    session" because FindEditorData.java does not extend
    HttpServlet and FindEditorData.java does not extend
    Action.
    
    2. if I want to get 'username' in the Java class
    instead of passing the 'username' as a hidden field
    from a submit button in my JSP, how do I do it?
    
    String username = request.getRemoteUser(); gives me a
    compilation error "cannot resolve symbol: request".  
    
    The action mapping in my struts-config.xml looks like:
    
       
    
    
    -Caroline
    --- Joe Hertz <[EMAIL PROTECTED]> wrote:
    > Actually, you haven't illustrated it. You've just
    > stated it.
    > 
    > In the ActionForm there are methods like validate()
    > that accept as
    > parameters an ActionMapping and an
    > httpServletRequest, and from the
    > httpServletRequest you can call getSession().
    > 
    > Same holds true in the Action class' execute()
    > method.
    > 
    > So what is the problem with your class? Why can't
    > you utilize it from
    > one of these places that you do have access to these
    > things? What
    > exactly is stopping you here? Once you tell us, then
    > you will have
    > illustrated the problem.
    > 
    > -J
    > 
    > > -Original Message-
    > > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
    > > Sent: Saturday, December 06, 2003 1:47 PM
    > > To: Struts Users Mailing List
    > > Subject: Re: Very Troubled in Finding Ways to Pass
    > a Variable 
    > > to a Class
    > > 
    > > 
    > > I know how to pass a hidden field.  The problem is
    > how
    > > to retrieve it in my Java class.  I have
    > illustrated
    > > that my Java class does not extend HttpServlet or
    > > Action.
    > > 
    > > This Java class has a mapping in the
    > struts-config.xml
    > > file:
    > > 
    > > type="org.apache.struts.scaffold.ProcessAction"
    > > parameter="org.XYZ.article.FindEditorData"
    > > name="articleForm"
    > > 
    > > -Caroline
    > > --- Timo <[EMAIL PROTECTED]> wrote:
    > > > Caroline,
    > > > The best way I use it to pass parameters to the
    > > > action class is via a hidden
    > > > attribute in the form, in your case the
    > > > "articleForm"
    > > > you can define the hidden attribute using
    > > > 
    > > >  > > value="<%=request.getRemoteUser();%>"/>
    > > > Good luck.
    > > > 
    > > > - Original Message -
    > > > From: "Caroline Jen" <[EMAIL PROTECTED]>
    > > > To: <[EMAIL PROTECTED]>
    > > > Sent: Friday, December 05, 2003 8:17 PM
    > > > Subject: Very Troubled in Finding Ways to Pass a
    > > > Variable to a Class
    > > > 
    > > > 
    > > > > I have a class FindEditorData.java.  I want to
    > > > pass a
    > > > > vairable 'username' to this class for some
    > > > processing.
    > > > >  This class is invoked from a JSP:
    > > > >
    > > > > 
    > > > > View Articles
    > > > >
    > > > > and the value of the 'username' is obtained
    > this
    > > > way:
    > > > >
    > > > > String username = request.getRemoteUser();
    > > > >
    > > > > Due to my limited knowledge in Struts,  I
    > cannot
    > > > > figure out what to do.  Let me explain the
    > > > problem:
    > > > >
    > > > > 1. This class has this method:
    > > > >
    > > > >public Object execute() throws Exception {
    > ...
    > > > }
    > > > >
    > > > >I do not make this class extends
    > HttpServlet or
    > > > > extends Action.  I cannot nest a method inside
    > a 
    > > doGet/doPost or the 
    > > > > Action's excute().
    > > > >
    > > > > 2. The action mapping in the struts-config.xml
    > is
    > > > this
    > > > > way:
    > > > >

    Mail Messages Using JavaMail in Struts

    Has a Struts application been built to handle
    send/view personal mail messages using JavaMail?
    
    If the answer is "yes", please provide information how
    to contact the developer of the application.
    
    __
    Do you Yahoo!?
    New Yahoo! Photos - easier uploading and sharing.
    http://photos.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Pass A String From Servlet And Write Out Its Value in JSP

    My servlet has a String called 'category'.  I want to
    pass the String to a JSP.  Therefore, I have the code
    shown below in the servlet:
    
    session.setAttribute( "c", category );
    OR
    request.setAttribute( "c", category );
    
    And, I do the following in my JSP:
    
    <% String keyValue = (String)session.getAttribute( "c"
    ); %>
    OR
    <% String keyValue = (String)request.getAttribute( "c"
    ); %>
    
    How do I write out keyValue in my JSP in Struts?
    
    
    __
    Do you Yahoo!?
    New Yahoo! Photos - easier uploading and sharing.
    http://photos.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

    I want to pass two hidden fields; username and keyName
    from a JSP via a SUBMIT button:
    
    
    
    <% String username = request.getRemoteUser();%>
    
    
    View Articles
    
    
    
    and an action mapping:
    
    
       
    
    
    How come the username is not passed to the
    FindEditorData.java while the keyName is successfully
    passed.  In the browser, I got:
    
    name=null; kn=journal_category; kv=null 
    
    The code of my FindEditorData is shown below:
    
    public final class FindEditorData extends Bean
    {
       public Object execute() throws Exception
       {
    
       // Obtain username 
       String username = getUsername();
      
       EditorService service = new EditorService();
       String value = service.findEditorData( username );
    
       String property = getKeyName();
    
    if (( null==property ) || ( null==value )) 
    {
    StringBuffer sb = new StringBuffer();
    sb.append( "name=" );
    sb.append( username );
    sb.append( "; kn=" );
    sb.append( property );
    sb.append( "; kv=" );
    sb.append( value );
    throw new ParameterException(
    sb.toString() );
    }
    
    ResultList list = new ResultListBase
    (
    
    Access.findByProperty( this,property,value
    )
    
    );
    list.setLegend( property,value );
    
    return new ProcessResultBase( list );
    
       } // end execute
    
    } // End FindEditorData
    
    
    
    __
    Do you Yahoo!?
    New Yahoo! Photos - easier uploading and sharing.
    http://photos.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

    My code was shown in my original message.  I used two 
     tags to pass two hidden fields, one
    is successfully passed while the other shows null.  By
    the way, I do not use 'request' to retrieve the value
    of the hidden field because my Java class is a
    scaffold.ProcessAction type.  I simply use getXxx.
    
    Let me show my code again:
    
    
    <% String username = request.getRemoteUser();%>
    
    
    View Articles
    
    
    
    --- Richard Yee <[EMAIL PROTECTED]> wrote:
    > Are you using the  or
    > html:hidden attributes? I 
    > didn't see it in your email.
    > If you do, the values will be available in the
    > request.
    > 
    > Regards,
    > 
    > Richard
    > 
    > At 08:20 PM 12/7/2003, you wrote:
    > >I want to pass two hidden fields; username and
    > keyName
    > >from a JSP via a SUBMIT button:
    > >
    > >
    > ><% String username = request.getRemoteUser();%>
    > value="journal_category"/> 
    > >value="<%=username%>"/> View Articles and an action
    > mapping: How come the 
    > >username is not passed to the FindEditorData.java
    > while the keyName is 
    > >successfully passed. In the browser, I got:
    > name=null; 
    > >kn=journal_category; kv=null The code of my
    > FindEditorData is shown below: 
    > >public final class FindEditorData extends Bean {
    > public Object execute() 
    > >throws Exception { // Obtain username String
    > username = getUsername(); 
    > >EditorService service = new EditorService(); String
    > value = 
    > >service.findEditorData( username ); String property
    > = getKeyName(); if (( 
    > >null==property ) || ( null==value )) { StringBuffer
    > sb = new 
    > >StringBuffer(); sb.append( "name=" ); sb.append(
    > username ); sb.append( "; 
    > >kn=" ); sb.append( property ); sb.append( "; kv="
    > ); sb.append( value ); 
    > >throw new ParameterException( sb.toString() ); }
    > ResultList list = new 
    > >ResultListBase ( Access.findByProperty(
    > this,property,value ) ); 
    > >list.setLegend( property,value ); return new
    > ProcessResultBase( list ); } 
    > >// end execute } // End FindEditorData
    > __ 
    > >Do you Yahoo!? New Yahoo! Photos - easier uploading
    > and sharing. 
    > >http://photos.yahoo.com/ 
    >
    >-
    > To 
    > >unsubscribe, e-mail:
    > [EMAIL PROTECTED] For 
    > >additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    > 
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    New Yahoo! Photos - easier uploading and sharing.
    http://photos.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    Re: HELP: about to get datasource of struts and pass to logic beans...

    There are lots of classes involved.  I will give you
    an example:
    
    1. my LogonAction calls EditorService.java (business
    delegate)
    2. EditorService.java calls MySQLEditorDAO.java (data
    access object implements EditorDAO.java, which is a
    data access interface)
    3. the MySQLEditorDAO.java returns EditorBean.java (a
    Java bean with three properties)
    
    Here is my LogonAction.java:
    
    package org.apache.artimus.logon;
    
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionServlet;
    
    import org.apache.artimus.lang.Tokens;
    
    public final class LogonAction extends Action {
    
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws java.lang.Exception {
    
    // Obtain username and password from web tier
    String username = ((LogonForm)
    form).getUsername();
    String password = ((LogonForm)
    form).getPassword();
    
    EditorService service = new EditorService();
    EditorBean editor = service.findEditorData(
    username );
    
    HttpSession session = request.getSession();
    session.setAttribute( "editor", editor );
    
    // Log this event, if appropriate
    
    if (servlet.getDebug() >= Tokens.DEBUG) {
    StringBuffer message =
    new StringBuffer("LogonAction: User
    '");
    message.append(username);
    message.append("' logged on in session ");
    message.append(session.getId());
    servlet.log(message.toString());
    }
    
    // Return success
    return (mapping.findForward(Tokens.VALID));
    
    }
    
    } // End LogonAction
    
    Here is the EditorService.java:
    
    package org.apache.artimus.logon;
    
    import org.apache.artimus.logon.dao.*;
    
    public class EditorService 
    {
       EditorDAO ed = new MySQLEditorDAO();
       public EditorBean findEditorData( String username )
       {
      return ed.findEditor( username );
       }
    }
    
    Here is the EditorDAO.java:
    
    package org.apache.artimus.logon.dao;
    
    import org.apache.artimus.logon.EditorBean;
    import
    org.apache.artimus.logon.exceptions.EditorDAOSysException;
    
    public interface EditorDAO.java
    {
    public EditorBean findEditor( String username )
    throws EditorDAOSysException;
    }
    
    Here is the MySQLEditorDAO.java:
    
    package org.apache.artimus.logon.dao;
    
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.sql.SQLException;
    
    import org.apache.artimus.logon.EditorBean;
    import
    org.apache.artimus.logon.exceptions.EditorDAOSysException;
    import org.apache.artimus.ConnectionPool.DBConnection;
    
    public class MySQLEditorDAO implements EditorDAO
    {
       // Here the return type is EditorBean
       public EditorBean findEditor( String username ) 
       throws EditorDAOSysException 
       {
      Connection conn = null;
      Statement stmt = null;
      ResultSet rs = null;
    
      try 
      {
     conn = DBConnection.getDBConnection();
     stmt = conn.createStatement();
     String query = "SELECT user_role,
    journal_category FROM members WHERE user_name = '" +
    username + "'";   
     rs = stmt.executeQuery( query );
     if (rs.next()) 
     {
    return new EditorBean( username,
    rs.getString( "user_role" ), rs.getString(
    "journal_category" ) );
     }
     else
     {
    System.out.println( "invalid user name" );
    return null;
     }
      } 
      catch (SQLException se)
      {
     throw new
    EditorDAOSysException("SQLException: " +
    se.getMessage());
      }
      finally
      {
     if ( conn != null )
     {
    try
    {
       rs.close();
       rs = null;
       stmt.close();
       stmt = null;
       conn.close();
    }
    catch( SQLException sqlEx )
    {
       System.out.println( "Problem occurs
    while closing " + sqlEx );
    }
    conn = null;
     }   
      }
       }
    }
    
    Here is the EditorBean.java:
    
    package org.apache.artimus.logon;
    
    import org.apache.artimus.logon.dao.*;
    
    public class EditorBean {
    
       private String username;
       private String userrole;
       private String keyValue;
    
       static EditorDAO ed = new MySQLEditorDAO();
    
       public EditorBean() {}
       public EditorBean( String username, String
    userrole, String keyValue )
       {
      setUsername( username );
      setUserrole( userrole );
      setKeyValue( keyValue );
       }
       public String getUsername

    Re: Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

    I did not mess up lowercase and uppercase of the
    hidden field I want to pass from my JSP to the
    scaffold.ProcessAction.  If it had been the
    lowercase/uppercase problem, I would have gotten a
    message saying that the variable could not be
    recognized.  
    
    I pass two hidden fields at the same time.  One of
    them is successfully passed with correct value.  The
    other is passed but its value shows a 'null' in the
    scaffold.ProcessAction.  What could go wrong?  Let me
    show my code again:
    
    Two hidden fields: username and keyName are passed 
    from a JSP via a SUBMIT button:
    
    
    
    <% String username = request.getRemoteUser();%>
    
    
    View Articles
    
    
    
    and an action mapping:
    
    
       
    
    
    The value of the 'username' is found to be a 'null' in
    the FindEditorData.java while the value of keyName is
    successfully retrieved.  In the browser, I got:
    
    name=null; kn=journal_category; kv=null 
    
    The code of my FindEditorData is shown below:
    
    public final class FindEditorData extends Bean
    {
       public Object execute() throws Exception
       {
    
       // Obtain username 
       String username = getUsername();
      
       EditorService service = new EditorService();
       String value = service.findEditorData( username );
    
       String property = getKeyName();
    
    if (( null==property ) || ( null==value )) 
    {
    StringBuffer sb = new StringBuffer();
    sb.append( "name=" );
    sb.append( username );
    sb.append( "; kn=" );
    sb.append( property );
    sb.append( "; kv=" );
    sb.append( value );
    throw new ParameterException(
    sb.toString() );
    }
    
    ResultList list = new ResultListBase
    (
    
    Access.findByProperty( this,property,value
    )
    
    );
    list.setLegend( property,value );
    
    return new ProcessResultBase( list );
    
       } // end execute
    
    } // End FindEditorData
      
    
    
    --- Caroline Jen <[EMAIL PROTECTED]> wrote:
    > I want to pass two hidden fields; username and
    > keyName
    > from a JSP via a SUBMIT button:
    > 
    > 
    > 
    > <% String username = request.getRemoteUser();%>
    >  value="journal_category"/>
    >  value="<%=username%>"/>
    > View Articles
    > 
    > 
    > 
    > and an action mapping:
    > 
    >  roles="editor"
    > path="/find/Category"
    >
    > type="org.apache.struts.scaffold.ProcessAction"
    >
    >
    parameter="org.apache.artimus.article.FindEditorData"
    > name="articleForm"
    > scope="request"
    > validate="false">
    > name="success"
    > path=".article.Result"/>
    > 
    > 
    > How come the username is not passed to the
    > FindEditorData.java while the keyName is
    > successfully
    > passed.  In the browser, I got:
    > 
    > name=null; kn=journal_category; kv=null 
    > 
    > The code of my FindEditorData is shown below:
    > 
    > public final class FindEditorData extends Bean
    > {
    >public Object execute() throws Exception
    >{
    > 
    >// Obtain username 
    >String username = getUsername();
    >   
    >EditorService service = new EditorService();
    >String value = service.findEditorData( username
    > );
    > 
    >String property = getKeyName();
    > 
    > if (( null==property ) || ( null==value )) 
    > {
    > StringBuffer sb = new StringBuffer();
    > sb.append( "name=" );
    > sb.append( username );
    > sb.append( "; kn=" );
    > sb.append( property );
    > sb.append( "; kv=" );
    > sb.append( value );
    > throw new ParameterException(
    > sb.toString() );
    > }
    > 
    > ResultList list = new ResultListBase
    > (
    > 
    > Access.findByProperty(
    > this,property,value
    > )
    > 
    > );
    > list.setLegend( property,value );
    > 
    > return new ProcessResultBase( list );
    > 
    >} // end execute
    > 
    > } // End FindEditorData
    > 
    > 
    > 
    > __
    > Do you Yahoo!?
    > New Yahoo! Photos - easier uploading and sharing.
    > http://photos.yahoo.com/
    > 
    >
    -
    > To unsubscribe, e-mail:
    > [EMAIL PROTECTED]
    > For additional commands, e-mail:
    > [EMAIL PROTECTED]
    > 
    
    
    __
    Do you Yahoo!?
    New Yahoo! Photos - easier uploading and sharing.
    http://photos.yahoo.com/
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    
    
    

    RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

    I pass two hidden fields: username and keyName at the
    same time.  The keyName is passed and with the correct
    value in it.  The username is passed but its value
    turns out to be a null.
    
    It is impossible for request.getRemoteUser(); in my
    JSP returning a null.  (see code below) Before it
    reaches request.getRemoteUser(); the user has already
    been successfully logged in with a valid name.
    
    
    
    
    
    <% String username = request.getRemoteUser();%>
    
    
    View Articles
    
    
    
    
    --- "Yee, Richard K,,DMDCWEST"
    <[EMAIL PROTECTED]> wrote:
    > Caroline,
    > Are you having problems with the username or the
    > keyName hidden variable? If
    > it is the username, then I'd suspect that
    > request.getRemoteUser() in your
    > JSP is returning null.
    > 
    > Regards,
    > 
    > Richard
    > 
    > -Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
    > Sent: Monday, December 08, 2003 1:32 PM
    > To: Struts Users Mailing List
    > Subject: Re: Please Help! Unable to Pass A Hidden
    > Field To
    > scaffold.ProcessAction
    > 
    > 
    > I did not mess up lowercase and uppercase of the
    > hidden field I want to pass from my JSP to the
    > scaffold.ProcessAction.  If
    > it had been the lowercase/uppercase problem, I would
    > have gotten a message
    > saying that the variable could not be recognized.  
    > 
    > I pass two hidden fields at the same time.  One of
    > them is successfully passed with correct value.  The
    > other is passed but its value shows a 'null' in the
    > scaffold.ProcessAction.
    > What could go wrong?  Let me show my code again:
    > 
    > Two hidden fields: username and keyName are passed 
    > from a JSP via a SUBMIT button:
    > 
    > 
    > 
    > <% String username = request.getRemoteUser();%>
    >  value="journal_category"/>
    >  value="<%=username%>"/>
    > View Articles
    > 
    > 
    > 
    > and an action mapping:
    > 
    >  roles="editor"
    > path="/find/Category"
    >
    > type="org.apache.struts.scaffold.ProcessAction"
    >
    >
    parameter="org.apache.artimus.article.FindEditorData"
    > name="articleForm"
    > scope="request"
    > validate="false">
    > name="success"
    > path=".article.Result"/>
    > 
    > 
    > The value of the 'username' is found to be a 'null'
    > in
    > the FindEditorData.java while the value of keyName
    > is successfully
    > retrieved.  In the browser, I got:
    > 
    > name=null; kn=journal_category; kv=null 
    > 
    > The code of my FindEditorData is shown below:
    > 
    > public final class FindEditorData extends Bean
    > {
    >public Object execute() throws Exception
    >{
    > 
    >// Obtain username 
    >String username = getUsername();
    >   
    >EditorService service = new EditorService();
    >String value = service.findEditorData( username
    > );
    > 
    >String property = getKeyName();
    > 
    > if (( null==property ) || ( null==value )) 
    > {
    > StringBuffer sb = new StringBuffer();
    > sb.append( "name=" );
    > sb.append( username );
    > sb.append( "; kn=" );
    >     sb.append( property );
    > sb.append( "; kv=" );
    > sb.append( value );
    > throw new ParameterException(
    > sb.toString() );
    > }
    > 
    > ResultList list = new ResultListBase
    > (
    > 
    > Access.findByProperty(
    > this,property,value
    > )
    > 
    > );
    > list.setLegend( property,value );
    > 
    > return new ProcessResultBase( list );
    > 
    >} // end execute
    > 
    > } // End FindEditorData
    >   
    > 
    > 
    > --- Caroline Jen <[EMAIL PROTECTED]> wrote:
    > > I want to pass two hidden fields; username and
    > > keyName
    > > from a JSP via a SUBMIT button:
    > > 
    > > 
    > > 
    > > <% String username = request.getRemoteUser();%>
    > >  > value="journal_category"/>
    > >  > value="<%=username%>"/>
    > > View Articles
    > > 
    > > 
    > > 
    > > and an action mapping:
    > > 
    > >  > roles="editor"
    > > path="/find/Category"
    > >
    > > type="org.apache.struts.scaffold.ProcessAction"
    > >
    > >
    >
    parameter="org.apache.artimus.article.FindEditorData"
    > > name="articleForm"
    > > scope="request"
    > > validate="false">
    > > > name="success"
    > > 

    RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

    I use container-managed authentication.  
    
    
    
    --- "Yee, Richard K,,DMDCWEST"
    <[EMAIL PROTECTED]> wrote:
    > Caroline,
    > Imposible? Look at the HTML that is generated by the
    > JSP page. I think you
    > will see that it returns "null".
    > Take a look at the JavaDoc for
    > HttpServletRequest.getRemoteUser();
    > 
    > getRemoteUser
    > public java.lang.String getRemoteUser()
    > Returns the login of the user making this request,
    > if the user has been
    > authenticated, or null if the user has not been
    > authenticated. Whether the
    > user name is sent with each subsequent request
    > depends on the browser and
    > type of authentication. Same as the value of the CGI
    > variable REMOTE_USER.
    > 
    > Returns: a String specifying the login of the user
    > making this request, or
    > null 
    > 
    > As the JavaDoc says: "Whether the user name is sent
    > with each subsequent
    > request depends on the browser and type of
    > authentication."  Are you using
    > basic authentication or are you authenticating the
    > user yourself?
    > If you are doing it yourself (ie. through a db
    > lookup) then the server
    > doesn't know about the user being authenticated and
    > will return null.
    > 
    > Regards,
    > 
    > Richard
    > -Original Message-
    > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
    > Sent: Monday, December 08, 2003 2:56 PM
    > To: Struts Users Mailing List
    > Subject: RE: Please Help! Unable to Pass A Hidden
    > Field To scaffold.Proces
    > sAction
    > 
    > 
    > I pass two hidden fields: username and keyName at
    > the
    > same time.  The keyName is passed and with the
    > correct
    > value in it.  The username is passed but its value
    > turns out to be a null.
    > 
    > It is impossible for request.getRemoteUser(); in my
    > JSP returning a null.  (see code below) Before it
    > reaches request.getRemoteUser(); the user has
    > already
    > been successfully logged in with a valid name.
    > 
    > 
    > 
    > 
    > 
    > <% String username = request.getRemoteUser();%>
    >  value="journal_category"/>
    >  value="<%=username%>"/>
    > View Articles
    > 
    > 
    > 
    > 
    > --- "Yee, Richard K,,DMDCWEST"
    > <[EMAIL PROTECTED]> wrote:
    > > Caroline,
    > > Are you having problems with the username or the
    > > keyName hidden variable? If
    > > it is the username, then I'd suspect that
    > > request.getRemoteUser() in your
    > > JSP is returning null.
    > > 
    > > Regards,
    > > 
    > > Richard
    > > 
    > > -Original Message-
    > > From: Caroline Jen [mailto:[EMAIL PROTECTED]
    > > Sent: Monday, December 08, 2003 1:32 PM
    > > To: Struts Users Mailing List
    > > Subject: Re: Please Help! Unable to Pass A Hidden
    > > Field To
    > > scaffold.ProcessAction
    > > 
    > > 
    > > I did not mess up lowercase and uppercase of the
    > > hidden field I want to pass from my JSP to the
    > scaffold.ProcessAction.  
    > > If it had been the lowercase/uppercase problem, I
    > would
    > > have gotten a message
    > > saying that the variable could not be recognized. 
    > 
    > > 
    > > I pass two hidden fields at the same time.  One of
    > > them is successfully passed with correct value. 
    > The
    > > other is passed but its value shows a 'null' in
    > the 
    > > scaffold.ProcessAction. What could go wrong?  Let
    > me show my code 
    > > again:
    > > 
    > > Two hidden fields: username and keyName are passed
    > > from a JSP via a SUBMIT button:
    > > 
    > > 
    > > 
    > > <% String username = request.getRemoteUser();%>
    > >  > value="journal_category"/>
    > >  > value="<%=username%>"/>
    > > View Articles
    > > 
    > > 
    > > 
    > > and an action mapping:
    > > 
    > >  > roles="editor"
    > > path="/find/Category"
    > >
    > > type="org.apache.struts.scaffold.ProcessAction"
    > >
    > >
    >
    parameter="org.apache.artimus.article.FindEditorData"
    > > name="articleForm"
    > > scope="request"
    > > validate="false">
    > > > name="success"
    > > path=".article.Result"/>
    > > 
    > > 
    > > The value of the 'username' is found to be a
    > 'null'
    > > in
    > > the FindEditorData.java while the value of keyName
    > > is successfully
    > > retrieved.  In the browser, I got:
    > > 
    > > name=null; kn=journal_category; kv=null
    > > 
    > > The code of my FindEditorData is shown below:
    > > 
    > >

      1   2   >