register a SESSION variable using Java

currently i have this code that launches a PHP page and send username data: "personal.php?username=xyz".

is there any way to register a SESSION first, then launch my PHP page?  this JAVA code is run from an APPLET.

package org.pegasus.intranet.networking.tools ;
import java.awt.BorderLayout ;
import java.awt.Dimension ;
import java.net.URL ;
import java.net.URLEncoder ;
import javax.swing.JApplet ;
public class LDAPConnector extends JApplet {  
    public LDAPConnector() {}
    public void start() {
        try {
            this.getAppletContext().showDocument( new URL( "http://192.168.0.2/admin/personal/personal.php?" + URLEncoder.encode( "username", "UTF-8" ) + "=" + URLEncoder.encode( System.getProperty( "user.name" ), "UTF-8" ) ), "_self" ) ;
        } catch ( Exception ex ) {
            ex.printStackTrace() ;
        }
    }
}
LVL 16
ellandrdAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
Well i use Eclipse, but i don't *rely* on it ;-) AFAIK Netbeans has a nasty habit of 'knowing better than the programmer'
0
 
CEHJCommented:
>>is there any way to register a SESSION first

Not sure what you mean. The server is in control of sessions, not the client
0
 
ellandrdAuthor Commented:
sorry i just realised what i said... lol its ok, i have solved the issue using PHP...
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
ellandrdAuthor Commented:
what do you use to create your java apps, since you siad to me earlier not to rely on IDE's.  answer this here to save me opening another thread and i'll award you the 500 points from this one...
0
 
ellandrdAuthor Commented:
thank you!
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.