30 Dec 2013, 06:32
Generic-user-small

Emil Georgiev (2 posts)

In chapter 3 when I tried to add the AuthFilter.java, it needs to import SessionUtils but it throws an error that they can’t be found. The same is happening with the others like OAuthServlet.java, LogoutServlet.java.

The particular line of code is:

import test.book.glass.SessionUtils;

How can this be solved?

07 Jan 2014, 19:26
Generic-user-small

Michael Bevil (2 posts)

No mention of this utility class is made in the book but you can find it in the source code - add it to the test.book.glass package

26 Jan 2014, 04:09
25233_377319146748_591736748_3799641_97127_n_pragsmall

Eric Redmond (19 posts)

Emil,

Michael is correct. All of the code is not printed in the book, We tried to keep the book around 100 pages, and as relevant to the Mirror API as possible. This means that some of the boilerplate GAE code wasn’t covered. To do so would have taken too much focus away from learning the Mirror API.

Sorry for any confusion,

Eric

08 May 2014, 15:20
Generic-user-small

Ron Swanson (2 posts)

Why would you think that you should introduce a new class but not even write a single sentence to explain where it comes from? As a programmer for whom Glass development is my first ever foray into Java/Eclipse/Android (not my choice), this threw me off for an extra hour while I tried to figure out if SessionUtils was a Java thing, a package from some other library I should go download, a new class I should write myself, etc. Even a comment in one of the servlet.java files would have greatly reduced the headache this caused. I don’t think one sentence would be “taking too much focus away” from the Mirror API.

For anyone else stumbling on this page, download this file: https://github.com/coderoshi/glassmirror/blob/master/chapter-3/src/test/book/glass/SessionUtils.java

and add it to your test.book.glass package.

  You must be logged in to comment