Shally Raina

Greenhorn
+ Follow
since Jun 26, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Shally Raina

i have found the way out by using a javascript function and nt relying on validator framework for this.
16 years ago
posted Today 3:19 PM
--------------------------------------------------------------------------------
Hi,

I am having problems with "validateUrl" method of org.apache.struts.validator.FieldChecks. I have following validation configured in my "validation.xml" for validating a URL in struts farmework.

<field property="instCustomerServiceURL" depends="url">
<arg key="InstitutionFormBean.instCustomerServiceURL"/>
<var>
<var-name>allow2slashes</var-name>
<var-value>true</var-value>
</var>
<var>
<var-name>nofragments</var-name>
<var-value>true</var-value>
</var>
<var>
<var-name>schemes</var-name>
<var-value>http,https,telnet,file</var-value>
</var>
</field>
But for some reason, I am always getting an error that this is not a valid URL and I wonder what could be the reason. This is how rule looks in "validator-rules.xml"

<validator name="url"
classname="org.apache.struts.validator.FieldChecks"
method="validateUrl"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.url"/>

Please guide me in this regard as i have done all hits and trials
16 years ago
Hi,

I am having problems with "validateUrl" method of org.apache.struts.validator.FieldChecks. I have following validation configured in my "validation.xml" for validating a URL in struts farmework.

<field property="instCustomerServiceURL" depends="url">
<arg key="InstitutionFormBean.instCustomerServiceURL"/>
<var>
<var-name>allow2slashes</var-name>
<var-value>true</var-value>
</var>
<var>
<var-name>nofragments</var-name>
<var-value>true</var-value>
</var>
<var>
<var-name>schemes</var-name>
<var-value>http,https,telnet,file</var-value>
</var>
</field>
But for some reason, I am always getting an error that this is not a valid URL and I wonder what could be the reason. This is how rule looks in "validator-rules.xml"

<validator name="url"
classname="org.apache.struts.validator.FieldChecks"
method="validateUrl"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.url"/>

Please guide me in this regard as i have done all hits and trials
16 years ago
thanks rajanikanth...
i came to know that after researching for the net
16 years ago
[Thread hijack removed]
[ June 26, 2008: Message edited by: Bear Bibeault ]
16 years ago
1. I have an <input type="file"> field on my jsp but when i browse a file and then click submit ..the path of the file gets reset.
i dont want that.
I am also using Struts validation framework for my jsp
16 years ago
Hi all,

1. I have an <input type="file"> field on my jsp but when i browse a file and then click submit ..the path of the file gets reset.
i dont want that.
I am also using Struts validation framework for my jsp
16 years ago
Thanks a lot for your reply to the mentioned query....
really it was of great help to me as i was stuck with the same problem...
great job!!!
thanks again!!
16 years ago