I published before however I appear to really begin to see the problem, just getting trouble fixing it.

I'm attempting to login to my schools grade website, possibly even make an application for this later, so when I personally use Chrome to examine the snacks being produced, I recieve each one of these,

Cookie:appName=chippewa_falls; tool=""; selection=""; districtID=1; endYear=2011; calendarID=0; permCalendarID=0; JSESSIONID=BE5AEF51EAA72975150FC2D0F77DDE13

However when my program prints all of the snacks it received, I only understand this

  • [version: 0][name: JSESSIONID][value: BC1BAA33BEB23DC27B7883AC24934A1D][domain: campus.chipfalls.k12.wi.us][path: /campus][expiry: null]

here's my code,

public static void main(String[] args) throws Exception {


    DefaultHttpClient httpclient = new DefaultHttpClient();
    HttpGet httpget = new HttpGet("https://campus.chipfalls.k12.wi.us/campus/portal/chippewa_falls.jsp");
    httpget.addHeader("Referer", "http://cfsd.chipfalls.k12.wi.us//high/");
    HttpResponse response = httpclient.execute(httpget);
    HttpEntity entity = response.getEntity();

    System.out.println("Login form get: " + response.getStatusLine());
    if (entity != null) {
        InputStream input = entity.getContent();
        BufferedReader reader = new BufferedReader(new InputStreamReader(input));
        String ln = "";
        while((ln = reader.readLine()) != null) {
            System.out.println("During Get - " + ln);
        }
    }
    System.out.println("Initial set of cookies:");
    List<Cookie> cookies = httpclient.getCookieStore().getCookies();

    if (cookies.isEmpty()) {
        System.out.println("None");
    } else {
        for (int i = 0; i < cookies.size(); i++) {
            System.out.println("- " + cookies.get(i).toString());
        }
    }

Note that's only for the GET some of it,

Thank you for any help :)

Edit: Used to do forget to say, it's using HTTPS, but to tell the truth, I'm not sure in the event that matters with apache client or otherwise.

Individuals snacks should be getting set Once you login, not before. Searching in the output with wget from the URL you've above the thing is this:

Resolving campus.chipfalls.k12.wi.us... 205.213.253.11
Connecting to campus.chipfalls.k12.wi.us|205.213.253.11|:443... connected.
WARNING: Certificate verification error for campus.chipfalls.k12.wi.us: self signed certificate in certificate chain
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Server: Apache-Coyote/1.1
  Set-Cookie: JSESSIONID=004549BDBCBDFB8289EBF859A4E743B2; Path=/campus; Secure
  Content-Type: text/html;charset=utf-8
  Content-Length: 6352
  Date: Tue, 17 May 2011 06:00:38 GMT
  Connection: keep-alive
Length: 6,352 (6.2K) [text/html]

the identical factor the thing is. Before you really sign in you won't begin to see the other snacks.