Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

how to add character '&' in system property value

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I set following system property in weblogic setDomainEnv.cmd, the part after '&' is missed, do you know how to modify it to set '&' character in value?

-Dportal.url=https://abc.com/cp?tab=CTab&url=
or
-Dportal.url=https://abc.com/cp?tab=CTab&url=



I got below result by System.getProperty("portal.url"):

https://abc.com/cp?tab=CTab

expected result is : https://abc.com/cp?tab=CTab&url=
 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just wrap your -D property with double quotes. It should work under WebLogic.

-Dportal.url="https://abc.com/cp?tab=CTab&url="
 
ya ji
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Deepak,

I followed your way, but I can't start weblogic now, got error: "=CTab was unexpected at this time."

Do you know how to resolve it?

Deepak Pant wrote:Just wrap your -D property with double quotes. It should work under WebLogic.

-Dportal.url="https://abc.com/cp?tab=CTab&url="

 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What version of WebLogic and OS ? Can you paste the exact command line option ?
 
ya ji
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
setting in my setDomainEnv.cmd is:

set WL_HOME=C:\Oracle\Middleware\wlserver_10.3
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi

set BEA_JAVA_HOME=

set USER_MEM_ARGS=-Xmx1024m -XX:PermSize=256m -Dlogback.configurationFile=C:\Oracle\Middleware\user_projects\domains\o_domain\user_conf\logback.xml -Dportal.url="https://aaa.bbb.com/csp?tab\=CTab&url\=";

set SUN_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07


I called command and got message as below:
C:\Documents and Settings\Me>C:\Oracle\Middleware\user_projects\domains\o_domain\startWebLogic.cmd
=CTab was unexpected at this time.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you try to use following lines instead of one SET command you have in the batch file ?

 
ya ji
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Deepak, it worked last Friday, but today, when I start weblogic, the system property is not set, I don't know why.

I set it in startWebLogic.cmd, like below(green):

call "%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*

set O_PROP=-Dportal.url="https://aaa.bbb.com/csp?tab=CTab&url="
set USER_MEM_ARGS=%O_PROP%


set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS%

Do you have any idea?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic