Neeraj is correct.   Even though our tools push you to use one webContent folder, a user could modify their component to use multiple, so you can't assume there is only one.
To get all, you can call component.getRootFolder().getUnderlyingFolders().

Hope that helps,

John Lanuti
Software Engineer, IBM Rational
[EMAIL PROTECTED]
t/l 441-7861

"I know this lady way down in my country.
She is so pretty that my eyes throw disguises at me.
Now we will sit and we'll wonder about our future,
But now I'm thinking that today sounds fine to me."  - Of A Revolution



Neeraj Agrawal/New Haven/[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]

04/07/2006 02:18 PM

Please respond to
"General discussion of project-wide or architectural issues." <[email protected]>

To
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, "General discussion of project-wide or architectural issues." <[email protected]>
cc
Subject
Re: [wtp-dev] Recommended approach for getting IPath for "WebContent"        folder?






You can use following :


IVirtualComponent component = ComponentCore.createComponent( project );

component.getRootFolder().getProjectRelativePath();





But...   component.getRootFolder().getProjectRelativePath()   gives the  first  folder which is mapped to   deploy-path of    "/"  .




In the  default   web project created by WTP ,  it is the  WebContent,  so you will get it  back

<wb-resource source-path="/WebContent" deploy-path="/"/>


Thanks

Neeraj  Agrawal





"Ian Trimble" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

04/07/2006 02:02 PM

Please respond to
"[EMAIL PROTECTED]" and "General discussion of project-wide or architectural issues."

To
"[email protected]" <[email protected]>
cc
Subject
[wtp-dev] Recommended approach for getting IPath for "WebContent"        folder?







Hi,

 

For the JSF Tools Project, we have situations where we need to obtain an IPath for the "WebContent" (regardless of actual name that user specifies) folder. We have discovered at least one approach (get WebArtifactEdit, get its deployment descriptor path, strip a couple of segments from it), but now I am wondering if there is an approach that feels like less of a hack.

 

Is there a recommended (and robust, of course) approach that anyone is willing to recommend (taking into consideration the fact that we cannot assume a constant name of "WebContent", since the user can change this)?

 

Thanks in advance,

- Ian

 

------------------------------------------------------------

Ian Trimble

JDeveloper Group

Oracle Corporation Canada Inc.

Office: (250) 954-0837

Email:
[EMAIL PROTECTED]
Web:
http://www.oracle.com
------------------------------------------------------------

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies.

_______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev

_______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev

_______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Reply via email to