This works for me, however, instead of a getter method I would use a method named isIsLoggedIn (might want to change the variable name if you do that though). I would think the getter method would work but maybe struts2 can't convert the boolean to a string if you do that. If that doesn't work, can you indicate what is going wrong with it?
Ok, I played around with this a little. I think the problem is you are using Boolean, and I am using boolean. I guess the s:property can't handle that wrapper class around the boolean (although I admit that seems wierd since it does have a toString method). I recommend trying to use the native type boolean instead of Boolean and see if that fixes your problem.
Strange, this code looks like it should access the values in your action class. Are you sure your action class is being called? Are you calling the JSP directly?
I directly call jsp file, action is definetly called (I added Syste.out.println("sdfsdfsdf") in the execute method and I can see in the tomcat console sdfsdfsdf printed when I call login.jsp)
I'm at a loss. The next thing I would try would be to put an s:debug tag between the <s:action> and </s:action> tags to see what's on the stack. Maybe that will clear up why loggedIn isn't accessible.
and, one more question, we can access properties via their name only if they belong to a current action (which is stored in top of the ValueStack), so how can I tell where to look for this property?
hmm... looking at the api for the action tag, it looks like I misunderstood how it works. I think you'll want to set the executeResult attribute of it to true, then in your struts.xml file specify a JSP for it to use to generate its output, then in that JSP you should be able to access loggedIn with OGNL. I also thought you could use that tag to do what you are trying to do, but It looks like I'm mistaken.