You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sac sha <sa...@gmail.com> on 2009/07/01 23:07:36 UTC

Post parameters are null while accessing through url rewrite

Hi All

I am a newbee to struts. I have made a test website in struts. I have added
some forms to the pages which inserts data to the database using action. The
parameters are sent as post.
All is working fine when I put http://localhost:8080/myproj.

I have done url rewriting to map my web app to my test url. When I tried
accessing the site from that url, none of the form is working although the
pages appears fine.

When I check the parameters by sysout in action, all the parameters are
null. But when I change the request to "get" from "post" all works fine.

Am I doing something wrong? Has anybody experienced this kinda problem?
Please suggest.

I am using tomcat 5.5.27.

-- 
Regards
Sachin Sharma

Re: Post parameters are null while accessing through url rewrite

Posted by Dale Newfield <da...@newfield.org>.
sac sha wrote:
> Any ideas?
>> Also I have used mod_rewrite for url rewriting.
>>> When I check the parameters by sysout in action, all the parameters are
>>> null. But when I change the request to "get" from "post" all works fine.

Sounds like url rewriting is eating the post data.  I'd guess you've got 
the rewrite engine configured incorrectly.

Confirm that posting directly to the translated url works, then you know 
it's the rewriter, and you can muck with that configuration until you 
get the same results posting to the original or translated urls.

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Post parameters are null while accessing through url rewrite

Posted by sac sha <sa...@gmail.com>.
Hi All

Any ideas?

I am really stuck with this problem as it is restricting me to make my
application live.

Regards

On Thu, Jul 2, 2009 at 2:41 AM, sac sha <sa...@gmail.com> wrote:

> Hi
>
> Also I have used mod_rewrite for url rewriting.
>
>
> On Thu, Jul 2, 2009 at 2:37 AM, sac sha <sa...@gmail.com> wrote:
>
>> Hi All
>>
>> I am a newbee to struts. I have made a test website in struts. I have
>> added some forms to the pages which inserts data to the database using
>> action. The parameters are sent as post.
>> All is working fine when I put http://localhost:8080/myproj.
>>
>> I have done url rewriting to map my web app to my test url. When I tried
>> accessing the site from that url, none of the form is working although the
>> pages appears fine.
>>
>> When I check the parameters by sysout in action, all the parameters are
>> null. But when I change the request to "get" from "post" all works fine.
>>
>> Am I doing something wrong? Has anybody experienced this kinda problem?
>> Please suggest.
>>
>> I am using tomcat 5.5.27.
>>
>> --
>> Regards
>> Sachin Sharma
>>
>>
>
>
> --
> Regards
> Sachin Sharma
>
>


-- 
Regards
Sachin Sharma

Re: Post parameters are null while accessing through url rewrite

Posted by sac sha <sa...@gmail.com>.
Hi

Also I have used mod_rewrite for url rewriting.


On Thu, Jul 2, 2009 at 2:37 AM, sac sha <sa...@gmail.com> wrote:

> Hi All
>
> I am a newbee to struts. I have made a test website in struts. I have added
> some forms to the pages which inserts data to the database using action. The
> parameters are sent as post.
> All is working fine when I put http://localhost:8080/myproj.
>
> I have done url rewriting to map my web app to my test url. When I tried
> accessing the site from that url, none of the form is working although the
> pages appears fine.
>
> When I check the parameters by sysout in action, all the parameters are
> null. But when I change the request to "get" from "post" all works fine.
>
> Am I doing something wrong? Has anybody experienced this kinda problem?
> Please suggest.
>
> I am using tomcat 5.5.27.
>
> --
> Regards
> Sachin Sharma
>
>


-- 
Regards
Sachin Sharma