Passing Arguments/Properties File to SUN JAVA ONE WEBSERVER at startup

We are porting a Java App currently running on an Orion Web Server to Sun Java One Web Sever.
We have found that with the various java application servers we've used over the years, that each want to find the properties file in a different spot. They way we've got around this is that we start Orion with a -D option to java to set a system property called cdsProps. Example: java -DcdsProps=Path_to_properties_file. We then reference that cdsProps arugment throughout the java code so it knows where to find the properties file. Because the cdsProps argument is used thoughout the java code, if the -D option is not used when starting the webserver to point to the properties file, the website will not function properly.

in the case above, the command line arguments are passed in the aaaaaaaaaaaaaaaaaaaaaaarggggggggggs array
you probably want aaaaaaaaaaaaaaaaaaaaaaarggggggggggs[0] for the filenameAm not sure i understand, do you mean i must change the param of the main method to String[] args[0] as this resulted in error when i did so. Or do you mean at command line instead file simply being passed to the Compressor program as
"java Compressor < examplefilename"
It has to be "java Compressor < examplefilename[0]" ?
If you could expand on this, would be grateful,
Thanks.

Similar Messages

  • Properties files in a Java package not included in DC build

    We are developing a Portal Standalone DC and i have a JspDynPage component within it. and i need to do internationalization in  it. so as part of that i want to keep multiple resource bundles(properties) so that i could manage my properties files easily, For example
    MSS.properties
    MSS_es.properties
    ESS.properties
    LSO.properties
    since portal by default has no way to do this bcos it allows only one resourcebundle to specify in portalapp.xml file, i have kept the resource bundles in java package like
    com.companyname.portal.resources.
    when i export from NWDS with selection of "i want to add non java resources into jar " option from windows->preferences->enterprise portal ->application development studio, it exports all the properties files as part of the par and everything works. but when i do the DC build it ignores all my properties files and it is not working. any suggestions on how to resolve this??? does SAP provide any other way of handling multiple properties files inside a PAR?????

    We are using NWDS 2004 SP19.  and yes i have defined three default SCs as dependencies. I tested with 2004s NWDS and it seems work fine. I am able to resovle this issue by moving my properties files into another java DC and create public part in java DC and use those public parts in Portal application DC.
    So The problem of not including the properties files into Jar seems to be issue only in Portal Application DC not in Java DC. thanks everyone for the quick responses..

  • Deploy .war or .ear file to sun java web server 7.0 update 4

    Hi
    This could be a very daft question, but still I would like to get a clarification.
    My clients are a financial organisation, and for security and various other reasons they accept only .ear files. But this time the development and deployment would be done on Sun Java Web Server 7.0 update 4 . Now since its a web server I don't think I can deploy an .ear file.
    But sure I would like to get an answer from the experts here, is it possible to deploy and .ear file to Sun Java Web Server 7.0 before I can go back to my clients.
    Please help me here as I'm in a real big confusion here. Your help would be highly valuable to me.
    Thanks
    Jagdish

    Hi
    Thanks for the reply and I appreciate your help. Well I tried deploying an .ear file directly and web server 7 complains that it doesn't have a .war extension, understandably so.
    And then ripping apart the .ear file and deploying the .war file does work, as is expected of a web server.
    Well, about my customer is a bank and they have a very tight security policy, and why they need an .ear file is beyond my understanding. Well as far as this issue is concerned, I need a strong point so that I can get back to them that we need to comply to the third party software.
    But I didn't wan't to get back to them saying we can only provide a .war file and then later find out an .ear file could have done the job. And being seen as the technical experts we can't afford to make any mistake.
    Thanks
    Jagdish

  • Configuring Sun Java System webserver 6.1 SP2 to JBOSS 4.0

    how to redirect a request from Sun Java System webserver 6.1 SP2 to JBOSS 4.0. What are the config chages to magnus.conf and obj.conf.
    do we need any plugins for this

    I'm unable to configure the Java webserver with JBOSS.
    I'm getting following info while running the server.
    Sun ONE Web Server 6.1SP3 B08/17/2004 18:33
    info: CORE3016: daemon is running as super-user
    info: PASS1000: Sun ONE Web Server 6.1SP3 Reverse Proxy Plugin B09/09/2004 11:59
    config: PASS1007: init-passthrough directive ignored
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun Microsystems Inc.]
    info: WEB0100: Loading web module in virtual server [vs-admin] at [admin-app]
    info: HTTP3072: [LS ls1] http://yamuna:8888 ready to accept requests
    startup: server started successfully
    My congifuration settings are:
    Magnus.conf: placed the libpassthrough.so in specified location.
    Init fn="load-modules" shlib="/opt/SUNWwbsvr/plugins/passthrough/libpassthrough.so" funcs="init-passthrough,auth-passthrough,check-passthrough,service-passthrough" NativeThread="no"
    Init fn="init-passthrough"
    Obj.conf:
    NameTrans fn="assign-name" from="/ApplnName(|/*)" name="ApplnName"
    <Object name="ApplnName">
    ObjectType fn="check-passthrough" type="magnus-internal/passthrough"
    Service type="magnus-internal/passthrough" fn="service-passthrough" servers="http://myIP:8080/ApplnName/"
    </Object>
    When I start server, the server is running fine but it is ignoring the init-Passthrough directive.
    I think i have to do some setting in magnus.conf. please help me out

  • Php plugin 1.0 for sun java system webserver

    Hi,
    I installed php plugin 1.0 for sun java system webserver 7. But it supports default 2 DB mysql and postgresql. Can i configure oracle 10g DB support?
    Appreciate if you could throw some light on this.
    Thanks,
    Krish

    Using PHP with NSAPI plugin will definitely get you the best performance. However, if you are using PHP with NSAPI plugin enabled then you might have to be careful when you are installing any of the PHP extensions from PECL to make sure that they are thread safe.
    Note: There can be a potential issue only when using any of PECL (http://pecl.php.net) extension and not with any PEAR (http://pear.php.net) extensions.
    For example, if you PHP built for NSAPI and then using on top of WordPress or Drupal or on top of frameworks like ZF etc should not be a problem
    To compile PHP 5.3 with NSAPI, you would do some thing like
    ./configure --with-nsapi=<web-server7-install-directory>
    To compile PHP 5.3 with FastCGI, you would do some thing like
    ./configure enable-cgi enable-force-cgi-redirect

  • How to use .properties files in Webdynpro Java code?

    Hi all,
      I want to use a logon.properties file when I initial a JCO connection pool in my webdynpro DC (JCO.addClientPool()),but  I found when I deployed this DC to the server, it always giv e me an FileNotFoundException. So I donot know how to deploy a .properties file to the server and how to access this file in my Java code?
    Thans and Best regards
    Deyang

    Hi,
    1) put .properties file to your packege under src\packages folder (src\packages\com\sdn\properties\jco.properties)
    2) load property:
         final InputStream is = getClass().getClassLoader().getResourceAsStream("com/sdn/properties/jco.properties");
         final Properties properties = new Properties();
         try
              properties.load(is);
         catch(Exception e)
              wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    Regatds Maxim R.

  • Importing jar files in Sun Java Studio

    Hi
    I am new to java and have recently installed Sun Java Studio Enterprise. As a part of assignment, I have been provided a jar file and use it.
    But i have not been able to load it into my program. How do i load it ?

    Hi
    I am new to java and have recently installed Sun Java Studio Enterprise. As a part of assignment, I have been provided a jar file and use it.
    But i have not been able to load it into my program. How do i load it ?

  • To Read the contents of the properties file which is located in webserver

    Hi,
    I have one requirement where I have to read the contents of a property file which is located in some path in server. Say for example, when you click on link abcd then contents of abcd.properties file should be displayed in one text view in webdynpro . I am trying to implement this in webdynpro for java. The main thing is like I am not able to retrieve the server path of the file and hence not getting the file contents. I tried using methods like  getApplicationPath() or getRealPath() but its not working. So can you guys please help me on to how to read the server file contents.
    Thanks and regards,
    Sai

    Hi Romano,
    Thanks a lot for your reply. However, I forgot to mention one thing in my question. Its like the path will be different everytime. Say, we have systems like development, acceptance, production. So when the user clicks on the link abcd, it should take the path of development system and similarly when the user clicks on the link in acceptance or production, the path will be different. say for example, in development the path will be
    usr/cluster/dev/abcd.properties but it acceptance it will be usr/cluster/acc/abcd.properties. So just want to know whether this will work? Anyway, I will give this a try.
    Thanks once again,
    Sai

  • Unable to open .shtml file in Sun java web server 6.1

    Hi,
    I migrated my application from iPlanet 6.0 to Sun one web server 6.1 and after that I'm unable to open any .shtml file from my browser. This issue is not with all browser but only with few.
    Ex : It works fine with firefox 1.x but fails with firefox 2.x
    I tried adding the shtml_send Init parameters in Magnus.conf and edited the obj.conf, and my mime type has the following entry for shtml:
    type=magnus-internal/parsed-html exts=shtml,jbhtml
    Any help is appreciated
    Thanks
    SS

    What is the exact version of Web Server you are using? Should be in the error logs or try $start -version
    It would be faster if you can capture and cut and paste the data that is sent between firefox and Web Server in both the cases using /usr/sfw/bin/ssltap (http://www.mozilla.org/projects/security/pki/nss/tools/ssltap.html) or ethereal when you try to view that shtml file. We can see if its any different in both cases and try it from there.
    Also verify the steps given in http://docs.sun.com/source/817-1832-10/pgshtml.html
    mime.types should have :
    type=magnus-internal/parsed-html exts=shtml
    obj.conf should have :
    Service fn="shtml_send" type="magnus-internal/parsed-html" method="(GET|HEAD)"
    When you activate parsing, magnus.conf should have :
    Init funcs="shtml_init,shtml_send" shlib="install_dir/bin/https/bin/Shtml.dll" NativeThreads="no" fn="load-modules"
    Shtml.dll (or libShtml.so on UNIX), is located in install_dir/bin/https/bin for Windows, and install_dir/bin/https/lib for UNIX.

  • Passing argument to shell script from java program

    str="/bin/sh -c /root/PWAppSh/StartSH.sh";
    p = rt.getRuntime().exec(str);
    above is the code snippet of java program for calling the shellscript
    when i pass a argument to the shell script from my java program it wont get accepted in shell script as an input
    when i do following changes in above code it wont work :---
    str="/bin/sh -c /root/PWAppSh/StartSH.sh para1 para2 para3 ";
    p = rt.getRuntime().exec(str);
    para1,para2 and para3 wont get as argument for the shell script
    how this can be done
    thanks
    reply "ARGENT"

    Argent.
    Read this:
    Navigate yourself around pitfalls related to the Runtime.exec() method

  • How can I use Servlets on Sun Java System WebServer 6.1

    Hi
    This is Khurram,
    I have just downloaded, and installed "Sun One Java System Web Server 6.1" on WindowsXP. This is installed and working properly on my system. But I want to use Servlet technology on this server, even I did download it just for working on servlets. Before it, I was using typical JavaWebServer2.0 for this purpose.
    Any ways.
    Can any one tell me, how can I do this on "Java System Web Server 6.1".
    Thanks
    any help will be appriciated
    regards
    Khurram

    Thanks for your such action.
    Actually I have installed it since 2 days, and have read throughly the documentation of WebServer, But Only the Link for this purpose is provided "Programmer's Guide to Web Applications", Now I have just searched for it and found only "Programmer's Guide" .PDF format. I have just read it out now, But here also provided a small refference to see "Programmer's Guide to Web Applications". Now I have just the problem that where to find it.
    Please, tell me if you have some solution to my problem
    or atleast tell me where to find the refference "Programmer's Guide to Web Applications". I tried but only found "Programmer's Guide" for Sun Web Server 6.1.
    Thanks any way to give some time.
    Khurram

  • CF 8 Multiserver & Sun Java System Webserver 7

    I am looking for information on how to connect SJSWS 7
    virtual web servers to individual ColdFusion 8 instances running in
    a multiserver environment.

    The package should be available on this website in the"Oracle Fusion Middleware" product list :
    https://edelivery.oracle.com/
    If you cannot found it, please open a service request on MOS and set this one as non-technical request.

  • Migration to Sun Java Webserver

    We are using a Java application running in iPlanet Web server 6.0
    Enterprise , On a customer requirement we decided to upgrade the web server to Sun Java System Web server 6.1. SP7,
    Our Java web application we have support for English as well as
    Arabic. Hence all the Servlets are written to handle the UTF-8 encoded
    pages.
    In Iplanet UTF8 encoding for the server can be enabled by specifying
    context.global.parameterEncoding=utf8 in the configuration file
    context.properties,
    During migration we found there is no context.properties file in Sun
    Java System Web Server 6.1 Sp 7.
    How this can be done in Sun Java System Web Server 6.1 Sp 7 without
    changing the application code?, What is the equivalent setting for
    context.global.parameterEncoding=utf8 in Sun Java System Web Server 6.1 Sp 7.
    Would appreciate your help.
    Regards,
    Asif
    [email protected]

    Take a look at following documentation to see if it helps:
    http://docs.sun.com/app/docs/doc/820-0261/6nc0ur6tb?a=view
    Thanks
    Manish

  • Passing properties file to portal

    Hi experts,
    I have one application which was built on PDK. I have one properties file which holds connection information of backend. now how can i pass these properties file to portal. In webdynpro java, we can achieve this using application parameters. but in PDK which procedure we have to follow?
    one more question is, For PDK applications creating the system object is mandatory or optional?. if mandatory how can we do that one for PDK application?
    Regards
    maha

    Hi,
    If it is a AbstractPortalComponent, DynPage or JSPDynPage you can put the information in the portalapp.xml file of the project into the component profile-section for example:
        <component-profile>
            <property name="z.system" value="R3_SYSTEM"/>
            <property name="z.debugMode" value="false"/>
        </component-profile>
    See [http://help.sap.com/saphelp_nw70/helpdata/en/c9/c8af42a6f6cb6ae10000000a155106/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/c9/c8af42a6f6cb6ae10000000a155106/frameset.htm] for more info about portalapp.xml.
    Then in code you access the values:
    String system = request.getComponentContext().getProfile().getProperty("z.system");
    The properties are visible in iview properties in Content Administration -> PortalContent -> [iview properties] - here you can change them.
    Hope that helps,
    Romano

  • Multiple weblogic.properties files?

    Hi all,
    We're in the stage now where I need to "quickly" switch between different
    versions of our app running on WLS 5.1.
    Can I pass the path to the weblogic.properties file to the java command in
    startWebLogic, or is it based solely on the weblogic.home property?
    If it is based on the weblogic.home property, what else depends on that
    property. Ideally, I'd like to not to have to duplicate the weblogic tree.
    Thanx!
    Will Hartung
    ([email protected])

    You can specify server name in the command line (startWebLogic.cmd foo)
    and add -Dweblogic.server.name=%1 to the list of java arguments. When
    weblogic starts it will read wl_home/weblogic.properties first and
    wl_home/foo/weblogic.properties second.
    (with clustering enabled it reads weblogic.properties from wl_home
    first, wl_home/cluster_name second and wl_home/cluster_name/server_name
    third).
    Will Hartung <[email protected]> wrote:
    Hi all,
    We're in the stage now where I need to "quickly" switch between different
    versions of our app running on WLS 5.1.
    Can I pass the path to the weblogic.properties file to the java command in
    startWebLogic, or is it based solely on the weblogic.home property?
    If it is based on the weblogic.home property, what else depends on that
    property. Ideally, I'd like to not to have to duplicate the weblogic tree.
    Thanx!
    Will Hartung
    ([email protected])
    Dimitri

Maybe you are looking for

  • Select open items for a settlement amount

    Hi All, I have a requirement to do a clearing with situation like this, upload a excel file contains of settlement amount. This amount will use to clear up the payment JV save earlier (open items) for example: settlement 57.00 then the open item docu

  • How do i get back my songs

    my ipod nano said it had no songs on it, yet it said i had songs on itunes (it said 1.13GM with a orange bar that said "other"). then i unclicked "manually manage music", it then showed 1.82GB with a blue bar that says "audio", then 1.13GB with the o

  • The App Download Error

    I get the download error when I click Apps on the CC desktop; I've tried the suggestions but it doesn't work. Also, I deleted my AAMupdater but when I try to re-install CC it doesn't give me the updater again.

  • String Data-Loss over Sockets

    I have some code that sends strings through a socket to a C++ program on another machine. The test strings I have been using are three characters long (i.e. 6 bytes). The buffer size I have put on the socket is 72 bytes, so I should have no problem w

  • Getting playlists from backed up iTunes combined with the current one.

    I have backed iTunes several times and upgraded OS and computers. I have some playlists on the B/U drive that did not get brought forward at some time. I would like to add these to the current library and not affect the latest music access.