CATEGORIES
Acer
AMD
Apache
Apple
ASP
Business Object
Compaq
Crystal Reports
CSS
Database
Dell
DOT NET
Fujitsu
Gateway
Google
HP
HTML
IBM
IIS
Intel
Java
Mainframe
Microsoft
Networking
Oracle
SAP
SEO
Sony
SQL Server
Testing
Tomcat
Toshiba
Ubuntu
Visual Basic
Web Hosting
Windows
How to Configure 404 Error or Page not Found on Tomcat
Guidelines on Setting Customize Error Page on Tomcat
Published by: San (9/12/2007)
I have tomcat 6.x installed on my Windows 2003, how can I configure 404 error to point my 404.jsp page and compile the java code written into it.
Its very simple to configure 404 or any other errors to your own jsp or html page. The only file you should modify in this process is web.xml which recites under all the application root folder. Under given code shows how to configure it in general for all the applications running on Tomcat, later on you can add the fourth point to your application only. Your web.xml will be inside WEB-INF folder under the ROOT folder. Updating this file will affect your application only.
1. Open the conf folder under tomcat2. Open the file web.xml (/tomcat/conf/web.xml)
3. Locate:
<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
..
..
</welcome-file-list>
4. Add following lines for the custom error page.
<error-page>
<error-code>404</error-code>
<location>/default.jsp</location>
</error-page>
Most Popular Articles
- How to Configure 404 Error or Page not Found on Tomcat
- How to Change the Image onMouseOver
- Sending Email from JSP Pages Using smtp.gmail.com
- JSP Web Services Example - XML, XSLT in JSP - XML Web Services in Java
- How to Email from JSP Page?
How to Email from JSP Page? >>
COMMENT
Name: Jo
hey man i don't see your < > ..... </ > tags.
Name: doubt
but where to store the file default.jsp