How to find out web-inf path from the physical drive?

How to find out web-inf path from the physical drive?
I have some user profiles in web-inf directory.SO I want to know the path from root directory like
d:/program files/allaire/jrun/appname/web-inf/profiles/username like that.
Presently I am able to get the path upto the application directory and from that I am concatinationg web-inf/profiles/username .
But it is giving problems when it is deployed under unix or linux.Because web-inf there it treats as WEB_INF
SO I want to get the path of web-inf directory with out hard coding.
Thanku

String path = application.getRealPath("/WEB-INF/profiles/username");
Note sure why you need this, but you don't need the real path to read the file - you can get an InputStream using the relative path. See ServletContext getResource() and getResourceAsStream().

Similar Messages

  • How to find out top 10 records from the R/3 using Java code (WD Program)

    Hi Experts,
    I have used Java Web Dynpro program to fetch records from the backend. Following code helps me and fetches record. As per the customer reqirement, we have to fetch only top 10 records (Actual Cost) from the backend. So I have to modify the Java code. How I can do so? Please help.
              wdContext.nodeGraphData().invalidate();
              IPublicCostcnt.IGraphDataElement categoryElement;
                   for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
                   categoryElement = wdContext.createGraphDataElement();
                   categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
                   categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
                   categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
                   wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

    Dear SDN Users,
    This is how I resolved the issue.
    1) Requested ABAPer to provide me sorted data. The data has been sorted in descending order of actual_cost.
    2) After that I used following code. This resolved the issue.
         if (wdContext.nodeItab_Final1().size()>10){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < 10; i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
         if (wdContext.nodeItab_Final1().size()<=10){
         if (wdContext.nodeItab_Final1().size()>0){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

  • How to find out which data control do the page layout components come from?

    hi,
    work in Jdev 11.1.2.3
    After have drag and drop data control into pages designer, how to find out which data control do the page layout component (such as a field in form layout) come from?
    --i cannot find data control related information in the property pallete for the page layout component.
    Regards.

    This information can be found in the page definition file.
    Select the field in the page and then click the binding tab.

  • How to find out web content files linked in folio through scripting

    Hi all,
    Please suggest me, how to find out web content files linked in folio through scripting.
    Regards,
    Moorthy

    @Moorthy – can you tell us a bit more? By mentioning "folio", I think you are referring to Adobe Digitial Publishing Suite (ADPS or short: DPS). If yes:
    1. Do you want to analyze Folio files *.folio and get the linked web content files?
    2. Or do you want to check an InDesign file with an overlay and check what files are linked as web content?
    3. Or something else?
    Where is your base problem?
    Packaging the InDesign files and copy/relinking the web content files after the packaging process?
    Uwe

  • How to find out which objects are at the end of the datafiles

    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.

    >
    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.
    >
    You may want to copy this and add it to your toolkit
    See 'What's at the End of the File?' in this Tom Kyte article from the Sept 2004 Oracle Magazine
    http://www.oracle.com/technetwork/issue-archive/o54asktom-086284.html
    And this AskTom blog shows you how to generate a script containing ALTER statements toresize your datafiles to the smallest possible. You can 'pick and choose' from the ALTER statements to do what you want.
    Then of course, you can use techniques from this article by Oracle ACE, and noted author, Jonathan Lewis
    http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/

  • How to find out if your Mac has the new Virus ?

    How to find out if your Mac has the new Virus, and how to fix it ???

    Helpful Links Regarding Flashback Trojan
    A link to a great User Tip about the trojan: Flashback Trojan User Tip
    A related link in the tip to a checker: Malware Checker Dowload Link
    A Google search can reveal a variety of alternatives on how the remove the trojan should your computer get infected. This can get you started.
    For now I recommend the User Tip from etressoft to detect and remove:
    Checking for and removing the "Flashback" trojan
    Kaspersky Flashback Trojan Site:Flashback Trojan Detection and Removal
    Also see Apple's article About Flashback malware.

  • The logic board on my MacBook Pro has failed. How do I retrieve all my data from the hard drive?

    The logic board on my MacBook Pro has failed. How do I retrieve all my data from the hard drive?

    Remove the drive and put it in an external enclosure. Backup the drive completely. Repartition and format the drive. Replace the drive into the computer. Take the computer in for the logicboard replacement.

  • HT1766 HOW CAN I CHANGE MY BACKUP FOLDER FROM THE C DRIVE TO ANOTHER?????

    HOW CAN I CHANGE MY BACKUP FOLDER FROM THE C DRIVE TO ANOTHER????? because my c drive in the windows computer gets filled and i need to back up my ipod to a portable hard disk.. bt i dont know how to do it.. plz help

    you can't change the backup folder as far as I know, but you can choose to move backups. The information you need can be found in this article: http://support.apple.com/kb/ht4946
    Where iTunes backups are stored on your computer
    The folder where your backup data are stored varies depending on the computer's operating system.   Make sure the backup folder is included in your periodic data-backup routine.
    iTunes places the backup files in the following places:
    Mac:  ~/Library/Application Support/MobileSync/Backup/
    Windows XP:  \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Note: To quickly access the Application Data folder, click Start, and choose Run. Type %appdata% and click OK.
    Windows Vista and Windows 7:  \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    Note: To quickly access the AppData folder, click Start. In the search bar, type %appdata% and press the Return key.
    Hope this helps
    Regards,
    Stijn

  • How to find out what was imported from a dump file

    Hi.
    I got the dump file from a group and they told me to import it. Import job went successfully without errors as following:
    Import: Release 9.2.0.6.0 - Production on Mon Oct 16 20:53:12 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    Export file created by EXPORT:V09.02.00 via conventional path
    Warning: the objects were exported by OPS$ORACLETS, not by you
    import done in US7ASCII character set and UTF8 NCHAR character set
    import server uses WE8ISO8859P1 character set (possible charset conversion)
    export server uses AL16UTF16 NCHAR character set (possible ncharset conversion)
    . importing OPS$ORACLETS's objects into SYS
    . importing BDS_APP's objects into BDS_APP
    Import terminated successfully without warnings.
    How do i find out what was imported from a dump file?

    another way would be to just list the contents of the dump file
    imp user/pass file=dumpfile show=Y

  • How to find out import & export path for object migration between D Q & P?

    Hi guys!
    Is there a way, how to find out export and import path for object transport on XI?
    Thanx!
    Olian

    Hi,
    Have a look at these links.
    When we do an export of the IR or the ID Oblects, a typical path at which it gets exported in the XI Server is as follow:
    For IR Objects:
    “C:\usr\sap\PI1\SYS\global\xi\repository_server\export “
    For ID Objects:
    "C:\usr\sap\PI1\SYS\global\xi\directory_server\export"
    Now in case you need to import the ".tpz" that you have.... You need to place it in the path mentioned below and u will be able to do import it from IR or ID...
    For IR Objects:
    “C:\usr\sap\PI1\SYS\global\xi\repository_server\import “
    For ID Objects:
    "C:\usr\sap\PI1\SYS\global\xi\directory_server\import"
    File Level transport in sap xi
    Every SLD related transport details are explained here
    Regarding transport of SLD objects
    https://service.sap.com/~sapdownload/011000358700001684302005E/HowToSLDandXI.pdf
    Regarding transport of XI objects
    http://help.sap.com/saphelp_nw04/helpdata/en/93/a3a74046033913e10000000a155106/content.htm
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.
    Message was edited by:
            Akshay Jamgaonkar
    Message was edited by:
            Akshay Jamgaonkar

  • How to find out sub site name from which sub site template is created - in solution gallery

    hi,
     i am having an issue in my "save site as a template". i have created  a subsite few weeks back with doc libs and  splists, disc.forum and  based on the template subsite I have created new subsites. now 
    as  per my new requirement i need to add new  doclibs and few columns in these doc lib. But I am unable to find which sub site was taken as a template.since i have many  subsites with different names, I forgott
    to make meaningful names, i gave some datetime for the templatesubsites,
    like project_27_jul_2pm,project_20_jul_7pm, etc etc.
    So would like to know, is it possible to find out from which subsite I have taken/prepared  the template subsite.
    any APIs are available or any power shell scripts. such that i can find  out from which subsite i have created this  sub site template.

    check this
    http://social.msdn.microsoft.com/Forums/en-US/3c492adb-e7cb-4f5c-8c29-386a21c3498e/how-to-find-out-a-list-of-sites-created-from-a-template?forum=sharepointgeneralprevious

  • How to find out which cube/ods has the code

    hi,
    I want to find out which cube/ods has the start routine/update rules written in it.  Is there a table or Tcode to find out the code instead of opening each cube/ods to find out whether there is code in it or not.
    Thanks,
    Sam

    hi Sam,
    take a look
    /message/3483792#3483792 [original link is broken]
    try RSTRAN, field STARTROUTINE
    related tables
    RSAROUT
    RSAABAP
    RSAABAPINV
    RSAROUTT
    Technical name of start routine
    Re: How to get info about a GP* program?
    Re: Search for start, update rule, etc. that uses infoobject
    if couldnt find out, you can use ST05 'sql trace', open 2 session, one for create start routine, and one for ST05, activate with option 'sql trace', then create start routine and 'deactivate trace' and 'display trace', and check out the tables list
    hope this helps.

  • How to find out users inapproprate access in the system

    Hi Experts,
    Please any on help me out how to find out the inappropriate critical/sensitive Access is granted to all end users.
    Regards,
    Reddy v.

    Hi Siddhesh,
    Thanks for your reply.
    I already used  the SUIM T-code, but unable to find out users, those who have critical / Sensitive authorization, could you please help me to find out the same by using SUIM,
    We will  able to get the critical / Sensitive authorization users details by executing RSUSR005.
    It display all Usres those who have critical / Sensitive authorization.
    But I want to know is thier any other way to find out the same.
    If any one help me to find out it will usefull for me for the security issue.
    Thanks
    Prakash

  • How do you get the web application path from the servlet?

    I have created a web application which is installed in
    /webapps/myApplication
    /webapps/myApplication/data/users.xml
    /webapps/myApplication/WEB-INF/classes/myServlet
    How can you get the path to the "users.xml" file from the "myServlet" file?
    The code below doen's seem to return the xml file. anybody knows why?
    public class myServlet extends HttpServlet {
    public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException
    File myXmlFile = new File("/data/users.xml");

    Try this..
    String FileName = getServletContext().getRealPath("\\data\\users.xml");
    File myXmlFile = new File(FileName);
    hope this helps..

  • How to find out a skype ID from a text?

    Met someone today and gave them my number, but they are from another country so i guess they used skype to text me which i can't reply to because skype is retarded... anyways, is there any way to find out the skype name of the person who sent it? The text just came from a random 5 digit number. I also got a phone call that i missed just a minute before this from a stange number with way too many digits so i assume its from skype as well so i have a number from that too but i can't call it back.

    Community_Team wrote:
    Congratulations, monclm!
    As the result of your contributions to the community, you have earned a new rank. Your new rank is Casual Tourist.
    We appreciate your efforts and hope you will continue to be an active member of the community.
    Thanks!
    How sweet of you to welcome me.
    However...I've been screaming at my computer for the last day because of one simple problem that it seems imposible to sort.
    Do you know that your customer support is an endless labyrinth? Is it deliberate????
    I don't have my Skype ID. I would like to find out my Skype ID. It would be useful to have it. I'm sure you understand.
    So far I've reset my password wht seems like a million times which now means that I have to write down a random password which means that my account is now no longer secure. Also it was entierly unclear that resetting my Skype password would reset my Hotmail one too - Not helpful to say the least.
    So I go through the rigmarole of contacting your customer 'services' and I have to reset my password - as I've said, this is unhelpful but I do it. Many times. And then.... I need my Skype ID to go any further. You can see the problem here. My issue is I don't have a Skype ID and I need to use my Skype ID to then get help finding out what my Skype ID is....
    Please tell me what my Skype ID is. I have an interview for a job that I need to do over Skype - I've been out of work for the last 8 months and it would be really nice to get a job and for it I need my Skype ID.
    Many thanks in advance for your help,
    Monica

Maybe you are looking for