Re: Configuring dynamic web project on existing svn checkout [message #484611] |
Tue, 08 September 2009 09:45  |
Eclipse User |
|
|
|
Copying this to the WTP newsgroup, eclipse.webtools
On 9/6/09 3:10 PM, Markus Fischer wrote:
> Hi,
>
> I'm playing around with a project ( Solr from
> http://svn.apache.org/repos/asf/lucene/solr/trunk/ ) and my goal is to
> be able to work with the web interface from within Eclipse. I've
> experience configuring/installing Solr on tomcat from within the console
> (Linux)
>
> I'm using Eclipse Galileo on Ubuntu and WTP etc. is installed. I can
> create a new Dynamic Web Project and work with Servlets.
>
> After checking out the specific solr project, I configure the build path
> so it picks up all necessary sources and libraries.
>
> I've checked out the project as nature Dynamic Web Project, but I don't
> know how/where to tell the tomcat installation what of the checkout to
> consider part of the web application.
>
> Whenever I try to start one of the servlets I get a 404 in tomcat. Under
> src/webapp/web/ is index.jsp. When I right click and choose "Run As" it
> doesn't show me the "Run on server" option (I need to configure them,
> but a tomcat configuration is present).
>
> I guess I'm missing some small step here ... ?
>
> thanks for any hints,
> - Markus
|
|
|
|
|
|
|
|
Re: Change dynamic web project settings after creation [message #485417 is a reply to message #485392] |
Fri, 11 September 2009 12:45  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03862 seconds