How Can I redirect to Error Page

Hi
I have below requirement to insert records into a table based on entered search criteria. And same time don't want to insert the records if there are already records for same search criteria. For this we have done below steps
1) We have a page with two Date fields.
i) Date From
ii) Date To
2) User enters Date From and Date To values and he press "Go" Button.
We have created a Validation at page level of type "Function Returning Boolean".
We are passing two searching Date From and Date To values to function and returning TRUE if there are already records.
Now when condition is TRUE then we want to redirect to a new Page.
How can we do this?
Appreciate if somebody can help me.
Regards
Kiran Akkiraju

Scott
Here is the actual situation.
Let us assume I want to populate EMP_TMP table from EMP table.
For this on my first page I have two Fields which are
1) From Date
2) To Date
I am going to give some values to these two fields and I press a button.
Basically what I have to do is
INSERT INTO EMP_TMP
SELECT * FROM EMP
WHERE TRUNC(HIREDATE) BETWEEN TO_DATE(:P_DATE_FROM, 'DD-MON-YYYY') AND TO_DATE(:P_DATE_TO, 'DD-MON-YYYY')
But before doing this I want to validate whether for given date range already data exist in EMP_TMP table or not?
If Already data exist then I have to redirect to User to one page which showing some details.
IF data is not there then I have to insert these records into EMP_TMP table and show those records into another page.
I have given this example on EMP table. But I was having similar example here.
Could you please let me know how can I achieve this.
Regards
Kiran Akkiraju

Similar Messages

  • How can we define custom error page in protal application

    How can we define custom error page in protal application, like we define "jsp Error page " in JSPs

    Hi,
    Check these:
    Customization of Portal Runtime Errors and portal standard error codes
    http://help.sap.com/saphelp_nw04/helpdata/en/9a/e74d426332bd30e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ec/1273b2c413b2449e554eb7b910bce7/frameset.htm
    Regards,
    Praveen Gudapati

  • How can I redirect to a page without having Firefox asking me to Allow it?

    Whenever I am on a website and then there is a redirect to another page (e.g. a link or button etc.) Firefox prevents the AUTOMATIC redirect to a page- and I then have to click the Allow tab. Previously -- up to now-- this never happened. I would like it back to the way it was. Thanks

    Perfect - easy. Thanks very much

  • How can I redirect a web page.

    I'm not sure if this is really an iWeb issue but I thought I would start here.
    I have a web site (www.replacementchild.com) that is hosted at a third party (not MobileMe). I have used the Blog tool at the hosting site to build a blog for the site (www.blog.replacementchild.com). I have used a snippet to embed the actual blog content into the blog page of my site (www.replacementchild.com/blog.html).
    Everything works fine except that the web crawlers pick up the actual blog url (www.blog.replacementchild.com) which brings up the unformatted page and there is no way to get the user back to the actual web site.
    I think I need some way to redirect the blog url to the actual web site url but can't figure out how to do that. Any thoughts or suggestions would be appreciated.
    Thanks,
    David

    OT:
    I'm making progress but I'm not quite there yet.
    I have actually installed an SQL Database and my own session of WordPress on my hosting service to get better control over the WordPress blog. I put the redirect statement into the footer of my blog template page and it seems to work but only the first time.
    What I mean by that is that since the blog is in an iFrame on my iWeb page, when I try to navigate on the blog page, it seems to do a second redirect and puts a new frame inside the first frame. To see what I mean, go to www.replacementchild.com and select the blog page then select any link on the blog page and you'll see a second frame is drawn.
    The url for the blog itself (which is being redirected is www.replacementchild.com/blog
    I suspect I've done something wrong. Any suggestions?
    Thanks for all your help.
    David
    Message was edited by: David Schwartzer

  • Urgent....How can i redirect to my jsp page from servlet in init() method..

    How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
    using RequestDispatcher..its not possible..becoz
    RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
    rd.foward(req,res);
    Here the request and response are null objects..
    So mi question can frame as how can i get request/response in servlet's init method()..

    Hi guys
    did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:519)
    at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
    at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    so plz do let me know how to call a jsp in the start up of a servlet.
    Thanks
    Vidya

  • How can i redirect to another JSP page automatically after some event

    I am developing a Tic-Tac-Toe game which can be played between two players who are on two different machines.
    When the first player comes to the Welcome page he will redirected to a Waiting Page when he clicks on the 'Start' button.
    When the second player comes to the Welcome page he will be redirected directly to the Game page, on clicking the 'Start' button.
    So how can i redirect the first player to the Game page after the second player is available for the game.
    And if i want to manage multiple instances of my game how can i do that//
    I am using JSP, javascript and MySQL for developing my project, and I am new to all these tools, but i would still like to carry on with all these only

    This is a bit of a challenge because of the nature of the web. Generally the web is "pull only" meaning that the browser has to initiate any interactions - the server can't push data to the browser if it wasn't asked to.
    The easiest way to solve this is using AJAX via JavaScript to periodically poll the server for any status changes. There are other ways (the Comet protocol is one) but they start to get a bit difficult and are still a bit new and not completely supported in a standards way. And to be honest they are still basically polling though in a more efficient way.
    Are you using a JavaScript framework? Most of the JavaScript frameworks that I've used have built in support for polling in the background. You'd have to have the JSP/servlet side be able to handle these polling requests from the browser and, when another person joins the game, the server indicates that and sends that back to the browser.
    As far as multiple instances I would have the server automatically pair up users as needed. So when the first player arrives he has to wait for another player. When the second player arrives a new game is created for those two players. Now a third player arrives and waits until a fourth player shows up. When player 4 joins another separate game is created. Presumably the conversation between the browser and the server will need to include a "game number" or other unique number so that the server can keep track of the games.

  • How can I close out the page I am working on in safari when error boxes keep popping up?

    How can I close out the page I am working on in safari when error boxes keep popping up?

    What do the error messages say ?

  • Redirect to Error Page Example ?

    Hi,
    Anybody, have an error page working example of how to redirect to error page in 10.1.3, i tried it many ways , followed the ADF Dev Guide PDF page 395 and 396 and no luck.
    where i should write the <error-page> and <dispatcher>REQUEST</dispatcher>
    and <dispatcher>ERROR</dispatcher>
    tags in web.xml
    any tricks in that ???
    thanks in advance

    Hi Frank,
    thanks for replying , unfortunately it did not work , it give me
    "The page cannot be displayed" , it seems that the Exception have been caught but it can't display the error page
    here is my web.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <context-param>
    <description>Makes Security View Handler printing debug messages at runtime</description>
    <param-name>com.groundside.jsf.security.print_debug_messages</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <description>Customize error message shown upon unauthorized access attempt</description>
    <param-name>com.groundside.jsf.security.unauthorized_access_error_messages</param-name>
    <param-value>User is not authorized to perform requested action</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>CpxFileName</param-name>
    <param-value>view.DataBindings</param-value>
    </context-param>
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    </filter>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>JsfAuthenticationServlet</servlet-name>
    <servlet-class>com.groundside.jsf.pagesecurity.authentication.J2eeAuthenticationServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>JsfAuthenticationServlet</servlet-name>
    <url-pattern>/jsfauthentication</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>errorpage.jsp</location>
    </error-page>
    </web-app>
    here is how i make the exception
    public void commandButton1_action() throws Exception {
    throw new java.lang.Exception();
    here is the code of the page that have the button that throws the exception
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"
    import="java.lang.Exception"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <f:view>
    <afh:html binding="#{backing_untitled3.html1}" id="html1">
    <afh:head title="untitled3" binding="#{backing_untitled3.head1}" id="head1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    </afh:head>
    <afh:body binding="#{backing_untitled3.body1}" id="body1">
    <h:form binding="#{backing_untitled3.form1}" id="form1">
    <af:commandButton text="commandButton 1"
    binding="#{backing_untitled3.commandButton1}"
    id="commandButton1"
    action="#{backing_untitled3.commandButton1_action}"/>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_untitled3--%>
    here is the errorpage.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <f:view >
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>untitled4</title>
    </head>
    <body>eeeeeror</body>
    </html>
    </f:view>
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_untitled4--%>
    by the way , in the error page if i change the f:view to f:subview , the page itself will not run
    thanks very much for your time.
    Message was edited by:
    bassem.farouk

  • How can I make a intro page for my website, then after the intro has run make the page automatically change to my we site home screen

    how can I make a intro page for my website, then after the intro has run make the page automatically change to my website's home screen

    You can do this using a meta refresh but the problem is you have to add it to the html file for the page very time you publish changes.
    A better way is to create a splash page and upload it to the server outside of the folder produced by iWeb. Example HERE.
    The meta refresh is added to the head section of the html file...
    <meta http-equiv="refresh" content="32;url=http://www.domain.about.com/Page-Name.html">
    The delay time in seconds is marked in blue and the URL to the redirect page is in red.

  • OSX sometimes places 31 character limit on file names. How can I get this error to stop?

    This error notice doesn't make sense, since many of my file names exceed 31 char. This error message pops up when saving documents, esp. web pages. As a consequence, OSX will refuse to let me save the file, until I shorten the name and so remove informative identifying features of the file name. But most of the time, OSX is perfectly happy to save files with names longer than 31 char. How can I get this error notice and block to turn off?

    I have also seen this issue it occurs regularly when transferring word documents files from my Macbook Pro running OSX 10.5.8 to my iMac running 10.9.4.
    My iMac HD should be formatted to factory standards as well since I have not mucked around with it since I bought it.

  • How can i print just one page of photo book without printing the entire book

    how can i print just one page of photo book without printing the entire book

    Jim,
    Take heart.  We can help.
    First turn on page view so you can see how the content of your sheet fits on the page(s).  A Numbers document contains sheets (listed on the left) which in turn contain tables, charts, text, and graphics.  Select the sheet you want to print on the left, then enable page view by selecting the menu item:
    "View > Show Print View":
    Now you should see your content and how it fits on one, or more, pages.  If thie content is too big for one page use the controls and the bottom left of the window to expose the sheet controls:
    Here a table is too big to fit on one page:
    slide the "Content Scale" slider so the content fits:

  • When I update my nano ipod I get an error message "User ipod cannot be updated.  The disk couldnot be read from or written to."   How can I overcome this error message.

    In the iTunes window, when I update my nano ipod, I get an error message "User ipod cannot be updated.  The disk could not be read from or written to."   How can I overcome this error message.

    Hello there dilip77707,
    It sounds like you are getting this error message that your iPod cannot be read from or written to when you are trying to update your iPod Nano. I recommend the troubleshooting from the following article to help you get that resolved. Its pretty straight forward, just start at the top and work your way down as needed:
     'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • How can I view as "single page continuous" in full screen mode?

    how can I view as "single page continuous" in full screen mode?
    preferences->page display:
    preference->accessbility:

    Not possible.

  • How can i stop an error message that comes up when i am using word? the error message is "word is unable to save the Autorecover file in the location specified. Make sure that you have specified a valid location for Autoreover files in Preferences,-

    how can i stop an error message that comes up when i am using word? the error message is "word is unable to save the Autorecover file in the location specified. Make sure that you have specified a valid location for Autoreover files in Preferences,…"

    It sounds like if you open Preferences in Word there will be a place where you can specify where to store autorecover files. Right now it sounds like it's pointing to somewhere that doesn't exist.

  • How can I make a decorative page border in Pages?

    How can I make a decorative page border in Pages?

    Hi Janet,
    I suppose that you are asking how to include a decorative border of your design into a pages document. How you design that border is rather out of the range of these discussions. So, let's say that you have a graphic that approximates a picture frame and has the required dimensions to frame your content.
    If you want to have the graphic appear on every page, Drag or Insert > Choose, to incorporate your design in to the document. The position it as you want it, and then Arrange > Send to Background and Format > Advanced > Move Object to Section Master.
    If there is more than one section in your document, there may be more considerations, but if you do this at the outset in the creation of your document, the design of the first section will flow to subsequent sections.
    Regards,
    Jerry

Maybe you are looking for

  • Scroll Bar state Problem

    I'm trying to implement a new control that needs a scrollbar, worked fine until I tried to collapse few properties.. The scroll bar must appear only if the BlockOffset (which is an integer that draws properties, and if the last property was drawn bel

  • Workitem cannot change in Inbox SBWP

    Hi All, I used the workflow WS10000051 and WS10000052. I have customized the text of Workitem in SBWP (add the posting date). This workflow is triggered when parking. If I parked and completed the invoice document with posting date 14.11.2011. Then t

  • Since adding Yosemite, my bookmarks bar shows bookmarks from a different computer (my work computer). How do I fix this?

    I just upgraded to Yosemite, and now I see that my bookmarks bar in Safari has all of the content from my work computer. Same with my reading list. Eeek! I want to keep these separate.  How do I fix this?

  • New aliases crash apache

    Looking to see if any of you folks have come across this, every time I add an alias via server admin (running server 10.4.10 and server admin 10.4.7) Apache crashes and I have to copy over the http.conf with a back up. Though this is a easy fix its k

  • Satellite Pro 4600 Battery Lamp Flashing

    The amber battery light is flashing constantly and the battery will not charge or power off of the battery. I have replaced the battery but still have the same problem. Is there an internal power board or similar that may be faulty. Any help apprecia