Announcement Announcement Module
Collapse
No announcement yet.
web.xml Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • web.xml

    delete the content
    Last edited by TerpInMD; Apr 22nd, 2009, 11:41 AM.

  • #2
    delete the content
    Last edited by TerpInMD; Apr 22nd, 2009, 11:41 AM.

    Comment


    • #3
      delete the content
      Last edited by TerpInMD; Apr 22nd, 2009, 11:52 AM.

      Comment


      • #4
        The order of items in the web.xml is important. Why not have a look at the tutorial example that ships with Acegi and ensure your order is consitent with it.

        Comment


        • #5
          Thanks,

          Of course I have acegi-security-1.0.3-src.zip and acegi-security-1.0.3.zip but I am not seeing the Contacts Sample they reference. Is that somewhere elsE?

          Comment


          • #6
            I cant even find the acegi security xml file in petclinic. wow.

            Comment


            • #7
              I've just downloaded Acegi and in the root directory there are two war files; acegi-security-sample-tutorial and acegi-security-sample-contacts-filter. If you extract either one, there is a web.xml in the WEB-INF directory.

              e.g.
              Code:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
              
              <web-app>
              
                  <display-name>Acegi Security Tutorial Application</display-name>
                  
              	<context-param>
              		<param-name>contextConfigLocation</param-name>
              		<param-value>
              			/WEB-INF/applicationContext-acegi-security.xml
              		</param-value>
              	</context-param>
              	
                  <filter>
                      <filter-name>Acegi Filter Chain Proxy</filter-name>
                      <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
                      <init-param>
                          <param-name>targetClass</param-name>
                          <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
                      </init-param>
                  </filter>
              
                  <filter-mapping>
                    <filter-name>Acegi Filter Chain Proxy</filter-name>
                    <url-pattern>/*</url-pattern>
                  </filter-mapping>
              	
              	<listener>
              		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
              	</listener>
              
               	<welcome-file-list>
              		<welcome-file>index.jsp</welcome-file>
              	</welcome-file-list>
              
              </web-app>

              Comment


              • #8
                Found it. This should give me a starting point, thanks. May pop in with more questions. I want to get the minimal amount of security up first.

                Comment


                • #9
                  I am getting there. I think I have most the pieces. The project builds and when I go to the login page I am seeing the hashed http address with the jsessionid.

                  I am getting 404 errors now so I need to figure out why the pages are not being picked up by the server. I imagine i has something to do with the daoAuthenticationProvider class not being implemented yet. I may try that inmemory one for testing.

                  Comment


                  • #10
                    Personally, I would take the acegi-security-sample-tutorial and start from there. This example probably contains most things you want and can be easily customized. It also stops the annoying, "why isn't this working" problems.

                    Comment


                    • #11
                      got it working in just a few hours. its working like a freaking charm. thanks for putting me on the right path.

                      its not that difficult but its also something you will not do very often so i am sure you have to revisit it everytime you set up a new app.

                      Comment


                      • #12
                        Not a problem, glad you got it work. I find the tutorial example to be a good starting point. Like you say, you don't start a new project every day so it does take some time to get your head round it all. Starting a project from scratch isn't fun! Why bother just take the sample and hack it into something you want. Good luck with it all!

                        Comment

                        Working...
                        X