Re: [Erlangweb-users] Problems in step1 of tutorial
                
                Brought to you by:
                
                    etcerlangweb,
                    
                
                    paulgray
                    
                
            
            
        
        
        
    | 
      
      
      From: Roberto A. <rob...@er...> - 2010-03-18 13:36:52
      
     | 
| On 03/18/2010 07:43 AM, Jeffm wrote: > Following the tutorial at > > http://wiki.erlang-web.org/Tutorial/Step1_Setup > > with release 1.4 of erlang web. I get up to testing /item/show/1 but I > get a 404 in the web browser. My first suspicions was that I'd mistyped > the dispatch rules in dispatch.conf, so I cut and pasted them from the > tutorial then restarted erlang web. I also added an io:format/2 to the > browser:show_item/1 to see if it at lest made it this far...doesn't > appear that it does. The log says, > > e_mod_gen module, error: 404: "/item/show/1" > > What should I check next? You might want to debug what's happening behind the scenes. In Erlang, it's extremely easy to trace functions, so that you can check which function has been called, when, and what it's returning. In your case, you might be interested in the function: e_dispatcher:dispatch/1 Tracing functions will help you (a lot!) in understanding how the whole Erlang Web framework works. For more information on how to trace Erlang functions, have a look to this quick reference: http://aloiroberto.wordpress.com/2009/02/23/tracing-erlang-functions/ Regards, Roberto Aloi -- University of Kent - Erlang Solutions Ltd. Twitter: @prof3ta Blog: http://aloiroberto.wordpress.com --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com |