1

I thoroughly searched for an answer in here but I think my case is pretty isolated.

I'm using IBM Rational® Application Developer 8.5 with WebSphere®. I configured my url from the Websphere Admin console->Resources->URL->URLs with these entries:

name: Documents_DisplayView

JNDI name: url/Documents/DisplayView

Provider: Default URL Provider

Description: https//Docs.myDomain.ca/velocity/english/secure/DocumentDisplay?DOCUMENT_REFERENCE_NUMBER={0}&DOCUMENT_CONTENT_DATE={1}

To access it from my java class, I created

@Resource(lookup = "url/Documents/DisplayView")
private URL docLink;

Now I used to hardcode my URLs and just replace the {0} and {1} params with my dynamic values using a text formatter but this time I can't hardcode the " https//Docs.myDomain.ca/..." because it will change depending on the server.

How do I create a URL using JNDI lookup with my formatter java.text.MessageFormat: {0} = value1; {1} = value2?

Thank you.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.