cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding loading a Start up class in SAP web AS

Former Member
0 Kudos

Hi

I am porting a J2ee application from Weblogic to SAP Web AS . There are

some classes which needs to be loaded when the server starts .As in

WebLogic we have an option of doing this , Wanted to know How does SAP

web AS provides this option of laoding a java class at start up .

please treat this message very urgent

regards

rajesh kr

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi juergen ,

I am trying this using a servlet and facing some ptroblems .Actually its trying to load a file IO from one of the internal classes and is failing.There are certain config xml file\s . we are unable to load the file internally due to which its failing . will he helpful if you could throw some light as to as to how can we load this files and where to keep the xml files in SAP web AS

code snippet is

-


Properties props = new Properties() ;

try {

xmlConfig.load(Object.class.getResourceAsStream("/" + file));

Iterator it = xmlConfig.getKeys() ;

String key = null ;

while (it.hasNext()) {

key = (String) it.next() ;

props.put(key, xmlConfig.getProperty(key)) ;

}

decryptPasswords(props);

-


Waiting for your reply . please let me know at the earliest

kind regards

rajesh

Former Member
0 Kudos

hi Juergen

Thanks for your reply , it was helpful .

ALso we are using Log 4j .Does SAP web AS supoorts this , if yes , how can we configure this in SAP web AS .

regards

rajesh kr

Rudi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rajesh,

have a look at the how-to paper about 3rd party logging-integration in SDN:

https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/e081a4b6-0801-0010-7fa4-c3c7a0454815">j2ee [original link is broken] [original link is broken].

Best regards,

Rudi

Opgenorth
Employee
Employee
0 Kudos

Hello,

in SAP WebAS there are no Startup classes like in WLS. A solution to your problem is described on page 16 of the migration guide http://media.sdn.sap.com/html/submitted_docs/sap_j2ee_migration_kit_webpages/external_docs/SAP_J2EE_...

Best regards,

Juergen