Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Re: Configuring dynamic web project on existing svn checkout
Re: Configuring dynamic web project on existing svn checkout [message #484611] Tue, 08 September 2009 13:45 Go to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
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 #484961 is a reply to message #484611] Wed, 09 September 2009 22:59 Go to previous messageGo to next message
Markus Fischer is currently offline Markus FischerFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

> On 9/6/09 3:10 PM, Markus Fischer wrote:
>> 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 (think) found the settings in
..settings/org.eclipse.wst.common.component of the project, but I'm
unsure about the specific things to change manually and I can't find the
UI dialog to change a the web application folder *after* creating a project.

Can someone help me?

thanks,
- Markus
Re: Change dynamic web project settings after creation [message #485236 is a reply to message #484961] Thu, 10 September 2009 21:20 Go to previous messageGo to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 46
Registered: July 2009
Member
heh, I just posted relatively the same question here...

http://www.eclipse.org/newsportal/article.php?id=19231&g roup=eclipse.webtools#19231

I know you can do it quite nicely in MyEclipse though it took a bit of
time to figure out and their server view is a bit different(seems more
intuitive to me). I hope someone responds with an answer. I am trying to
figure out the same thing.
Re: Configuring dynamic web project on existing svn checkout [message #485245 is a reply to message #484611] Thu, 10 September 2009 22:24 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
> 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.

I don't know what you mean when you say you've "checked out the project as nature Dynamic Web Project". Can you elaborate? It sounds to me like the project in question is not actually a web project when you are trying to deploy it.

- Konstantin
Re: Change dynamic web project settings after creation [message #485356 is a reply to message #484961] Fri, 11 September 2009 13:41 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Markus Fischer wrote:
> Hi,
>
>> On 9/6/09 3:10 PM, Markus Fischer wrote:
>>> 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 (think) found the settings in
> .settings/org.eclipse.wst.common.component of the project, but I'm
> unsure about the specific things to change manually and I can't find the
> UI dialog to change a the web application folder *after* creating a project.
>
> Can someone help me?
>
> thanks,
> - Markus

UI isn't currently available for modifying the "component" file. You
can review Bug 277482[1] for what might be coming in WTP 3.2. You have
likely figured out what to do by now. But to complete the thread, the
following <wb-resource> element would map the index.jsp to show up in
the root of the webapp:

<wb-resource deploy-path="/" source-path="/src/webapp/web"/>

Cheers,
Larry

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=277482
Re: Change dynamic web project settings after creation [message #485392 is a reply to message #485356] Fri, 11 September 2009 15:22 Go to previous messageGo to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 46
Registered: July 2009
Member
Is there documentation on that file????!!!!

<?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>

I am assuming all of these paths are relative to context-root, and that
context-root is not used for web app or anything. What I don't get is why
there is no value for java-output-path. 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>

but then, where is it getting my jar files from? 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.

thanks,
Dean
Re: Change dynamic web project settings after creation [message #485417 is a reply to message #485392] Fri, 11 September 2009 16:45 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
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
>
>
Previous Topic:Missing namespace prefix using content assist
Next Topic:Re: web page editor
Goto Forum:
  


Current Time: Thu Apr 25 07:06:19 GMT 2024

Powered by FUDForum. Page generated in 0.04129 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top