If you desparately want to do such things, then may be you can put the generated query string in the session and validate it , if the user has changed the query manually....
Panchasheel -----Original Message----- From: sriram [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 10:10 AM To: 'Struts Users Mailing List' Subject: URL changed by user - how to restrict? Hi, I am developing a web application in which some parameters are passed through query string. I do not want to allow users to manipulate the query string. If they manipulate, they should be logged off and taken to login page. For ex.., I have a page http://mymachine:8080/appln/test.jsp?user=1004 In this page, user details are displayed. If a user changes the query string - from user=1004 to user=1005 - and clicks ENTER, then the details of 1005 are being displayed. I want to avoid this. In such cases, user should be logged off and taken to login screen. How can this be done using Struts? Any clue? I believe this can be done by checking HTTP_REFERER, but I'm unable to get it right. Sriram -----Original Message----- From: Greg Hess [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 7:31 PM To: 'Struts Users Mailing List' Subject: RE: URL validation with struts??? Hi Prashanth, I have done this using the Struts validator. I use the mask rule as follows: <form name="serviceProviderForm"> <field property="URL" depends="required,mask"> <msg name="mask" key="error.invalid.ServiceProviderURL"/> <arg0 key="serviceProvider.url"/> <var> <var-name>mask</var-name> <var-value>^http:\/\/[^ ]*$</var-value> </var> </field> </form> There are great examples of using the validator in the Struts distribution. With this my code need not be concerned with the validity of the url string and is check by the validation framework on both client side(JavaScript) and server side and I only worry about errors obtaining a connection to the supplied url. Cheers, Greg -----Original Message----- From: Prashanth.S [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 9:36 AM To: [EMAIL PROTECTED] Subject: URL validation with struts??? Hi all, I need to upload a resource present at a particular location by making user enter a valid URL...How can i do URL name validation using struts???Is there anything to do so??Do i need to do this in action form or action class??[what User entered is a valid url i.e,both name as well as resource present at that url) Thanks in advance Prashanth --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]