Hello there,
Can any one please help me in obtaining html erro codes like 401, 505 etc
Thanks
Hello there,
Can any one please help me in obtaining html erro codes like 401, 505 etc
Thanks
Once you get a better understanding of the HTTP codes... If you are learning about this because you are managing your own webserver, you could also modify the HTML files that your webserver is using for each of these codes and further customize them as needed. For example, provide more info, links, etc...
Hey Jorge,
Thanks for ur reply i got my application runing on appache i need to generate html error pages in order to check whether they are been handled properly or not. For an example if i need to get 503. where and wat should i mess up with, is it appache or tomcat?
You can control the behavior in either.. Tomcat or apache. For example, in Tomcat modify these settings in your web.xml file or for your apache http server specify the "ErrorDocument" directive in the virtualhost section of your apache configuration.
I've done this a lot more in the IIS/ASP.NET platform, but its about the same concept...
Lots of examples online for both.
I already handled it to respective pages. But wat is the best way to check whether they are been handled. Is there any proper help to know about how to reproduce this error pages through my application
Thanks
So this depends on the error because you can format the HTML error pages to redirect somewhere else and record the event using server side scripting. However some of these codes may be related to a global problem with your server code so that process may not work in all instances.
What I try to do is capture and handle as much as possible within my code using try..catch blocks. Then I try redirecting common HTTP (400s, 500s) errors to "soft" error pages (ASP.NET via web.config or Tomcat) in your case and for the remainder, I generally have modified error pages that IIS will server.
In my Try...catch blocks and soft error pages, I simply take appropriate action and typically log the error to a DB or local file and/or send out an email to the website admin.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.