Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Servlet-Interview-Questions How to Send particular error to another page in Servlet from web.xml
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


samar
How to Send particular error to another page in Servlet from web.xml
1 Answer(s)      3 years and 2 months ago
Posted in : Servlet Interview Questions


How to Send particular error to another page in Servlet from web.xml


Advertisement
View Answers

October 5, 2011 at 1:09 PM


Hi you can forward particular error from web.xml file as

<error-page>
    <error-code>404</error-code>
    <location>404Error.jsp</location>
</error-page>

You can also send error from Servlet as

response.sendError(404, "Resource Nor Found");

When an error related to 404 occurs the page 404Error.jsp will be called automatically



Related Tutorials/Questions & Answers:
How to Send particular error to another page in Servlet from web.xml
How to Send particular error to another page in Servlet from web.xml  How to Send particular error to another page in Servlet from web.xml   Hi you can forward particular error from web.xml file as <error-page>
how to send sms from my website to mobile of particular user.
how to send sms from my website to mobile of particular user.  i had created a website and aim of pjt is whoever the client register for site..... so can u tell the process and how to implemnt this using java
Advertisements
how can i send a mail to a particular user from a many user dropdown list in jsp
how can i send a mail to a particular user from a many user dropdown list in jsp  how can i a sent a user question to a particular person from a drop down list in jsp
Send Email From JSP & Servlet
J2EE Tutorial - Send Email From JSP & Servlet... mail from webserver, using JavaMail API, the following code shows how the required
How to send boolean array to servlet from java application?
How to send boolean array to servlet from java application?  Hi, I want to send randomly generated array of boolean values. I used Random function and boolean array length to generate values. My question is I want to send
How to use web.xml in Servlet 3.0
How to use web.xml in Servlet 3.0 In this tutorial you will learn how to use web.xml in Servlet 3.0. Here I am giving the simple example of a Servlet in which I make a simple servlet class using @WebServlet annotaion into which
how can we pass parameters from jsp href to another servlet
how can we pass parameters from jsp href to another servlet  how can we pass parameters from jsp href to another servlet
regarding web.xml - JSP-Servlet
regarding web.xml  I am the java beginner, please send the web.xml code and how to run a servlet for apache5.0.... my problem is in tomcat manager am getting the message 'fail' in web.xml  Hello,Please check the tomcat
how to pass an array from one jsp to another jsp - JSP-Servlet
how to pass an array from one jsp to another jsp  hi friedns, can any One tell me how to send an array from one jsp to another jsp,pls any one send the code for this.also porvid the code how to retrive the arry in another jsp
How do I throw a 404 error from within a java servlet?
How do I throw a 404 error from within a java servlet?  How you can write code in Servlet for throwing the httpd error 404? How to add the configuration for handling the not found error in the web.xml file? Thanks   
How to send the data selected from drop down menu from html page to sql 2005 database.
How to send the data selected from drop down menu from html page to sql 2005... by user from html drop down menu such as check-in date for hotel reservation system ,how can I save these data in database and how to retrieve later .Thanks
Populate values from html to another html
Populate values from html to another html In this tutorial, you will learn how to send values from one html page to another. Here, we have create a html... on another html page. page1.html: <html> <form type=get action="
how to insert the bulk data into the data base from the table of jsp page to another jsp page
how to insert the bulk data into the data base from the table of jsp page to another jsp page  pls help i'm doing the project called centralized... and i have to insert the mark for n number student in the table i don't how
How to send mail - JSP-Servlet
How to send mail  Thanks a lot ODBC is cleared to me now. Now,have another query about how we can send mail by using jsp. Actually i want to make a web page for a user feedback ,it must be send to our mail id
How can I call a Servlet that is declare on web.xml with spring framework
How can I call a Servlet that is declare on web.xml with spring framework ... is declare on web.xml, but the spring dispacher don't find it so how I can make spring dispacher to call a servlet that is declare on my Web.xml here is my
Loading a jsp page (with record from database) from another jsp page
Loading a jsp page (with record from database) from another jsp page  ... with records from database(against Serial no and year).That is, as soon as Getdata.jsp will be loaded, it will show the first record. How can I do
How to pass parametes from JSP page to HTML page? - JSP-Servlet
How to pass parametes from JSP page to HTML page?  Hi all, In my project I have one JSP page and one HTML page. In JSP page I have created HTML... to pass the values from my JSP page to HTML page. Pls help me out. Hitendra 
loacation of errorpage in web.xml for 404 error
loacation of errorpage in web.xml for 404 error   The webpage cannot be found HTTP 404 Most likely causes: ‚?ĘThere might be a typing error... can try: Retype the address. Go back to the previous page. Go
web.xml - servlet - Java Beginners
application. I was suggested to use tag in the web.xml file to run that servlet...web.xml - servlet  Hi All, In my web application, I have one servlet that has to run automatically when ever I start my web application
How to send data by ajax to servlet? - Ajax
How to send data by ajax to servlet?  Hi, Can i send a value from a HTML file to servlet via Ajax? If it is possible please give me a sample code Thanks
calling one jap page from another jsp page
calling one jap page from another jsp page  i created a button in one jsp page i need to call another jsp page as an action to that button. so how can i call.. plz any one explain. its urgent
to bring checked data from one page to another
to bring checked data from one page to another  thanks for your help... jsp page which is connected with servlet at the back and through which i am fetching data from the database on second jsp page with checkbox corresponding each
how to send a mail - JSP-Servlet
how to send a mail  Dear sir, I am able to send a mail.But... public String sendMailWithAttachment(String from, String to, String ccList... how to get a matter as it is what am sending..please help me sir if any changes
calling one jsp from another jsp page
calling one jsp from another jsp page  need coding for calling one jsp from another jsp including the xml file.Its urgent
how to pass arraylist data from one jsp to another jsp - JSP-Servlet
how to pass arraylist data from one jsp to another jsp  hi to all iam... the following >XXX/ ? is required to send a value from one jsp to another... to receive all employee id's that are retrived from the database in the first jsp
how to send html email from dreamweaver
how to send html email from dreamweaver  how to send html email from dreamweaver
can u plz help out how to attach file directly & send to a particular mail id
can u plz help out how to attach file directly & send to a particular mail... mini project so if a faculty write all details abt leave & shd send to HOD for approval so i need ur guidance how to tackle this problem
How to display Jfreechart from servlet in jsp web page at specified location
How to display Jfreechart from servlet in jsp web page at specified... to display the chart in web page. I generated the chart using Jfreechart in Servlet which is in image format.plz sir give me the code to display this chart
How to Configure Spring in web.xml file ?
How to Configure Spring in web.xml file ?  How to Configure Spring in web.xml file ?   Hi you need to map the DispatcherServlet in web.xml as <servlet> <servlet-name>dispatcherServlet<
web.xml deployment descriptor - JSP-Servlet
web.xml deployment descriptor  Pls guide about how to write the web.xml file to deploy our web applications that uses JSP, by using tomcat... ... servlet into web.xml file.<!-- Hello World Servlet --><servlet> <
how to call servlet from html page at anchor tag ?
how to call servlet from html page at anchor tag ?  I have a very... to other page and at that place i give url of a servlet but in server that url... it is not working properly. I split and merge template. In the header part of my page i use
Advertisements
 

 

 

DMCA.com