|
|
How do I organize a Web app project in JBuilder 4? |
Original question:
>I am trying to use JBuilder4 Enterprise to do a Jsp project.
>Although the "Counting bean" example included with JBuilder-
>works fine as a "Hello World" example of Jsp, there seems to
>be no documentation with the IDE on where the IDE expects
>certain kinds of files to be within the project environment-
>that you would be using in a more sophisticated Jsp project.
The best thing one can do is to set up a completely
new project, and one-by-one, add each kind of resource
to the project. That is, add a servlet, run the Web app.
Look at the file system explorer to see what went where.
Then add a JSP and do the same. Add a static .html file
and redirect to it from the servlet. I know, this sounds
like too much work, and it is. (JBuilder 5 and 6 progressively
provide better assistance in structuring a Web app project,
as you might expect from a rapidly evolving product.)
Here's what I have surmised from looking at one project.
Suppose the project file (.jpr) is located in the "webOne"
folder, and other folders are as shown here:
d:/projects
+ webOne
+ myWebApp.jpr
+ src
| | - home.jsp
| | - static.html
| + com
| + mycorp
| + servlets
| | - servlet1.java
| | - ... <other servlets>
| + models
| - datamodule1.java, etc.
+ bak
+ classes
+ images
- logo.jpg
In the Project Properties dialog:
Paths tab
Working directory: d:/projects/webOne
Source tab
d:/projects/webOne/src
Run tab
JSP/Servlet tab
Start file/class: <your starting HTML or JSP>
Servlet options tab
Document base: d:/projects/webOne
To reference resources in JSPs or static HTML, you'd
write, for example,
html
body
<a href="home.jsp"><img src="/images/logo.jpg">/a
/body
/html
Note the "/" prefix to "images/logo.jpg". This means
that the folder "images" is in the "Document base"
folder, which was defined above as "d:/projects/webOne".
That should just about do it.
| |
| [Append to This Answer] | |
| pfurbacher@mac.com | |
| 2002-Mar-12 10:26pm |
| Previous: |
|
| Next: |
|
| ||||||||
|
Java Community
Java Tools |
Code Central JB OpenTools |
Community Recent Threads |
Borland Chat Chat FAQ |
||||||||||||||
|
Feature Matrices 3.0 | 3.5 | 4.0 5.0 | 6.0 | 7.0 |
Shop for JBuilder |
JBuilder Downloads and reg keys |
Report Piracy | ||||||||||||||
|
Online Manuals 4.0 | 5.0 | 6.0 7.0 |
Borland DevSupport's Bug/RFE Form Quality Central Client |
JB Patches & Updates |
JBuilder FAQs TIs | ||||||||||||||
|
JBuilder Newsgroups |
Tamaracka's News Archive |
Mr. Haki's JBuilder Machine |
JGuru's JBuilder FAQ |
||||||||||||||
|
Sun's Bug Parade |
|||||||||||||||||
|
|||||||||||||||||