Modify Error Response Page

Dear all,
Does one of you might have an experience to replace the standard SAP error response page with a custom error page. Example of such error page is that when a custom web application is stopped, there will be a screen which shows Error 503 Service Unavailable.
I have tried to add the error page through web.xml in the custom application folder, but the error page don't kick in when the application is currently stopped. Thanks in advance
Kind Regards,
Erick Prajogo

The link below shows how to manage web.xml for a J2ee/EJb application on a 404 http error.
[http://help.sap.com/saphelp_nw04s/helpdata/en/9a/e74d426332bd30e10000000a155106/content.htm]
<error-page>
<error-code>404</error-code>
<location>/errorPages/MyCustomErrorPage.jsp</location>
</error-page>
I understand a  Webdynpro application is also  a j2ee application running in the server with its webdynpro runtime.
However, I do not see a web.xml file.
However, the following files were found, upon searching the file system.
  1. Application.xml and  ( requirement for a j2ee application ear file).
  2. application-j2ee-engine.xml (not sure why WD needs it).
I could not locate the above in any of the WD, J2ee, EP perspectives, but only in the file system.
Questions:
1. Should I need to create a web.xml inside this webdynpro?  If so, at what location ?
2. Can I add the above <error-page> tag section inside application.xml ?  If so, how to edit this file.?
3.  Is there any other approach to insert the http 404 error response?
Can anyone help please?
Thinakar

Similar Messages

  • Hide Server Error Response from users

    I use Weblogic 8.1 both as an application server and to serve http requests. Is there a way to stop Weblogic from sending detailed Server Error Response pages to application users? I have security people asking me this.
    Thanks.
    Paul

    Do your application war files contain error page entries?

  • Portal Runtime Error: Logon Page Modified!!!!

    Hi all
    I have modified the Logon Page to include a New Drop down.
    I copied com.sap.portal.runtime.logon.par.bak to my NewParProject0.par and modified the Logon Page with the Following code addition:
       <tr>
           <td width="161" height="20">
             <label class=urLblStd for="logonCltfield">
                <%=logonLocale.get("CLIENT")%>
                <span class=urLblReq> *</span>
             </label>
           </td>
           <td>
        <select id="clientType" class="DROPDOWN" style="width:2in">
       <option CLASS="DROPDOWN" value ="100" selected>100</option>
       <option CLASS="DROPDOWN" value ="110">110</option>
       <option CLASS="DROPDOWN" value ="120">120</option>
       <option CLASS="DROPDOWN" value ="130">130</option>
        </select>
         </td>
       </tr>
    The above process is done as per the documentation given in the <b>Customizing the Logon Screens</b>
    After building the new par file, I moved it into the ...\deployment\pcd
    And i modified the <b>authschemes.xml</b> as per the details given in the <b>help.sap.com(Changing the authschemes.xml File)</b>
    And even i tried changing  value of the property <b>login.authschemes.definition.file</b> to the name of the new authschemes file.
    I facing the following error:
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    The exception was logged. Inform your system administrator..
    Help please!!!!!!
    Thanks
    Kam

    Peter
      My Logon screen will get 3 credentials from the User .
       1. User Id (Text appearing in the Screen is User)
       2. Password (Text appearing in the Screen is Password)
       3. Client (Text "CLIENT" should appear similar to the User Id and Password).
      The Value field for the CLIENT should be of type DropDown.
    Hope my requirement is clear. Please Advice on the procedure to be followed...
    Thanks
    Kam

  • Server Error: The Page Javascript.js has been modified...

    I don't know why all of a sudden I am getting this error when I try to publish my website thru Frontpage.
    Server Error: The Page Javascript.js has been modified by (unknown) user...
    Anyway I can correct it?
    Thanks...

    I don't know why all of a sudden I am getting this
    error when I try to publish my website thru
    Frontpage. You are in the wrong place.
    This forum is for supporting Java developers.
    You have a problem with FrontPage. FrontPage is not a Java application and nobody here wrote it.
    Please contact your ISP and/or FrontPage support (ha ha) for assistance with your issue.

  • Edit Page options in ribbon disabled after applying modified Seattle Master Page

    Hi,
    I'm working on a modified version of the Seattle.master page, and I have an odd permissions issue that is seen when my user (a farm admin) tries to edit a page on the site. On some pages, clicking Edit Page doesn't do anything at all. On others, I've been
    able to go into edit mode but not do anything with the Edit options afterward. In this scenario, most or all of the useful edit options are disabled, and I cannot use Save, Checkout, Discard the Checkout, Change the Page Layout, etc...
    Checking the JavaScript console in IE reveals this JS error that I don't see in the OOTB Seattle:
    SCRIPT5007: Unable to set value of the property 'href': object is null or undefined 
    [our.site.com], line 1128 character 590
    Here's the function being referenced:
    function _cUpdconetidProjectPropertyTitleGraphic(data, ctrl){ ctrl.href = slNavUrl; }
    Other possibly helpful information:
    Here is a snippet from the modified Seattle Master Page of where the ribbon code sits:
    <div id="s4-workspace" class="ms-core-overlay">
    <div id="s4-bodyContainer">
    <SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AnonymousUsersOnly">
    <wssucw:Welcome runat="server" EnableViewState="false" />
    </SharePoint:SPSecurityTrimmedControl>
    <div id="ms-designer-ribbon">
    <PublishingRibbon:PublishingRibbon runat="server"/>
    </div>
    As you can see, I have moved the Ribbon (div#ms-designer-ribbon) from its fixed position outside of the div#s4-workspace to inside of the div#s4-bodyContainer so that it scrolls with the page. Placing the ribbon inside div#s4-bodyContainer shouldn't be an issue,
    as I've made a Design Manager Master Page in the past and placed the ribbon there as well without issue.
    Does anyone know how I can get this modified Seattle master page to allow editing?

    Hi,
    Is there any custom JavaScript in it, sometimes error may occur due to some typo.
    Suppose that we can do the customization like this: With a copied master page, we can apply a part of the change first, then check it in the browser to make sure it can work without affecting the OOTB features. Then apply other parts one by one with immediate
    examinations...
    By doing this, it would be easier to find out which step in your whole customization would cause the issue.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Error on page from BW 3.5's default web template

    Hi Guru's,
    We have a problem in our new BWD BW 3.5 environment where we are getting the "error on page" error from SAP-generated code and we aren’t sure why.
    On our old BWT BW 3.0b platform, we have been using a modified version of the 0query_template called Z_QUERY_TEMPLATE. We did a system copy of BWT to BWD, our new BW 3.5 platform. At that point in time we would see our old BW 3.5 default template for queries that we ran. We wanted to see what the new default web template looked like in BW 3.5. We found where we could remove the Z_QUERY_TEMPLATE from the Web Adhoc Analysis web template setting so we could see the new features of the BW 3.5 default BEx query designer template instead of our old BW 3.0b default template.
    Now when we run a query through the BW 3.5 query designer on BWD, we are using BW3.5’s default template. The prompt web page is fine. No errors on page messages.
    However, the initial presentation of the query results displays okay, but shows "error on page" in the message bar at the bottom of the displayed page. As soon as we do any navigation on those query results that error on page goes away. If we navigate back to the initial presentation, all is still okay. If we use the context menu to go back to start, we again get the error on page.
    This error on page does not happen in BQ2 (our new BW 3.5 QA environment copied from our old BW 3.0b QA environment where we had not yet changed the default BEx Query Designer template to be Z_QUERY_TEMPLATE). We have tried several queries and in each case, we get errors on page in BWD, but not in BQ2. We used ultraedit to compare the view source output from the equivalent web pages from BWD and BQ2 and the only difference is the validity date of the data. There are no other differences in the javascript code generated by BW in the two platforms.
    The statement that Internet Explorer is saying is the problem is the same in each of the cases we have checked and that is:
    SAPBWSetFocus(anchor);
    Error: Object expected
    Code: 0
    It’s in the set_tab() function.
    <script type="text/javascript">
    <!--
    /* Calls the online Documentation via technical QueryName */
    function callquerydoc() {
      var docustart= '/sap/bw/doc/meta/fldmeta/default?tlogo=elem&objnm=' + document.getElementById('querydoc').innerHTML;
      SAPBWOpenWindow(docustart,'Documentation',800,600);
    /* Sets the displayed tab */
    /* Check, which items of the Array check_items  is not hidden.
        Change the style of the HTML tag with id Group+Area/Group+Link */
    function set_tab() {
         if (!(navigator.appVersion.substring(0,1) == '4' && navigator.appName == 'Netscape')) {
           var check_items = new Array('GR1Toolbar','GR2Chart','GR3TECommon','GR4Broadcaster');
        for (i=0;i<check_items.length;i++) {
                        hidden = true;
                       prop = SAPBWGetItemProp(check_items<i>);
                       if (prop != null){
                                           for(j=1;j<prop.length;j++){
                                                      if (prop[j][0] == "HIDDEN")  hidden = (prop[j][1] == "X");
                   anchor_item = document.getElementById(check_items<i>.substring(0,3)+'Area').firstChild;
                    if (hidden) {
                        document.getElementById(check_items<i>.substring(0,3)+'Area').className='SAPBEXTbsTab';
                        anchor_item.title = 'Inactive Tab Page:' + ' ' + anchor_item.title; 
                    else {
                        document.getElementById(check_items<i>.substring(0,3)+'Area').className='SAPBEXTbsTabSel';
                        anchor_item.title = 'Active Tab Page:' +' ' + anchor_item.title; 
              } /* if */
          }   /* for */
        /* Set the BexHeader invisible when running as IView */
            if (SAPBWGetProperty('RUNS_AS_IVIEW')) {
                               document.getElementById('bexheader').style.visibility='hidden';
                               document.getElementById('bexheader').style.display='none';
              anchor = window.location.hash.substring(1,50);
              <b>SAPBWSetFocus(anchor);</b>
      }  /*function */
    -->
    </script>
    Because the error goes away as soon as we navigate I’m thinking some object isn’t being created or initialized, but since the view source code of these pages are identical I’m wondering if there is some code that should be executing before this page that is not happening in BWD for some reason.
    Any help will be much appreciated.
    Thanks,
    Jeri

    Heike,
    Thanks for your help in this. BWD and BQ2 are both on the same SP. SAP_BW release 350 level 10 (SAPKW35010) with BI_CONT at release 352 level 5 (SAPKIBIEP5).
    I invalidated the server cache following your instructions and tried again, but am still having the same problem in BWD. The initial display gets the "Done, but with errors on page" message until any navigation is done.
    I am using IE 6.0.2900.2180.xpsp_sp2_rtm.040803-2158 when I execute queries on both BWD and BQ2.
    Please, do you have any other suggestions?
    Thanks,
    Jeri

  • Can you Ignore Error Response Code in HttpUrlConnection?

    I have a problem with a HttpUrlConnection object throwing an IOException when it gets an HTTP Error Response code. Especially when there is an actual response from the server sent back that has more details in it that are actually helpful.
    I would like to just tell the HttpUrlConnection ot ignore HTTP error responses and just pass along the page or data that was returned instead. I need to handle this myself.
    The reason if it matters, is I am sending SOAP Envelopes, and if the Web Service doesn't like it, it will send an HTTP 500 Response Code, but it also sends a response SOAP Envelope that tells me exactly what is wrong.
    Right now to get this response I have to use a Sniffer, or worse since it is HTTPS (ssl) i have to use the jvm's SSL debug mode, and pull the response out of the hex code.
    I couldn't find anything about this, so I am afraid I am SOL, just hoping that there might be an obscure "feature" or "property" that can deal with this, that I can't find.
    ** 10 Duke Dollars to first person to provide a solution that works **

    Just call the getErrorStream() method to read the error response. Eg.
    HttpURLConnection conn = null;
    try {
      conn = (HttpURLConnection)
        new URL("http://www.google.com/givemea404").openConnection();
    } catch (Exception e) {
      InputStream in = conn.getErrorStream();
      int i = in.read();
      while (i != -1) {
        System.out.print((char) i);
        i = in.read();
    }

  • Error on page load when trying to run the jsp appl. through JDeveloper

    I created an JSP application using Oracle JDeveloper 9.0.5.2 and Business Intelligence beans 9.0.5. and i am using Embeded oc4j Server for running the application from the JDeveloper Environment.
    All the presentations are existed in the Local Catalog of the application...
    Configuration file of the Application is :
    (Project1OLAPConfig4.xml):
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!--This file is generated by the BI Designer object and specifies configuration
    settings for your application. These configuration settings do not affect
    the BI Designer object. You can specify the name of this file in the constructor
    of the BISession object for the application.
    If you want to customize this file, then choose Settings from the
    right-mouse menu of the associated BI Designer object. Or you can right click on the
    configuration file and choose Settings. You can choose whether to keep the
    configurattion settings the same for both design and runtime, which is the
    default, or to use different settings for design and runtime.
    Refer to the Help system for more information on the configuration file.
    Current Settings:
    In Sync with Designer
    -->
    <BIConfig>
    <BISession DeploymentOption="LOCAL">
    <BIUser Username="Local User"/>
    <Debug Mode="ERROR"/>
    </BISession>
    <PersistenceConnection PCID="pc1" PersistenceType="FILE" RootFolder="bidefs/Project1BIDesigner4/" BootConnection="true"/>
    <OLAPConnection OCID="oc1" ServerType="ROLAP" OLAPConnectionName="OLAPConnection1" HostName="twdpc232" SID="encore" PortNumber="1521" JdbcDriverType="thin">
    <DADFile Filename="/Project1OLAPConfig4OLAP.dad" Obfuscated="false"/>
    </OLAPConnection>
    <MetadataManager>
    <PersistenceConnection PCREFID="pc1"/>
    <OLAPConnection OCREFID="oc1"/>
    </MetadataManager>
    </BIConfig>
    Project1OLAPConfig4OLAP.dad :
    Username:CS_OLAP
    Password:CS_OLAP
    JSP page is : (biuntitled1.jsp)
    <%@ taglib uri="http://xmlns.oracle.com/bibeans/jsp" prefix="orabi" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ page errorPage="cabo/bi/jsp/error.jsp" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <!-- Start synchronization of the BI tags -->
    <% synchronized(session){ %>
    <orabi:BIThinSession id="bisession1" configuration="/Project1OLAPConfig4.xml" >
    <!-- Business Intelligence definition tags here -->
    <orabi:Presentation location="Presentation1" id="biuntitled1_pres1"/>
    </orabi:BIThinSession>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    BI Beans JSP Page
    </title>
    </head>
    <orabi:BIBody>
    <form name="BIForm" method="POST" action="biuntitled1.jsp" >
    <orabi:InitBITags parentForm="BIForm"/>
    <!-- Insert your Business Intelligence tags here -->
    <orabi:Render targetId="biuntitled1_pres1" parentForm="BIForm"/>
    <p/>
    <p/>
    <!-- The InsertHiddenFields tag adds state fields to the parent form tag -->
    <orabi:InsertHiddenFields parentForm="BIForm" biThinSessionId="bisession1" />
    </form>
    </orabi:BIBody>
    </html>
    <% } %>
    <!-- End synchronization of the BI tags -->
    The Errors coming when loading the page are:
    Line : 25
    Char : 76
    Error : ObjectExpected
    Code : 0
    URL : http://172.29.52.77:8989/Workspace1-Project1-context-root/biuntitled1.jsp
    The same error is coming in the (line, char) combination are : (25,1);(30,1);(21,1);
    Output of bicheckconfig :
    BI Beans Diagnostics(v1.0.2.0) 8/23/04
    ===============================================================================
    JDEV_ORACLE_HOME .......................... = c:\JDeveloper
    JAVA_HOME ................................. = C:\j2sdk1.4.2_03
    JDeveloper version ........................ = 9.0.5.2.1618
    BI Beans release description .............. = BI Beans 10.1.2 Production Release
    BI Beans component number ................. = 10.1.2.5.0
    BI Beans internal version ................. = 3.2.0.37.4
    Connect to database ....................... = Successful
    JDBC driver version ....................... = 9.2.0.3.0
    JDBC JAR file location .................... = C:\JDeveloper\jdbc\lib
    Database version .......................... = 9.2.0.5.0
    OLAP Catalog version ...................... = 9.2.0.5.0
    OLAP AW Engine version .................... = 9.2.0.5.0
    OLAP API Server version ................... = 9.2.0.5.0
    BI Beans Catalog version .................. = N/A; not installed in CS_OLAP
    OLAP API JAR file version ................. = "10.1.0.3.0"
    OLAP API JAR file location ................ = c:\JDeveloper\jdev\lib\ext
    Load OLAP API metadata .................... = Successful
    Number of metadata folders ................ = 2
    Number of metadata measures ............... = 24
    Number of metadata dimensions ............. = 5
    Metadata output location .................. = C:\JDeveloper\bibeans\bi_checkconfig\bi_metadata.txt
    To interpret this output, see the "Displaying Information about your Oracle9i Business Intelligence Beans Client Configuration" technical note, whose file name is bi_checkconfig_tn.html
    These diagnostics are captured in: C:\JDeveloper\bibeans\bi_checkconfig\bi_checkconfig.xml
    Can any body help me....
    Thanks
    Bhanu.

    Copy the jdev_home/jlib/redist/uix2_install.zip file to
    jdev_home/jdev/redist folder . It will overwrite an existing uix2_install.zip file.
    Close and open the Jdeveloper IDE. It will prompt you for upgradation of projects. Press OK button in response.
    Now you should be able to run the JSP pages.

  • Custom Error Responses - S1WS 6.1

    Hello
    Iam trying to create custom error responses. I did this thru Admin , Class Manager.
    I gave the absoulte path to file which contains error messages for the HTTPcodes (Not Found, Unauthorized etc)..
    When i did testing, the browser still gets 404 back. I did verify whether obj.conf has the settings. I also restared the web server. The setting was selected for "Entire Web Server".
    Please help.
    Thanks
    ssk

    I'm not sure I understand. Even if you specify a custom error page, the server will continue to send a response with a 404 HTTP status code. It will use the contents of your page for the body, but the HTTP status code will still be 404.
    If you're not really concerned about the HTTP status code but rather the body of the response, check the log files:
    1. Check the errors log. Is the server trying to tell you something?
    2. Check the access log. Is the server getting the request? Is the server sending your file (check the response size, it should match the size of your file)?
    If there's nothing in errors and access suggests the server is sending your file, the browser may be choosing not to display your error page. Microsoft Internet Explorer does this when the page is below a certain size. Try increasing the size of your error page.

  • Error:- "Response from server contained an error"

    Hi,
    I'm getting an error while running the dashboard Report.
    It works find for two times but third time the error message comming up in dashboard Top left below dashboard prompts saying "Error:- Response from server contained an error"
    I'm accesiing OBI dashboard from EBS.
    Appreciate your help.
    Thanks

    Hi,
    We also faced the same error some time back when clciking on dashboard items is logging us out.Finally we moved the dashboard pages from that dashboard to newly created dashboard and the problem is resolved.
    Please check below step also .
    1) When you are clicking on Dashboard was all services are up and running ,oc4j?
    2. check your dashboard link also might be having symbols like &????.
    Hope this help's
    Thanks
    Satya

  • Modify the login page (login.jsp) of B2B scenario of the Internet Sales app

    All
    I wanted to modify the login page (login.jsp) of B2B scenario of the Internet Sales application
    By typing the URL "http://<servername>:50001/b2b/b2b/init.do." I could able to see the login page
    My requirement is to add an extra link in this page
    when I use showmodule=true it gives the location of jsp which is "user/logon/login.jsp"
    I could able to find this jsp in the DC "crm-isa-web-b2b"
    when I open the DC in package explorer i could able to locate this jsp in a jar file but not able to open/modify it
    Awaiting experts response
    Thanks
    Murali.K.N

    When I work on ours ISA4, I go to the file on the server
    \jsp\crm.b2b\servlet_jsp\b2b\root\b2b\login\login.jsp
    Now, I'd imagine there might be a much easier way to work with the files, but that's how I edited ours. 

  • Can I print the "view responses" pages?

    We just came off of an event and used Forms Central for our evaluation form.  I can print the Summary Report, but I want to print the View Responses page, as we asked folks for comments in several areas.
    mkT

    Thank you!
    Blessings,
    MelanieMelanie Timmerman
    *Executive Admin. Asst./Office ManagerLa Crosse Area Synod,
    ELCA608-788-5000*
    PRIVILEGED AND CONFIDENTIAL
    This e-mail may contain privileged and confidential information and is only
    for the use of the specific individual(s) to whom it is addressed.  If you
    are not an intended recipient of this e-mail please do not use,
    disseminate, or copy this e-mail or the information contained in it or
    attached to it.  If you have received this e-mail in error, please delete
    it and immediately notify the sender named above by e-mail reply.  Thank
    you.

  • Customer self service form gives the error of  "Page cannot be displayed"

    Hi All,
    Customer self service form from Navigation: Recievables -> Customers --> Standard gives the error of "Page cannot be displayed" but the same form gets opened when i navigate that from Order Management responsibility
    Thanks&Regards,
    APPS DBA

    Hi All,
    I have been trying to install the EBS 11i in configured system core 2 duo with 1 gb ram and 250 gb HDD,
    have been following the below steps to install the EBS 11i,
    1.installed Win20003 server edition
    2.VC++ and copyind the link file into windows\system32,
    3.GNU make done the path set everything,
    4.MKS tool kit,
    5IP config and installing MS loopback,
    started the installtion direct from the DVDs,
    Pre-Installtion everything was OK,
    but after done everything I got struck last min, where the popup window appeared as login page responding but i did wait for 30 min and nothing has happened.
    So closed and I restarted the System and I have restarted process putting 1st DVD and given the command rapidwiz -restart.from command prompt.
    and Again its started as a new installtion, and preinstatltion wizard has came.
    where I haeve commited the mistake i did not understand...?
    Please guide me
    regards
    Satya

  • JQuery Mobile template: Error Loading Page

    Hello Apex community,
    My name is Robert and this my first post on this forum. I've been developing with Oracle Apex for over a year now.
    I've recently started developing for mobile devices with Oracle Apex 4.2.
    However i stumble on serveral problems including the one I will describe here:
    The problem is best described by this screenshot:
    [ http://roberthantink.com/img/Error_loading_page.JPG]
    Whenever I log into my JQuery template based application which uses 'Application Express Accounts' as authentication.
    I get the following Error: "Error Loading Page".
    When inspecting with a development tool I only get this warning:
    "The page at https://apex***********.com/nbb/f?p=100:LOGIN_JQM_SMARTPHONE:5788626446201 displayed insecure content from http://apex*******.com/nbb/f?p=100:101:0:::::."
    Page 101 is de login page and after the login it should redirect to Home which is page 1. This is all default.
    The weird thing is I can log into the application if I am on our company's local network.
    And I can also log into the workspace from outside our network, but I cannot get in the Application.
    I've also made a 'Sample Database Application' which I can log into from anywhere.
    I've searched this forum and of course the internet and could not find anything on this subject.
    I hope my explanation is clear enough and that someone could help me out.
    Edited by: Robert Hantink on 5-dec-2012 11:09
    Edited by: Robert Hantink on 5-dec-2012 11:10

    So here is the update.
    I've checked my themes/templates/pages for hardcoded HTTP/HTTPS and didn't find anything.
    I also inspected and compared the website from inside our network and outside and could not find anything out of the ordinary.
    Because this problem only occurses when i use the JQuery Mobile template I also compared the JQuery template with a Normal template.
    The only thing i noticed besides the different scripts that are found in the <head>tag, is the <base> tag :
    <base href="http://*****************.com:8080/nbb/f?p=100:10:13950022358106::NO:::">
    This tag is only used in the mobile template.
    I have also used the firebug network function and i noticed that when the site is used from outside our network that there is no response to a POST.
    I've uploaded some screenshots to make things clear.
    This is what happens from inside our network when i click on the SUBMIT-button "test" :
    http://roberthantink.com/img/intern1.JPG
    http://roberthantink.com/img/intern2.JPG
    Everything just works and the answer to the POST is a html site.
    However if i do the same thing from outside our network this is what happens:
    http://roberthantink.com/img/extern1.JPG
    http://roberthantink.com/img/extern2.JPG
    The next thing I'm about to check is our webcache and our firewall.
    Because the current port that is used is 443 and maybe we need 8080 and 8181 as well.
    Hope this gives you more of an insight of what is going on.
    Let me know if you need more information.
    Thanks a million so far!!!

  • Modify Servlet response using filter

    This is the code wht i am using, this is an example give in the oronserver.com and some other sites too..
    import javax.servlet.*;
    public class GenericFilter implements javax.servlet.Filter {
    public FilterConfig filterConfig;
    public void doFilter(final ServletRequest request,
    final ServletResponse response,
    FilterChain chain)
    throws java.io.IOException, javax.servlet.ServletException {
    chain.doFilter(request,response);
    public void init(final FilterConfig filterConfig) {     this.filterConfig = filterConfig;
    public void destroy() {                                             
    =============================================================
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class FilterServletOutputStream extends ServletOutputStream {
    private DataOutputStream stream;
    public FilterServletOutputStream(OutputStream output) {
    stream = new DataOutputStream(output);
    public void write(int b) throws IOException {
    stream.write(b);
    public void write(byte[] b) throws IOException {
    stream.write(b);
    public void write(byte[] b, int off, int len) throws IOException {
    stream.write(b,off,len);
    ===================================================
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class GenericResponseWrapper extends HttpServletResponseWrapper {
    private ByteArrayOutputStream output;
    private int contentLength;
    private String contentType;
    public GenericResponseWrapper(HttpServletResponse response) {
    super(response);
    output=new ByteArrayOutputStream();
    public byte[] getData() {
    return output.toByteArray();
    public ServletOutputStream getOutputStream() {
    return new FilterServletOutputStream(output);
    public PrintWriter getWriter() {
    return new PrintWriter(getOutputStream(),true);
    public void setContentLength(int length) {
    this.contentLength = length;
    super.setContentLength(length);
    public int getContentLength() {
    return contentLength;
    public void setContentType(String type) {
    this.contentType = type;
    super.setContentType(type);
    public String getContentType() {
    return contentType;
    ===========================================================
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class PrePostFilter extends GenericFilter {
    public void doFilter(final ServletRequest request,
    final ServletResponse response,
    FilterChain chain)
    throws IOException, ServletException {
    OutputStream out = response.getOutputStream();
    out.write("<HR>PRE<HR>".getBytes());
    GenericResponseWrapper wrapper = new
    GenericResponseWrapper((HttpServletResponse) response);
    chain.doFilter(request,wrapper);
    out.write(wrapper.getData());
    out.write("<HR>POST<HR>".getBytes());
    out.close();
    ===========================================================
    filter3.jsp
    <HTML>
    <HEAD>
    <TITLE>Filter Example 3</TITLE>
    </HEAD>
    <BODY>
    This is a testpage. You should see<br>
    this text when you invoke filter3.jsp, <br>
    as well as the additional material added<br>
    by the PrePostFilter.
    <br>
    </BODY>
    </HTML
    When i run the above code i am not getting data which is there in the jsp page, i am getting data which i am writing it in the prepostFilter.
    the output is
    PRE
    Post
    Is the above is overwriting the actual response ?
    If so can anyone tell me how to modify the response of the servlet instead of overwriting.............i will so thankful to you.

    i run your codes and get the following:
    PRE
    This is a testpage. You should see
    this text when you invoke filter3.jsp,
    as well as the additional material added
    by the PrePostFilter.
    POST
    my testing environment is
    sun j2ee ri 1.3.1
    and i deploy filter3.jsp and set the filter Mapping as the following
    Filter Name: PrePostFilter
    Target Type: Url Pattern
    Target : /*

Maybe you are looking for

  • How can I get a Powershell script which maps network drives to execute at logon to any workstation in my domain

    I want to map network drives for each user when they logon to any workstation in the network.  I have created and tested the PS1 script which works fine where the drives attach and used persistent parameter.  I have updated the Windows 7 Professional

  • Problems with outlook 7

    I am registed with apple as Helen (my nick name is Bene) so when I send out an email invite form Outlook 7 it has me as Helen...no one know who Helen is which is an issue. Also this alls tarted happening when I upgraded the new soft ware and everytin

  • How to efficiently select a block of text in iOS

    I'm a relatively new iPad user who has brought his iPad into hospital. I'm frequently find iOS to be quirky. There are frequent times when I cannot select the specific phrase i want to capture. iOS guesses and almost always guesses way wrong, way, wa

  • What the Hell is Application Server 10g R2

    Hello Experts....I am using Application Server 10g R2 on Windows Server 2003..In the Morning Everything(Especially Reports) Works fine...but in Evening i think it the Report Server get tired...it take too much time to run even simple Report..What the

  • Error IOS 8. Tested

    Dear Apple, I'm Rony from Perú, writing to inform about an error I found in my iphone 6. I've tried it in other iphone 5C and iphone 6 devices, and the error repeats. The error shows when I try to activate the ascending menu from a stand by status. T