struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hardik Shah <>
Subject realm use in s2
Date Tue, 26 Aug 2008 07:48:43 GMT


i am trying to use jdbc realm with s2 for that i have configured like that 
 i am using eclipse ,so i have changed in server project 's server.xml file
like this

(first disable the userdatabase realm)
and then applying 

 <Realm  className="org.apache.catalina.realm.JDBCRealm"
         connectionName="cfa" connectionPassword="cfa"
              userTable="usermast" userNameCol="username"
          userRoleTable="usermast" roleNameCol="user_role" />

after that i have change in my project's web.xml file like that


	<!-- End settings for sitemesh and struts  -->
		<realm-name>MyFirst Protected Area</realm-name>
		<description> admin user allowed</description>
		<description>cfa user allowed</description>

in login.jsp i have write like 


<form method="POST" action="j_security_check">

				<table width="70%" >
						<td class="label"><s:text name="Username" /></td>
						<td><s:textfield  name="j_username" cssClass="textbox"  /></td>
						<td class="label"><s:text name="Pasword" /></td>
						<td><s:password name="j_password" showPassword="true"
cssClass="textbox"  /></td>
					<td align="right">	
					<s:submit cssClass="button"/>


when i try to login this 

gives error like 

HTTP Status 400 - Invalid direct reference to form login page

where i make mistake?
please help me !

it might be not que abt s2 but still expect help!


Java/J2EE developer 

blogs wordpress blog 

View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message