• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Term "URL.endWith" is Filter does not work  RSS feed

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
   Hey all!

I try to realize the following scheme:
1. From url “http://localhost:8080/newsPage?role=manager” or “http://localhost:8080/newsPage?role=spec”  I send the request to Servlet “/newsPage”.    Interaction between client and servlet is serviced through  Jsp “newPage.jsp”.  
2. All requests to servlet “/newsPage”  have to be passed through filter “FilterLogin”. In this filter I use the term: “if (url.endsWith(“manager”))” or “if (url.endsWith(“spec”))”.
But this term does not work. I may sure in this problem, by using Logger.info (in particular).

The Filter-code:


  Post-method is realized in client, when url "http://localhost:8080/newsPage?role=manager",
  by the form-construction in jsp-page:



  To make the problem-understanding more easy, I attached the general diagram to my post.

GeneralLogic.png
[Thumbnail for GeneralLogic.png]
 
Saloon Keeper
Posts: 2504
321
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Andrey Dmitriev wrote:


Have you verified that session is actually equal to null?
 
Andrey Dmitriev
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ron McLeod wrote:

Andrey Dmitriev wrote:


Have you verified that session is actually equal to null?



 No, I have not. From other side, when I except "(session == null)" and retain only "(uri.endsWith("manager")" noting is changing.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!