I am using Tapestry for my web project and have a question about sharing a Session Class
to a non Page class
.
I have class named VisParser.java
. I want to create that class for every session and use it in an RestImplementationclass
. VisParser.java
is not a model class. It is a simple Java class with methods and attributes.
I tried to use the SessionState
object annotation, but I could not transfer the object to a non-page class. Every time it throws a NullPointerException
.
I tried to use it as a service class, inject it on a page and try to call it with getters and setters. No Success, still throws a NullPointerException
.
I think the source code is not necessary.
A little hint would be enough. I hope somebody can help me.
I found an older question with solution, which solved my problem.
Restful : How to get access to Httpsession inside the Service class?
Thanks anyway. :-)