Re: access HTTP request parameters?
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Mon, 14 Jul 2008 20:11:52 -0400
Stefan Palme wrote:
hope this is the right place to ask for help - some hours of
search engine stressing did not bring any light...
I have a rather complex 3rd party web application using Cookies
for authenticating purposes. Every HTTP request from the user's
browser sends an HTTP request header like "Cookie: session=1234567"
to the server.
One of the application's HTML pages contains an <applet>-Tag causing
the users browser to load an applet. The applet lives in the same codebase as the web application, i.e. something like this:
<applet code="my.package.Main" archive="applet.jar">
... (some applet params)
</applet>
The "Cookie" header used for authentication is of course also set in the HTTP request used to load applet.jar to the client.
Is there a way to access the Cookie-Header (or any other HTTP
request header) of the HTTP request that was used to load the
applet's jar file?
I.e. in the applet code I want to do something like this:
public class Main extends JApplet {
public void init() {
System.out.println("Cookie: "+WHATEVER.getRequestParam("Cookie"));
System.out.println("User-Agent: "+WHATEVER.getRequestParam("User-
Agent"));
...
}
}
Is there a really existing way for "WHATEVER.getRequestParam()"?
The applet code runs client side and has no access to the
information present server side when the code was
previously retrieved.
But the applet can access the cookie information stored
in the browser about the HTML document via the
Java applet - JavaScript interface.
See:
http://www.rgagnon.com/javadetails/java-0180.html
for examples.
Arne
.
- Follow-Ups:
- Re: access HTTP request parameters?
- From: Richard Maher
- Re: access HTTP request parameters?
- References:
- access HTTP request parameters?
- From: Stefan Palme
- access HTTP request parameters?
- Prev by Date: Re: trying to get the data off gutenberg's today's rss feed
- Next by Date: Re: IBM's JVM?
- Previous by thread: access HTTP request parameters?
- Next by thread: Re: access HTTP request parameters?
- Index(es):
Relevant Pages
|