This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes Getting current portal project path in RAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Getting current portal project path in RAD" Watch "Getting current portal project path in RAD" New topic
Author

Getting current portal project path in RAD

Biju moozhikkara
Greenhorn

Joined: Oct 21, 2005
Posts: 20
Hi,
i want to put a properties file some where in my portlet project ,probably under WebContent and read it through java.io api's from portlet. Can any one suggest where exactly suggest where i could put the file and which path should i give in say a FileInputStream("path");

Thanks
Biju
[ August 04, 2006: Message edited by: Biju muzhikara ]
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
When you say properties file, it appears you have some kind of configuration file. Could you elaborate on what kind of configuration file it is? If you want to read the file, you can put it at some location on the server and store the path to the file as portlet preference (not a very good solution though).

I faced this question when I wanted to read spring configuration file. If that's your problem, put the file somewhere in class path and use ClassPathResource class provided by the spring framework to use the file.

C


ChintanRajyaguru.com
SOADevelopment.com - Coming soon!
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

Actually I tried to run the portal demo which is there in the tutorial of RAD but I think somehow it is not able to create the database. As I have imported the database from example the project runs fine. But it neither able to show any data from cloudscape database nor able to store data in database.

Is there any specific setup required to run cloudscape database or something wrong with the example database.
manuela marginean
Greenhorn

Joined: Mar 05, 2009
Posts: 7
hello,

I have this problem. I am trying to read jndi name for an oracle connection.
I have put a config.properties under WEB-INF and I don't know how to read it.
Is there a better way to save a jndi name?

Thank you.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting current portal project path in RAD
 
Similar Threads
Deployed portlets do not show up in Jetspeed
any API equalent to httpservletrequest getRemoteAddr() In PortletRequest
how many portlet I can put in one *. war file
how to create applet and run in eclipse
portlets