3 Replies Latest reply on Mar 12, 2009 1:39 PM by norman

    UrlRewrite not working anymore

    serkan.s.eskici.online.nl

      Hi.


      We are using UrlRewrite to offer friendly URL's to the client side. My problem is that everything was working fine until someday suddenly the parameter Im passing via the URL doesn't get filled correctly.


      This is how my code and configurations look like:


      @Scope(ScopeType.EVENT)
      @Name("customerBean")
      public class CustomerBean extends AbstractBean
      {
          @Logger
          private Log log;
         
          private String customerNumber;
          
          ...
      
          public void getAccountInfo() { //reads the customerNumber ... }
      }
      



      components.xml:


      <components>
      
         <core:init debug="false" jndi-pattern="@jndiPattern@" transaction-management-enabled="false" />
         <transaction:no-transaction />
      
         <component name="org.jboss.seam.debug.hotDeployFilter">
            <property name="urlPattern">*.seam</property>
         </component>
         
         <web:rewrite-filter view-mapping="*.seam" />
      
         ...
      
      </components>
      



      pages.xml:


      <pages xmlns="http://jboss.com/products/seam/pages"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd">
      
          <page view-id="/customer.xhtml" action="#{customerBean.getAccountInfo()}">
              <rewrite pattern="/details/{customerNumber}" />
              <param name="customerNumber" value="#{customerBean.customerNumber}" />
          </page>
         
          ...
      
      </pages>
      



      This used to work, but it's not working anymore. When I run the debugger, the customerNumber is just null. And I don't get any exceptions.


      However when I add @RequestParameter on private String customerNumber in CustomerBean it's working again. But this is a hack.


      Does anybody know what's going wrong ?


      Btw, Im using Seam 2.1.1.GA on Sun Appserver 9.1.