How to use relative url

I use xml file to save configuration and saved /WEB-INF/config.xml
In my java class i can't use that file with relative url.
document=builder.parse(new File("/WEB-INF/config.xml"));

Try something like this:
String thisPath = this.getClass().getResource("").getPath();
document=builder.parse(new File(thisPath + "/WEB-INF/config.xml"));

Similar Messages

  • How to use relative paths in Captivate 8 / Cómo usar URL's relativas en Captivate 8

    Hello, I have developed a bunch of courses which will be migrated to a new site and I am having trouble changing the absolute paths into relative URL's to resources such as PDF files inserted into the scorm packages. I cannot find information on how to use relative paths in Captivate. Please help. Thank you.

    I have the same issue with relative links using Captivate 8.  I am trying to load Captivate modules into an LMS using relative links to document files within the LMS.  The links work fine during a site page test so not an issue in the LMS, but from the Captivate module they aren't working....
    Help?

  • How to use one URL for several Oracle AS?

    Hi folks,
    how do I use one URL to access several application servers (i.e. for different applications).
    Example:
    We have one URL:
    www.test.com
    In our DMZ, wie have three application servers and one web cache:
    test1.intranet.com:7777
    test2.intranet.com:7777
    test3.intranet.com:7777
    webcache.intranet.com:8000
    One application server is no problem. In Web Cache, i just map site www.test.com:443 to AS test1.intranet.com:7777.
    But what is the correct setting, to access all three Oracle AS over one URL? I tried URL PATH Prefix. Then i am able to access all three Oracle AS, but the application server does not know the Path.
    Example for mapping:
    www.test.com:443/server2 -> test2.intranet.com:7777
    When I access www.test.com:443/server2, I get redirected to the correct AS (test2.intranet.com:7777), but the Oracle AS does not know the path /server2.
    How do I have to configure the Oracle AS?
    Thanks in advance and best regards.

    I setted up a proxy and at first glance,
    it works fine. The problem are internal links. Some links redirect to the
    machine name, which is of course not accessible from outside our dmz.
    My httpd.conf entries:
    ProxyPass /test1infra/ http://test1.intranet.com:7777/
    ProxyPassReverse /test1infra/ http://test1.intranet.com:7777/
    ProxyPass /test1mid/ http://test1.intranet.com:7778/
    ProxyPassReverse /test1mid/ http://test1.intranet.com:7778/
    When I now access (for example) www.test.com/test1infra/pls/orasso I get
    redirected to www.test.com/pls/orasso, which is another Oracle AS!
    How can I prevent my OracleAS doing this? It has to "know" that all its internal urls need a url path prefix.

  • Problem with sendRedirect using relative URL in WebLogic 5.1 with SP7 & 8

    I patched to SP 7 (and also 8), and the request.sendRedirect() with relative
              URL failed. The browser simply displayed "404 - Page not found".
              This problem only happens in a cluster environment attached to a web server.
              SP6 or earlier does not have such problem.
              I noticed that the latest SP always formats the URL and returns it as a full
              absolute URL to the browser. The problem is it uses the Weblogic Server host
              URL where the request is processed (not the Web Server host URL) which is
              not visible to the internet.
              Is it possibly a bug in SP?
              

    I patched to SP 7 (and also 8), and the request.sendRedirect() with relative
              URL failed. The browser simply displayed "404 - Page not found".
              This problem only happens in a cluster environment attached to a web server.
              SP6 or earlier does not have such problem.
              I noticed that the latest SP always formats the URL and returns it as a full
              absolute URL to the browser. The problem is it uses the Weblogic Server host
              URL where the request is processed (not the Web Server host URL) which is
              not visible to the internet.
              Is it possibly a bug in SP?
              

  • How to use GO URL?

    Hi All,
    I have two Reports-
    Report1 - Dim A (A1,A2,A3) , Fact A (B1,B2,B3)
    Report2 - Dim C (C1,C2,C3) , Fact C (D1,D2,D3)
    Where A1,A2.. ,B1,B2.. ,C1,C2..,D1,D2.. are the attributes of dimensions and facts.
    While drilling from attribute B1 in report1, i want to pass parameter A1 to report2 and want to see only the records in report 2
    for which C1 = A1. The attributes A1 and C1 are having the same values.
    For Drilling from measure B1 , i can use GO URL. But in the report2 "Dim A.A1" is not present.In Report2 , i have "Dim C.C1".
    For GO URL, the parameter that is passed from one report should be present in second report.
    Thus , how can i implement this scenario? My target report has different attribute.
    Thanks, Ashish

    Hi Goran,
    I have the same requirement and implementing what you said
    As you said,I have given HTML for the dataformat and in the column fx i gave the following.
    case when project.SOURCE = 'BETA' then '' ||Sample.org_code || '' else Sampleorg_code end
    case when project.SOURCE = 'BETA' then '' ||Sample."PWA#_L" || '' else Sample."PWA#_L" end
    The first navigation is working fine,its giving me the data only for the selected org code(Org Code is numeric).But, the second navigation is giving all the results in the target report irrespective of the selected PWA#_L.PWA#_L is Alpha numeric
    Please let me know where i am going wrong.
    Thanks in Advance.

  • How to use Go URL to Navigate from one report to another

    I have used Actionlink option to navigate from one report to another, It is nopt working on the dashboard because i used presentation variables in my first report and its throwing me an error below, I have to pass on id from one summary report to detail report, I have created Go URL, Do i need to use that URL in my summary report column formula ?
    Need some info ~ Thanks ~Srix
    An invalid object was accessed during evaluation.
    Error Details
    Error Codes: QBB4RZQS:SDKE4UTF
    Location: saw.views.evc.activate, saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool, saw.threadpool, saw.threads
    Expression: report.variables['TimePeriod']

    Hi ,
    Please refer the below threads.
    How to Navigate from one report to another report based on column values
    Navigating from one report to another report
    Re: Navigate from Report 1 to Report 2 using Go URL
    Award points it is useful.
    Thanks
    satya

  • How to use Relational OLAP?

    How to use and/or create Relational OLAP (ROLAP)? Any information will help... Thanks

    There are three ways to create OLAP metadata on a relational schema.
    1) OEM - You can use the Dimension and Cube wizards in Enterprise Manager (Administration Tab -> BI & OLAP link) to create the required additional metadata to enable OLAP queries against an existing relational schema. However, you cannot save the steps or resulting script to a SQL file for re-use. This is more a one-off method for quickly and easily creating OLAP metadata.
    2) OWB - A more scalable solution is to use Warehouse Builder. Even if you have an existing schema you can import the tables/views and then create new dimensions and cubes and map those tables to those objects. The deployment information can be saved to a script
    3) You can refer to the OLAP developers guide to help you manually create the SQL scripts to generate the CWM OLAP metadata against existing tables.
    Make sure you have all the required database patches in place:
    9i - at least 9.2.0.7
    10gR1 - at least 10.1.0.4
    10gR2 - at least 10.2.0.3
    Hope this helps
    Keith

  • How to convert relative url to absolute in URLPortlet?

    Images and links don't work becase they are not getting filtered to absolute urls. <baseHRef> doesn't seem to do it. Isn't URLServices supposed to automatically convert all urls to absolute?

    URL Services internal identifies relative URL and converts them into absolute URL's.
    It uses <BASE HREF="URL"> if available, otherwise the uses <pageUrl> as base URL and constructs the absolute URL's.
    Please post URL to which you facing problem, so that we can find fix this error.

  • How to use relational operator in JSF EL

    Hi,
    I am trying to set the insert allowed property for the subtab based if the no.of records in the sub tab is less than 2. So i tried the following expressions in the insert allowed property
    1. #{bindings.OvrBrowseTypesIterator.estimatedRowCount < 2} which leads to compilation errors - no start tag found etc..
    2. #{bindings.OvrBrowseTypesIterator.estimatedRowCount ls 2} which leads to runtime error - encountered "ls" at line 1 col 1752 when expecting one of the following "(" , "<" , ">" etc....
    Please advise if any one has used relational operators in the EL.
    Thanks, Pradeep

    I found the mistake. I should use "lt" instead of "ls" for less than.
    #{bindings.OvrBrowseTypesIterator.estimatedRowCount lt 2}  works fine.

  • How to use Endeca Url Optimization API

    Hi All,
    Iam working to implement Endeca Url Optimization API to a java project developed in RAD.
    Any one please guide me to achieve the same.
    Issue:
    Iam calling parseRequest(String Querystring,String pathinfo,string encoder) method to get encoded N-vaue value
    For the case of multiple filter selection, Iam passing pathinfo as “/cat_CL167288/_/N-1z139r3” where N-1z139r3 is the encoded N-value of previously selected filter.
    UrlState baseUrlState=seoFormatter.parseRequest("catalogId=10020&storeId=50001&langId=1&N=1z139r3","/cat_CL167288/_/N-1z139r3","UTF-8");
    We are getting an error which is thrown from SEOURL API jars. I have decompiled the jar and found that the exception is throwing while setting N Param value, but able to set other values without exception.
    paramUrlState.setParam(“N”, “1z139r3”);
    Here is the error message :
    java.lang.IllegalStateException: UrlState doesn't contain valid navigation state: you must explicitly call UrlState.inform(ENEQueryResults) or UrlState.setNavState(...) before handling the navigation state of an UrlState
    at com.endeca.soleng.urlformatter.UrlState.getNavStateUrlParam(Unknown Source)
    Please help me
    thanks,
    RGL

    Hi Roy,
    > I found this line:
    Within the docu or within your page?
    Normally, when it's within the page, you don't have to add it to your iView. It has to be on the page.
    There must be somethin else strange. Maybe an error in NW implementation, but I would think that's probably some minor mistake on your site.
    Please minimize your example as far as you can: Use a JSPDynpage with nothing in it than the redirect to the JSP, within the JSP, do nothing in it than the things needed for the call of the pageSupport object, and a corresponding minimized portalapp.xml.
    Post them here in the thread (using code marker).
    And give additional info how the iView when you tested and still it didn't work has been isolated (URL/embedded). Also try to play with these settings by yourself.
    Hope it helps
    Detlev

  • URL IView - how to use local URL

    Hi all,
    in my CE 7.11 system I need to create a URL iview which references a local url such as:
    http://CEHOST:CEPORT/<myApplication>.html
    I must reference it as a local url, cannot use copy/paste from PCD since it's not a WDJ or portlet.
    My question is:
    how do I configure an url iview to reference a local url?
    E.g. should I reference the whole URL or just the <myApplication>.html part?
    How do I configure authentication?
    Thanks, regards
    Vincenzo

    You can try using com.sap.portal.appintegrator.sap.Generic component ?
    Use URL Template property with value : <Request.Protocol>://  <Request.ServerPort>/<your application name>.html
    or
    just give /<your application name>.html
    Regards,
    Mahesh

  • Smartforms - how to use page URL like output option ?

    Hello,
    in the smartofms output options, there's the possibility to set
    BSP Page/URL: ......
    and Output format:  XSF output + HTML.
    My requisite is to send a form in XML via web service, can I use it ? How is run ?
    tks.

    Hello
    Use the function module "FB_CONVERT_FORM_TO_XML" to convert the smartform to XML format table.
    The function module has been used in the method "GET_SMART_FORM_AS_XML" of the class .
    THanks ,
    M.Naveen Kumar

  • How to use boimage url for displaying images

    I am trying to test the Image URL feature in a Web Intelligence report.
    I have a few images loaded in the images folder on the installation server.
    I made the text of a cell: boimage://auditingBOBJLogo.png
    No images are showing up. When I am in view mode a box with an x shows.
    I am using the Web Client to edit the report and view it in InfoView.
    Any tips or best practices for getting this to work would be appreciated.
    Thanks

    Hi,
    Make sure that you have placed the image files in correct folder.
    And the cell formula is boimg://auditingBOBJLogo.png and not boimage://auditingBOBJLogo.png.
    Remember to set the display property of the cell to Image URL.
    Regards

  • How to use relative DSN filename for connection (in Design mode)

    Hello,
    I connect Crystal Reports to Oracle database via ODBC with connection information stored in DSN file.
    I use "Crystal Reports Basic" in Visual Studio 2008 SP1. CR has no SP. Windows XP Pro SP3, my development machine.
    I created a DSN file, and in Database Expert I'm creating a new ODBC connection and trying to fill the File DSN.
    But, the file name is absolute, and I need to use file name relative to the report file, because I want several programmers and several reports to share the connection parameters. This would also simplify the deployment.
    When I try to copy the DSN file to the solution folder and use just the relative path, then a error is reported:
    Logon failed.
    Details: HY000 General Error: Invalid file DSN
    which probably means that the file could not be found.
    This problem does not exist in runtime, as the connection string could be set programmaticaly.
    Does Crystal Reports accept relative DNS file name?
    If does not, are there any other possibilites to achieve this?

    If still an issue post your question the .NET SDK forum.

  • How to use relative pathnames in a webb application?

    We have made a webb application with Netbeans. It was developed on Windows, but will be deployed on Linux. In the application, a file is created from the pathname
    C:/Documents and Settings/xeyvalm/CRMtester/res/parameters.txt.
    I want to avoid the hardcoding and reference it with something like
    pathnameOfWebbApplication+/parameters.txt
    because the pathname will not be the same on Linux as on Unix.
    So how do I get the pathname of the webb application? I have tried to find the right method, but haven't found it.

    The code using user.home variable will work fine on Linux, on Linux your file will are placed on your User Home folder. ie. /home/eeyvind/.myapp.
    Using Java Preferences API, your administrator's app will not need to change any Java code. Java Preferences values can be modify using Java Preferences Editor or Some administrator sofrware written for you.
    I recommend Preferences Editor software for edit your configurations ... with Java Preferences you can: do backup and restore your info from one XML file generated for the same API. Recommend Links for this Editor:
    http://prefedit.sourceforge.net/
    http://www.jpackage.org/rpm.php?id=1199
    This work for me.
    Gook look !

Maybe you are looking for

  • Two ipods on the same computer?

    i have an ipod, and my father just bought one, and he wants me to put his music in his ipod, how can i add music in his ipod without adding my music that is already in my computer. CAn i have two libraries in the same i tunes?

  • Pricing on the basis of specific group of materials by cumulating values

    Dear SAP Gurus, There is a requirement to cumulate the values of a certain group of material AND provide discount on the basis of that on the sales order.For example , group 1 =mat A mat B if 1000 give 5% group 2 =mat c mat D if 2000 give 10% So at s

  • Reorganize records in table?

    PartyID PartyFunctionTypeID Surname FirstName MiddleName MiddleName2 DisplayName 1 4 Yudin Michael NULL NULL Michael Yudin 2 4 Diggins Ben NULL NULL Ben Diggins 3 4 Strait Derrick NULL NULL Derrick Strait 4 4 Mazur Michelle NULL NULL Michelle Mazur 5

  • [Resolved] Minimal WM environments and modern computing power

    Hi, I'm not trying to start any flamewars with this thread.  With that out of the way, I'll continue. I have wondered quite often why there are always some (or more than some in this community!) people in every linux community that prefer to run a ve

  • Problem with drill down and hierarchies :(

    Hi, i've been working on the following issue for about 2 days, but i just cant find a solution. I got this data schema: Department     Account Manager     Customer     KPI     Jan 09     Feb 09 BM-A     Max, Musermann     Comp1     Actual     1.982,2