Palayoor Thomas

Greenhorn
+ Follow
since Nov 16, 2006
Merit badge: grant badges
For More
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 Palayoor Thomas

We are trying to achieve Single Sign On (Log on) using the following components:

1). Websphere server 6.1
2). Kerberos and Key Distribution Center
3). Microsoft Active Directory contains the user credentials
4). Microsoft Active Directory is installed on a Windows 2003 server

We have enabled the websphere 6.1 sso and the other security settings required. Created some test users in the Active Directory. Set the stand alone directory from the WAS 6.1 as MS AD. A sample web application is deployed over WAS 6.1 Whenever we access the appln., it's asking for the userid /pwd everytime. We are not getting Single Sign On Behavior.

Could anyone help on this scenario?
15 years ago
Hi,

When I am validating my forms using mask variable, the validation is working. After the validation, the following error trace is getting...

15:37:45,731 ERROR [ValidatorForm] org.apache.struts.validator.FieldChecks.validateMask(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: org.apache.struts.validator.FieldChecks.validateMask(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest)
at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627)
at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:557)
at org.apache.commons.validator.Field.validateForRule(Field.java:827)
at org.apache.commons.validator.Field.validate(Field.java:906)
at org.apache.commons.validator.Form.validate(Form.java:174)
at org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:110)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:950)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)




I am using struts 1.2 version and validator 1.1.3 versions
16 years ago
I have three struts actions and a single form bean. I am declaring three different form-beans in the struts-config.xml with three different form names for the same form bean java class. How can I validate the forms using the struts validator framework?

My struts-config.xml will look like this:

#########################################################################
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources />
<form-beans>
<form-bean name="customerRegistrationForm"
type="com.sag.form.CustomerRegistrationForm">
<form-property name="customerId" type="java.lang.String" />
<form-property name="customerName" type="java.lang.String" />
<form-property name="customerAddress"
type="java.lang.String" />
<form-property name="customerParentId"
type="java.lang.String" />
<form-property name="countryId" type="java.lang.String" />
<form-property name="clientDivision"
type="java.lang.String" />
</form-bean>
<form-bean name="projectRegistrationForm"
type="com.sag.form.CustomerRegistrationForm">
<form-property name="projectName" type="java.lang.String" />
<form-property name="projectType" type="java.lang.String" />
<form-property name="technology" type="java.lang.String" />
<form-property name="sbu" type="java.lang.String" />
<form-property name="projectProfiles"
type="java.lang.String" />
<form-property name="onsiteOffshore"
type="java.lang.String" />
<form-property name="noOfResources" type="java.lang.String" />
</form-bean>
<form-bean name="proposalRegistrationForm"
type="com.sag.form.CustomerRegistrationForm">
<form-property name="proposalSerialNumber"
type="java.lang.String" />
<form-property name="proposalNumber"
type="java.lang.String" />
<form-property name="quarter" type="java.lang.String" />
<form-property name="month" type="java.lang.String" />
<form-property name="salesContact" type="java.lang.String" />
<form-property name="sagContact" type="java.lang.String" />
<form-property name="deliveryContact"
type="java.lang.String" />
<form-property name="proposalValue" type="java.lang.String" />
<form-property name="currencyCode" type="java.lang.String" />
<form-property name="USDinMillion" type="java.lang.String" />
<form-property name="proposalSummary"
type="java.lang.String" />
<form-property name="customerWinQuarter"
type="java.lang.String" />
<form-property name="clientRegion" type="java.lang.String" />
</form-bean>
</form-beans>
<global-exceptions />
<global-forwards>
<forward name="getName" path="/pages/registration.jsp" />
</global-forwards>
<action-mappings>
<action input="/pages/registration.jsp"
name="customerRegistrationForm" path="/registerCustomer"
scope="session" type="com.sag.action.CustomerRegisterAction"
validate="true">
<forward name="success" path="/pages/registration.jsp" />
<forward name="failure" path="/pages/customer.jsp" />
</action>
<action input="/pages/registration.jsp"
name="projectRegistrationForm" path="/registerProject"
scope="session" type="com.sag.action.ProjectRegistrationAction"
validate="true">
<forward name="success" path="/pages/registration.jsp" />
<forward name="failure" path="/pages/customer.jsp" />
</action>
<action input="/pages/registration.jsp"
name="proposalRegistrationForm" path="/registerProposal"
scope="session" type="com.sag.action.ProposalRegistrationAction"
validate="true">
<forward name="success" path="/pages/registration.jsp" />
<forward name="failure" path="/pages/customer.jsp" />
</action>
<action input="/pages/registration.jsp"
name="customerRegistrationForm" path="/register" scope="session"
type="com.sag.action.CustomerRegisterAction">
<forward name="success" path="/pages/registration.jsp" />
<forward name="failure" path="/pages/customer.jsp" />
</action>
</action-mappings>
<controller />
<message-resources parameter="ApplicationResources" />
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
</plug-in>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>
##########################################################################


Inside my jsp for the form, I am declaring the script for enabling the client side alert as:


#####################################################################
<html:javascript formName="customerRegistrationForm"
method="validateForm" dynamicJavascript="true" staticJavascript="false"
cdata="false" />
<html:javascript formName="projectRegistrationForm"
method="validateForm" dynamicJavascript="true" staticJavascript="false"
cdata="false" />
<html:javascript formName="proposalRegistrationForm"
method="validateForm" dynamicJavascript="true" staticJavascript="false"
cdata="false" />

##########################################################
16 years ago