cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saskia Heesen" <>
Subject Cookies in Javaflow
Date Thu, 31 Aug 2006 19:16:11 GMT
Hello all

I would like to read cookies in Java. However, I get a type mismatch or a cast exception.
Here is my code:

import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Cookie;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.forms.formmodel.Field;
import org.apache.cocoon.environment.Response;

public class Cookie extends AbstractContinuable {

 public void doCookie() {
  FormInstance form = new FormInstance ("fields.xml");
  Request request = getRequest();
  Cookie[] cookies = request.getCookies();

In eclipse, I can't generate Java bytecode. I get the message: The import org.apache.cocoon.environment.Cookie
conflicts with a type defined in the same file. How can I avoid the conflict?

I tried to use HttpCookie instead of Cookie. Then, there is a cast exception in this line:

  HttpCookie[] cookies = (HttpCookie[]) request.getCookies();

Do you have any hint?

Thanks in advance.



Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message