title: Issue in calling Ajax from magento
body: <p>enter code here</p>
  
  <p>I am new to magento.
  I am trying to call Ajax from JavaScript.
  I created a Module and one controller.
  I enabled that module as well as controller.
  My Package Name is Package and Module name is ajax.
  Controller Name is AjaxController.php in controller directory of module.
  function name I want to use is ViewAction with no Params.
  I am echo a simple message.</p>
  
  <p>So my URL becomes </p>
  
  <pre><code>http://216.12.194.46/~thetyrec/magento/index.php/ajax/ajax/view/
  
  or   http://216.12.194.46/~thetyrec/magento/ajax/ajax/view/
  </code></pre>
  
  <p>I am getting 404 error in both of them.</p>
  
  <p>Please guide me. Where I can be wrong or how can I debug further.</p>
  
  <p>I am not seeing any such issue in var/report and log files.</p>
  
  <p>Tutorial I am following is <a href="http://blog.baobaz.com/en/blog/magento-module-create-your-own-controller" rel="nofollow">http://blog.baobaz.com/en/blog/magento-module-create-your-own-controller</a></p>
  
  <p><strong>Edit :</strong></p>
  
  <p>After more debugging I found that I am getting error</p>
  
  <pre><code>a:5:{i:0;s:51:"Controller file was loaded but class does not exist";i:1;s:1072:"#0 /home/thetyrec/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(326): Mage::exception('Mage_Core', 'Controller file...')
  </code></pre>
  
  <p>when I try to access URL </p>
  
  <pre><code>http://216.12.194.46/~thetyrec/magento/index.php/ajax/ajax/view
  </code></pre>
  
  <p>and my code for controller is </p>
  
  <pre><code>class Package_Ajax_AjaxController extends Mage_Core_Controller_Front_Action
  {
      public function viewAction()
     {
  
         echo "I am getting below value:";
      }
  }
  </code></pre>