James Selvakumar’s Blog

January 13, 2008

Java Web Development with Eclipse 3.3

Filed under: eclipse,java,netbeans — James @ 12:22 pm

Hi all,
Blogging after a long….break. I was travelling a lot for the last 1 month or so. I went to Singapore, Putrajaya, Malacca to name a few. And as a result, very little time for blogging.

If you are following my blogs, i blogged sometime back about core java development using netbeans 6.0 and eclipse 3.3.

Both are excellent open source IDEs that have their own strength and weakness.
I’ve been using both netbeans and eclipse and i’m pleased with both of them generally.

Before the advent of version 6.0, netbeans was not on par with eclipse for core java development. The responsive editor, fast code completion, incremental compiling etc, etc.. were some of the trademark eclipse strongholds which netbeans never managed to enter leave alone capturing.

But with 6.0, netbeans has made really a very huge stride in the areas which where it’s traditional letoffs.

But i always believed that java web development with netbeans has been superior compared to eclipse for a long time. The WTP project in eclipse has improved a lot over these days, so i thought of giving it a try.

Can eclipse do well against the likes of netbeans in java web development? Let’s see…

My environment:
Eclipse 3.3 Europa
JDK 1.6.0_03
Tomcat 6.0

So i thought of refreshing my servlet/jsp/jsp-el/jstl skills in the above mentioned environment.

One thing that impressed me is that eclipse, by default, supports many popular application servers/web containers than netbeans does.
There is support for all versions of tomcat, jboss (even for 5.0), websphere (ofcourse dude) and also JOnAS server.
But how come they can leave out glassfish, which is the reference app server for java ee 5?
(I heard that glassfish team has released an eclipse plugin. But i expected more from the number one java ide)

One thing i missed though, is a separate menu item to configure “servers”. That’s ok.

Then i started churning out a few servlets and jsps in my sample app. I changed the web.xml a few times (to configure servlet init parameters etc)
All was going well until i got an “out of memory exception”. The IDE displayed a window which suggested me to close the workspace.

That was ok with me. I was changing the web app many times and was redeploying it often. Occasionally, i restarted the tomcat server from within eclipse. So i thought that might have overloaded the ide.

I closed eclipse and then started it again. It started up smoothly, but some of the changes i made were not saved. That’s ok. Then when i deployed my web app, i got an error which said that
"Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
".

I was quickly able to reckon that tomcat might not have been stopped properly because of the ide crash.
So i attempted to start/restart the server from eclipse, but couldn’t.
Then i went to the task manager and closed the tomcat process manually.

I didn’t expect this though. I expected the IDE to recognize correctly whether tomcat is running or not and should not ask the user to manually close the process.

After closing the tomcat process i was able to deploy my webapp.

But as time went, eclipse threw more and more such errors, which frustrated me, as i have to go through the process of not only restarting eclipse but also stop the tomcat process manually.

To be honest, i haven’t reported this as an issue yet to the eclipse. I’ll be doing that shortly.
I’m sure they can fix these issues quickly and give us an update.

Other things i really appreciate is the nice xml editor, which really save a lot of time. I find the eclipse xml editor marginally better than that of netbeans.

More on the complaints, i feel the code completion needs to be improved for jsp-el and jstl.
I found virtually no code completion for jsp-el.

So by the current standing, eclipse 3.3 provides good if not great support for java web development. I haven’t explored the struts/jsf support in eclipse yet.
Eclipse needs to improve in the web development area, if it want to pose a strong fight to netbeans which is clearly superior here.

About these ads

10 Comments »

  1. I use eclipse for java webapp development for a project which uses JEE 5, Tomcat 5, and JSF.

    Eclipse crashes for me at least twice daily, so I am starting to shop around for another IDE.

    Comment by Anonymous — January 14, 2008 @ 4:45 pm | Reply

  2. Your problems with OutOfMemoryExceptions can be solved rather easy, by setting the PermGen space size. Read more about it at http://tkramar.blogspot.com/2007/10/effective-eclipse-i-setup.html

    I don’t understand why it is not set up more generously out-of-the-box, 64Mb is not much nowadays..

    Comment by Tomáš Kramár — January 15, 2008 @ 8:51 am | Reply

  3. I have to say I’ve never been a Netbeans fan until v6.0 came out … wow! I really like it. However, to be fair, the inexpensive commercial distribution of Eclipse, called MyEclipseIDE (www.myelcipseide.com) is very, very good. I’d call it a draw with Netbeans 6 (not counting the fee of course!). However, there is one really important issue that nobody ever brings up when comparing these tools … plugin availability. Eclipse simply blows Netbeans away here. For example, you cannot get a Netbeans plugin for JUnitFactory, which is awesome. That’s just one example. Anyone else bothered by this? I’d be a total Netbeans convert if I could get all the plugins I want.

    Comment by Jim — January 15, 2008 @ 3:03 pm | Reply

  4. Netbeans 6.0 have very good support for junit out of the box. It supports both junit 3.x and 4.x versions.

    Comment by James Selvakumar — January 15, 2008 @ 3:27 pm | Reply

  5. Thanks tomas kramar.
    Your tips were very useful.

    Comment by James Selvakumar — January 15, 2008 @ 3:47 pm | Reply

  6. Yes, james, I know Netbeans has good support for JUnit … but that’s not what I was complaining about. Many 3rd party plugins are not available for Netbeans because the developers have concluded Eclipse has the market share lead. The one I mentioned specifically is JUnitFacotry (http://www.junitfactory.com/). But there are many, many others. I love Netbeans, but plugin support is not as widespread as Eclipse.

    Comment by Jim — January 15, 2008 @ 4:19 pm | Reply

  7. You are right, Jim. Eclipse as the market leader has a plugin ecosystem which is very huge.

    Even Google released an eclipse plugin for their “Android” development.

    Netbeans and other ide’s have to play catchup in this area.

    Comment by James Selvakumar — January 16, 2008 @ 1:52 pm | Reply

  8. just change the port number which is used by another process to some numbers like

    8080 = 6060

    and for all the port numbwers which is being used by another process.

    then the problem will solved . . . .

    Comment by nandha — October 1, 2008 @ 5:44 am | Reply

  9. I appreciate the information. iphone development with iphone developers is really grooming these days as demand for business and entertainment application is increasing.

    Comment by robertjekob — March 20, 2010 @ 4:12 pm | Reply

  10. Hello sir i start the server that time i got error how to overcome this error (Port 8080 required by Tomcat v6.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
    )

    Comment by UTHAYA CHANDIRAN — August 8, 2011 @ 1:18 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Theme: Rubric. Get a free blog at WordPress.com

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: