Colin,
Without entering into the details of the approach, which may or may not
be sound depending on how important it is to you to actually prevent
that duplication (certainly the approach is not what I would call
"robust"), you should be able to do this in OPS, but you have
unfortunately to write a few lines of Java. This should be enough with
the Java processor though.
What the processor would do is do something like this:
ExternalContext externalContext = (ExternalContext)
pipelineContext.getAttribute(PipelineContext.EXTERNAL_CONTEXT);
HttpServletResponse response = (HttpServletResponse)
externalContext.getNativeResponse();
response.addCookie(new Cookie(...));
-Erik
Colin O'Brien wrote:
> Hi,
>
> I need to create a form and make some effort to ensure that it is only
> completed once by any individual.
> The thought is to create a cookie on the visitor's system when they
> complete the form and test for the existence of this cookie when a user
> calls up the form.
>
> I can't find anything in OPS (examples or docs) about cookies (apart
> from it looks like the request generator can return the value).
> How would I set a cookie in OPS?
>
> I fear that this is something simple that doesn't need OPS at all, in
> which case I apologize for taking time on the list, but this is an area
> of the web I have not had to deal with before.
>
> Thanks & regards
> Colin
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws