I want to display 404 error page for that i have made error404.php file in my protected/view/system folder.
By default i have Sitecontroller and it contained error acti
Can't you do this with .htaccess? Personally I create an "errors" folder with all the html php files that holds the error messages and modify .htaccess to call those pages while coming across the error.
Links:
http://www.javascriptkit.com/howto/htaccess2.shtml
http://www.addedbytes.com/for-beginners/error-documents-for-beginners/
Examples:
Create a .htaccess file in the directory you want the error pages to be called and in the text file, write the following line:
ErrorDocument 404 /404.html
assuming there is a page called 404.html in the same directory, when a 404 page not found error is genrated, the 404.html page will be called.
The same works with other error codes:
ErrorDocument 500 /500error.html
assuming a 500 error was created and a 500error.html file exists in the same directory.