This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to bake your own cookies............

 
Max Huang
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to the best forum on the web site
I have a question, dont know if it belongs in this forum or another one. Here it is:
I was thinking about how you would program something and I don't know how it would be done. The idea is this: simply a go-between for someone trying to access a web site. So when they want to go to a web site, they request it from your web server instead, and then you go retreive it using the standard HTTP protocols.
For the basic case it is easy, but it can get tricky. what if you wanted to handle cookies? anyone have ideas on how that would be done?
I might implement this just for fun, but first i gotta find out how to do it and second of all i gotta find out if there is any useful application for it Maybe someone's already done it, in which case I wnat to know about all their design decisions
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JavaScript:

In servlets, "Cookie" is just a class in the J2EE API.
Article on Cookies
I am not sure what you are trying to DO with these cookies?
[ February 24, 2003: Message edited by: Cindy Glass ]
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Max Huang:
I have a question, dont know if it belongs in this forum or another one.

Totally confused. If you have a question, wouldn't it be nice if people can easily understand it? :roll:
 
Greg Charles
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question seems clear enough to me, but unfortunately I don't know the answer. Max wants to create a web page that can serve as a springboard for browsing. That is, when you first hit the page, it presents you with a form into which you type a URL, and then it displays that page for you. There used to be a site called something like SafeWeb that provided this service. Obviously, the main purpose was to allow browsing from work without the company knowing or being able to block where you went. However, I (also) used it to hit our servers from an outside client to make sure firewalls and such were configured correctly.
Max's point is what about cookies? They would be dropped on SafeWeb's server, and probably wouldn't be available to me the next time I hit the page. I would venture to guess that SafeWeb ignored this problem, but it is possible they relayed the cookies along with the HTML.
 
Max Huang
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again,
Yes Greg Charles, you hit the nail right on the head! That is what I am looking for. It is too bad you don't know the answer.
Now that you can read his clarification of my original question, Anyone have any suggestions??

Originally posted by Greg Charles:
The question seems clear enough to me, but unfortunately I don't know the answer. Max wants to create a web page that can serve as a springboard for browsing. That is, when you first hit the page, it presents you with a form into which you type a URL, and then it displays that page for you. There used to be a site called something like SafeWeb that provided this service. Obviously, the main purpose was to allow browsing from work without the company knowing or being able to block where you went. However, I (also) used it to hit our servers from an outside client to make sure firewalls and such were configured correctly.
Max's point is what about cookies? They would be dropped on SafeWeb's server, and probably wouldn't be available to me the next time I hit the page. I would venture to guess that SafeWeb ignored this problem, but it is possible they relayed the cookies along with the HTML.
 
Max Huang
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, there are also many other features in the web that I am interested in how to support.... anything involved in complex web content.
Originally posted by Max Huang:
Hello again,
Yes Greg Charles, you hit the nail right on the head! That is what I am looking for. It is too bad you don't know the answer.
Now that you can read his clarification of my original question, Anyone have any suggestions??


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic