Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: url pattern issue - please help me...

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow url pattern issue - please help me...

    Hello friends,

    I'm using a filter for CSRF Cross-site request forgery.
    This filter should executed for all actions or for all .do been called.
    The application is working separately with filter.

    Mapping is done like this in web.xml :
    <filter>
    <filter-name>sessionCheck</filter-name>
    <filter-class>filterSecurity.FilterSecurityController</filter-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>WEB-INF/csrfguard.properties</param-value>
    </init-param>
    </filter>

    <filter-mapping>
    <filter-name>sessionCheck</filter-name>
    <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>sessionCheck</filter-name>
    <servlet-name>action</servlet-name>
    </filter-mapping>

    And i've done SSL setting, for security using apache tomcat.
    SSL also working separately. Mapping is given like this in web.xml

    <security-constraint>
    <web-resource-collection>
    <web-resource-name>All</web-resource-name>
    <description>No Description</description>
    <url-pattern>/*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <user-data-constraint>
    <description>USE SSL</description>
    <transport-guarantee>INTEGRAL</transport-guarantee>
    </user-data-constraint>
    </security-constraint>

    SSL starts from first page. The problem is when I put SSL and filter both, and when i try to login i.e. when an action is called, filter is not getting executed and its giving page page cannot be displayed. Can u help me in solving this? Any idea? Should I've to change the url-pattern???

    Plz help me out...

    Thanks in advance


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: url pattern issue - please help me...

    So the filter never gets hit at all?

    // Json

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: url pattern issue - please help me...

    Yeah,
    The server I'm using is weblogic.
    And when i don specify Security constraint its working well...
    With SSL its not going to filter.

Similar Threads

  1. Repeating program issue
    By Bill_H in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 24th, 2009, 10:58 AM
  2. Issue with JTextField Locking
    By PekinSOFT.Systems in forum AWT / Java Swing
    Replies: 0
    Last Post: October 1st, 2009, 11:12 AM
  3. Replies: 3
    Last Post: May 18th, 2009, 03:45 AM
  4. Issues with Tomcat 6.0
    By sanyog24681 in forum Java Servlet
    Replies: 0
    Last Post: October 21st, 2008, 07:55 AM

Tags for this Thread