How to access the response object in a JS based web script?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2015 08:54 AM
Due to the unsolved issues reported here:
- https://forums.alfresco.com/forum/developer-discussions/web-scripts/cors-filter-not-applied-login-we...
- https://forums.alfresco.com/forum/developer-discussions/web-scripts/custom-headers-web-script-041820...
I want to set a header variable within a JavaScript based web script - I do not want to rewrite the entire script in Java as an extension from AbstractWebScript.
I did not find anything in the documentation how to access the response object in a web script. Is it even possible?
- https://forums.alfresco.com/forum/developer-discussions/web-scripts/cors-filter-not-applied-login-we...
- https://forums.alfresco.com/forum/developer-discussions/web-scripts/custom-headers-web-script-041820...
I want to set a header variable within a JavaScript based web script - I do not want to rewrite the entire script in Java as an extension from AbstractWebScript.
I did not find anything in the documentation how to access the response object in a web script. Is it even possible?
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 04:00 AM
Hello Mathias,
neither the request nor response object are mapped into parameters for the script execution. The web script runtime only maps request-derived parameters and response is always handled only via 'status' and the response template.
Regards
Axel
neither the request nor response object are mapped into parameters for the script execution. The web script runtime only maps request-derived parameters and response is always handled only via 'status' and the response template.
Regards
Axel
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015 05:31 PM
I suggest that you make a project under /tomcat/webapps/ROOT/ then take the response and add the header you want then send it to your applicaton.
———————————————-
PLEASE IF YOU SAW MY COMMENT IS VERY USEFUL, PLEASE DON'T FORGET TO GIVE USEFUL RATE
———————————————-
PLEASE IF YOU SAW MY COMMENT IS VERY USEFUL, PLEASE DON'T FORGET TO GIVE USEFUL RATE
