(Answer) (Category) FAQ-O-Matic : (Category) General : (Category) J2EE/JSP/EJB/Servlets/JDBC :
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: (Answer) Remote debugging JSPs with JRun
Next: (Answer) I need to override my EJB's Jar's Manifest file so that I can specify a CLASSPATH. How do I do this?
This document is: http://www.visi.com/~gyles19/cgi-bin/fom.cgi?file=363
[Search] [Appearance]
This is a Faq-O-Matic 2.709.
This FAQ administered by gyles19@visi.com.

Other JBuilder Links

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
Netring Home - About - Privacy
The
JBuilder Netring Logo
The Borland JBuilder Netring by JBuilder FAQ-O-Matic
[ Join Now | List Sites | Random | << Prev | Next >> ]
[ Previous 5 Sites | Skip Previous | Skip Next | Next 5 Sites ]