JSP Location

I have deployed ear file containing a war and an ear file. Both deploy correctly in 9.0.4. The jsp pages interact with some EJBs, nothing special. I access the pages through http://localhost:8888/test/test.jsp
but when I access them from an outside machine I get a 404. I have tried the IP and server name like
http://sceniexp2:8888/test/test.jsp
http://141.255.21.1:8888/test/test.jsp
When I access it from a different machine besides the server in the logs I get the following: Why is it going to the default web app?
03/12/22 14:39:46 defaultWebApp: JspServlet: unable to dispatch to requested page: java.io.FileNotFoundException: C:\oc4jdev\j2ee\home\default-web-app\test\test.jsp (The system cannot find the path specified)
     at java.io.FileInputStream.open(Native Method)
     at java.io.FileInputStream.<init>(Unknown Source)
     at oracle.jsp.provider.JspFilesystemResource.fromStream(JspFilesystemResource.java:177)
     at oracle.jsp.provider.JspFilesystemResource.fromReader(JspFilesystemResource.java:193)
     at oracle.jsp.runtimev2.JspPageCompiler.fromReader(JspPageCompiler.java:472)
     at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:359)
     at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:260)
     at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:443)
     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:541)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:303)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:293)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:602)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:308)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
     at java.lang.Thread.run(Unknown Source)

I am having the same problem
using oc4j standalone 9.0.4.0.0
have you solved it by now?
Could could you help me out?
I have deployed the app in all possible ways, checked out all the rellevant files but cannot figure out why it starts searching for my apps files in the default-web-app directory...
thanks

Similar Messages

  • JDeveloper's compiled JSP location in a .war file

    When I choose to build a .war file in JDeveloper 10.1.2 that contains the .JSP files, it sticks the compiled jsps in WEB-INF/classes/.jsps. To get the app server to properly recognize the precompiled JSPs, they need to be located in the WEB-INF/classes directory.
    How can I configure JDeveloper to put the compiled JSPs in WEB-INF/classes?

    JSPs in a web application are neither in WEB-INF/classes or WEB-INF/classes/.jsps directory.
    JSPs are in the top level directory.
    Servlets are in the WEB-INF/classes directory.

  • EBS R12.1.3 with Apex 4.1.1 Calling a JSP

    I am running Apex 4.1.1 using EBS 12.1.3. THe EBS instance is a two tier system (web/application server on a different machine to the database). A glassfish server has been installed on the same server as EBS web server(same linux owner for both) and the Apex listner is running inside glassfish.
    I am wanting to call a JSP(located on the web) server from Apex, to get a list of files from a given directory(on the web server) and display the files in the browser using using apex. In other word, a user click on a button/tab... it runs a JSP that returns a list of the files in a given directory and displays them in a tabular format within Apex.
    Can this be done, if so how ?
    Thanks

    Hi Pete,
    I'm working on integrating EBS R12 and APEX 4.1.1, I had followed the Extending Oracle E-Business Suite Release 12 using Oracle Application Express white paper. In the white paper its said that Create Authentication Scheme From scratch, but there is no option to create application scheme from the scratch,but the page showing like this
    When you create a new authentication scheme, you have several options. Most let you reuse implementations that already exist in your application or in other applications within your workspace. There are even some pretested schemes you can copy to get you up and running immediately.
    Create Scheme:     
    Based on a pre-configured scheme from the gallery
    As a copy of an existing authentication scheme
    You may create a new authentication scheme by making a copy of one in this application or in another application in your workspace. Then you can edit the new scheme, changing the name to what you prefer and changing any of the settings to meet your requirements.
    Alternately, you may create a new authentication scheme from scratch by stepping through the wizard and specifying all of the parameters.
    How can we create Authentication Scheme using the wizard but there is no option to create via wizard.
    Kindly help me because i had no idea and stuck up at this point, is any document you have kindly share with me it would be grateful...
    Thanks,
    Karthik

  • Error when requesting JSP page

    We have just finished getting our environment set up. We are running
    WebLogic 4.5.1 sp7 on a Sun server, and are frontending it with IIS 4.0
    SP6a using the iisproxy.dll WebLogic plugin.
    We can get things working for a while, but eventually, we get the
    following error in the NT event log when requesting the first JSP on our
    site:
    "Out of process application '/LM/W3SVC/1/Root' terminated unexpectedly"
    The Web server is still up, it's just when the JSP page is called that
    we get "Page can not be displayed" errors. Any HTML pages come up just
    fine. To fix the problem, we just stop and restart the Web Publishing
    service.
    Has anyone seen this error or does anyone know what events cause this
    problem?
    Thanks,
    -Mike

    There is a big difference between this;
    http://www.mydomain.com/blabla
    and this;
    http://www.mydomain.com/blah.jsp
    blabla - this is the name of the Web application. When you reference this Web application name Tomcat will check the welcom file descriptor and redirect for that web application.
    blah.jsp - is the name of a JSP page. When you reference this page the way you did above, you are not stating where the JSP page is located. It would be locatied in the "http://www.mydomain.com/blabla/blah.jsp" location.

  • Import of a JSP

    Hi;
    How to retreive the content of a external JSP located in : C:/jsp/F1.jsp in another JSP located in the Webapp directory: ../WEB-INF/webapps/jsp/F2.jsp ?
    Regards;

    Hi;
    Exactly but with "include" when I build a new *.war it erases the F1.jsp so I must to copy F1.jsp each time I build new war file.
    Regards;

  • RE:How to call a constructor or a .class file using jsp?

    try like this:
    <%@page import="folder_name.*%>
    <jsp:useBean id="info" class="folder_name.class_name"
    />
    now use your code:
    <%info.method_name()%>But my GetInfo class reside in this following folder!!!
    GetInfo.class location:
    D:/jakarta-tomcat-4.1.24/webapps/chart/WEB-INF/classes/GetInfo.class
    Configuration.jsp location
    D:/jakarta-tomcat-4.1.24/webapps/chart/Configuration.jsp
    This effectively means that I do not have a folder!!
    So I put in this
    <jsp:useBean id="info" class="GetInfo" />
    <%info.SetElement("VISUAL");
    info.startXML();
    String Visual = info.ReturnVISUAL();%>
    <%=Visual%>
    and get the following error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] D:\steve\jakarta-tomcat-4.1.24\work\Standalone\localhost\chart\Configuration_jsp.java:60: cannot resolve symbol
    [javac] symbol : class GetInfo
    [javac] location: class org.apache.jsp.Configuration_jsp
    [javac] GetInfo info = null;
    [javac] ^
    [javac] D:\steve\jakarta-tomcat-4.1.24\work\Standalone\localhost\chart\Configuration_jsp.java:62: cannot resolve symbol
    [javac] symbol : class GetInfo
    [javac] location: class org.apache.jsp.Configuration_jsp
    [javac] info = (GetInfo) pageContext.getAttribute("info", PageContext.PAGE_SCOPE);
    [javac] ^
    [javac] D:\steve\jakarta-tomcat-4.1.24\work\Standalone\localhost\chart\Configuration_jsp.java:65: cannot resolve symbol
    [javac] symbol : class GetInfo
    [javac] location: class org.apache.jsp.Configuration_jsp
    [javac] info = (GetInfo) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "GetInfo");
    [javac] ^
    [javac] 3 errors
    at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
    at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
    at ConfigurationServlet.service(ConfigurationServlet.java:80)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    at java.lang.Thread.run(Thread.java:536)
    then I put in this code:
    <%@page import="GetInfo.*"%>
    <jsp:useBean id="info" class="GetInfo" />
    <%info.SetElement("VISUAL");
    info.startXML();
    String Visual = info.ReturnVISUAL();%>
    and get the following error:
    org.apache.jasper.JasperException: /Configuration.jsp(19,21) equal symbol expected
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
    at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:169)
    at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:136)
    at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:149)
    at org.apache.jasper.compiler.ParserController.figureOutJspDocument(ParserController.java:254)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:173)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
    at ConfigurationServlet.service(ConfigurationServlet.java:114)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    at java.lang.Thread.run(Thread.java:536)

    Okay, Tomcat doesn't like it when you don't use packages in the WEB-INF/classes folder, don't ask me why, it's just the way it is.
    Rewrite your class so it exists in a package:package myclasses;
    public class GetInfo { ... }Compile it and put it in the WEB-INF/classes directory so you should have:
    WEB-INF/classes/myclasses/GetInfo.class
    Your import statement should be:<%@ page import="myclasses.GetInfo" %>and continue coding as before.
    Let me know how it goes.
    Anthony

  • Using href in a JSP

              Hi there
              I'm using to call KopfDatenJSP.jsp from another JSP, located in the package
              TD/filename.jsp
              DCL is the name of the application.
              WLS is able to find KopfDatenJSP.jsp but its images are not displayed.
              why?
              could anyone help me?
              thanks

    you need to refer to your images from the root. E.g. if your application is
              'app' and it has images in it's 'image' subdirectory, you neet to set src to
              '/app/images/image.jpg'.
              "Mathias" <[email protected]> wrote in message
              news:3ad5c226$[email protected]..
              >
              > Hi there
              > I'm using > to call KopfDatenJSP.jsp from another JSP, located in the package
              > TD/filename.jsp
              > DCL is the name of the application.
              > WLS is able to find KopfDatenJSP.jsp but its images are not displayed.
              > why?
              >
              > could anyone help me?
              >
              > thanks

  • Importing classes in jsp

    In jakarta tomcat servlet engine, in which directory should I put a class file so that i can call it from a jsp located in /examples/jsp or where should I put the class file so that it can be called using <jsp:useBean> tag

    In jakarta tomcat servlet engine, in which directory
    should I put a class file so that i can call it from a
    jsp located in /examples/jsp or where should I put the
    class file so that it can be called using
    <jsp:useBean> tagI don't use Tomcat at the moment, but I think it's the same with resin and other stuff.
    You have a path called "/WEB-INF/classes" somewhere under your tomcat root. This is the location where you should store your classes and packages. The servers using only this path to locate classes, not your classpath.
    I hope, this helps.

  • Need Information on JSP to JSP Communication

    I am working in a Banking domain. I got a problem where i need to communication One JSP located in One SERVER to Another JSP Located in ANOHTER SERVER. I am not able to find the solution. Some Body Please Help me out.
    Gopi

    See if you dont know anything about the JSP in another Server, it would be difficult for you to achieve what you are trying to do.
    Let us say u have a JSP named 1.jsp and u need to connect to 2.jsp in another Server. Teh Problem is you might not know what are all the Parameters that the other Server / JSP is expecting. First identify that.
    If the JSP only pulls data from the URL Query String, you are saved... All you need to do is POST the first JSP to teh Second JSP with the Parameters
    For Example:
    <FORM ACTION="2.jsp?tbParam1=PazhanitbParam2=Kanthan" METHOD='POST'>
    Thanks and regards,
    Pazhanikanthan. P

  • Exceptions thrown after a jsp:include

    Hi all,
              At the beginning of my JSP, I can't use the JSP include directive because I
              need to do a specific include from another webapp servlet context. Thus I
              wrote my own include tag <mytag:include page="" context=""/> where I use
              RequestDispatcher.include().
              But then I am facing the following problem with this JSP :
              [myjsp.jsp]
              <mytaglib:include page="" context=""/>
              <mytaglib:stgElse/>
              if the second tag <mytaglib:stgElse> is throwing a JspException, and if I
              use the error handling system of the webapp :
              [web.xml]
              <error-page>
              <exception-type>javax.servlet.jsp.JspException</exception-type>
              <location>/web/en/pf/error.jsp</location>
              </error-page>
              I get : "java.lang.IllegalStateException: Cannot forward a response that is
              already committed"
              because it tries to do a forward after an include which needed a flush of
              the buffer previously, what means the response was already comitted.
              Thus the question is : how to handle exceptions coming after an include was
              done, that is to say after a flush of the buffer has already been committed
              Thanks for any help.
              Yann
              

    In the doc, it states:
    sendRedirect
    If the response has already been committed, this method throws an
    IllegalStateException. After using this method, the response should be
    considered to be committed and should not be written to.
    In other words, you must not do anything before or after with the response.
    Cameron Purdy, LiveWater
    "Lawrence Lourduraj" <[email protected]> wrote in message
    news:8ip9p4$r0g$[email protected]..
    >
    Friends,
    How do I do a redirect either through HttpServletResponse.sendRedirect ()or
    <jsp:forward /> in a JSP that does a <jsp:include /> at the top.
    I am getting a IllegalState exception.
    Thanks
    Regards
    Lawrence Lourduraj
    VocaLoca Inc.

  • Handle exception on server side and display a customized jsp error page

    Hi,
    I am developing a java/j2EE web application using servlet, jsp, ejb3 with JBOSS and ECLIPSE.
    Two cases can occur on the server side :
    1) either I have not an expected result in a method and in this case I want to display an error page (a JSP page I suppose) with a personnalized error message
    2) or I have an exception thrown and I want to display the exception message in the former JSP page
    I don't know how to cope with this problem of personnalized error message (or the message of a thrown exception) with a JSP page.
    Does anybody can help me ? Thank you
    Edited by: xflamant on Jun 20, 2009 10:51 AM

    For the case of an unknown Error, simply use a default error page.
    The redirection to this page can be accomplished by inserting folowing code into your web.xml:
         <error-page>
            <exception-type>java.lang.Throwable</exception-type>
            <location>/WEB-INF/jsp/error.jsp</location>       
        </error-page>Known exception can be caught via a try-catch block.
    Then simply dispatch to the page you want displayed an add an attribute containing the error message to the response object.
    This attribute can then be used in the target page to diplay the error.

  • 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.

  • 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

  • Error Page in JSP Having Problems.

    Hi all,
    I am having some issues with error pages in JSP.
    I am trying to display one simple error image when my JSP is having any kind of error, let’s say when it throws any exception. Here goes the code…
    throwError.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ page errorPage="errorPage.jsp"  %>
    <html>
    <body>
    Hello All,
    <%! int x = 12/0; %>
    </body>
    </html>errorPage.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ page isErrorPage="true" %>
    <html>
    <body>
    <img src="error.jpg" height="100" width="100">
    </body>
    </html>web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" 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">
         <error-page>
         <error-code>500</error-code>
         <location>/errorPage.jsp</location>
         </error-page>
         <error-page>
         <exception-type>java.lang.ArithmeticException</exception-type>
         <location>/errorPage.jsp</location>
         </error-page>
    </web-app>Please see if you can help…
    Currently when I run the throwError.jsp in Eclipse, nothing happens. It shows "500 Internal server error". But the error.jpg doesn't appear on browser. I have copied the error.jpg properly in the WebContent folder of the Web App root.
    Thanks much...
    Goldest

    Raghu,
    You need to fix your syntax:
    <%=someObje.getNo()>
    not
    <=someObje.getNo()>
    Your concept of how to use error.jsp seems correct.
    --BobC                                                                                                                                                                                                                                                                                                   

  • [Tomcat bug?] Calling response.sendError(404) from JSP

    Calling "response.sendError(404);" from JSP context causes Tomcat to mangle all non-latin characters.
    Any ideas why?
    How to recreate bug:
    http://www.kitoy.ru/int/bug1.zip
    There are 3 files in bug1.zip.
    index..jsp:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page pageEncoding="utf-8"%>
    <%@page contentType="text/html; charset=utf-8"%>
    <%
        response.sendError(404);
    %>
    <html>
    </html>404.jsp:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page pageEncoding="utf-8"%>
    <%@page contentType="text/html; charset=utf-8"%>
    <html>
    <h1>Hello in Russian: &#1055;&#1088;&#1080;&#1074;&#1077;&#1090;!</h1>
    </html>and WEB-INF\web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app 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"
        version="2.4">
        <display-name>bug1</display-name>
        <description>bug1</description>
        <distributable/>
        <error-page>
            <error-code>404</error-code>
            <location>/404.jsp</location>
        </error-page>
    </web-app>Calling of index.jsp should cause 404 error with custom error page. The error page is utf-8 encoded and contains russian characters. That's by design.
    In fact, Tomcat shows ?????? instead Russian variant of "Hello".
    Tomcat/5.5.17 or Tomcat/5.0.28.- it does not matter.
    Is it Tomcat bug or I should not call response.sendError(404) from JSP?

    it's not a tomcat bug, it's rather a problem with
    your code.
    change index.jsp like the following then test
    it !
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page pageEncoding="utf-8"%>
    <%@page contentType="text/html; charset=utf-8"%>
    <%
    esponse.sendRedirect("blablablablablabla.html");
    %>
    <html>
    </html>
    Thanks for the insight. But the issue here is with the response.sendError() method.

Maybe you are looking for

  • Kernel Panic when I insert Snow Leopard Disc

    Hi, when I insert the snow leopard retail disc, my mac startup with a kernel panic, without log in logs folder. And on screen appear this. http://img847.imageshack.us/img847/282/20111115195144.jpg

  • Installation of Exchange 2010 in Windows 2012 Server

    Hi all, We are planning to upgrade our current Exchange 2003 to Exchange 2010, Need some help on installation and Support of Exchange 2010 in Windows 2012 Server, as per the https://technet.microsoft.com/library/ff728623(v=exchg.150).aspx Exchange 20

  • Message split for every 1000 records

    Hi All, My scenario is Proxy to File.We have to process thousands of records from r/3 to.I need to create separate XML file for every 1000 records in receiver directory.Is there any solution to achieve this? Thanks in advance Kartikeya

  • DBACOCKPIT There are different versions of ODBC32.dll in use

    Hi all, In dbacockpit if you go to Configuration and SQL Server Setup Check. Got this error u201CThere are different versions of ODBC32.dll in useu201D How do I fix this?

  • Verify() within HostnameVerifier is not called

    My intension is when I try to connect to URL, I have to check for whether the url is https and the certifact name maps to the issuedTo name of the certifacte. So I have written the code to check for the certificate name validation in verify method of