Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


Session issues

URL for the main parameters of imported methods for dynamic JSP page.
The first request (args[0]) with parameters, parameters inquiries will request some data and the preservation of Session.
Second and subsequent request (args[1], args[2]. . . ) Without parameters, but the moment to show that this is the first time JSP Session request to retain the data.
The question now is : Second Session and the subsequent request can not get the data,
[color=Red] Is there any way that this series of requests have come in the same Session? [/color]

[code]
Public static viod main (String[] args) (
For (int i = 0 i "args.length; i++) (
String government payments are capped = args[i];
Try (
URL u = new URL (government payments are capped) for imported parameters ;//url
HttpURLConnection uc = (HttpURLConnection) u.openConnection ();
InputStream in = new BufferedInputStream (uc.getInputStream ());
Reader r = new InputStreamReader (in);
Int c;
While ((c = r.read ())> -1) (
System.out.print ((char) c);
    }                       
Uc.disconnect ();
}catch (Exception ex) (
System.err.println (ex);
}
}
}
[/code]

1. Httpclient httpunit or can be used like a tool to replace the standard java.net package, they have the management session/conversation
2. The method can be used jsessionid


Well, convenience or httpclient handy!



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com