Re: Setting up JBOSS 5 Server on my local computer
- From: Tom Anderson <twic@xxxxxxxxxxxxxxx>
- Date: Mon, 24 Nov 2008 21:40:36 +0000
On Sun, 23 Nov 2008, Lew wrote:
Lew wrote:First of all, you're linking source to JBoss, instead of built artifacts.
Tom Anderson wrote:Why is that a problem? Indeed, if you're linking JSPs, is there any other way?
Source directories don't match deployment structures. For example,
Source for Java:
project / src / java /
Deployed Java:
project_root / WEB-INF / classes /
JSP source:
project / web /
JSP deployment:
project_root /
Subdirectoried resources may differ between source and deployment.
You don't have to use one link for the whole project - we make two, one for class files and one for JSPs, or more for other components. Assuming you use an exploded deployment to begin with, something like (obviously assuming you have your Eclipse project set up like the one in my head - i don't have a copy of Eclipse to hand):
SERVER=DevSetup
APP=MyApp
rm -rf /opt/jboss/server/$SERVER/deploy/$APP.war/jsp
ln -s /opt/eclipse-projects/$APP/src/jsp /opt/jboss-4/server/$SERVER/deploy/$APP.war/jsp
rm -rf /opt/jboss/server/$SERVER/deploy/$APP.war/html
ln -s /opt/eclipse-projects/$APP/static-content /opt/jboss-4/server/$SERVER/deploy/$APP.war/html
rm -rf /opt/jboss/server/$SERVER/deploy/$APP.war/WEB-INF/classes
ln -s /opt/eclipse-projects/$APP/build/classes /opt/jboss-4/server/$SERVER/deploy/$APP.war/WEB-INF/classes
Note that you don't link the java sources in at all - just the class files.
Note also that this does involve putting all your web documents in one or more directories under the root, rather than right in the root. We don't find this is a big deal. On suitably advanced OSs, and given suitably obscure wizarding knowledge, you could use a union mount to get this right. Or you could do something unclean with symlinks inside your own project file.
And where to put translated JSPs and their compiled class files?
Wherever JBoss wants to put them. If that directory then comes under the Eclipse project root, cvsignore it.
Continuing,
JARs:
project / lib /
Deployed JARs:
project_root / WEB-INF / lib /
It's all too different from the deployed structure to link to source directories.
A link for each. Sorry i didn't explain this more fully beforehand.
tom
--
Tomorrow has made a phone call to today.
.
- References:
- Setting up JBOSS 5 Server on my local computer
- From: maflatoun@xxxxxxxxx
- Re: Setting up JBOSS 5 Server on my local computer
- From: Tom Anderson
- Re: Setting up JBOSS 5 Server on my local computer
- From: Lew
- Re: Setting up JBOSS 5 Server on my local computer
- From: Tom Anderson
- Re: Setting up JBOSS 5 Server on my local computer
- From: Lew
- Setting up JBOSS 5 Server on my local computer
- Prev by Date: Re: Store value or calculate
- Next by Date: Re: Internet Down?
- Previous by thread: Re: Setting up JBOSS 5 Server on my local computer
- Next by thread: Re: Setting up JBOSS 5 Server on my local computer
- Index(es):
Relevant Pages
|