cancel
Showing results for 
Search instead for 
Did you mean: 

linux path to logon.properties

Former Member
0 Kudos

public class JCOConnection {
	
	private String connectionPool = "ElectcomsPool";
	private JCO.Repository mRepository = null;

	public JCOConnection(){
		JCO.Pool pool = JCO.getClientPoolManager().getPool(connectionPool);
		if (pool == null) {
			System.out.println("createPool");
			OrderedProperties logonProperties;
			try {
				// Configuration conf=new Configuration();
				// JCO.addClientPool(connectionPool,5,conf.getClient().toString(),conf.getUser().toString(),conf.getPwd().toString(),null,conf.getHost().toString(),conf.getSysnr().toString());
				String currentDir = System.getProperty("user.dir");
				System.out.println(currentDir);
				
				logonProperties = OrderedProperties.load("C:\tomcat\webapps\TESTING2\WEB-INF\logon.properties");
				
				//JCO.addClientPool(connectionPool,5,OrderedProperties.load(fileIn));
				JCO.addClientPool(connectionPool,5,logonProperties);
				
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				System.err.println("logon:" +e);
			}
		       
		//	JCO.addClientPool(connectionPool, 5, logOnInfo.getSapClient(),  logOnInfo.getUserId(), logOnInfo.getPassword(), logOnInfo.getLanguage(), logOnInfo.getHostName(), logOnInfo.getSystemNo());
		}
		mRepository = new JCO.Repository("ElectcomsRepository", connectionPool);
		System.out.println("mRepository " + mRepository);
	}

In windows ENV

C:
tomcat
webapps
TESTING2
WEB-INF
logon.properties

In linux ENV

usually the tomcat will locatate in which path ?

pls advice

<u>linux</u>

PATH = ??

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can do it much easier by placing the properties file in your WEB-INF\classes directory. The java classloader will find it automatically, no need to specify path.

Good luck,

Roelof

Former Member
0 Kudos

if i really want to know the path in linux that are similar to windows,

what would be linux path that installed the tomcat (default path)

linux path : ??

urgent .......

i am ignorant to linux stuff

Former Member
0 Kudos

try this command:

whereis tomcat

good luck.