Re: Importing javax.faces.context.FacesContext for Glassfish
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 19:06:21 -0400
csharpdotcom wrote:
Well, I seem to eventually got it to compile through a series of trial
and
error, as the documentation I found online together with the man and
help
pages were not at all clear. I typed the following:
javac -d web/WEB-INF/classes -classpath "web/WEB-INF/lib/*" \
src/java/com/corejsf/ChangeLocaleBean.java
So the destination folder is specified first with the "-d" option,
then
the classpath, which for some reason has to be in quotes, then the
source
code. It doesn't work when the classpath is not in quotes, and must
have
something to do with the way the shell handles the wildcard. I'm
uaing
bash.
That is only part of the answer, of course. After you've compiled the classes to web/WEB-INF/classes/ (that is relative to a build/ or dist/ directory, correct?), you still have to copy the JSPs and HTMLs to web/, the JARs to web/WEB-INF/lib, then drop to web/ and jar the whole thing into a WAR file for deployment to your app server.
I usually use web/ as the source directory for web artifacts, src/ as the top of the source tree, build/ as the target of the build (so that classes go into build/WEB-INF/classes/, for example), and dist/ as the target directory to build the WAR file.
project/
|-- src/ <== Java source tree here
|-- web/ <== JSPs, HTMLs, etc.
| |-- WEB-INF/
| | |-- lib/ <== JARs
| | |-- jspf/ <== JSP fragments
| |
| |-- images/ <== other resources
| |-- style/ :
|
|-- build/ <== JSPs, HTMLs, etc., copied to here
| |-- WEB-INF/
| | |-- lib/ <== JARs copied to here
| | |-- jspf/ <== JSP fragments copied to here
| | |-- classes/ <== .class files built here
| |
| |-- images/ <== other resources copied to here
| |-- style/ :
|
|-- dist/ <== WAR file built here
This is in line with what Sun and Apache Tomcat recommend, and how most IDEs will organize your stuff.
--
Lew
.
- References:
- Importing javax.faces.context.FacesContext for Glassfish
- From: csharpdotcom
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: Hunter Gratzner
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: Lew
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: csharpdotcom
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: Lew
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: csharpdotcom
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: Lew
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: csharpdotcom
- Re: Importing javax.faces.context.FacesContext for Glassfish
- From: csharpdotcom
- Importing javax.faces.context.FacesContext for Glassfish
- Prev by Date: Re: how to convert metric to pixels
- Next by Date: Re: Hey people, would you like to excahnge links with our site?
- Previous by thread: Re: Importing javax.faces.context.FacesContext for Glassfish
- Next by thread: Re: Importing javax.faces.context.FacesContext for Glassfish
- Index(es):
Relevant Pages
|
|