struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srinivas_A_Nagalli/Singapore/Netlife%NETL...@netlife.com.sg
Subject Form based authentication
Date Wed, 06 Jun 2001 07:17:20 GMT

Hi,

Has anyone used Form based authentication? How does action
="j_security_check" work?

Thanks,
Nagalli



                                                                               
                    "ameer"                                                    
                    <ameer@yashaa        To:     "Struts"                      
                    .com>                <struts-user@jakarta.apache.org>      
                                         cc:                                   
                    06/06/01             Subject:     Displaying the jsp       
                    03:01 PM             forwarded by actionforward with the   
                    Please               struts-form.tld                       
                    respond to                                                 
                    struts-user                                                
                                                                               
                                                                               




 Im facing problem in displaying a forwarded jsp where in the form values
 are coming from the request attributes set in action class. im getting the
 attribute values but the struts-form tags are not getting converted to
 what it is supposed to. my jsp is like this .. the tag works fine for the
 first input jsp file . since it is just a submit form. but in my forwarded
 form i have submitted to the same servlet. can you suggest soln here . my
 jsp code goes like this for the forwarded page.
 ******************************************************************************
 <%@ page language="java" %>
 <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>

 <html>
 <title>MusicCD Display</title>
 <body>
 <%
  out.println(request.getAttribute("ejbUpc"));
  out.println(request.getAttribute("ejbTitle"));
  out.println(request.getAttribute("ejbArtist"));
  out.println(request.getAttribute("ejbType"));
  out.println(request.getAttribute("ejbPrice"));
 %>

 <form:form action="musiccd.do">
 <table border="0" align="center" bgcolor="brown" >
   <tr>
       <td align="center" colspan="2">
    <font face="Comic Sans MS" size="3" color="yellow">Music CD
 Details</font>
    </td>
   </tr>
   <tr>
    <td>
     <font face="Comic Sans MS" size="3" color="white">CD #</font>
    </td>
    <td>
    <form:text property="upc" value=<%= request.getAttribute("ejbUpc") %>
 maxlength="30" size="30" />
    </td>
   </tr>
   <tr>
    <td>
    <font face="Comic Sans MS" size="3" color="white">Title</font>
    </td>
    <td>
    <form:text property="title" value=<%= request.getAttribute("ejbTitle")
 %> maxlength="30" size="30"/>
    </td>
   </tr>
   <tr>
    <td>
    <font face="Comic Sans MS" size="3" color="white">Artist</font>
    </td>
    <td>
    <form:text property="artist" value=<%= request.getAttribute
 ("ejbArtist") %> maxlength="30" size="30"/>
    </td>
   </tr>
   <tr>
    <td>
    <font face="Comic Sans MS" size="3" color="white">Type</font>
    </td>
    <td>
    <form:text property="type" value=<%= request.getAttribute("ejbType") %>
 maxlength="30" size="30"/>
    </td>
   </tr>
   <tr>
    <td>
    <font face="Comic Sans MS" size="3" color="white">Price</font>
    </td>
    <td>
    <form:text property="price" value=<%= request.getAttribute("ejbPrice")
 %> maxlength="30" size="30"/>
    </td>
   </tr>
   <tr>
    <td align="left">
    <form:submit property="submit" value="Submit"/>
    </td>
    <td align="right">
    <form:reset />
    </td>
   </tr>
 </table>
 </form:form>
 </body>
 </html>
 ************************************************************************************

 thanx in adv.
 Ameer Hussain SS
 s/w engineer
 Yashaa Infotech Pvt.Ltd.
 #14 , 10th Main, HAL 3rd Stage
 Bangalore 560075
 phone: 5294430/53
 http://www.yashaa.com




Mime
View raw message