Re: access HTTP request parameters?



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
.



Relevant Pages

  • Re: access HTTP request parameters?
    ... the users browser to load an applet. ... The "Cookie" header used for authentication is of course also ... set in the HTTP request used to load applet.jar to the client. ... I.e. in the applet code I want to do something like this: ...
    (comp.lang.java.programmer)
  • Re: Getting properties of file on web server without downloading it
    ... yes it's a HTTP server. ... I was issuing a HttpWebRequest for the file, ... Dim loginCookie as New Cookie ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: corba in java applets using http tunnel?
    ... I have the problem that a java applet needs to communicate with the ... webserver, which delivered the applet, through corba. ... I have seen some large companies use an HTTP proxy server to handle all outbound traffic, which would force you to use HTTP in your applet if you are concerned about that situations. ... Basically, everybody is forced to use lowest-common-denominator HTTP solutions now if you want to communicate across all firewalls, which is too bad. ...
    (comp.object.corba)
  • Re: Can one write/set a cookie from inside a bowser java applet?
    ... >>variables and set a cookie. ... > My friend wants to do this from inside the java applet, ... > without javascript, but in Java itself. ... It's a sort of using JavaScript from within Java. ...
    (comp.lang.java.help)
  • Re: corba in java applets using http tunnel?
    ... I have the problem that a java applet needs to communicate with the ... webserver, which delivered the applet, through corba. ... seen some large companies use an HTTP proxy server to handle all ...
    (comp.object.corba)