Unable to set root/main/default servlet in Tomcat 5.5

I'm on a shared hosting account with Tomcat 5.5 and cannot figure out why I can't set the default servlet. I want all incoming requests regardless of the relative path, to be handled by the Redirect servlet. There is only one servlet in the whole project.
Some examples
http://www.mydomain.com -> Redirect servlet (not working)
http://www.mydomain.com/ -> Redirect servlet (not working)
http://www.mydomain.com/a -> Redirect servlet
http://www.mydomain.com/blaldjflajdd -> Redirect servlet
With the below web.xml file, the last two above works just fine, but the first two gives a 403 error. What gives, I followed the Tomcat documentation to the teeth... It seems to work on my development server, but not on the shared hosting. Is this a setting anyone would block? Any help would be much appreciated.
The full web.xml setting below:
<?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">
     <display-name>Redirect</display-name>
     <servlet>
          <display-name>Redirect</display-name>
          <servlet-name>Redirect</servlet-name>
          <servlet-class>com.somedomain.Redirect</servlet-class>
          <init-param>
               <param-name>host</param-name>
               <param-value>www.myotherdomain</param-value>
          </init-param>
          <init-param>
               <param-name>redirect-type</param-name>
               <param-value>301</param-value>
          </init-param>
     </servlet>
     <servlet-mapping>
          <servlet-name>Redirect</servlet-name>
          <url-pattern>/</url-pattern>
     </servlet-mapping>
</web-app>I tried adding other mappings as well that didn't work, such as :
     <servlet-mapping>
          <servlet-name>Redirect</servlet-name>
          <url-pattern>/*</url-pattern>
     </servlet-mapping>What would happen if I try an empty url-pattern?
     <servlet-mapping>
          <servlet-name>Redirect</servlet-name>
          <url-pattern></url-pattern>
     </servlet-mapping>Any help would be much appreciated. I tried workarounds, by using an index.jsp file to supplement, but that isn't working quite right either. I prefer to have it setup properly though.... Please Help!!!

tomcat does not compile servlets, only JSP's will be translated and compiled on the fly. You need to compile them yourself, possibly using ANT or an IDE like NetBeans or Eclipse to make it easier to deploy the changes.

Similar Messages

  • Help: Unable to set root servlet in a shared hosting environment

    I'm using a shared hosting environment with GoDaddy and can't set the http://www.domain.com/ root servlet, i.e. the servlet that gets invoked when we go to the homepage.
    I have the following web.xml file configured that currently works on my testing server:
         <servlet>
              <display-name>MainPage</display-name>
              <servlet-name>MainPage</servlet-name>
              <servlet-class>com.somedomain.MainPage</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>MainPage</servlet-name>
              <url-pattern>/mainpage</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>mainpage</welcome-file>
         </welcome-file-list>The application is configured as the 'ROOT' application on my development server, but shared in the hosting environment. I wonder if some permissions are not given since it is shared hosting environment. The error message I get when visiting the page is:
    Forbidden
    You don't have permission to access / on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.33 Server at dev9.somedomain.com Port 80Unfortunately the server get's restarted once a day, so multiple suggestions would be much appreciated. I will upload them all at once.

    Change the value of the url-pattern value of your servlet mapping in the deployment descriptor. Instead of using "/mainpage" as the value use "/index.html" or "/index.jsp".
    Edited To Add - But this might not be right, because it will result in an endless loop. You would eventually want to display the home page and it would trigger the servlet which would forward to the home page, triggering the servlet and on and on...
    I don't think I know the answer here...
    Edited by: nantucket on Apr 5, 2009 12:20 PM

  • Office Jet 8600 Premium unable to set printer as default. Error 0x00000709

    Have NEVER been Able to make my new OJ 8600 Premium the default printer--Win7x64 Ultimate, McAfee, MSOffice All Updated.  This is less than 30 days old!!!!
    Installs and seems to be fully functional, Prints a Test Page, & Scans using YOUR software, BUT:
    Will Not Scan Normally from Acrobat as it will not recognize  (still has my HP 6500 listed which is UNINSTALLED & Registry cleaned )  Can scan using Custom Settings (WT*?!!)
    Outlook & Excel "sees" the printer BUT will NOT print  Fails to connect.
    Checked & cleaned registry of OLD printer info then rebooted as indicated in some of the forums.  STILL 0x00000709
    Took offline and tried a direct connect using the USB port.  Rebooted all and still 0x00000709
    I thought initially it was just me.  BUT, this is ALL OVER THE INTERNET, and NOT just on the 8600.
    I am about to put the 8600 back in the box WITHOUT the packing and SEND it BACK.  OVER 20 years with HP, BUT I have HAD IT!

    Hey MHz67,
    This error is coming from the Windows OS itself and is most likely coming from an issue with your Print Spooler service.  I would advise trying to run the Microsoft Fixit tool for automatically detecting and fixing printing problems.
    http://support.microsoft.com/mats/printing_problem​s/
    Once this has run are you able to get the printer to be set as default and function?
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • Unable to set up the default value in custom object 10,related item section

    Hi,
    Please help me out for the below issue
    Custom Object 10 we renamed to Quarterly Broker Review .In Quarterly Broker Review there is a related item section 'Activity'.
    In Quarterly Broker Review ,Activity related Section ,After clicking on The 'New Task' button 'Account Name' field in Quarterly Broker Review(Parent ) should be prefilled in the Activity Section(Related Item Section) in Account Name Field
    'Account Name' field is a Picklist Read Only field.
    Since it is a picklist read only field i couldn't write the expression in the 'Activity' Related section under 'Account Name' field
    you can also help me by reaching at '[email protected]'
    Thanks,
    Srinivas Merugu

    Hi Srinivas,
    As you know, you can refer to a field in a different object by using JoinFieldValue function. But this function is not available for all the object references. If you refer online help for JoinFieldValue function you would notice that from activity only CustomObjects 1,2 an 3 can be referenced using this function.
    If this is possible for the activity and CustomObject 10 then you go to the field named Account Id in Activity object and set a default value. I guess in the parent object "CustomObject10" Account Id will also be stored in "Account: Integration ID". So this field value can be copied into the Account Id field of Activity.
    Instead you could write a web service program to achieve this.
    Thanks
    Naren

  • Vista Home Basic Unable to Set Safari as Default

    Topic pretty much describes it all.
    I've tried to set the default application settings as "Custom" and selecting Safari as the default browser... that setting won't stick. Setting Safari as the default inside of Safari itself won't stick. I can't set Safari as the default application to handle http protocol in "Set program access and computer defaults" because it doesn't even show on the list.
    I want so very, very desperately to use this browser, but if I can't get it to load any pages unless I type them in the address bar myself, it seems slightly pointless.

    Can you get there: http://www.windowsvistauserguide.com/vista2/defaultprograms/select_your_default_programselection.JPG
    (Road map: http://www.windowsvistauserguide.com/default_programs.htm)
    And do you see safari there?

  • Unable to set outlook as default calendar

    After the last software update I installed on my Blackberry torch, I have lost the option to set Outlook as my default calendar - apparently Facebook is now my default.
    Any suggestions how I can change it?
    My syncing is showing as Outlook.

    Hi hillke,
    Welcome to the BlackBerry Support Community.
    Could you please provide more information so I can better assist you?
    When you click on the drop down list next to Calendar (CICAL) in Options > Device > Advanced System Settings > Default Services, is Facebook the only option to select?
    How many email accounts do you have integrated on your BlackBerry® Torch™ 9860 smartphone?
    Can you please clarify what you mean by your syncing is showing Microsoft® Outlook®?
    Thanks.
    -FS
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.
    Click Solution? for posts that have solved your issue(s)!

  • Unable to set "Mail" as default mail client

    I did have a prefpane from Rubicode .. deleted, restarted .. frankly not sure if that was even the problem. However, every time I select "Mail" to be the default email app, I still see iTerm.app listed as the default email handler. I have tried changiing and restarting to no avail. All I have to do is make the change to ANY email program, and close the MAIL PROGRAM. The next time I check in Mail/Preferences/General/Default-email ... I see Term.app ...

    However .... I might add that in making the experiment, not deleting however renaming that plist, Mail made another; started the process of asking me to make some email accounts; I quit right then.
    But ... when I restarted Mail again, with the original plist, to my chagrin, I noted that I can make "Mail" stay (stick) as the default email client.
    I just restarted the macBook to prove it to myself ... been certainly more than a week and i'd not resolved it. So, we'll give you the credit for causing me to move the original out then back, which "seems" to have obliquely corrected the problem.
    go figure, on that one.
    tnx

  • Setting the initial default project on tomcat

    Hi, Sorry, I know this is not the rigth place for thie question becausse is not related to java but to tomcat. Anyway I hope anyone in the comunity can help me.
    I have tomcat installed and my app is already deployed on it. if I use the url:
    localhost:8080 I see the tomcat page and my project is in: localhost:8080/myapp
    now what I want is:
    that when I go to localhost:8080 instead os appearing the tomcat home page I want it to appear my app. Any suggestions?

    This link might help:
    http://wiki.apache.org/tomcat/EditDefaultJSPPage
    After you remove the compiled index.jsp page in the jar file,
    change the index.jsp page in the folder they reference so it forwards to your application (url).
    Now when you type http://locahost:8080, it should go to your application.
    I'm not sure it will work as described since I never tried it.

  • Execute a servlet in tomcat

    hai friends,
    I am trying to execute a simple servlet in tomcat but I couldn't..
    please help me

    Can you execute the default Servlets in Tomcat which are found in the "Examples" folder ? http://localhost:<PORT NO>/examples/
    If yes then try deploying your servlet in the examples folder and find out a file called "servlet.jar " in your server and set its classpath.
    I hope that will work.
    Shashi

  • What is the default root of the servlet engine in IPlanet v6?

    I am trying to get java based code to work on IPlanet's webserver/servlet engine version 6. The servlets are being inited, but they can't find their .properties files (xml variable files). I have been able to install this code on many servlet engines including JRun, Tomcat, and Jserv by placing the .property files into the default root of the servlet engine. In JRun, for example, it would be Allaire/Jrun/servers/default. I have tried placing them in several directories and adding them individually to the classpath, but still no luck. Any help would be greatly appreciated.

    Hi,
    Please place your claspath in jvm12.conf file.
    Which will be under /server-root/https-instance/config/jvm12.conf.
    For more info about how to set classpath for running servlet. Please look out the below link.
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/serv.htm#17272
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/xjvm.htm#21181
    http://docs.iplanet.com/docs/manuals/enterprise/50/pg/2-config.htm#1069613
    I hope this helps.
    Regards,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • Outlook 2013 (Office 365 Install) unable to set Default Mail Client

    After installing Office 2013 via Office 365 for Business, the installation is unable to set Outlook as the default mail client.  Message appears after each system reboot:
    "Either there is no default mail client or the current mail client cannot fulfill the messaging request.  Please run Microsoft Outlook and set it as the default mail client."
    When going into Control Panel and manually set the Outlook client as the default, the setting does not take.  After a reboot, the warning message reappears.
    Anyone else having the same issue?

    MJ
    No but then again it is a Beta. Did you clean install or update?  9926 seems to be relatively stable.
    Wanikiya and Dyami--Team Zigzag

  • Unable to set default program for .pdf

    CURRENT PROBLEM:
    As show in print screen, when i attempt to set default program nth happens at all. The only way i can open any .pdf file now is by 1st opening adobe reader 9 and select the .pdf file manually
    INITIAL STAGE OF PROBLEM:
    Problem started after upgrading to windows 7 from vista. Windows 7 is able to recognise adobe reader 8 as a valid default program since it is in windows.old. Thus the default for .pdf is adobe reader 8 (it was installed in vista).
    Subsequently, installing adobe reader 9 isof  no use as it will be ignored and windows 7 will only continue to use adobe reader 8 as the default reader when i try to open a .pdf file, unless if i manually opened adobe reader 9 and selected a .pdf file manaually
    However, I am unable to uninstall adobe reader 8 as the "program and feature" can only identify adobe reader 9 and does not think that adobe reader 8 exists.
    ATTEMPTs TO SOLVE:
    Thus, I removed windows.old by using the disk cleanup. However, I am still unable to set adobe reader 9 as the default reader. Instead, .pdf are no longer accessible/"open-able" unless I 1st opened adobe reader 9 and then selected a .pdf manaually.
    I've attempted reinstalling and restarting comps etc, they dun seem to help. I suspect the OS is now only able to recognise adobe reader 8 from windows.old as a valid program directory due to some registry issues since it was initally set as the default when i 1st upgraded the OS. Now that adobe reader 8 is removed, there might be some corrupted registry somewhere that needs to be set right again?
    Really need help with this. Thanks a million.

    Thanks guys for showing interest in helping.
    As you guys can see, there's no adobe reader when u expand. Also, I already browsed the reader just in case too. Thus expanding doesnt help. =(
    Also, I cant seem to find the "file type" tab in folder options

  • Unable to set default date for Date Picker item using Auto Row Processing

    Okay, I have searched through the forum for an answer, and have not found a thing to account for my problem.
    First, does anyone know if using Auto Row Processing has problems updating an item/field in a record where the Source is defined as Database Column if the 'Display As' is defined as 'Date Picker (MM/DD/YYYY)'?
    I ask this only because I found out the hard way that Auto Row Processing does NOT fetch the value for an item where the field is defined as TIMESTAMP in the database.
    My problem is as follows: I have a form that will CREATE a new record, allowing the user to select dates from Date Pickers, text from Select Lists, and entering in text into a Textarea item. The information is saved using a standard (created through the Auto Row Processing wizared) CREATE page level button. After the record is created the user is able to go into it and update the information. At that time, or later, they will click on one of two buttons, 'ACCEPT' or 'DECLINE'. These are Item level buttons, which set the REQUEST value to 'APPLY' (Accept) and 'UPDATE' (Decline). The Accept button executes a Process that changes the Status Code from 'Initiated' to 'Accepted', and sets the Declined_Accepted_Date to SYSDATE, then another Process SAVEs the record. The Declined button runs a Process that changes the Status Code from 'Initiated' to 'Declined', and sets the Declined_Accepted_Date to SYSDATE, then another Process SAVEs the record.
    However, even though the Status Code field is updated in the database record in both Accepted and Declined processing, the Declined_Accepted_Date field remains NULL in the database record (by looking at the records via SQL Developer). WHY??? I looked at the Session State values for both the Status Code and the Declined_Accepted_Date fields and saw that the fields (items) had the expected values after the process that SAVEs the record.
    The following is the code from the Accept button Page Process Source/Process:
    BEGIN
    :P205_STATUS_CD := 'A';
    :P205_REF_DECLINE_ACCEPT_DT := SYSDATE;
    END;
    As can be seen, the Status Code and Declined_Accepted_Date items are set one right after the other.
    As an aside, just what is the difference between Temporary Session State vs Permanent Session State? And what is the sequence of events to differentiate the two?

    Here's yet another thing that I just looked into, further information...
    One other difference between the date field I am having problems with (Accepted_Declined_Date), and other dates (with Date Pickers) in the record is that the Accepted_Declined_Date never gets displayed until after it is set with a default date when the Accept and Decline buttons are pressed.
    One of the other dates that works, the Received Date, is able to write a default date to the record that is never typed into the box or selected from the calendar. That date is placed into the box via a Post Calculation Computation in the Source, which I set up as: NVL(:P205_REF_RECEIVED_DT,TO_CHAR(SYSDATE,'MM/DD/YYYY'))
    However, I do remember actually trying this also with the Accepted_Declined_Date, and setting the Post Calculation Computation did not work for the Accept_Decline_Date. Could this be because the Accept_Decline_Date is never rendered until the Status Code is set to Declined (in other words, there is no need to display the date and allow the user to change it until the record is actually declined)???
    The control of the displaying (rendering) of the date is set via the Conditions / Condition Type: Value of Item in Expression 1 = Expression 2
    Expression 1 = P205_STATUS_CD and Expression 2 = L
    Does this shed any light???

  • Unable to set iTunes as the default audio player - do not have enough access privileges for this operation

    I have just upgraded to iTunes 10.5.1.42 (from 10.5.0.143).
    When iTunes is launched, a message from iTunes came up saying:
    iTunes has detected that it is not the default player for audio files. Do you want to make iTunes the default player for audio files?
    [   ]  Do not show this message again
                                [ Yes ]   [ No ]
    Clicking the Yes  button, another iTunes message appears:
    An error occurred while updating the default player for audio file types. You do not have enough access privileges for this operation.
                                    [ OK ]
    I found in Googles as well as from some of my own notes dated a few years back which others (and myself) encountered the same problem before. I don't recall what was the solution to this annoying problem. Maybe I should just check the first box and tell iTunes to "shut up"? It seems that iTunes is already the default program designated to open audio files like MP3, WAV or what not. Why does it need to be set as the default player again?
    Come to think about it, I do have a few files with .aup as extension. These were played with "audacity". Perhaps that upsets iTunes player?

    Hello magestecal,
    Thanks for using Apple Support Communities.
    To troubleshoot this issue where you're getting a permissions error when trying to sync your iPhone, I'd like you to please follow the steps in the article below.
    iTunes: Missing folder or incorrect permissions may prevent authorization - Apple Support
    Take care,
    Alex H.

  • Setting a default servlet

              i need to do considerable pre-processing of requests and would like
              to isolate all the pre-processing logic to one servlet. the default
              servlet ( as far as I understand ) is served when a resource cannot
              be found therefore weblogic serves the default. what i need is
              to specify all request come through a single 'preprocessor' servlet
              which does all request preprocessing then forwards the request
              to the requested URI. How can i achieve this ?
              thanks in advance.
              

              Hi,
              You can make use of FileServlet which is the default servlet in
              Weblogic. You can do any number of pre processing. You can achieve
              this by extending the FileServlet class and overridding the appropriate
              methods.
              Regards
              Ganesh
              "derrick" <[email protected]> wrote:
              >
              >i need to do considerable pre-processing of requests and
              >would like
              >to isolate all the pre-processing logic to one servlet.
              >the default
              >servlet ( as far as I understand ) is served when a resource
              >cannot
              >be found therefore weblogic serves the default. what i
              >need is
              >to specify all request come through a single 'preprocessor'
              >servlet
              >which does all request preprocessing then forwards the
              >request
              >to the requested URI. How can i achieve this ?
              >
              >thanks in advance.
              

Maybe you are looking for

  • Depot Excise Invoice Printout

    Dear Gurus,                    I have configued Depot Sales Process . And able to sucessfully create a Depot Excise Invoice . I wish to know if there is any standard program (to print Depot Excise Invoice) available in SAP . If not then what is the p

  • How can I make mail retry sending messages in the Outbox?

    Howdy all, As the title says how can a force Mail to try to resend the messages in the outbox? I use my MacBook Pro in a number of different environments and when I am on one flakey access point in particular or when I have forgotten to open Safari t

  • Hi, I want to create a financial Model in SBO

    hi I need some help. i need to know how can i design a financial model template for an balance sheet. i need to create another balance sheet model for add some accounts , this account i dont want to view in the regular balance sheet.

  • Problem setting up the UCP Web Service

    I am new to CISCO and my first project is to set up the UCP Web Service.  I don't have access to the web interface on ACS but I was told that acs config-web-interface ucp enable was run.  I have in the UCP file on tomcat C:\Tomcat 7.0\webapps\ROOT\UC

  • ZEN SLEEK PHOTO & WINDOWS 98 SE!! AAAAAARGGH!

    Hi! Apologies in advance if this problem has already been raised and addressed, but due to a mismatch of information, I find I have now invested in a lovely mp3 player (namely ZEN SLEEK PHOTO) I can't use. The problem? It's mimimum OE requirement is