Getting the folder name of the service in Tomcat 5.5

Hi,
I am using Tomcat 5.5.
I have a problem getting the folder name my service is located in.
Ex.
\webapps\myApp\...
Here i would like the string "myApp" - does anyone know how to get this?
The reason for this is that i use a war file to deploy "myApp". I have a set of properties which i don't want to change so I put them in a file outside "myApp" called "myApp.properties". I can then easily change between a test environment and my online environment.

I don't think you understand his answer.
Reading properties files from the file system directly is a mediocre solution at best for a web application. Even if it happens to work in this particular situation.
For example you would be better off loading properties from a single properties file as classpath loaded resources and simply using the context as a key to the properties in question. You could also configure this from web environment parameters specific to the web application.
Anything that puts a hard dependency on a particular file system layout is a bad idea, anything that reads files from within a web application server is likely to be a brittle solution.
This may work, for you, in your current circumstances, but you need to understand why this is a poor approach in general.

Similar Messages

  • How to get the service name of a webservice using UDDI API

    Hi,
    Iam working on setting up a dynamic partner link in a BPEL, by passing the endpoint of a web service queried from the UDDI (Oracle Service Registry 10.3 ) using the API. Iam able to do it successfully.
    Now, for example I have two operations in my wsdl, one to createCustomer and the other to bookTicket. I need to get the operation name using UDDI API so that i can pass it along with the endpoint to the partner link. ie. When i need to createCustomer, my UDDI API code will need to get the service name createCustomer and the endpoint and I would pass them to the partnerlink and the createCustomer operation of my webservice would be called.
    Can any one help me to get the service names of the wsdl using UDDI APIs.
    Thanks,
    Ananth

    Hi sia,
    1. Table is APQI
    2. field name for session name is GROUPID
    regards,
    amit m.

  • DO NOT Get The Service With This Company IF You Want to Receive a Good Customer Service

    It is really a pain, dissatisfaction, and a lot more when you have Verizon as your service provider. I have been having service for my cellphones with Verizon for over 3 years, and did not have any major problems, so when I moved to my new place I thought it’s better to get the Fios, and have one bill for my all Verizon services. I went online and started to order my products online. During ordering, the chat session opened and I started chatting with the Customer Service Rep in order to get help through the process. When we were in the step that I could order the home phone plan, I saw the International World Plan, and I asked the lady to give me some information about this plan. I asked her that I want to call to my country and I mentioned my country’s name to her as well. I asked her that if this service is available for my country, and she said “Yes” you can call to over 100 countries with this service and she encouraged me to get the 300 minutes service. Since the plan sounded good to me I decided to get the 500 minutes instead of 300 min, and after I ordered my plan, I started calling overseas, and happy that I am paying less than the Phone cards with this plan. On March 26 I received my bill, and saw that Verizon charged me 142 $ for the less than 200 minutes that I called to my country, and there was a Letter “N” in front of each phone calls. I checked the guide to see what does “N” mean, and I saw that it said N means “Denoted calls are NOT listed in World Plan”. Well, thanks to the lady who gave me the wrong information while I was ordering my plan online, but she or the Verizon company is not that much lucky because I printed my chat session the day I ordered my plan since I wanted to have the information of what I actually had ordered. That time I did not think that I may get in trouble like this. Since March 27th, I have been calling Verizon every other day, and I have explained my issue to more than 10 Customer Service Reps, and each of them asked me to fax my chat session to them. I have been faxing that to all the numbers that they gave me, and I am keep faxing them, but do not get any respond. One of the Verizon’s Supervisors, whose name is Mark, called twice on my home phone number during the daytime, around 3 pm, and he left massages. On his second massage, he said that he checked the plan and my country is not listed in the International World Plan. He just said this, and he said that he was going to call me back, but never happened. He also did not leave me any phone number that I could call back. Also, since my cellphones are listed in the same bill as my other products, he could easily see the other numbers that he could call and reach me, but he did not bother himself to do so. I have even changed my home voice mail greeting addressing to Verizon, and left my cellphone number in voice mail greeting. I am so sorry that I have to say this, but this seems a definite fraud to me. I did not know about this plan, and I asked the Customer Service Rep to help me. She was responsible to check my country, or at least let me know how I could find out about the coverage. This is ridiculous, and if Verizon cannot take over this problem, my lawyer will take the action over, and takes the issue to their corporate court. I am not going to give up about this, and I decide to give Verizon about a week or so to solve this issue, but I won’t wait more than that. Just a friendly advice to people who want to get the home service through Verizon: DO NOT Get The Service With This Company IF You Want to Receive a Good Customer Service. There is nothing about taking care of customer in this company, and you are going to be stuck with what you get.      

    Mahsa21,
    We are glad that we were able to resolve the international calling plan issue for you.  If you need assistance,please  reach out to us.
    thanks,
    Tonya D.

  • FM for getting the Service Ticket Details

    Hi Group,
    I have a requirement wherein, I need to get the Service Ticket(s) for the system when I pass the Status of the Service Ticket.
    The query is like:
    <b>Import </b>-> Passing the <b>Status</b> of the Ticket (like : <b>Assigned/Closed/Resolved </b>).
    <b>Export-</b>> Get the details of all the <b>Service Tickets</b> whose status is mentioned in the
                 <b> Import</b> Parameter..
    So please let me know of the <b>FM/BAP</b>I to achieve this task.
    thanks in advance.
    Regards,
    Amit.

    Hi Amit,
    You can use FM
    'CRM_SERVICE_PROCESSES_SEARCH'
    Here in 'Export' Parameter:: STATUS specify the status required
    Parameter: FROM and TO for dates.
    and collect the result from Import parameter: BUSINESS_PROCESSES_LIST
    Best Regards,
    Pratik Patel
    <b>Reward with Points!</b>

  • Whether java component (Not ejb, not servlet) can be deployed in App Server and get the services provided by App Server

    As I mentioned in subject, I am just wondering Whether the java component (Not
    ejb, not servlet) can be deployed in App Server and get the services provided
    by App Server or not?

    Nevermind folks - I got it to work. All my configuration was correct; I had other issues with the ejb-jar file that the verifier informed me of (my previous deployments were with the verifier turned-off).

  • Office 2013 SP1 is here - when will Access 2013 Runtime get the service pack?

    Office 2013 SP1 is here - when will Access 2013 Runtime get the service pack? ie. When will we see Access 2013 Runtime Service Pack 1?

    Hi,
    There has no exact information about the Access 2013 Runtime Service Pack 1 now. We can continue to pay attention about it in the Microsoft Official website.
    Regards,
    George Zhao
    TechNet Community Support

  • I wants to know if i purchase sony mobile through online i will get the service from sony service ce

    i wants to know if i purchase sony mobile through online i will get the service from sony service centre or not???

    HI arshak,
    Greetings! At your convenience, please reach out to our colleagues at Sony Mobile for further assistance with your question. You can reach them at this site: http://www.sonymobile.com/global-en/support/contact-us/contact-info/  Thanks for your message today!

  • Cannot get the Service No from the subitem in a PO

    Hi all.
    What I wanna do is to get the service number within a position in a purchase order. I've tried function MPN10_READ_POSITIONS wich brings me all the data of the sub item except for service number. The function fills and internal table i_POT with PO number (EBELN), PO position (EBELP) and the service package number (PACKNO) among others. I though that by accessing with these three elements in table ESSL, I would be able to get the service number. Got no lucky,u2026u2026so, does anybody know how to get this information from the PO?

    I got it. Bye.

  • How to get the service address from service address number

    Hi, IS-U Gurus:
    I got the service address number by passing business partner number to  BAPI 'BAPI_ISUPARTNER_GETDETAIL'
    On return table of "bapiisubpa", the first field is service number, but what we need is service address,
    How can I get the service address from service number ?
    Thanks in advance.
    Liang
    Edited by: Liang Ji on Apr 27, 2009 6:57 PM

    hi
    are u looking for business partner address?
    if so u can ref table but020, get its bp no. and then refer table but000 for its address.
    Regards,
    Sumedha

  • Get the service name using form 6i

    Dear Oracle Gurus
    Can anyone please tell me how can I get the connection service name using forms 6i.
    Fawad

    Let me explain in a bit detail.
    Lets suppose, using TNSNAMES.ORA, I created a service by the name DBServer
    similarly I have some other services in TNSNAMES.ORA and I may swith between these services
    Now I connect my forms using scott/tiger@dbserver
    I wish to get this service name i.e. 'dbserver' using the form 6i

  • Query to get the service name

    Hi There,
    I want to append the SERVICE name to my email subject sent using UTL_SMTP. I am running it within PL/SQL so that it can change based on the instance. I can do a V$instance, but that shows the sid and not the service name.
    Thanks

    sys_context is the function which gives you such info:
    SELECT sys_context('USERENV', 'SERVICE_NAME') FROM DUAL;Cheers,
    Manik.

  • How can I get the "Service Name" the user used to connect to the DB with

    My application has code that is dependent on the databases "Global Name" make application processing chooses. I want to switch that to the "Service Name" the the user connected to. I have looked at SYS_CONTEXT but I do not seem to see it their. Any ideas?

    Sky13 wrote:
    My application has code that is dependent on the databases "Global Name" make application processing chooses. I want to switch that to the "Service Name" the the user connected to. I have looked at SYS_CONTEXT but I do not seem to see it their. Any ideas?09:19:31 SQL> select * from global_name;
    GLOBAL_NAME
    V112
    09:19:39 SQL>

  • Not getting the service I'm paying for

    I spoke to a representative yesterday. My internet speed and tv service was to be upgraded. Over 24 hours later, nothing. How long does this take? I am frustrated with AT&T and the lack of concern for its long time customer. I have used them for many years. I need to shop for new services. AT&T doesn't care for this customer anymore.

    Unplug all your boxes when not recording anything (or else the recording will be messed up.) Plug the RG "modem" back in. Wait until the lights go solid. Plug the DVR back in and wait for normal operation. Plug the other set-top boxes back in and wait for normal option.
    Another idea -- Turn to a channel you should be receiving as part of the upgrade. Do you get the black screen or do you get an image? If you get an image with sound and don't see it in your guide, the channels are hidden. You'll have to press "menu" then select options, channel options, hide channels, then select each channel in that list that you want to appear on the guide. You'll have to do this individually for each box, but you can manually enter numbers on the remote to quickly go to that channel.
    If the channels are shown on the guide and you've reset everything and still no upgrade, send ATT Customer Care a PM using the link below. Include all relevant information, a link to this thread, a phone number with a good time to reach you and your real name and billing number. Someone will get back to you within 2-3 business days via the blue envelope at the top right corner. (You'll see a "1" showing one unread message.)
    https://forums.att.com/t5/notes/privatenotespage/tab/compose/note-to-user-id/192773

  • Hello. I ve bought the iphone 4 in usa ..unfortunately its broken ..but my problem is i live in Moscow and i cant get the service because the person from service said to me that i can get it just in store when i ve bought  it..what can i do?

    Hello! I bought the iphone 4 in USA but when it was broken and i wanted to get service in Moscow ..they told me that i could go the the store where i bought it .. what can i do now?? I thought that it doesnt matter where i bought the phone ..I thought the apple has international service.. ?????

    The only thing you can do is get the phone back to the US somehow even if someone else has to take it for you (which is fine).  The iphone does not have an international warranty except throughout the EU.

  • Where do i can get the service order attachment details

    Hi Guys,
    I am developing a report, which it needs to delete the attachments for the particular service order, in which details i can the service order attachment details.
    Thanks,
    Gourisankar.

    Dear Gourisankar,
    Did you get any help or solve this issue since i face the same problem and i could not find a solution

Maybe you are looking for

  • Animated GIF broken on iPad, iPhone

    [This is a cross-post with the iPhone forum:  https://discussions.apple.com/message/17908717#17908717 ] I develop a web site and I use animated GIFs. They used to work fine on both iPhone and iPad, but now they're broken. The animation plays but one

  • Installing Flash player fails AGAIN on Win 7

    Recently I had discussed here a problem with installing Flash Player on 32-Bit Windows 7, which was solved by help in this forum. Now I had a similar problem with 64-Bit Windows 7 with Flash Player for Mozilla. Installation just said that it failed,

  • Converting files with Camera Raw 4.1

    Have just upgraded to iphoto '08, and am having problems with "noise" in the raw conversion within iphoto. So, I'm using Camera Raw 4.1 instead (a bit of a pain as I have a batch of 200 photos to convert from a wedding!). A question ... can you save

  • Player 8 help

    Is there a way for someone to help me make this code work in Flash Player 8 (Actionscrpt 2: largodemo = 25; myString = this._name; temp1 = ""; for (n=0; n<largodemo; n++) { temp1 += chr(random(42)+48); temp2 = this.myString.substr(0, i); this.eltexto

  • Time dimension generated differently in 11gR2

    Hi, on generating a new default time dimension, I noticed some strange behaviour compared to the former release which seems to be incorrect. 1. No DIMENSION_KEY column as PK 2. the %_START_DATE columns are defined as business key instead of the %_NUM