I have just taken your controller code, put it into a fresh quickstarted environment, and visited the url http://localhost:8080/content.json
It worked just fine. Since we don't have a complete copy of your code, I would suggest looking at the exact request being sent in via your browser. Is it really looking to visit http://yourdomain.com/content.json ? Is the content method defined in your root controller? Are you exposing your root controller at the root of the site, and not some number of levels deep? Double-check all of these things. They can make you chase down the wrong problem. On Fri, Jun 17, 2011 at 3:16 PM, q3 <[email protected]> wrote: > // Js-code > <script> > $.ajax({ > type: 'post', > url: '/content.json', > dataType: 'json', > success: function(msg){ > alert( "Data Saved: " + msg ); > } > }); > </script> > // My controller > > @expose('json') > def content(self): > pages = ['A','B'] > return dict(pages = pages) > > => localhost:8080/content.json => 404 Content not Found? > => page that contains the js-code => ajax call => again content 404 > Content not Found? > What is wrong with my controller? > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en. > > -- Michael J. Pedersen My IM IDs: Jabber/[email protected], AIM/pedermj022171 Yahoo/pedermj2002, MSN/[email protected] My LinkedIn Profile: http://www.linkedin.com/in/michaeljpedersen Twitter: pedersentg -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

