[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Change dynamic web project settings after creation

Dean Hiller wrote:
Is there documentation on that file????!!!!

Not that I'm aware of. Manual modification, though useful/necessary in some circumstances, isn't officially supported.



<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="onlineReporting2">
<wb-resource deploy-path="/" source-path="/input/webroot"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/input/javasrc"/>
<property name="context-root" value="onlineReporting2"/>
<property name="java-output-path"/>
</wb-module>
</project-modules>

This looks reasonable.


I am assuming all of these paths are relative to context-root, and that context-root is not used for web app or anything.

The context-root property specifies the context name the webapp should be served as, i.e. "http://somehost:someport/onlineReporting2/someresource...";. That's all it affects.



What I don't get is why there is no value for java-output-path.

I'm not sure either. The lack of a value may mean default behavior should be used. In any case, the WTP is smart enough to copy the build artifacts for "/input/javasrc" and not the actual source for that <wb-resource>.



If I want everything to go to output, would this be correct.....

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="onlineReporting2">
<wb-resource deploy-path="/ouput/webroot" source-path="/input/webroot"/>
<wb-resource deploy-path="/output/webroot/WEB-INF/classes" source-path="/input/javasrc"/>
<property name="context-root" value="onlineReporting2"/>
<property name="java-output-path"/>
</wb-module>
</project-modules>

No. The deploy-path must be the relative path within the webapp. The location of the webapp will provided by the action you are executing, such as publishing to a server or exporting to a WAR file. The extra folders at the beginning of the deploy-path will just "break" things.



but then, where is it getting my jar files from?

Jar files can be managed from the Java EE Module Dependencies page if the project's Properties dialog, which is able to modify this file. There are also special buildpath attributes that can appear in the project's ".classpath" file that can mark a jar as one that needs to be included or excluded from a webapp's WEB-INF/lib.


how do I define that in here? unfortunately build for jboss and tomcat and so we have two directories of jar files to get jars from as well.

It's not clear what exactly "build for jboss and tomcat" is implying. However, I'm not aware of a way to have what comprises the webapp (WTP calls it a "module") in a Dynamic Web Project to be different depending on a dynamic choice of server. What you might be able to accommodate would depend on exactly what needed to be different.


Cheers,
Larry


thanks, Dean