manni prat

Greenhorn
+ Follow
since Apr 07, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by manni prat

Is your validation problem solved?
10 years ago
Hi,
As we have tried all the possible options (which are not working ) I created sample app and tried with it .
It seems to be working .Could you please check for the differences in code below and your code:

============================STRUTS.XML
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>

<package name="default" extends="struts-default">
<action name="LoginAction" class="vaannila.Login">
<result name="input">/login.jsp</result>
<result name="success">/success.jsp</result>
</action>
</package>
</struts>


============================Login-Validation.xml


<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="userName">
<field-validator type="requiredstring">
<message>User Name is required.</message>
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
<message key="password.required" />
</field-validator>
</field>
</validators>

===========================LOGIN.jsp

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Login Page</title>
<s:head />
</head>
<body>
<s:form action="LoginAction">
<s:textfield name="userName" label="User Name" />
<s:password name="password" label="Password" />
<s:submit value="Login" />
</s:form>
</body>
</html>

10 years ago
Just a guess.
in your xml file your are using message key as below:

<field name="userName">
<field-validator type="required">
<message key="username"/>
</field-validator>
</field>

In this case your key is "username".Everywhere else you have used "userName" i.e camel case notation.
Is it possible that it is not able to find the key and hence not able to locate the message?
10 years ago
ohh ok.
Is it something to do with <s:fieldError/> in JSP?
10 years ago
I am not aware of struts 2.
But in struts 1 , we need to specify name of validation XML (in your case Login-vaidation.xml ) inside "struts-config.xml".
This is done where ValidatorPlugin is declared inside struts-config fiile.

Please check that once.
10 years ago
I was getting this error when I was specifying wrong user name and password.
Also ,Please specify domain name while entering the user name.
e.g <domain_name>\<username>
10 years ago
In my project there is a requirement of LDAP authentication for login module.This is already implemented by one of the developers in our project and also documented the steps for using this Login module.

To use the Login functionality successfully it is mentioned that I have to put cacerts file in tomcat.(This cacerts file is checked in the source repository).

I have no clue how this cacerts file was created .In addition to this ,it is mentioned that if I want to add support for new LDAP server then I need to run InstallCert.java provided on the sun's web site.

As per my understanding the steps followed for creating this cacerts file are :

1.Get the signed certificate (signed by CA) for particular LDAP server from LDAP admin.
2.Import it into the JDK keystore by using InstallCert.java.

Please confirm my understanding.

JDK comes with tool named keytool. Are keytool and InstallCert.java used for the same purpose?




10 years ago