You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/01/31 01:07:34 UTC

[jira] Created: (SLING-213) ujax post servlet should respond with status page instead of default redirect

ujax post servlet should respond with status page instead of default redirect
-----------------------------------------------------------------------------

                 Key: SLING-213
                 URL: https://issues.apache.org/jira/browse/SLING-213
             Project: Sling
          Issue Type: Improvement
          Components: microsling
            Reporter: Tobias Bocanegra


it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
this allows clients (javascript+formpost or ajax based) to react better on the modifications.

will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


Re: [jira] Assigned: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by Tobias Bocanegra <to...@day.com>.
hi,
the changes affect the tests quite a bit. and some failed due to some
"weird" sling exceptions.
i can go over the tests again, if you like, and see if i can find all issues.

regards, toby

On 1/31/08, Felix Meschberger <fm...@gmail.com> wrote:
> Salut Bertrand,
>
> Am Donnerstag, den 31.01.2008, 14:31 +0100 schrieb Bertrand Delacretaz:
> > Hi,
> >
> > > ...Felix Meschberger reassigned SLING-213:...
> >
> > I meant to comment in JIRA but it's not responding at the moment: make
> > sure to run the launchpad-webapp integration tests after this change,
> > as quite a few of them test the current behaviour, i.e. redirect after
> > POST.
>
> Definitely. Though Toby "fixed" some tests, he also said, that there
> were some failures. I will only checkin when the tests do not fail again
> - the changes are quite substantial, actually.
>
>
> Regards
> Felix
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Re: [jira] Assigned: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by Felix Meschberger <fm...@gmail.com>.
Salut Bertrand,

Am Donnerstag, den 31.01.2008, 14:31 +0100 schrieb Bertrand Delacretaz:
> Hi,
> 
> > ...Felix Meschberger reassigned SLING-213:...
> 
> I meant to comment in JIRA but it's not responding at the moment: make
> sure to run the launchpad-webapp integration tests after this change,
> as quite a few of them test the current behaviour, i.e. redirect after
> POST.

Definitely. Though Toby "fixed" some tests, he also said, that there
were some failures. I will only checkin when the tests do not fail again
- the changes are quite substantial, actually.


Regards
Felix


Re: [jira] Assigned: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

> ...Felix Meschberger reassigned SLING-213:...

I meant to comment in JIRA but it's not responding at the moment: make
sure to run the launchpad-webapp integration tests after this change,
as quite a few of them test the current behaviour, i.e. redirect after
POST.

-Bertrand

[jira] Assigned: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-213:
---------------------------------------

    Assignee: Felix Meschberger

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Commented: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565495#action_12565495 ] 

Felix Meschberger commented on SLING-213:
-----------------------------------------

Applied modified patch in Rev. 618397:

Default response is HTML response and elements with well-known ID tags:

    Status : status code, e.g. 200
    Message : status code message, e.g. OK
    Location : URL to created/modified Resource, e.g. http://host/a/b/c
    ParentLocation: URL to parent of created/modified Resource, e.g. http://host/a/b
    Path : Absolute path of created/modified Resource, e.g. /a/b/c
    Referer : Referer header of POST request
    ChangeLog : The operations applied, list of add, removed, modify

All values are available as element content of the respective DOM elements, the elements are available by getElementById


modified ujax:redirect support

   (1) ujax:redirect parameter not set: Default HTML response, see above
   (2) ujax:redirect parameter set to any URL : Temporary redirect (302) to the given URL
   (3) ujax:redirect parameter contains "*" : Temporary redirect (302) to the URL where "*" is replaced with the
                       name (Node.getName()) of the Resource created/modified.

Example for (3): Given a node with name "1234" is created:

    ujax:redirect=*   ==> redirect to "1234"
    ujax:redirect=*.html   ==> redirect to "1234.html"
    ujax:redirect=*/suffix.pdf   ==> redirect to "1234/suffix.pdf"
    ujax:redirect=prefix/*/suffix.pdf  ==> redirect to "prefix/1234/suffix.pdf"

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Commented: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565320#action_12565320 ] 

Felix Meschberger commented on SLING-213:
-----------------------------------------

As a result of the discussion, I change the patch such, that any "extension" of the ujax:redirect parameter starting with "*" is used as the request extension for the redirect (302) to the created/modified node.

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Commented: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565491#action_12565491 ] 

Felix Meschberger commented on SLING-213:
-----------------------------------------

Adapted integration tests in Rev. 618395:

  - UslingIntegrationTestClient:
       * use default ujax: parameters, but do not overwrite test-provided values
       * default status is 200 (ok) now, was 302 (temp redirect)
  - HttpTestBase: Gather messages while waiting for Sling startup in a list
       instead of a Set to keep the order of the messages
  - PostRedirectTest: Adapt to new ujax:redirect semantics
  - PostServletDeleteTest: Adapt to default status 200 (OK)
  - PostServletOrderTest: minor message format

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Updated: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra updated SLING-213:
-----------------------------------

    Attachment: ujax_post.r616964.patch

- implemented status page
- changed default redirection behaviour
- adjusted some tests


> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>         Attachments: ujax_post.r616964.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Resolved: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-213.
-------------------------------------

    Resolution: Fixed

Considering this issue fixed. Please close if ok for you. Thanks.

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Updated: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra updated SLING-213:
-----------------------------------

    Attachment: ujax_post.r616964-1.patch

- slight modification to response html

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Updated: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra updated SLING-213:
-----------------------------------

    Attachment:     (was: ujax_post.r616964.patch)

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Closed: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra closed SLING-213.
----------------------------------


glad we agreed on this!

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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


[jira] Commented: (SLING-213) ujax post servlet should respond with status page instead of default redirect

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564900#action_12564900 ] 

Felix Meschberger commented on SLING-213:
-----------------------------------------

Cannot continue until the "correct" behaviour after a successfull POST is resolved. See the dev mailing list for more information.

http://markmail.org/message/karoj6hiwtca3n3x

> ujax post servlet should respond with status page instead of default redirect
> -----------------------------------------------------------------------------
>
>                 Key: SLING-213
>                 URL: https://issues.apache.org/jira/browse/SLING-213
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>         Attachments: ujax_post.r616964-1.patch
>
>
> it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect.
> this allows clients (javascript+formpost or ajax based) to react better on the modifications.
> will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect="*" input parameter.

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