i have custom module. i can't call controller in view of my module. this url call http://localhost/magento2-2.0.0-rc/index.php/namespace/moduelname/product/view/custom/ Code file **Custom.php** in ***Namespace/Namespace/Controller*** namespace Namespace\Namespace\Controller; class Custom extends \Magento\Framework\App\Action\Action { /** * Index action * * @return $this */ public function execute() { $resultRedirect = $this->resultRedirectFactory->create(); return $resultRedirect->setPath('/'); } } This file Custom.php in ***Namespace/Namespace/Controller/Product/View*** <?php /** * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Namespace\Modulename\Controller\Product\View; class Custom extends \Namespace\Modulename\Controller\Custom { protected $resultForwardFactory; protected $resultPageFactory ; protected $_coreRegistry; /** * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory, \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory, \Magento\Framework\Registry $registry ) { $this->resultForwardFactory = $resultForwardFactory; $this->resultPageFactory = $resultPageFactory; $this->_coreRegistry = $registry; parent::__construct($context); } public function execute() { $data = $this->getRequest()->getPostValue(); print_r($data); die('xx'); } }