How to set a weel page to deal pages that not exist?

Hi,
I am new to Tomcat, i am learnning JSP by Tomcat Env, i find if Tomcat display
error pages in IE if i input page that doesn't exit, i want to know if there is
way to display a user-defined page to replace the error page (...HTTP Status 404 ...)
Thank you!

This is code that would be run from a servlet. Your JSP page would need to post to a servlet giving the url of the page you are checking for existence. You can redirect any level of error. The HttpURLConnection will attempt a connection with the URL you provide and you call the getResponseCode() method which will provide you with any level of response code. I believe in 1.2 there was a bug with this and it threw a page not found exception, so if you are using 1.2, you must catch that exception and assign the responseCode to be 404.

Similar Messages

  • How to set multiple home pages, the option is gone (replaced my hard drive and had to reinstall firefox) This version seems to only offer tabs, not pages?

    My old version of Firefox had the option for me to set multiple home pages. My hard drive recently failed and had to be replaced, so I had to install the newest version of Firefox. The only option I see when I go to tools, options, general is to set the one home page. (and maybe tabs) I would like to open several of the same pages every time I open my Firefox. Does anyone know how to get this back, or which version had this feature so I can downgrade to that particular version?
    Also, I was wondering if there is a way to get the bookmarks I had on the old version back. I think they are lost forever, but if anyone knows, I would be thankful. I do still have the old hard drive, but the way it failed was actually when you tried to open any browser, the hard drive would go and blue screen, this is why the old hard drive had to be replaced. Thanks. :)

    So you mean you want to open new windows with the same page when you open Firefox?
    [[How to set the home page#w_set-more-than-one-website-as-your-home-page|Set more than one website as your home page]] should help if you want to open multiple pages when you open Firefox.
    As for recovering your bookmarks, you can try to plug that hard drive into a working computer, and then read [[Recovering important data from an old profile]] to copy your bookmarks from it. However, if it is failing you may not be able to do that.

  • How to set custom master page for social/sites.aspx in sharepoint 2013

    How to set custom master page for social/sites.aspx in sharepoint 2013.?
    File path is
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\SocialDataStore\SocialDataStoreList\sites.aspx
    Thanks in advance

    Hi,
    You could open the sites.aspx in Notepad or SharePoint designer, and set the master page to your own master page directly via editing:
    <%@ Page language="C#" MasterPageFile="~masterurl/custom.master"      Inherits="Microsoft.SharePoint.Portal.WebControls.FollowedContentWebPartPage,Microsoft.SharePoint.Portal,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
    %>
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to set a default page setup in P6?

    Hi,
    Anyone know how to set a default page setup in P6?
    Thanks,
    Manuel

    Hi Manuel,
    For printing, the settings are stored within the layout. If you have one layout containing the settings you use, you can then use this layout as your template and do a 'Save As' every time you make your changes.
    Hope that helps
    David

  • Epson Artisan 810 in duplex printing, reverses the second page, so that it is upside down in relation to the first page. Does anyone know how to set the second page i.e the reverse side of the page, in the correct direction?in the

    Epson Artisan 810 in duplex printing, reverses the second page, so that it is upside down in relation to the first page. Does anyone know how to set the second page.... i.e the reverse side of the page.....in the correct direction?
    It worked perfectly last week, now there are problems.
    Thanks for any advice.

    Epson Artisan 810 in duplex printing, reverses the second page, so that it is upside down in relation to the first page. Does anyone know how to set the second page.... i.e the reverse side of the page.....in the correct direction?
    It worked perfectly last week, now there are problems.
    Thanks for any advice.

  • Start page lacks menu items - unlike "How to set the home page" view

    I have just downloaded the beta of Firefox 4 and am attempting to reproduce opening home page from previous version. Directions on accomplishing this (loading the NY Times front page) depend on a menu bar with "File, Edit, View, History" etc. There are not visible. They are shown in the directions on Firefox Help but not on my computer. How to do this??

    Click the Firefox button, then click Options. This will open the options dialog that the [[How to set the home page]] article refers to.
    When viewing the support articles, in the right-hand column there is a section titled "Help With:", make sure it is set to Windows and Firefox 4 to get help relevant to the version you are using. In some articles you get different content when you select Firefox 4.

  • How to set the default page size ?

    Hi there,
    I just bought a 15.4" Macbook Pro.
    When I use Safari to surf, I found that the image/fonts are to small for my liking.
    So I did VIEW > ZOOM IN two times & the image/fonts & it become satisfactory.
    But after I shutdown & restart the laptop again, I find that whenever I startup, the page in Safari when back to the smaller setting & I have to click VIEW > ZOOM IN twice again .
    My question is how to make this settings permanent ? It is irritating having to do VIEW > ZOOM IN everytime I start up the system !!
    Any ideas ?
    Thnaks

    In Safari, go to Safari >> Preferences. Click on the Appearance tab. Set the standard and monospaced fonts. That not only sets the default fonts for web pages (many web-sites will specify other fonts), but also the default sizes (though web-sites can specify alternate sizes). Also, on the 'Advanced' tab, there's a checkbox labeled 'Never use font sizes smaller than' followed by a drop-down. This permits you to prevent the text from going beneath the specified size.
    The advanced tab also permits you to provide a CSS stylesheet to apply as the default. If you know CSS, this can be very powerful.

  • Firefox 4.01. I wish to have "Mozila Firefox S tart Page" as Start Page. I have used "How to set the home page" (tools, options, general, restory to default) but no result.

    # Numbered list item

    The part you are probably missing is
    When Firefox starts: "Start my Home page" (in the dropdown)
    the installed default home page is about:home in Firefox 4, but simply choose the "Restore to Default",
    then click on the "OK".
    see [https://support.mozilla.com/kb/How%20to%20set%20the%20home%20page How to set the home page | How to | Firefox Help]
    If that is not working then try instructions , and following the instructions suggest taking a picture of your toolbars first, so that you will be able to recustomize your toolbars afterwards, see [http://kb.mozillazine.org/Corrupt_localstore.rdf Corrupt localstore.rdf - MozillaZine Knowledge Base]
    After resetting, continue with [http://kb.mozillazine.org/Toolbar_customization Toolbar customization - MozillaZine Knowledge Base] and if you used small icons -- don't forget the checkmark for that in the dialog.

  • How to set up huge Pages on sles 10

    Does anybody know
    How to set up huge Pages on sles 10
    in order to use large memory ?
    I need a description or how to .
    Thanks
    Peter Schläger

    Metalink Note:317139.1 explain , how to setup hugepage and configure Very Large Memory and big SGA for Oracle RDBMS.
    - Virag Sharma
    http://virag.sharma.googlepages.com

  • HT5312 How to set up my rescue email account,so that can reset my security question?

    How to set up my rescue email account,so that can reset my security question? The key is I need change my security question

    You won't be able to add a rescue email address until you can answer 2 of your questions, you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the page that you posted from to add a rescue email address for potential future use

  • How do I delete some pages from an existing pdf file?

    I have an existing pdf file that is too large to send to some people. How can I delete some pages from this existing pdf file, and break it up into two files?

    Acrobat
    You can download a 30 day trial at that link.
    You may also be able to do it with CreatePDF, but I'm not sure.

  • I never used this program before. I tapped on the "budget form" and decided I'd rather use the "expense form".  I can't figure out how to get to the page that you choose which form you want

    I never used this program before. I tapped on the "budget form" and decided I'd rather use the "expense form".  I can't figure out how to get to the page that you choose which form you want. How would I do that?

    Pct,
    In the Numbers spreadsheets window where all your documents are shown as icons, tap the Plus Sign.
    Choose Create Spreadsheet
    Select the template you want to use
    Jerry

  • How to set Analysis graphics background color to Transparent? not White.

    How to set Analysis graphics background color to Transparent? not White.
    thanks
    Edited by: user13257485 on 2010-8-15 下午11:53
    Edited by: user13257485 on 2010-8-15 下午11:55

    Hi,
    We almost had the same requirement, but we just needed to color a specific column.
    Here goes the solution to that, you might do the same for your row highlighting
    Changes are required in jsff and one method to be added in backing bean
    1. JSFF :
    <af:column headerText="Amount"
                     id="c4" width="100"
                     inlineStyle="#{backingBeanScope.BackingBean.cellColor}">2. Backing Bean
    //searchResultTableVO is Table's VO
    public String getCellColor() {
          FacesContext ctx = FacesContext.getCurrentInstance();
          ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
          ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row}", FacesCtrlHierNodeBinding.class);
          FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)ve.getValue(ctx.getELContext());
          Row row = node.getRow();
        if(row.equals(searchResultTableVO.getCurrentRow())){
    //You can add your inline style for font-style too
          return "background-color:Red;";
             return null;
      }Hope this is helpful :)
    Regards,
    Neha..

  • How do i get refund for app i purchased thats not working properly

    how do i get a refund on an app thats not operating properly on my ipad 2

    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
     Cheers, Tom

  • Get a online number page does not exist!

    This is the 3rd time this is happening to me in about 2 weeks with no success. I go to the online number page and everything works fine. I can view my existing online numbers and so on. However when I click on the link get an online number because I want to sign up for another it says the page does not exist.
    Hi, we couldn’t find this pageLooks like the page you were trying to visit doesn’t exist or has been deleted. If you got here by a link from skype.com then about the wrong or out of date link and we’ll fix it. Thanks.
    Since we’re not sure what you were looking for then here’s a bunch of things you might find useful:

    We are short on information. Settings may depend on your Mac OSX version, which we don't yet know. Please let us know the version, plus how you are sending/receiving mail: a mail client installed like Apple Mail, Ms Outlook, or Entourage; or by visiting a web site like yahoo, hotmail, or gmail.

Maybe you are looking for

  • Continuous play???

    This sounds really dumb, but I can't get iTunes to play continuously; it plays one song, then stops. I've tried all the settings, uninstalled it then reinstalled it, and upgraded to 7.5. It does this when just playing songs from the library as well a

  • How do I remove the security password created after the upgrade?

    How do I remove the security password created after the upgrade?

  • Permanent Font Color Within a pre-made form.

    I have made a form in Pages and also imported a form from Windows. There are many different lines and I want to find a way to type in a different color (Blue) when I change lines without having to format it each and every time. Any ideas?

  • Read work center details for a notification

    Hello All, Is there an FM that I can use to read the work center that is assigned to a service / maintenance notification? The problem that I have is that I use BAPI_ALM_NOTIF_GET_DETAIL to read the notification header. In case of service notificatio

  • About Icloud

    Here is what I would like to do. I signed up for Icloud so all my songs would be copied into my other devices. and copied they were. ower and over again. my birjam sons(about 320 of them) were recopied at least 3 times in one device. You do themath.