on 04-22-2008 8:32 AM
Hi,
in AbstractPortalComponent our method doContent(IPortalComponentRequest request, IPortalComponentResponse response) is generating a response. For this response this method also creates a js file which will be included into the response.
We want to delete the js file a f t e r the response was send. We have tried it with doAfterContent(IPortalComponentRequest request, IEvent event). This doesnt work properly,... the js file is deleted too soon.
Any advice ?!?
Flo
Hi,
If the response is already sent to the browser, from where to you want to delete the js file?
Do you save this js in some session or some where?
If so then delete this, in the start of your doContent method.
I would suggest some code logic like this:
The first time you generate the JS, place it in request. So always read request to see if JS already exists, if not create JS and place in request. While including JS in responce, always take it from request object. So the JS is only available for one request/responce cycle. Every request/responce has its own JS.
Regards,
Praveen Gudapati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for your answer. I know it is confusing that I want to save the javascript file on filesystem and delete it a f t e r the response.
I want to hide parameters in an applett, because of this I am using a javascirpt include. In the js file are the parameters with document.write(). So I can avoid that the users can read the parameters in the html source.
Probably I can´t delete the js file after the response was send in AbstractPortalComponent, right ? What for other solutions could I use ?
Regards
Flo
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.