[ 
https://issues.apache.org/jira/browse/SLING-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578056#action_12578056
 ] 

Tobias Bocanegra commented on SLING-325:
----------------------------------------

> it gets even worse when we consider limiting the value of the override to 
> only allow "GET": in this case 
> the attribute is actually unneeded on the tag ... 
how about a 'forceGet' attribute with default to 'true' if not set ? so if you 
want to use the same method, you just set it to 'false' explicitly.

> Finally thinking about it, I wonder whether your application may not be 
> modified such, that the POST 
> handling servlet just does what it has to do on POST and the redirects to the 
> rendering servlet with a GET > request... 

the POST handling servlet is a script that displays the preview of some 
modified text (e.g. wiki update).
i strongly believe that this will be a problem for other use cases, where a 
POST result needs to be displayed in a multi-script environment.

currently, i'm adding a POST.jsp with <[EMAIL PROTECTED] file="html.jsp"/> to 
all be resource types. which is ok for the moment.

> Add RequestDispatcherOptions.OPT_REQUEST_METHOD
> -----------------------------------------------
>
>                 Key: SLING-325
>                 URL: https://issues.apache.org/jira/browse/SLING-325
>             Project: Sling
>          Issue Type: New Feature
>          Components: Scripting
>            Reporter: Tobias Bocanegra
>
> I'm facing a problem with POST handling in scripts. i have a 'main' script 
> that includes others (header, navigation, footer, etc.) using 
> <sling:include/>.
> now i have a html form that uses (multipart) POST that i want to handle 
> myself and not with the ujax post servlet. therefor i added a 'POST.jsp' 
> beside my 'html.jsp' of the main script. this works. now the problem is, that 
> all included resources that do not have a POST.jsp are rendered by the ujax 
> post servlet, which is not what i want. of course i can add POST.jsp to all 
> other scripts but that's a bit tiresome.
> suggest to:
> - add new RequestDispatcherOption  OPT_REQUEST_METHOD that allows override of 
> the method (maybe limit to 'GET')
> - extend the <sling:include/> tag to take a 'method' attribute and default it 
> to GET, if absent (it would be tedious to specify the GET for every include, 
> so rather make it default).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to