Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Configuration Eclipse (Tomcat)
Configuration Eclipse (Tomcat) [message #206180] Thu, 27 December 2007 04:02 Go to next message
Eclipse User
Originally posted by: Abel.MacAdam.eden.invalid

Hi,

First of all, if this is the wrong mailing list my apologies.

At the moment I'm bootstrapping myself in developing web projects using
Struts. But I get bombarded with errors left and right. That makes me
wonder
if my configuration is amiss. So therefore I describe what I do, and
hopefully someone will see what is wrong in my installation.

I use examples in the book 'Struts Design and Programming (version 1.2), a
Tutorial' from Budi Kurniawan.

To be able to look at what happens in the examples, I need to get them
displayed by an application server. I use Tomcat (6.0) (and as webserver I
use Apache as delivered in the WAMP download, wampserver2.0). I use Eclipse
Europa as my IDE. I use the Sysdeo Tomcat plug in for Eclipse.

When I want to look at an example I copy the directory containing the
example to my ECLIPSE/workspace directory. Next I start a new project in
Eclipse (File -> New -> Project ...). In the 'New Project' window, I then
choose Java -> Tomcat Project, after which I use the name of the directory
I
just copied from the sources from the book.

This results in the following directory structure (in Eclipse):
<directory>
- JRE System Library [jre1.6.0_03]
- Referenced Libraries
|- servlet-api.jar - TOMCAT_HOME\lib - C:\Tomcat6.0\lib\servlet-api.jar
|- jasper.jar - etc
|- jsp-api.jar
|- el-api.jar
|- annotations-api.jar
- antlr.jar
- commons-beanutils.jar
- ...
- standard.jar
- struts.jar
(The last jars, from antlr.jar to struts.jar are more or less from the
STRUTS_HOME\lib directory)
WEB-INF/src
work
bin
jsp
src
WEB-INF
</directory>

After looking through the supplied code, I want to try it out. In Eclipse,
I
start my Tomcat. Next I go to my browser, and enter the address of the app
(like http://localhost:8080/app05a/displayAddOrderForm.do). And then I get
the errors.

So can anyone of you point me to mistakes in my configuration?

TIA,
Abel
Re: Configuration Eclipse (Tomcat) [message #206189 is a reply to message #206180] Thu, 27 December 2007 09:28 Go to previous messageGo to next message
Eclipse User
Originally posted by: dcarver.starstandard.org

Abel MacAdam wrote:
> Hi,
>
> First of all, if this is the wrong mailing list my apologies.
>
> At the moment I'm bootstrapping myself in developing web projects using
> Struts. But I get bombarded with errors left and right. That makes me
> wonder
> if my configuration is amiss. So therefore I describe what I do, and
> hopefully someone will see what is wrong in my installation.
>
> I use examples in the book 'Struts Design and Programming (version 1.2), a
> Tutorial' from Budi Kurniawan.
>
> To be able to look at what happens in the examples, I need to get them
> displayed by an application server. I use Tomcat (6.0) (and as webserver I
> use Apache as delivered in the WAMP download, wampserver2.0). I use Eclipse
> Europa as my IDE. I use the Sysdeo Tomcat plug in for Eclipse.
>

Any particular reason you aren't using the Web Tools Platform, or the
Eclipse Europa for JEE Developer's addition.

With that said, you may need to contact the developer of Sysdeo plugin:

http://www.eclipsetotale.com/tomcatPlugin.html

Otherwise, you could try downloading and using the Eclipse for JEE
Developers edition, and creating a Dynamic Web Project. There is a Tom
Cat FAQ at:

http://wiki.eclipse.org/WTP_Tomcat_FAQ

But again it's specific the Web tools implementation and support for Tomcat.
Re: Configuration Eclipse (Tomcat) [message #206197 is a reply to message #206189] Fri, 28 December 2007 03:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: Abel.MacAdam.eden.invalid

David Carver wrote:

> Abel MacAdam wrote:
>> Hi,
>>
>> First of all, if this is the wrong mailing list my apologies.
>>
>> At the moment I'm bootstrapping myself in developing web projects using
>> Struts. But I get bombarded with errors left and right. That makes me
>> wonder
>> if my configuration is amiss. So therefore I describe what I do, and
>> hopefully someone will see what is wrong in my installation.
>>
>> I use examples in the book 'Struts Design and Programming (version 1.2), a
>> Tutorial' from Budi Kurniawan.
>>
>> To be able to look at what happens in the examples, I need to get them
>> displayed by an application server. I use Tomcat (6.0) (and as webserver I
>> use Apache as delivered in the WAMP download, wampserver2.0). I use Eclipse
>> Europa as my IDE. I use the Sysdeo Tomcat plug in for Eclipse.
>>

> Any particular reason you aren't using the Web Tools Platform, or the
> Eclipse Europa for JEE Developer's addition.

> With that said, you may need to contact the developer of Sysdeo plugin:

> http://www.eclipsetotale.com/tomcatPlugin.html

> Otherwise, you could try downloading and using the Eclipse for JEE
> Developers edition, and creating a Dynamic Web Project. There is a Tom
> Cat FAQ at:

> http://wiki.eclipse.org/WTP_Tomcat_FAQ

> But again it's specific the Web tools implementation and support for Tomcat.
Hi David,

Sorry, I was not complete in describing what i use. I have Eclipse Europa,
with JEE installed (eg. eclipse-jee-europa-fall2-win32.zip). In a
discussion on the Tomcat mailing list
( http://www.nabble.com/NoClassDefFoundError-3A-TagExtraInfo-m issing--to14487034.html)
someone suggested I try to look at the results in Tomcat directly,
bypassing the Tomcat Eclipse uses. This resulted in more examples showing
as they are intended.

But as you also advised "and creating a Dynamic Web Project" I tried that
one out. And now I have this particular example running from Eclipse too.

Might you answer me the following questions:
1 Should I use 'Dynamic Web Project' instead of Tomcat project?
2 What is the difference between these two ways of starting a development
project?

(The only thing I could see differing from Tomcat project was that I had
to add libraries for the Servlet and Struts api manually).

Abel
Re: Configuration Eclipse (Tomcat) [message #206204 is a reply to message #206189] Fri, 28 December 2007 04:35 Go to previous messageGo to next message
Eclipse User
Originally posted by: Abel.MacAdam.eden.invalid

David Carver wrote:

> Abel MacAdam wrote:
>> Hi,
>>
>> First of all, if this is the wrong mailing list my apologies.
>>
>> At the moment I'm bootstrapping myself in developing web projects using
>> Struts. But I get bombarded with errors left and right. That makes me
>> wonder
>> if my configuration is amiss. So therefore I describe what I do, and
>> hopefully someone will see what is wrong in my installation.
>>
>> I use examples in the book 'Struts Design and Programming (version 1.2), a
>> Tutorial' from Budi Kurniawan.
>>
>> To be able to look at what happens in the examples, I need to get them
>> displayed by an application server. I use Tomcat (6.0) (and as webserver I
>> use Apache as delivered in the WAMP download, wampserver2.0). I use Eclipse
>> Europa as my IDE. I use the Sysdeo Tomcat plug in for Eclipse.
>>

> Any particular reason you aren't using the Web Tools Platform, or the
> Eclipse Europa for JEE Developer's addition.

> With that said, you may need to contact the developer of Sysdeo plugin:

> http://www.eclipsetotale.com/tomcatPlugin.html

> Otherwise, you could try downloading and using the Eclipse for JEE
> Developers edition, and creating a Dynamic Web Project. There is a Tom
> Cat FAQ at:

> http://wiki.eclipse.org/WTP_Tomcat_FAQ

> But again it's specific the Web tools implementation and support for Tomcat.
Hi David,

As you might have noticed, I also replied earlier to your answer. But your
answer made me think a bit. As it turns out, I might be using WTP instead
of Sysdeo. Looking at my installed plugins (Help -> Software Updates ->
Find and install ..., Search for new features to install) it turned out I
have the 'Web Tools Platform (WTP) Updates' site in the list of sites to
include in my feature search. But when I look in my ECLIPSE\plugins
directory I see I have a 'com.sysdeo.eclipse.tomcat_3.2.1' directory as
well.

So my current questions are:
1. Asking the obvious, I have WTP installed?
2. Does having both a WTP and a Sysdeo conflict?
3. How do I remove Sysdeo from my plugins (and out of Eclipse)?

Possible answer for 3:
Shutdown Eclipse, delete the 'com.sysdeo.eclipse.tomcat_3.2.1' directory,
and restart Eclipse again.
4. Is this the way to remove Sysdeo?

Abel
Re: Configuration Eclipse (Tomcat) [message #206266 is a reply to message #206204] Wed, 02 January 2008 04:06 Go to previous messageGo to next message
Eclipse User
Originally posted by: Abel.MacAdam.eden.invalid

Hi all,

In my quest to get Tomcat working inside Eclipse I have made a new step. I
used a document [1] to try out the configuration, and that example worked.
It turned out I had not set the Context root in the New Dynamic Web
Project window (or the Context Root in the Web Project Settings part of
the Properties window of my app). This resulted in no server being
assigned to my app. The 'Server' part of my project Properties was set to
<None>. When I changed that I could get the example of [1] working.

Trying to retrace the same steps for my own app [2], I checked the Context
root. That one was set to the correct directory name. Trying out the app
still generated the same error:
<error report>
type Status report

message /app15a/createCustomer.do

description The requested resource (/app15a/createCustomer.do) is not
available.
</error report>

Does anyone know what more I can check to see if my configuration is
faulty?

TIA,
Abel

[1]
http://www.eclipse.org/webtools/community/tutorials/BuildJ2E EWebApp/BuildJ2EEWebApp.html
[2] app15a in "Struts Design and Programming, A Tutorial", code
downloadable from http://books.brainysoftware.com/index.php?show=struts
Re: Configuration Eclipse (Tomcat) [message #206299 is a reply to message #206266] Wed, 02 January 2008 11:02 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1293
Registered: July 2009
Senior Member
Abel MacAdam wrote:
> Hi all,
>
> In my quest to get Tomcat working inside Eclipse I have made a new step.
> I used a document [1] to try out the configuration, and that example
> worked. It turned out I had not set the Context root in the New Dynamic
> Web Project window (or the Context Root in the Web Project Settings part
> of the Properties window of my app). This resulted in no server being
> assigned to my app. The 'Server' part of my project Properties was set
> to <None>. When I changed that I could get the example of [1] working.
> Trying to retrace the same steps for my own app [2], I checked the
> Context root. That one was set to the correct directory name. Trying out
> the app still generated the same error:
> <error report>
> type Status report
>
> message /app15a/createCustomer.do
>
> description The requested resource (/app15a/createCustomer.do) is not
> available.
> </error report>
>
> Does anyone know what more I can check to see if my configuration is
> faulty?
>
> TIA,
> Abel
>
> [1]
> http://www.eclipse.org/webtools/community/tutorials/BuildJ2E EWebApp/BuildJ2EEWebApp.html
>
> [2] app15a in "Struts Design and Programming, A Tutorial", code
> downloadable from http://books.brainysoftware.com/index.php?show=struts

There isn't enough detail about your configuration here to say what
might be going wrong. For reference, a non-blank Context Root setting
is not required. If it is blank, then the it becomes the "default"
webapp for Tomcat (i.e. the "ROOT" webapp). This means its URL would be
like "http://localhost:8080/index.jsp" instead of
"http://localhost:8080/myapp/index.jsp". Typically though, the Context
Root is set to something non-blank like you have done.

Likewise, the Server setting is also not required. That setting is
primarily used by the Run As -> Run on Server command. If set to
"<none>", the Run on Server wizard will ask you which server on which to
run the project. The advantage of the Run on Server command is that it
will open the browser with an appropriate URL for the resource you had
selected.

You may want to check out http://wiki.eclipse.org/WTP_Tomcat_FAQ for
some info about the Tomcat Server support in WTP. It was written for
WTP 1.5.x, but largely applies to WTP 2.0.x as well.

As for the problem with the Struts tutorial, if simple things like
accessing a JSP works in the webapp, then that would suggest something
wrong in your Struts configuration. Note that the amount of info
returned to the browser will often be somewhat minimal, since exposing
detailed info there is typically considered a security risk. You will
likely find more useful info in log files.

Cheers,
Larry
Previous Topic:Not able to create Any J2EE project
Next Topic:The requested resource is not available
Goto Forum:
  


Current Time: Tue Jul 22 09:44:17 EDT 2014

Powered by FUDForum. Page generated in 0.03594 seconds