| Author |
Can't get my login servlet to be called
|
Pat Farrell
Rancher
Joined: Aug 11, 2007
Posts: 4437
|
|
I'm trying to use a filter to validate that the user is logged in. I think I have something wrong in my configuration, or perhaps my thinking.
I'm running this under Glassfish started from Netbeans 6.7
The java code is executed once, only the iniitializer, the actual filter code is never called.
The log files show that this call is being made:
public void init( FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
lfLog.debug( "Login filter initialised");
}
this is never called
any pointers greatly appreciated
Pat
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
Pat,
Does a URL or "/j_security_check" or "/closed/*" get called? If you aren't sure, you could check the logs or have a filter with "/*" output all the URLs it sees. My guess is you are relying on j_security_check and a slightly different URL is getting called.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Pat Farrell
Rancher
Joined: Aug 11, 2007
Posts: 4437
|
|
Lots of pages that have urls like
${contextPath}/closed/foo and ${contextPath}/closed/baz
are called all over the place.
There are no explicit calls to "/j_security_check". I thought they were called automagically.
Do I need to call them explicitly?
|
 |
Chinmaya Chowdary
Ranch Hand
Joined: Apr 21, 2008
Posts: 432
|
|
Hi Pat.
Can you please post, complete web.xml?
|
 |
Pat Farrell
Rancher
Joined: Aug 11, 2007
Posts: 4437
|
|
Jeanne Boyarsky wrote:you could check the logs or have a filter with "/*" output all the URLs it sees.
Which logs? I'm not seeing anything about them.
I wrote a trivial filter, and it is recording URLs. But I'm not seeing any records of my FrontMan views.
or the .JSP pages that are generated in the FrontMan processing.
These pages are being driven internally, so perhaps I need to work with Bear to debug/understand this.
In short, the JSP pages are in WEB-INF/closed but they are accessed by a url that looks like
http://localhost:8080/fnfapp/command/usercontrolpanel
which dispatches to FrontMan.
I'm not seeing any "/j_security_check" calls at all. Should I be seeing them?
|
 |
Pat Farrell
Rancher
Joined: Aug 11, 2007
Posts: 4437
|
|
Chinmaya Chowdary wrote:Can you please post, complete web.xml?
I can't seem to attach it. Initially, I got "Files with the extension .sample are not allowed as attachment in the message."
but no matter how I rename it, it still will not attach.
|
 |
 |
|
|
subject: Can't get my login servlet to be called
|
|
|