Component action context().hasSession() returns false? [Was Re: context().hasSession() returns false... then true?]
Component action context().hasSession() returns false? [Was Re: context().hasSession() returns false... then true?]
- Subject: Component action context().hasSession() returns false? [Was Re: context().hasSession() returns false... then true?]
- From: Rams <email@hidden>
- Date: Fri, 27 Jun 2008 11:20:32 -0400
Hi everyone...
I should add, I am currently using component actions. I'm not
defaulting to direct actions yet... so I'm under the impression that
there should always be a session present. I only check
context().hasSession() now because I had planned to move to direct
actions at a future date. At least Tomcat is failing consistently at
the same places, so I guess that's a small ray of hope.
BTW, if the wise regulars here think using Tomcat is just a bad idea
to begin with, please say so. I'm perfectly willing to move to
something different... perhaps Java Monitor and wotaskd. I only
started with Tomcat in an attempt to be as flexible as possible with
commercial deployment options. However, I've learned in my lifetime
that it's generally not productive to fight the tool. If using Tomcat
is going to be a huge pain and produce one failure after another, I'll
switch. I'm sure there have to be a few WebObjects hosting options
out there.
Any opinions?? Thanks again everybody.
On Jun 26, 2008, at 8:40 PM, Rams wrote:
Yes, the application has a login with the logged in user entity
stored in the session. I do have an error in the log file, although
I don't know what it means...
Jun 26, 2008 6:05:13 PM org.apache.catalina.core.StandardContext
processTlds SEVERE: Error reading tld listeners
javax.servlet.ServletException: Exception processing TLD at resource
path /WEB-INF/tlds/WOtaglib_1_0.tld in context /myapp
javax.servlet.ServletException: Exception processing TLD at resource
path /WEB-INF/tlds/WOtaglib_1_0.tld in context /myapp at
org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:557)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:295)
at
<snip>
On Jun 26, 2008, at 8:07 PM, Don Lindsay wrote:
Hello;
Are there any errors in your catalina.out or localhost_ÚTETIME
%.log files? Is this an application that requires a user to login?
Don
Sorry this was supposed to apply to this message not Wonder/Tomcat
Documentation.
Don
On Jun 26, 2008, at 7:21 PM, Rams wrote:
Hi Everyone...
I have an app deployed on Tomcat 6.0.16 and it appears that
context().hasSession() is failing to produce reliable results. In
my Main WO I have:
public Boolean authenticated() {
return (context().hasSession() &&
session().valueForKey(User.ENTITY_NAME.toLowerCase()) != null);
}
and in my Main WO, that resolves to false, and then true. I'm not
calling session() anywhere. I'm logging session creation in my
Application.createSessionForRequest method and the session
*should* exist before the first call. It's also failing in my
logout direct action
public WOActionResults logoutAction() {
if(context().hasSession()) {
NSLog.out.appendln("Terminating session: " +
session().sessionID());
session().terminate();
} else {
NSLog.out.appendln("logoutAction(): context().hasSession() ==
FALSE");
}
WORedirect mainPage = (WORedirect)
pageWithName(WORedirect.class.getName());
mainPage.setUrl(
context().directActionURLForActionNamed(
"default", new NSDictionary<Object,Object>(Boolean.FALSE,
"wosid")));
return mainPage;
}
All of this works fine in WOLips. It's failing on Tomcat. I'm
using WO 5.3.3 and Wonder. Is this a known bug with a known
workaround? Am I doing something dumb? Any help/advice/insight
would be appreciated.
Thanks all!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@mac.com
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden