Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse 3.1 and jsp

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm totally new to jsp and related stuff; i'm used to eclipse in order to code stand alone java apps; i wonder if one can use eclipse 3.1 to build web apps: how one tells eclipse to compile .java files?

TiA

EDIT
in the meanwhile i created a build.xml that compiles my .java files to a WEB-INF/classes folder (pls see this thread)

I'd like to know how i can use eclipse 3.1 to work with my proj and using ant (inside eclipse) to build

TiA
[ October 02, 2005: Message edited by: miguel lisboa ]
 
Hussain Fakhruddin
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download the tomcat plugin for eclipse from this site

Tomcant Plugin

instruction are provided on the link ... if still there is any problem you can ask ... you need to compile the class ... whenever you save the class it is automaticaly compiled and place in the WEB-INF/classes folder.
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for that link, Hussain

as i said before, i'm just giving my first steps in jsp related stuff.

i tried creating my project inside tomcat and then creating a proj with eclipse, using the option with ant buid file, but then my proj ended inside my (eclipse) workspace, not inside tomcat as i expected it to be...

so, i'd like to have my proj inside tomcat and at the same time beeing able to edit, compile and so on from eclipse, using my ant build file.

My problem is that i've no idea how to do it...
 
Hussain Fakhruddin
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
assuming that you have added the plugin ... yes the project is created in the eclipse workspace ... but even then you can run it from localhost as its context is added automatically in server.xml file in tomcat by eclipse.
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks again, Hussain
i just installed the beta plugin (only available for eclipse 3.1), followed the instructions, and then ended with 3 new icons in eclipse menus.

also, in tray bar, i've tomcat icon that lets me start/stop tomcat.

i tried those icons to start, stop and restart tomcat from eclipse and though those commands do start/stop tomcat, the tomcat'icon in tray bar does not reflect those changes.
is this usual?

TiA
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
assuming that you have added the plugin ... yes the project is created in the eclipse workspace ... but even then you can run it from localhost as its context is added automatically in server.xml file in tomcat by eclipse.

i'm sorry i keep asking an asking, but
i tried the following: in eclipse i commented out all my .java and then restarted tomcat and app still worked: this means my .class (in tomcat) wasnt updated

Can you help me in this, pls?

TiA

EDITED:
i tried creating a proj in eclipse (using the web app i've in tomcat) in several ways: file/new/project/Java Project from existing ant build file or Tomcat project

both create new WEB-INF folders and mess it all

what is the correct procedure to have the files in eclipse?

TiA
[ October 05, 2005: Message edited by: miguel lisboa ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic