Setting a URL

Hi everybody,
I have code and html organized like this:
Main folder
-> docs (html)
-> source (code)
And I'm trying to set a page of html from the docs folder on a JEditorPane. I called the setPage method of JEditorPane like this:
pane.setPage( getClass().getResource( "/docs/Contents.html" ) );This worked when calling the help from a JAR, but it doesn't seem to work from the console. I think it's probably something weird with the path, because I get an Invalid Url exception.
Does anyone know of one path structure which would work for both console and JAR?
Thanks,
Jezzica85

Firstly, it doesn't matter where your sources are. The class files ("binaries") matter.
Secondly and in all probability, your ClassLoader won't provide you direct access to resources that are "above" (in the filesystem hierarchy) the class path token corresponding to your class. Not using getResource(), at least.
I suggest you organise your build so that your "docs" folder is one level below your binaries folder, i.e. at the same root as your class file hierarchy. Not sure if there's a way to make it work unifiedly otherwise.
df.

Similar Messages

  • How to set Target URL in Jdeveloper 10.1.3

    There is an error when i build a portlet with Jdeveloper coz Target URL is wrong
    So i want to set Target URL again to referenced to localhost
    ( I set in hosts file:
    *192.168.1.2 namdinh.com*
    but when I build my portlet, Target URL still is http://192.168.1.2:8988..... )
    Please show me what i must do in this case :(
    Thanks so much!

    Hi,
    Go to Tools > Embedded OC4J Server Preferences... > Global > Startup.
    Look for the options in "Host Name or IP Address Used to Refer to Embedded OC4J".
    William

  • Is there a way to set a url for a link button?

    hey guys, so im trying to set a url link to a dynamic button im creating using actionscript...
    so far i know that you can do
    <linkbutton .....
         click="navigateToURL(new URLRequest('http://yahoo.com/downloadpdf.pdf', 'quote')" />
    but when i create my button in actionscript i dont see an option for click anywhere...
    the code i have is
                        var newButton:customLinkButton = new customLinkButton();
                        newButton.label = item.@name;
                        newButton.tabId = item.@tab;
                        newButton.changeTo = item.@changeTo;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        if(newButton.changeTo == "downloadFile"){
                        newButton.addEventListener(MouseEvent.MOUSE_DOWN, customButtonPressed);
                        dynamicButtons.addElement(newButton);
    i've tried doing newButton.click but that dosent work...
    i also tried doing newButton.setStyle("click", "navigateToUrl.........")  but with no result...
    i just need to set this button so when i click on it, it will show that download pdf file from link box.....
    any ideas??

    http://www.adobe.com/devnet/actionscript/articles/event_handling_as3_03.html
    Basically just use addEventListener(MouseEvent.CLICK, someFunction); (exactly the same as how you did for mouseDown event) and then call the navigateToURL() method from the customButtonPressed method.
    Peter

  • Dynamic Setting of URL in Proxy for binary content in OSB

    I have three external links (to three different images) and external applications change them quite frequently.
    I want to build a proxy service where I should get the dynamic URL as parameter and this proxy should hit that URL to get the images. This proxy service should return these images as binary content.
    So this proxy service will be a routing service for different images coming from external web applications. I would like to know how can I get the content from a dynamic URL (not a fixed one)?
    I cannot use business service because I have to set the URL at run time.
    I will appreciate a prompt response.
    Thanks

    Use BS and in the request action use a Routing Options action http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/ui_ref.htm#i1290930
    Routing option allows you to change the URI of BS as per your runtime need.
    Manoj

  • How to set the URL??

    Hello Friends,
    I am using the Oralce BPEL process manager 10.1.2 .
    In my BPEL program (in BPEL jdeveloper->BPEL process manager )I have deployed the wsdl of SALESFORCE.COM
    I had accessed the Login api of salesforce.com and login is sucessful.
    After that I called the Create api .
    It gives the error that URL is not set.
    So please tell me that where should I set the URL .
    Thanks and regards
    Ram Krishna Tripathi
    [email protected]

    Hi,
    pls look into the sample provided within your distribution - to connect to Salesforce .. It can be found in $BPEL_HOME\integration\orabpel\samples\demos\SalesforceFlow
    hth clemens

  • Set List URL in event reciever

    Hello All,
    I want to set list url in event reciever element.xml file. Please to resolve this problem.
    Thanks.

    Hi,
    According to your description, you might want to create an Event Receiver for a specific list.
    What we need to do is to replace the property "ListTemplateId" with "ListUrl" and specify the relative URL of list in it.
    For list:
    <Receivers ListUrl="Lists/yourlistname">
    For library:
    <Receivers ListUrl="yourlibraryname">
    Best regards
    Patrick Liang
    TechNet Community Support

  • Is it possible to set download URL explicitly for AIR Updater ??

    Hi,
          we have <url>http://XXXXXXXX/C.air</url> in update.xml, So would like to set that path explicitly to
    ApplicationUpdater. Is it possible ?? if so how can i do that.
    Please help me.
    Thanks
    Kishore

    addition details:
      Instead of setting the url node in update.xml file, is it possible to set to the ApplicationUpdater object. ???
    Thanks

  • How set up URL Connection Factory/Resource?

    Hi,
    How to set up URL connection Factory, Exactly like JDBC connection Pool i.e. specifying
    Max. No. of Connection, Intial capacity etc.
    I'm able to find this much only.
    <WebServer URLResource="weblogic.httpd.url.myURL=http://localhost:7701/blah"
    />
    But If i want to set Max. Capacity/ Intial capacity for URL Connection Factory,
    Where to specify it?
    Will you please help me?
    Regards,
    Devendra

    Hi,
    The Simplest Way to Load a Property file (Which is outside of your Application) ..is.
    Just Place the Property file in the Server Classpath...or in the "C:\bea103\user_projects\domains\7001_Domain\lib" folder of your Domain. It means somehow the Property file should be available in the Server Classpath...
    Now Please write the following code in your Application to read the Property file:
    java.util.Properties prop = new java.util.Properties();
    java.io.InputStream stream=this.getClass().getClassLoader().getResourceAsStream(“my.properties”);
    prop.load(stream);
    String hostProperty = p.getProperty(“host.name”);
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com/generalweblogic/   (WebLogic Wonders Are Here)

  • I have a cisco ironport c170, i want set up URL redirect? But i don't khow how to ? Can you help me?

    I have a cisco ironport c170, i want set up URL redirect? But i don't khow how to ? Can you help me?

    The C170 does not support URL redirection prior to OS release 8.5. What exactly do you need to accomplish?

  • Set Destination URL Dynamically

    Hi,
    I have to set Destination URL Dynamically.
    return.setDestination("OA.jsp?page=/oracle/apps/pa/project/webui/HomePG");
    if(pageContext.getParameter("Return")!=null)
    But when i clk on btn Im nt able to navigate to home page.
    If i use pagecontext.SetforwardURL() for Return button The page URL cant be changed it remains the same page url instead of Home page URL, but page is navigating to Home page.
    Plz help me...
    Thanks
    Nani:)

    Hi,
    For the simple button also you can check in processformRequest if it has been clicked or not..
    This way...
    OAButtonBean button = (OAButtonBean)createWebBean(pageContext,OAWebBeanConstants.BUTTON_BEAN, null, "BUTTON");
    button.setText("Test Button");
    btn.setFireActionForSubmit("navigate",null,null,false,false);
    webBean.addIndexedChild(button);
    then when you click on this button then an event will occur which you can check in processformrequest
    String event = pageContext.getParameter("event");
    if("navigate".equals(event))
    navigate to the desired page using pageContext.setForwardurl()
    Thanks,
    Gaurav

  • Set dynamic URL in SOAP receiver adapter

    Hi,
    Is this possible ? I have managed to do this with the HTTP adapter but the this time it is a Web service I am integrating to that requires SOAP 1.1 over HTTP to be used.
    Thx.
    Colin.

    Hi Stefan,
    Basically the full URL I want to send the message to via the SOAP receiver is within the payload.
    I can see the Target URL can be set in the communication channel but I want to override this with detail from the payload.
    I have managed to use dynamic URL setting with the HTTP adapter but am a little stumped on how/if this can be done on the SOAP adapter.
    Can you please expand on your comments a little please ?
    Kind regards
    Colin.

  • How to set different urls for logoff button for different user groups

    HI All,
    We have two different set of users in our company .when one user group clicks on the logoff button in masthead we want to redirect them to for example www.google.com and for the other group we want to redirect to www.gmail.com.
    How can we acheive this particular requirement
    Thanks
    Bala Duvvuri

    hi bala,
    For the  two user groups maintain two different desktops, two/same themes and frame work.change the headeriview jsp in masthead par file to Google and save it as masthead1 and another one with gmail as masthead2 then create iviews with that par file and assign them to different groups and make invisible the default masthead iview.then the users get the logoff based on group you can get some wikis on changing log off or redirecting log off, check these threads
    Portal logoff : Redirection or Close the Entire Window
    Portal Logoff redirection URL
    Regards
    Mahesh

  • How to set/get URL-parameters from ORACLE -tag?

    How do I set/get parameters in a URL, using the <ORACLE>-tag?
    We are trying to create a UI Template containing a dynamic
    stylesheet selection dialogue on top of every page. The question
    we are facing now is how to pass parameters (in our case,
    stylesheet settings) between different pages.
    Any ideas/comments are appreciated!

    How do I set/get parameters in a URL, using the <ORACLE>-tag?
    We are trying to create a UI Template containing a dynamic
    stylesheet selection dialogue on top of every page. The question
    we are facing now is how to pass parameters (in our case,
    stylesheet settings) between different pages.
    Any ideas/comments are appreciated!

  • Setting Default Url At User Level? Help !!

    Hi-
    After a user logs on .. I would like to point that user to a specific default url .. if I specify the default url at the domain level:
    manage domains
    select domain
    select user tab
    show advanced settings
    delete default url: /DesktopServlet
    add new url
    It works fine when the default url is set at this level .. problem is it then points EVERY user who is a member of that domain to the specified url ..
    Logically.. one would think that the correct approach would be to specify the defaul url for a particular user at the user level:
    manage domains
    select domain
    select role
    select users
    click username
    click user tab
    show advanced settings
    delete default url: /DesktopServlet
    add new url
    However, when this approach is used .. the user is sent to:
    /DesktopServlet
    in spite of the fact that the users default url had been set to a specific url other than:
    /DesktopServlet
    Question:
    Is it possible to set a users default url to a specified url and have it only affect that user?
    If so .. how?
    Does anyone have any recommendations as to how to make this work?
    Essentially .. I would like to create a domain with multiple users and have each user within that domain sent to a distinct and unique url .. how can I accomplish this objective?
    And if it simpy can't be done .. please let me know .. it would be much appreciated .. Happy Holidays .. to all ..
    Sincerely .. jesus ..

    Thanks for your response .. as it is .. I was able to accomplish the stated objective by using the Url Scraper to point each user to a page containing a meta-refresh tag which causes the desktop to appear for a fraction of a second before the user is advanced to the desired url .. sans the desktop and with the secure lock in the right hand corner .. thanks again for your response .. much appreciated .. jesus ..

  • Performance issue in linux while using set with URL object

    Hi,
    I am facing performance issue while using Set(HashSet) with URL object on linux. But it is running perfectly on windows.
    I am using
    set.contains(urlObject)
    Above particular statement is taking 40 sec on Linux, and only a fraction of ms on windows.
    I have checked the jre version on both OS. It is the same version (jre6)
    on both the OS.
    Could anyone please tell me what is the exact reason, why the same statement is taking more time on linux than windows.
    Thanks & Regards
    Naveen

    jtahlborn wrote:
    I believe the URL hashCode/equals implementations have some /tricky behavior which involves network access in order to run (doing hostname lookups and the like). you may want to either use simple Strings, or possibly the URI class (i think it fixed some of this behavior, although i could be wrong).The second new thing I have learned today. I was wrong in reply # 1 because looking at the URL code for 1.6 I see that the hash code is generated from the IP address and this has a lazy evaluation. Each URL placed in a HashMap (or other hash based collection) requires a DNS lookup the first time the hash code is used.
    P.S. 40 seconds does seem a long time for a DNS lookup!
    Edited by: sabre150 on Feb 13, 2008 3:40 PM

  • Set alias URL for SharePoint site

    Hi,
    I want to set the SP site alias. my server name appearing http://dmfpqabudappcq2 and i want to change it to http://MySharePoint.
    I check the central admin - AAM - Edit alias url. I have updated there.
    Now, i am setting the new alias host in DNS. for this i have open the DNS - expands server name - Forward Lookup zone. When i go for right click then i can not see to add new alias and server IP there.
    Can anyone please tell what i am missing here to complete the setting for SharePoint alias. 
    Any help is much appreciated.
    Thanks, 
    Rakesh

    I've never trusted changing a Web App's URL. I always advise adding a new AAM for http://intranet etc. alongside your already existing server name.
    I would return the inital entry to as it was, then add a new AAM for your site.
    Now if i understand you correctly you haven't added an A host record for the AAM address to DNS yet? This is described here:
    http://technet.microsoft.com/en-us/library/cc779029%28v=ws.10%29.aspx
    Once you have an A host record you should be able to 'ping' that address from a client computer. You should also be able to browse the site from a client computer (assuming there's a site collection created for that web application).
    You will not however be able to browse it from your SharePoint server, this is because of the loop back check:
    http://www.harbar.net/archive/2009/07/02/disableloopbackcheck-amp-sharepoint-what-every-admin-and-developer-should-know.aspx

Maybe you are looking for

  • Asset Scrapping - Calculating Depreciation for entire year

    Hi guys We want to scrap an asset without revenue using ABAVN. Asset Details: The asset will be completely depreciated by the end of this year (December) We have smoothing indicator on. We wish to post the retirement and close out the asset balances

  • Performance issue in Store Business Document functionality in ME52N

    Hi Guys, I have a problem in the Services for object in the transaction ME52N. In Services for object Create->Store Business document functionality when i try to drag&drop the PDF type file it is taking longer time. Please provide some input to impro

  • Adobe Reader for Mac OS X 10.9.1

    I have a Mac with OS X 10.9.1 and I have not been able to download a version of Adobe Reader.  How do I do it?

  • URL iV iew is not resized

    Hello all, I defined an URL iView with Height Type = "AUTOMATIC", Fetch Mode = "Server-Side" and Adjust to structural changes in site = "Yes". When I click on the corresponding navigation menu item, the iView height is rendered correctly. But when I

  • ITunes Match Subscription- what is this?

    Hello, aprarently we have an iTunes Match subscription and need to pay 24.95 Euros soon to renew this. I have no idea what this is for or what it does. If this is to use the iTunes store, then I would be unpleasantly surprised but maybe someone can a