Announcement Announcement Module
No announcement yet.
start-state POST Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ricsouzamoura
    started a topic start-state POST

    start-state POST

    My start-state is a class that extends AbstractAction.
    When I send request parameters by get it works well, but when I send request parameters by POST it don't works.

    There is some diference ?

    I have tried to use context.getSourceEvent().getParameter(), context.getSourceEvent().getAttribute(), context.getRequestScope().getAttribute() but I didn't get.

    context = RequestContext

    Thanks in advance

  • ricsouzamoura
    Ok... I understood now.
    When I use Acegi, it make a redirect to https using the class RetryWithHttpsEntryPoint
    a piece of javadoc is bellow:

    "public class RetryWithHttpsEntryPoint extends Object implements InitializingBean, ChannelEntryPoint

    Commences a secure channel by retrying the original request using HTTPS.

    This entry point should suffice in most circumstances. However, it is not intended to properly handle HTTP POSTs or other usage where a standard redirect would cause an issue. "

    Thank you

    Leave a comment:

  • ricsouzamoura
    Everything works without https. It could be a wrong configuration or a bug in Acegi... I will read more about to see if I get the reason...
    Thank you very much by the tip...
    When I have a answer about the problem after my researches I post a reply...

    Leave a comment:

  • klr8
    Could it be the Acegi stuff and the switch to HTTPS that is messing with the request parameters? Have you tried disabling your security, just as a test, and see if that works?

    If that's not it, I have absolutely no idea what could be happening to those request parameters. It's unlikely that it's a problem in SWF though.


    Leave a comment:

  • ricsouzamoura
    Unfortunatelly it doesn't work too.
    When I use GET everything works well, but POST....
    I will try to show you how is my application.

    It is a shopping cart to a e-commerce application.
    I have a form like this:

    <form action="/secure/" method="POST">
    <input type="hidden" name="codProd" value="1"/>
    <input type="hidden" name="codItem" value="10"/>
    <input type="hidden" name="amount" value="1"/>

    <input type="hidden" name="codProd" value="2"/>
    <input type="hidden" name="codItem" value="20"/>
    <input type="hidden" name="amount" value="1"/>

    <input type="submit" value="OK"/>

    When I click on OK, this URL pass by Acegi Security filters and change to security channel (https)

    for example: the codProd parameter should have been passed like a String[] with 2 elements, but when I used what you suggest it returned null

    I have tried all that options, but It just worked when I have used GET.

    I am using Tomcat-5.5.7, Apache-2.0.52 webflow r3, spring 1.2, JDK-1.5.0_03 SUN.

    If you still have some more questions, feel free to ask

    I apreciatte if you can spend your time with this problem...

    Leave a comment:

  • klr8
    There should be no difference. It's the servlet engine, e.g. Tomcat, that handles the difference and makes all request parameters available using 'request.getParameter("name")'. Inside of SWF, the HTTP servlet request is wrapped inside an Event, so you should be able to get the value of any request paremeter using 'context.getSourceEvent().getParameter("name")', no matter whether it was sent using HTTP GET or POST.

    Do you get the correct value if you do:
    HttpServletRequest request = &#40;&#40;ServletEvent&#41;context.getSourceEvent&#40;&#41;&#41;.getRequest&#40;&#41;;
    //assertEquals&#40;context.getSourceEvent&#40;&#41;.getParameter&#40;"name"&#41;, request.getParameter&#40;"name"&#41;&#41;;
    If the last assert fails, please let us know because that might be a bug.


    Leave a comment: