Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to modify source file in Eclipse

 
K DeLucia
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to modify a portlet/war file. I have the source code. In Eclipse I opened the appropriate .java file and made a change to one parameter (I need to change a default URL hard-coded into the portlet). I'd like to now somehow repackage the code into a new war file with my changes but can't quite figure out how.

Should I import the code (with the edited .java file) into Eclipse, then export it as a war? I tried that, but when I try to deploy it in JBoss it doesn't show in the list of available portlets like it did before I messed with it. I have restarted JBoss. I may not have imported all the right stuff, or maybe not into the right place. I'm not even sure that's what I should do.

Any pointers are much appreciated.
K
 
Campbell Ritchie
Sheriff
Pie
Posts: 49382
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know.

Sounds more complicated than the average beginner's question. In case there is an Eclipse-specific trick, I shall try moving you to the IDEs forum.
 
BV Boose
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would use an ant build to generate a .war file. You could generate it with a tomcat plugin- is that even available anymore?
here's a start:
http://arkblog.wordpress.com/2008/01/08/creating-a-deployable-war-file-from-eclipse-project/
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Eclipse, you can create a "Dynamic Web Project". This project knows how to build WAR files and creates directories you can use for your JSPs.

You can also create a JBoss server within Eclipse, and link your web project to that server and Eclipse will handle the deployment.

Also, if you are doing development for JBoss AS, you can get JBoss Tools which is a set of plugins that help with app development.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic