HttpServletRequest

Hi everyone,

I am fairly new to java and I am having problems reading cookies from my browser store.

I am thinking that I have to use the getCookies on HttpServletRequest object. However, I don't know how to initalize this object.

My guess is that the HttpServletRequest object can only be initialized by a jsp. If thats true, is there another way of reading the cookies from my browser store? Any sample code, preferably with a main method, would really be appreciated!

Thanks!

moy

[523 byte] By [moy021a] at [2007-11-26 16:20:59]
# 1
I'd suggest posting this to either the [url= http://forum.java.sun.com/forum.jspa?forumID=33]Java Servlet Forum[/url] or the [url= http://forum.java.sun.com/forum.jspa?forumID=45]JSP Forum[/url].
DrLaszloJamfa at 2007-7-8 22:44:37 > top of Java-index,Java Essentials,New To Java...
# 2
It looks like You are going to write stand along application for that. If so it is wrong way.I would recommend You to create a servlet or jsp under some of web containers.Then You will have that HttpServletRequest initialized in get or post method.
_Dima_a at 2007-7-8 22:44:37 > top of Java-index,Java Essentials,New To Java...