Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
How to pass parameterized String values to url rewrite filter?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sirisha  
View profile  
 More options Jun 25, 3:05 am
From: sirisha <sirisha.siri....@gmail.com>
Date: Thu, 25 Jun 2009 00:05:15 -0700 (PDT)
Local: Thurs, Jun 25 2009 3:05 am
Subject: How to pass parameterized String values to url rewrite filter?
How to pass parameterized String values to url rewrite filter?

I will give you a scenario :

In jsp I have  an Hash map having

blogMap1.put(StringConstants.TOTAL_RECORDS,fm.getTotalRecords());
blogMap1.put(StringConstants.PAGE_NUM,fm.getPageNum());
blogMap1.put(StringConstants.QUERY_ID,fm.getQueryId());

pageContext.setAttribute("parameters1", blogMap1);

and Im using this map in <html:link> as

<html:link forward="<%= ForwardConstants.BLOG_EDIT_ACTION %>"
name="parameters1" scope="page" styleClass="edit_link">Edit</
html:link>

here i need a url having parameters in sequence as I have put in Hash
map.(but in my case these values are swaping for every time,this is
because of Hash map if I am correct).
I also tried with Linked Hash Map , but it didn't work.

At last what  I need is , The parameters taken by the url rewrite
filter should be in the order which I have specified in hash map or
linked hash map.(the order should not be changed).

can anyone please help in  resolving this issue...............


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Avlesh Singh  
View profile  
 More options Jun 25, 6:38 am
From: Avlesh Singh <avl...@gmail.com>
Date: Thu, 25 Jun 2009 16:08:14 +0530
Local: Thurs, Jun 25 2009 6:38 am
Subject: Re: How to pass parameterized String values to url rewrite filter?

First of all, I am not sure why this is a url-rewrite question?

Second, if a LinkedHashMap does not work for you (in preserving order of the
parameters in the URL), ask this question on the Struts user mailing list. I
tried your use case, with a HashMap and a LinkedHashMap on my box (with
struts 1.2.7) and it just works fine (and as expected) for me.

Third, your statement

The parameters taken by the url rewrite filter should be in the order which

> I have specified in hash map or linked hash map

did not make sense to me. Maybe, I am missing something.

Cheers
Avlesh

On Thu, Jun 25, 2009 at 12:35 PM, sirisha <sirisha.siri....@gmail.com>wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wim De Smet  
View profile  
 More options Jun 26, 4:28 am
From: Wim De Smet <krom...@gmail.com>
Date: Fri, 26 Jun 2009 10:28:04 +0200
Local: Fri, Jun 26 2009 4:28 am
Subject: Re: How to pass parameterized String values to url rewrite filter?
I _think_ it might be the following problem: when you write a regexp
based rule query parameters tend to be really hard to parse as they
can shift around. Doing so in the rewrite rule is really not
recommended.

i.e.:
blah/query?var1=foo&var2=bar
blah/query?var2=bar&var1=foo
Do the same thing, but right now I don't really see a straightforward
way to get a working rewrite rule that parses both. There's probably
some regex voodoo you can do or just make two rules, but then the
amount of rules you need would be, er, strongly rising. (binomial?
haven't had much coffee yet today)

regards,
Wim


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google