on 10-24-2007 5:10 PM
Hello,
I would like to use KM Task Scheduler :
public void run( String id, Properties properties ) {
IPortalComponentRequest request;
String location = request.getPublicResourcePath();
}
It's normal, it doesn't work ! How can I use IPortalComponentRequest for my schedule task ?
Thanks a lot
Best regards,
Aurélien
Hello Aurelien,
i think that IPortalComponentRequest object is available only in components that suppose direct user interaction (components which accept requests from a browser).
In case of SchedulerTask it's not posiible because this type of component is internal only and it is not invocable by a external request. So i'm almost sure - there is no way to get IPortalComponentRequest in SchedullerTask service.
Try to specify what exactly are you trying to do, why do you need this type of object. Resp. why do you need getPublicResourcePath in SchedullerTask???
regards.
mz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aurelien,
ok then, place your xml file into any package of your project. For example:
In package called "my.package.files" place file "myfile.xml"
then wherever within your code (let's assume you have an class called MySchedullerTask) call next structure:
URL url = MySchedullerTask.getClass().getClassLoader().getResource("my/package/files/myfile.xml");
and then work with the file.
Just one more note: non Java files are not build always into application PAR acrhive.
To do so, you have to check in option:
"Yes, I want the non java sources includet into the portal components jars"
You will find this option in NWDS:
Window -> Preferences -> SAP Enterprise Portal -> Application Development Studio.
regards
mz
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.