• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Can't get my login servlet to be called

 
Rancher
Posts: 4804
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

public void doFilter(ServletRequest request,
ServletResponse response, FilterChain chain)
throws java.io.IOException, ServletException {
chain.doFilter(request, response);
lfLog.debug("filter called");
}



any pointers greatly appreciated
Pat
 
author & internet detective
Posts: 42135
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Pat Farrell
Rancher
Posts: 4804
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pat.
Can you please post, complete web.xml?
 
Pat Farrell
Rancher
Posts: 4804
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 4804
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic