Problems with the tag error-page in web.xml

hi all, here is my code in my web.xml:
<error-page>
<exception-type>java.sql.SQLException</exception-type>
<location>/ex.html</location>
</error-page>
it seems not to work, because my JavaBean where its the code to connect to my database and execute a query has an error i made it at purpose to see if the error page works, my JavaBean reports an error: column name not valid but the error-page didn�t work, i use a servlet which instantiates my JavaBean and then my servlet redirects to a JSP, obviouslly if an error occurs my servlet didnt redirect to any place, here is the code into my JavaBean, if anyone could help me i really appreciate it...
public BeanLista seleccionaCliente()
int nBandera = 0;
BeanList lp = new BeanList();
String cadena = "SELECT CODCLI, APEPATI FROM TESO.CLIENTE WHERE CODCLI like '2001120%' ";
try
context = new InitialContext();
pool = (DataSource)context.lookup("jdbc/PRUEBADS");
catch (NamingException ne)
ne.printStackTrace();
System.out.println("No se ha podido efectuar el Pool de Conexiones");
try
cc = pool.getConnection();
ResultSet rs = cc.createStatement().executeQuery(cadena);
cc.close();
while(rs.next())
BeanPrueba bp = new BeanPrueba();
bp.setCodcli(rs.getString(1));
bp.setApepat(rs.getString(2));
lp.add(bp);
return lp;
}catch(SQLException sql){
System.out.println("A ocurrido un error de SQL");
System.out.println("Error de SQl capturado como : "+sql.getMessage());
//sql.printStackTrace();
return lp;
}

Can it be because you are catching your exception? Why don't you try throwing the same exception in the catch block and let the server handle it for you.
Just a guess... Hope it works.
VM

Similar Messages

  • Problems with error-page in web.xml and page caching

    Having a few problems with error pages and web.xml with browsers caching the error pages and strange errors coming out of weblogic.servlet.intenal.WebAppServletContext
    I'm trying to set a web app up so that all http errors and all exceptions are routed thruogh predefined resources. For now, I'm simply send 400 errors to 400.html and the ServletException, IOException and RuntimeException to respective html pages.
    What I'm finding is that the error codes work fine but the exceptions are only be routed to the correct error page for the first call to the servlet after server restart.
    So for example, I have my servlet throwing a ServletException as a test case. The weblogic server log shows that ServletException is thrown, and the correct error page for ServletExceptions is shown.
    If I change the Servlet code to throw IOException in place of SevletException, the weblogic.log shows that IOExceptyion is being thrown (so the servlet has deployed successfully), however the Servletxception error page is shown on the browser.
    I'm using IE6 and I've changed the setting such that a new page is requested every time using the tools-internet options-temp internet files-settings option to "check for new versions of stored pages: Every visit to the page".
    Despite this, the servlet exception error page still appears.
    If you clear the cache from the temp intenet files->delete files IE option, the correct errror page will be shown so it appears that the browser cache is being used after all.
    everytime I delete the temp intenet files I get the correct error page on the first request after but then not after that.
    I have implemented the service method for this test to throw the exceptions - does this make a differecne?
    As a test, I have moved the imlpementation to the doGet method instead bu I now get a strange eror from weblogic comlpaining about an arrayOutOfBoundsException because eror codes in the web.xml are not supported! - see error above.
    Any help is appreciated

    After further investigation: -
    There are no problems with error pages based on error codes, only error exceptions.
    As a test case, I have a service method in a servlet throwing either one of the three exception types that servlets can throw (Runtime, Servlet & IO) the following rules apply. The exception to be thrown is hardcoded and is changed and the web app rebuilt each time. The correct web.xml has been deployed to the app server (checked through console). the webapp is being redeployed correctly - this can be seen in the weblogic log, where the correct exception is reported.
    I am using WLS 8.1, Servlet 2.3, JDK 1.4.1_02
    In all cases, the weblogic log reports that the servlet is throwing the exception as expected.
    Despite having set error-page for exception javax.servlet.ServletException, the exceptions are diverted to the error page that has been set up for http error code 500
    The error page for ServletException is therefore never reached.
    I have the browser set to request pages every time it is asked.
    Once the servlet has thrown an IOException, the only way to get the browser to report an IO or Runtime exception error-page is to clear the browser cache. Restarting the server has no effect.
    Once the servlet has responded with ANY exception, it is not possible to get it to report a ServletException (which is incorrectly reported as a 500 anyway) unless the cache is cleared. Restarting the server has no effect.
    In the case where the servlet throws ServletException, it has no root exception. The servlet 2.3 spec states that if ServletException is thrown but cannot be found in the error pages, the root excpetion will be extracted and the error page list traversed again. Knowing that the RuntimeException error page is correct shown when RuntimeException is throwm, I have nested this inside the ServletException, however error page for http error 500 is still shown.
    I don't believe this is a WLS 8.1 problem, as the console shows that the correct exception is thrown each time. this is backed up by the fact that the correct exception page is thrown when the cache is cleared regardless of what exception was previousdly thrown by the servlet. This excludes ServletException which is always incorrectly thrown as a 500.

  • Problem displaying error page of web.xml when using JSF, Ajax4jsf

    Hi,
    My application is using MyFaces, RichFaces and Ajax4jsf. When i try to display error page configured in web.xml, i am getting exception "Error while processing error page".
    my web.xml contents are as follows:
    <?xml version="1.0"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 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">
    <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>faces</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>
    org.apache.myfaces.webapp.filter.ExtensionsFilter
    </filter-class>
    <init-param>
    <description>
    set the size limit for uploaded files. Format: 10 - 10 bytes 10k
    - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>100m</param-value>
    </init-param>
    <init-param>
    <description>
    Set the threshold size - files below this limit are stored in
    memory, files above this limit are stored on disk.
    Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>Seam Redirect Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
    </filter>
    <filter>
    <filter-name>KTServletFilter</filter-name>
    <filter-class>com.kenexa.core.system.KTServletFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>Seam Redirect Filter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>KTServletFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <!-- seam Listeners -->
    <listener>
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
    </listener>
    <listener>
    <listener-class>com.kenexa.kr.web.KRServletListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsf</location>
    </error-page>
    </web-app>
    As per the configuration, when exception is thrown out of the application, container tries to display systemError.jsp page. If we want to include the JSF tags in systemError.jsp page, the request should pass through FacesServlet, so in the <error-page> <location> tag systemError page is specified with the extention systemError.jsf though it's actual extention is .jsp
    When exception is thrown from the application container invoke the error page but, while rendering systemError.jsf page exception is thrown saying "Exception processing error page "systemError.jsp" "
    To solve this problem i've gone through several forums, materials.
    In one forum a guy said, JSF1.1 spec has some problem in displaying error pages. To solve this don't write <f:view> tags in the error page, use <f:subview> intstead. By reading this, i again changed the contents of systemError.jsp page replacing <f:view> by <f:subview>. But the error is still repeating.
    Finally what i found is, when we use Ajax4jsf in the application, its AjaxViewRender class is throwing exception while rendering error pages configured through web.xml.
    So what i did is i changed error page extention from .jsf to .jsp in the <location> tag. Now jsf won't come in the picture and remove JSF related tags from the systemError.jsp page.
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsp</location>
    </error-page>
    Any comments are welcome----------------------------------------------------------------

    I too iam facing the same problem could you advise if you have found any solutions
              -Ram

  • I am trying to get the free trial to cc but it said there seems to be a problem with the files (Error code: 205)

    I am trying to get the free trial to cc but it said there seems to be a problem with the files (Error code: 205) please help

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Using error pages in web.xml

              Having a few problems with error pages and web.xml with browsers caching the error
              pages and strange errors coming out of weblogic.servlet.intenal.WebAppServletContext
              I'm trying to set a web app up so that all http errors and all exceptions are
              routed thruogh predefined resources. For now, I'm simply send 400 errors to 400.html
              and the ServletException, IOException and RuntimeException to respective html
              pages.
              What I'm finding is that the error codes work fine but the exceptions are only
              be routed to the correct error page for the first call to the servlet after server
              restart.
              So for example, I have my servlet throwing a ServletException as a test case.
              The weblogic server log shows that ServletException is thrown, and the correct
              error page for ServletExceptions is shown.
              If I change the Servlet code to throw IOException in place of SevletException,
              the weblogic.log shows that IOExceptyion is being thrown (so the servlet has deployed
              successfully), however the Servletxception error page is shown on the browser.
              I'm using IE6 and I've changed the setting such that a new page is requested every
              time using the tools-internet options-temp internet files-settings option to "check
              for new versions of stored pages: Every visit to the page".
              Despite this, the servlet exception error page still appears.
              If you clear the cache from the temp intenet files->delete files IE option, the
              correct errror page will be shown so it appears that the browser cache is being
              used after all.
              everytime I delete the temp intenet files I get the correct error page on the
              first request after but then not after that.
              I have implemented the service method for this test to throw the exceptions -
              does this make a differecne?
              As a test, I have moved the imlpementation to the doGet method instead bu I now
              get a strange eror from weblogic comlpaining about an arrayOutOfBoundsException
              because eror codes in the web.xml are not supported! - see error above.
              Any help is appreciated
              

    Have you tried setting pragama no cache?
              <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
              cheersmbg"Aaton" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Having a few problems with error pages and web.xml with browsers caching
              the error
              > pages and strange errors coming out of
              weblogic.servlet.intenal.WebAppServletContext
              >
              > I'm trying to set a web app up so that all http errors and all exceptions
              are
              > routed thruogh predefined resources. For now, I'm simply send 400 errors
              to 400.html
              > and the ServletException, IOException and RuntimeException to respective
              html
              > pages.
              >
              > What I'm finding is that the error codes work fine but the exceptions are
              only
              > be routed to the correct error page for the first call to the servlet
              after server
              > restart.
              >
              > So for example, I have my servlet throwing a ServletException as a test
              case.
              > The weblogic server log shows that ServletException is thrown, and the
              correct
              > error page for ServletExceptions is shown.
              >
              > If I change the Servlet code to throw IOException in place of
              SevletException,
              > the weblogic.log shows that IOExceptyion is being thrown (so the servlet
              has deployed
              > successfully), however the Servletxception error page is shown on the
              browser.
              >
              > I'm using IE6 and I've changed the setting such that a new page is
              requested every
              > time using the tools-internet options-temp internet files-settings option
              to "check
              > for new versions of stored pages: Every visit to the page".
              >
              > Despite this, the servlet exception error page still appears.
              >
              > If you clear the cache from the temp intenet files->delete files IE
              option, the
              > correct errror page will be shown so it appears that the browser cache is
              being
              > used after all.
              >
              > everytime I delete the temp intenet files I get the correct error page on
              the
              > first request after but then not after that.
              >
              > I have implemented the service method for this test to throw the
              exceptions -
              > does this make a differecne?
              >
              > As a test, I have moved the imlpementation to the doGet method instead bu
              I now
              > get a strange eror from weblogic comlpaining about an
              arrayOutOfBoundsException
              > because eror codes in the web.xml are not supported! - see error above.
              >
              > Any help is appreciated
              

  • Problems with jsp-error page in web.xml

    Hello everybody, I have a confusing problem concerning the use of jsps as error pages for 404-errors.
    I inserted the following lines in my web.xml file:
    <error-page>
    <error-code>404</error-code>
    <location>/personal404.jsp</location>
    </error-page>
    The problem is: when an 404 occurs, instead of showin the personal404.jsp, the browser tells me that it tries to download a file which it can't (it tries to download the mis-spelled file). When I try to redirect the 404 to a static html-page, as in
    <error-page>
    <error-code>404</error-code>
    <location>/personal404.html</location>
    </error-page>
    everything works fine.
    Please, does anybody have any idea or suggestion, what I am doing wrong?
    Thanks in advance,
    Sebastian

    Hi Ivan,
    I tried it, but there wasn't any difference.
    I'll try to explain in more detail what happens:
    Imagine my application has the following root-path
    http://myServerName:port/mainRoot/
    When I try the following URL:
    http://myServerName:port/mainRoot/pageThatDoesNotExist.jsp, the browser tells me, it tries to download the file pageThatDoesNotExist.jsp from myServerName and that it can't find that file.
    The same happens, when I type http://myServerName:port/mainRoot/pathThatDoesNotExist/pageThatDOESExist.jsp, except that the browser tries to download the file pageThatDOESExist.jsp which (again) it can't.
    I have located the files 404.jsp and 404.html in the same directory, so I don't think this is a path-related problem, because everything works fine, when I specify the 404.html as the target error page (i.e. the browser displays the 404.html when I type the URLs shown above).
    I don't know if I'm making this clear, but maybe you get the idea.
    Sebastian

  • Defining error-page in web.xml

    Hi,
    We are using oracle 9iAS with oc4j container. I have defined error-page for redirecting 404 error-code in web.xml. It works fine with all browsers except internet explorer 5.5 and higher, IE ignores and displays 'page cannot be displayed' page. Can anybody help me on this, but on the otherhand if I send response.sendError(404);, it recognizes and invokes page.
    Thanks for the advice

    Hi,
    Thanks for your reply to me.
    I am doing something wrong but I can't find it.
    I add the following code to my WEB-INF/web.xml file under the web-app tag, using jdeveloper.
    <error-page>
    <error-code>404</error-code>
    <location>notFound.html</location>
    </error-page>
    then all of my jsp's in my project have this error message when I buit them.
    -Error(1): oracle.xml.parser.v2.XMLParseException: Invalid element 'error-page' in content of 'web-app', expected elements '[taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    Can yo help me???
    thanks in advence...

  • Here are the instructions on how to fix the newest update problem with the .dll error message:, Here are the instructions on how to fix the newest update problem with the .dll error message:

    Go to My Computer, Uninstall Programs, and uninstall in this exact order :
          Itunes
          Apples Software Update
         Apple Mobile Device Support
         Bonjour (my system required a reboot on this one)
         Apple Application Support
    Reboot your computer, go to the official Itunes website (make sure it's the Apple Itunes Website and not some other one!), and reinstall Itunes. 
    I got the same .dll error message after the reinstall, but my Itunes was downloaded successfully and I was able to Sync my phone. : )
    Good luck to you and God Bless! 
    (Sad that we have to come to the Discussion Forum to figure this all out instead of Apple taking care of their business and helping us out, huh?)

    Someone else said they did a system restore to a previous update, and then a java update and that worked for them, saying they were going to stick with the earlier version of itunes until they get the bugs out of the new one.  I t tried restores and that didn't work for me either, but maybe it will work for you.  Good luck and I hope you get it working soon.. 

  • Problems with the html custon page

    Hi, i add the parameter connectionDisallowedURL ( connectionDisallowedURL = /custom_page/custom_page.htm) to my formsweb.cfg. This one, have the name of the folder where i put the html custom page and all the images (.gif). This folder is located in /ORACLE_HOME/Apache/Apache/htdocs. When i disabled the new user connections (     allowNewConnections=false) the Application Server redirect to my custom page, but not display the images.
    Anyone can help me?

    Ok!!!... I resolved the problem. I moved the images to /Apache/Apache/hdocs/ohs_images
    thx,

  • Problem with the tag color in the richText

    Morning,
    I want to modify by html the color of a word in a richtext field.
    I know I can use the tags <b>bold</b>, <i>italic</i> in the richtext Field for one word. Which tag to use to change the color?
    Could you help me please?
    Thanks by advance.
    Josijosi

    Here is an example of the sting "This is a test " where the word test is in a different color.
     <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.7.0.0" xfa:spec="2.1">
       <p style="margin-top:0pt;margin-bottom:0pt;text-valign:middle;font-family:'Myriad Pro';font-size:10pt;text-decoration:none">This is a<span style="xfa-spacerun:yes"> </span>
        <span style="color:#ff0000">test</span>
       </p>
      </body>
    Paul 

  • error-page in web.xml not working

    In my web.xml I have
    <error-page>
    <exception-type>java.lang.NullPointerException</exception-type>
    <location>/error.jsp</location>
    </error-page>
    I checked the page works by doing a /context/error.jsp and
    the page displays fine (it is a simple jsp page).
    I hit a struts action that gives me this in the std output.
    06/29 10:48:24 error
    [1]java.lang.NullPointerException
    at
    com.pearson.gs.cms.business.LoginService.verifyPassword(LoginService.java:232)
    at
    com.pearson.gs.cms.action.LoginAction.performCMSAction(LoginAction.java:92)
    at
    com.pearson.gs.cms.action.BaseCMSAction.execute(BaseCMSAction.java:48)
    at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    [0]javax.servlet.ServletException
    at
    org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
    at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    I get a 500 error page instead of my /error.jsp page.
    I tried adding
    <error-page>
    <error-code>500</error-code>
    <location>/error.jsp</location>
    </error-page>
    but that doesn't work either.
    JRun 4.0
    Updater 6
    JDK 1.4.2
    Struts 1.2.8
    Any ideas what to try?

    a. Override your skeletons error.jsp to forward/redirect to your page.
    or
    b. If you primarily use pageflow portlets Define a shared flow which has an exception handling method and direct it to your page. Reference the shared flow in each of your controllers (i think global.app is deprecated in 10 otherwise you could do this there). this lets you log some additional information, plus gives you the added flexibility of dealing with different exception types
    or
    c. Override the path to error.jsp in your portlets properties (havent tested)
    Note if you are using servlets etc you still need your web.xml java.lang.Exception entry. The reason it doesnt get picked up is because the portal framework is handling the exception
    Edited by: deepshet on Dec 22, 2008 8:12 PM

  • Display error page using web.xml error-page

    I need to dispaly error page when IOException in thrown. How to do that with web.xml error-page tag?
    start.jsf
    public String doButton1Action() throws IOException{
              String value = getText1().getValue().toString();
              try {
                   File f = new File(value);          
                   InputStream in = new FileInputStream(f);
              } catch (IOException e) {
                   throw new IOException();
              return "success";
         }I have this in web.xml:
         <error-page>
              <exception-type>java.io.IOException</exception-type>
              <location>/ioerror.jsp</location>
         </error-page>

    I tried that earlier but then I get error just printed to console and HTTP 500 - Internal server error -page, bubt not my errorPage.
    [26.1.2007 21:19:16:543 EET] 00000038 jsf           E com.sun.faces.lifecycle.InvokeApplicationPhase execute #{pc_Start.doButton1Action}: javax.faces.el.EvaluationException: java.io.FileNotFoundException: c:\temp\ghostfile.jpg
                                     javax.faces.FacesException: #{pc_Start.doButton1Action}: javax.faces.el.EvaluationException: java.io.FileNotFoundException: c:\temp\ghostfile.jpg
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:79)
         at javax.faces.component.UICommand.broadcast(UICommand.java:312)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:298)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:412)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    Caused by: javax.faces.el.EvaluationException: java.io.FileNotFoundException: c:\temp\ghostfile.jpg
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:131)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
         ... 25 more

  • Error-page in web.xml: error page doesn't show

    Hi,
    I added the following block in web.xml file:
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/ESU9098J.jsp</location>
    </error-page>
    When I force an exception, I get a pop-up for downloading a file named EAC0002Se04379bf (where EAC0002S is the name of the servlet in which the exception happens). Can anybody help?
    I use OC4J 10221 on Win Xp with JDK 1.3.1
    Thanks
    Jean

    This is due to a erroneous MIME type mapping in one of the OC4J config files.
    To resolve it:
    Modify mime.types under $OC4J_HOME/config by removing the line application/jsp (for some unknown reason, there are two of them in the file) or renaming the
    word jsp into some other name, ex.:
    "application/jsp jsptemp"
    for both the 2 lines. Then add "jsp" to the end of the "text/html" line, ex.:
    "text/html html htm jsp".
    This will make oc4j use text/html in the response when a jsp file is being processed that's why it's very important to eliminate application/jsp by renaming jsp or simply deleting the line.
    We fixed this error in the config file in a later release.
    cheers
    -steve-

  • Problems with the xsl element ---- xsl:output method="xml"/ ----

    Hy, my problem is the next, I am trying to read a xml file and transform it in itself but when I do with XSLT, Internet Explorer doesnt show a xml file, just show me the text nodes of the xml file. I have the element <xsl:output method="xml"/>" in the xsl file but I dont Know what Iam doing wrong.
    The next code is from the xsl file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:template match="/">
    <xsl:copy-of select="catalog"/>
    </xsl:template>
    </xsl:stylesheet>
    The next code is from the xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Edited with XML Spy v2007 (http://www.altova.com) -->
    <?xml-stylesheet type="text/xsl" href="PlantillaXSL.xml"?>
    <catalog dni="4546545">
         <cd numero="2" id="5" color="red">
              <title>Empire Burlesque</title>
              <artist>Bob Dylan</artist>
              <country>USA</country>
              <company>Columbia</company>
              <price>10.90</price>
              <year>1985</year>
         </cd>
    </catalog>
    The result in internet explorer is:
    Bob Dylan USA Columbia 10.90 1985

    All right. I asked because it's unusual to use the ".xml" extension for an XSL file, so I thought it might be an error. But there's nothing wrong with that.
    Next debugging step: is that XSL file actually being used? Insert some debugging code in it so that you can tell.

  • JSP error page in web.xml

    I had a JSP error page spcified through the attribute isErrorPage and referenced in the other JSPs through the errorPage attribute, and everything worked well.
    Then, I decided to specify that errorpage in the web.xml instead :
    <error-page>
      <exception-type>java.lang.Throwable</exception-type>
       <location>/error.jsp<location>
    </error-page>The page is found and everythiing, except that I don't get the Throwable info in the implicit exception object in error.jsp. There's nothing in exception.getMessage().
    Anybody knows why and the solution to this ?

    The JSP spec lets you get the Throwable through the javax.servlet.jsp.jspException request attribute.
    The servlet spec uses the javax.servlet.error.exception request attribute for the same thing.
    Therefore, because of the above unfortunate mismatch, when you switched to a global error page, you could no longer get the Throwable through the implicit exception obj, because the later retrieves Throwable from the javax.servlet.jsp.jspException request attribute.
    The solution would be to retrieve javax.servlet.error.exception from the request yourself in your error page.

Maybe you are looking for