Problem in retriving the realpath from the servlet

Hai All,
I am facing problem in retriving the realpath from the servlet.
I am using the following code in order to retrieve the path.
String prefix = getServletContext().getRealPath("/WEB-INF/classes");
The value returned from above code is null.
I am using Weblogic 8.1 server, and deploying my servlet as WAR file inside
the weblogic server.
Is this the problem with the weblogic server or with the code. Is there any way to over come this.
I need the path as i am implementing Log4j for the servlet and i have to pass the
configuration file in one of the function "PropertyConfigurator.configure(file);"
where the file should include complete path.
My configuration file is in WEB-INF/Classes directory.
Any help is appreciated.
Thanks in advance
Pooja.

String realPath = request.getRealPath(request.getContextPath());
That should return the path up to where you have your servlet context.

Similar Messages

  • How to get the value from a servlet?

    Hello guys:
    how can i get the value from a servlet on my jsp page,for example return a boolean variable from a servlet
    which API to use?
    thanks

    Hi
    There is no specific API for this, call the method of the servlet which returns the required value in your JSP page.
    Thanks
    Swaraj

  • The problem here is i am not able to get the data from the list

    hi all,
    i have the following code
    EnrichedProductCatalogue enrichedProductCatalogue1 = new EnrichedProductCatalogue();
    enrichedProductCatalogue1.setAssetCount(2);
    enrichedProductCatalogue1.setBlockingProduct("Weekend Freebee");
    enrichedProductCatalogue1.setBlockingReason("Compatability");
    ArrayList<String> availableActionsList = new ArrayList<String>();
    availableActionsList.add(EnrichedProductConstants.ADD.toString());
    availableActionsList.add(EnrichedProductConstants.REMOVE.toString());
    enrichedProductCatalogue1.setAvailaibleActions((ArrayList<String>)availableActionsList);
    BundleProduct bundleProduct = null;
    Product product = new Product();
    product = new Product();
    product.setProductName("International");
    product.setProductClassName("International");
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);
    bundleProduct = new BundleProduct();
    bundleProduct.setCommercialProduct(product);
    enrichedProductCatalogue1.setBundleProduct(bundleProduct);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    here i have an list called listOfEnrichProducts.
    here i am adding two objects of enrichedProductCatalogue.
    which contains a object called BundleProduct.
    which has a reference for Product class.
    here this product class has a list which contains objects of another class called UiCategory.
    the problem here is i am not able to get the data from the list which contains UiCategory objects .
    the following is the UI
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{pageFlowScope.sample1}"
    binding="#{pageFlowScope.sampleManagedBean.dataTable}"
    partialTriggers="apimethods ::apimethods">
    <af:column sortable="false" headerText="ProductName" id="c2">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productName}" id="ot15"/>
    </af:column>
    <af:column sortable="false" headerText="ProductClass" id="c12">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productClassName}" id="ot19"/>
    </af:column>
    <!--
    <af:column sortable="false" headerText="UICategoryName" id="c32">
    <af:forEach var="item" items="#{row.bundleProduct.commercialProduct.uiCategory}" >
    <af:outputText value="#{item.categoryName}" id="ot119"/>
    </af:forEach>
    </af:column>
    -->
    <af:column sortable="false" headerText="AssetCount" id="c22">
    <af:outputText value="#{row.assetCount}" id="ot1"/>
    </af:column>
    <af:column sortable="false" headerText="blockingReason" id="c3">
    <af:outputText value="#{row.blockingReason}" id="ot2"/>
    </af:column>
    <af:column sortable="false" headerText="blockingProduct" id="c4">
    <af:outputText value="#{row.blockingProduct}" id="ot3"/>
    </af:column>
    <!--<af:column sortable="false" headerText="availaibleActions" id="c1">
    <af:commandButton text="#{row.availaibleActions}" id="cb1"
    actionListener="#{pageFlowScope.sampleManagedBean.callAction}"
    partialSubmit="true">
    <af:setPropertyListener from="#{row.availaibleActions}"
    to="#{pageFlowScope.avalibleaction}" type="action"/>
    </af:commandButton>
    </af:column>-->
    </af:table>
    Can anyone pls give some solution ...

    Hi Frank,
    value="#{pageFlowScope.sample1}"
    here sample is
    Map<String, Object> flowScope1 =
    ADFContext.getCurrent().getPageFlowScope();
    flowScope.put("sample1", listOfEnrichProducts);
    this is not the problem . i am able to get all the values except the following .
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);

  • While logon to lync it gives error " there was a problem verifying the certificate from the server "

    i already go through all threads related to my question. but not even one thread is satisfying my question  ok my problem is again the same it gives me error as i mentioned in title. client OS is XP. actually can somebody tell  me which certificate
    i should import in which name of certificate group.
    N ya why error has occur. help me 
    thanks in advance 
    jayesh rohit

    You'll want the CS root certificate in the trusted root certificate authorities area of the machine store (vs the user store).  If there are any subordinate CAs with intermediate certificates, put them in the intermediate certification authorities area. 
    Verify that the certificate has the correct SANs for you server.  Did you generate the certificate from the deployment wizard, did you check the box for the sip domains as you went through the wizard?  Is the certificate internally signed by your
    certificate authority?  Are you attempting to connect internally or externally when you see the issue? 
    Can you confirm that your SRV records for _sipinternaltls._tcp.domain.com have the correct port and hostname and that the hostname is also resolvable?  Can you do the same for _sip._tls.domain.com?
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications

  • I have a problem. When I start to sync music to my iPod touch, you have to enter the password of your account. I downloaded the game from the general account, and do not always know the password. He writes that if I do not login, then the game will be era

    I have a problem. When I start to sync music to my iPod touch, you have to enter the password of your account. I downloaded the game from the general account, and do not always know the password. He writes that if I do not login, then the game will be erased. Previously, this was not. When starting to sync music, it did not touch my programs, and now because of this music can not be transferred to iPods. PANIC AT ME! HELP

    If they are Tunes purchased music you have to sing into the account that purchased them.
    Is this the iTunes library/computer you sync with? You can rally only "sync" with one iTunes library/computer.However, yo can manually manage music and videos among different libraries/computer. See the manual method of:
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad

  • I have a password problem. After importing data and settings from one MacBook Pro to a new one, I have to put my iCloud password in when re-starting, but the password from the old computer in when waking the computer from sleep.

    I have a password problem. After importing data and settings from one MacBook Pro to a new one, I have to put my iCloud password in when re-starting the new computer, but the password from the old computer in when waking the computer from sleep. I want to use my iCloud password on both computers consistently. How can I fix this?

    The only other place to change a password for the computer login is in Users & Groups preferences. But I don't really know enough here to fix your problem. You can try fixing the keychain:
    iCloud- Frequently asked questions about iCloud Keychain
    Tutorial: Resolving Keychain Issues
    If you can't access your keychain, or forget your password If you can't get into your keychain file because you've forgotten your password or the keychain file appears to be corrupt, there are a couple of options.
    First, if you've forgotten your password, you can use the "Keychain First Aid" utility to make the keychain password the same as the login password. This can be accomplished via the following process:
      1. Open Keychain Access (located in Applications/Utilities)
      2. Go to the "Keychain Access" menu and select "Preferences"
      3. Click the "First Aid" tab
      4. Make sure the "Synchronize login keychain password" box is checked
      5. Close the Preferences window
      6. Go to the "Keychain Access" menu and select "Keychain First Aid"
      7. Enter your username and password
      8. Click the "Repair" button
    The second option is to completely delete your keychain then recreate it. This routine is useful if your keychain appears to be corrupt or otherwise inaccessible. This can be accomplished as follows:
      1. Launch Keychain Access (located in Applications/Utilities)
      2. Click "Show Keychains" in the lower-left corner of the window.
      3. Select the problematic keychain from the left-hand pane.
      4. Navigate to the "File" menu and select "Delete Keychain '(name of keychain)'"
      5. Check all options for deletion and press "OK"
      6. Create a new keychain by going to the "File" menu, then "New" and selecting
          "New Keychain"
      7. You can now make this keychain your default if you desire by selecting it, then
          going to the "File" menu and selecting "Make '(name of keychain)' Default"
    Login as root and perform repair In some cases, problems with keychains can only be resolved when logged in as the root user.
    First, you want to enable the root user:
      1. OS X Mountain Lion: Enable and disable the root user
      2. OS X Lion: Enable and disable the root user
      3. Mac OS X 10.6: Enabling the root user
      4. Enabling and using the "root" user in Mac OS X
    After enabling the root user, and logging in under this account, again open Keychain Access. First attempt repairs using Keychain First Aid, and failing that, delete then recreate the keychain as described above while logged in as root.
    Persistently asked for stored passwords If you are persistently asked for passwords in various applications that you have specified should be remembered in a keychain, your "login" keychain may not be active for one reason or another.
    Navigate to ~/Library/Keychains/ (this is the Library folder inside your user's home folder). Find the file named "login.keychain" and double-click it.
    Failing that, select the "login" keychain within the Keychain Access application and make sure it is the default keychain by going to the "File" menu and selecting "Make 'Login' Default"
    Turn off Keychain synchronization in applications having problems If specific applications are experiencing issues when accessing password-protected material, the Keychain may be to blame.
    The above comes from an article published on MacFixit.com.

  • Problem in downlaoding the attachment from the transaction iw33

    Hi experts ,
    I am facing problem in downlaoding the attachment from the transaction iw33 where we have attached a presentation.
    when i tried to debug it at the function module GUI_DOWNLOAD its returning sy-subrc = 5 which is no authorization .
    there is some problem with the user authorizations as the same thing is working fine with other SAP user account .

    It was an authorisation problem .

  • CA issue - Workstation signin "There was a problem verifying the certificate from the server"

    Hi,
    We have issues with all workstations on our domain. I just recently setup Lync 2013 server on a windows 2012 OS. When I went to test sign-in, I received a message "There was
    a problem verifying the certificate from the server". To fix this issue, I had to download the cert and import it into Trust Root Certification Authorities on the local workstation. This will be impossible if I have to do this for multiple machines.
    Is there a way around  this? Why is it asking to do this?
    Thanks guys, much appreciated.
    MM

    You can follow the instructions here to use Group Policy to install your root certificate to all your workstations.
    Or you could re-deploy your CA as an Enterprise CA.
    Hi Georg,
    Thank you for your reply.
    I did deploy my CA as an Enterprise CA..... Not sure why its still asking me to install on workstations?
    How can I confirm its an Enterprise CA?
    Thanks,
    MM

  • Problem with fan, temperature and battery after the restore from the stop (Macbook pro 15)

    From a couple of weeks my macbook pro (15" 2.4 Ghz i7 4gb OS X 10.7.4) has this problem: when i close the screen it goes to stop and when i open it goes out the stop normaly but the fan and the temperature increase and the battery last nothing. So i reboot the mac and everithings go to normal way and also battery time increase in comparison with before...

    I've found that samsung kies wifi started at the login and that the app used 91% of my cpu and filled up my ram so i went to: system preference > users and groups > login's elements > and i deleted the app from the list.

  • HT1338 I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    It should unzip if you double-cick.
    What are you seeing happen when you do that?
    Select a .zip file in the Finder and Get Info (cmd-i). What is set for it to Open With. It should be Archive Utility.

  • Problem with "Capture Server Model from the Database"

    I've installed Oracle-Developer-Suite 10g and Designer 9.0.4.5.6. The repository databse is Oracle 10g and the application database is Oracle 9i (about 700 tables for the application). After I started the Designer Editor, I got the follwoing message:
    "No network notification service has been configured for this Repository instance. A desktop-only notification has been started."
    What does it mean? What's wrong with the configuration? How can I avoid this problem?
    Then I tried to "Capture Server Model from the Database". It took hours to read the data from the database. After reading the data, the following message occurs:
    "138 overlaps could not be eliminated by AutoLayout as there is insufficient room to layout the items. Select a large area and retry"
    I can not save the uncommited data into the repository.

    1. Designer 9i was made to capture 9i DB functionality. So no it will not capture full 11 DB functionality.
    2. Yes I have had some problems capturing from an 11DB and have written a bug on it.
         Bug.7138247     (74) CANNOT DESIGN CAPTURE A TIMESTAMP(6) FROM 11G DB:
    this is fixed in Designer 10.1.2.5

  • Is anyone experiencing problems with opening mission control from the desktop.  Running mountain lion with parallels 7 and windows 7

    is anyone experiencing problems with opening mission control from the desktop.  Running mountain lion with parallels 7 and windows 7

    I had been having a similar problem on Lion with Safari pdf files despite downloading the latest Adobe Reader XI.
    I would constantly get the same messages - There was an error opening this document. The file is damaged and could not be repaired. And I would get a blank page when I tried to print the pdf if I tried printing from the Safari web page using File - Print from the top toolbar on my laptop.
    Then I came across the grey Safari lozenge with action icons.
    This allowed me, without downloading the pdf, to print the pdf file direct from the Safari page by using the Print icon on the grey lozenge that appears centrally three quarters down the screen.
    Then I discovered that if I save the pdf using the Save icon from this same grey lozenge on the Safari page I can open and print this pdf version from my desktop.
    I've tested it with a couple of different pdf files and these methods work using the grey lozenge icons but the same pdfs files don't work using File - Save As on the Tool Bar.

  • Dreamweaver encountered problems while constructing the menus from the current menus.xml file

    So, after having trouble with my Photoshop scratch disk, I had to do an archive and install of my Mac OS 10.6.1 then reinstall the Adobe suite. I then had to run the Licensing Repair Tool (http://www.adobe.com/support/contact/licensing.html).
    Now everything works but Dreamweaver, which is throwing the following error:
    "Dreamweaver encountered problems while constructing the menus from the current menus.xml file.
    Please delete the current menus.xml file and rename menus.bak to menus.xml"
    I tried that. menus.bak is a directory, not a file. Even renaming the directory didn't work.
    I saw this http://forums.adobe.com/message/2188511#2188511
    but I don't have a /FlashPlayerTrust/ directory, nor do I see what that has to do with Dreamweaver.
    I couldn't find a corresponding solution for this http://forums.adobe.com/message/862339#862339 for the Mac OS.
    This http://forums.adobe.com/message/3396334#3396334 didn't help, either.
    Anybody have any ideas?
    Thanks!

    This is the error I got after deleting (moving) the configuration directory.
    "No document types have been found in the Configuration/DocumentTypes/ folder. The MMDocumentTypes.xml file may be missing or corrupted. The application will exit now."
    I've reinstalled the entire Adobe CS4 (which fixed my Photoshop problem but created this Dreamweaver problem) and then reinstalled Dreamweaver alone.
    I've also attached a screenshot of the Dreamweaver directory tree with the menus.xml files.

  • There was a problem verifying the certificate from the server

    i can not sign in to my lync server in client user and the error message is "There was a problem verifying the certificate from the server".
    i can sign in in my lync server by any account but i can not sign in in other pc clients.

    Hi,there,
    Just some additional info...
    Please go through the following old threads with the same error message
    http://social.technet.microsoft.com/Forums/en-US/ocscertificates/thread/19d74620-9ea8-4f19-bc01-25387e4ee380/
    http://social.technet.microsoft.com/Forums/en-US/ocscertificates/thread/7a973094-6cd1-4f3f-9af0-6d330a9b8428 
    http://social.technet.microsoft.com/Forums/en-US/ocscertificates/thread/4034e791-6c3c-4c35-b936-bca734204fd4/ 
    Hope these helpful!
    B/R
    Sharon
    Sharon Shen
    TechNet Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

  • My problem is a sudden loss of ability to get to PSE12 Organizer when I tried to load a saved scan. Had been using the Organizer and the Editor with no problems for several hours just before that.     Can not load the Organizer from the icon at the bottom

    My problem is a sudden loss of ability to get to PSE12 Organizer when I tried to load a saved scan. Had been using the Organizer and the Editor with no problems for several hours just before that.  
    Can not load the Organizer from the icon at the bottom of  Editor screen, from the icon on the MacBook Air dock (OS 10.10.2),  nor from the file in applications located with Finder.
    I have tried without success to access Organizer after turning off and on the scanner, turning off and on the computer, loading a fresh copy of PSE12 from the CD, and restoring default preferences.  I have searched on line for other options but not  found any. 
    Can you help me?

    Not Charge
    - See:    
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
    - If a 5G iPod               
    Iphone 5 lightning port charging problem - SOLUTION!
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

Maybe you are looking for

  • Question about the concept of RMI reverse calls.

    Hello guys. I'd appreciate if someone could clarify something to me. As far as I understand , RMI reverse call in concept, is the mean thought witch a server can remotely call a method belonging to the client. I've done that like this: the client cal

  • Help. I can't update iPod Touch 1st gen from ios 2.1.2 to 3.1.1; already paid for it.

    Hi all,   I got an iPod Touch 1st gen for my youngest son for Christmas as a starter. It has the 2.1.2 ios on it, but after I paid for the upgrade to 3.1.1, I keep getting an error message (8288) saying there was a problem with the network connection

  • Odds on whether I get my alias back

    It has been 4 days and I still can't login using my old alias - jschell. Naturally I am more than a little annoyed. Anyone want to guess on odds that I will ever get it back?

  • Can't start up after power failure.

    Greetings. Here in the Santa Cruz mountains we experience occasional power outages. After an outage, when I attempt to re-start the computer, it doesn't get past the spinning spokes (or whatever you call that thing). The thing just keeps spinning unt

  • How can I uninstall MFP 5?

    I have run the Secuna Program on my compiter and it shows that I have MFP 5.X (active X control) installed.  I have searched and cannot find the file. I also ran the Adobe MFG uninstaller and that didn't help.  I do have adobe Flash Player 10 install