When I get a moment, I'll re-write them to reflect the correct open tools
steps, and update the rest to follow suit.
However, if you do what my steps say, and incorrectly install the open tools
as zip files like I show, it does work. I think this is partially due to
the fact that JB5 opens the .zip and finds the /src directory and compiles
it, but that's just a guess.
The disadvantage is, you'll just have your .tld files in the wrong place and
the struts.jar loaded in the context. But at least the project will build
and deploy.
Anthony
-----Original Message-----
From: Bill G [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 3:44 PM
To: [EMAIL PROTECTED]
Subject: RE: JBuilder w/Struts Support
By eliminating step 2, step 7 becomes unnecessary but what about step 8?
It's not clear to me.
BG...
-----Original Message-----
From: Anthony Martin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 1:55 PM
To: '[EMAIL PROTECTED]'
Subject: RE: JBuilder w/Struts Support
Only steps 7 and 8 are effected by this.
-----Original Message-----
From: Bill G [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 1:52 PM
To: [EMAIL PROTECTED]
Subject: RE: JBuilder w/Struts Support
Hi Anthony,
"This might explain why the .TLD files weren't moving over."
If this is true then are your instructions for steps 3 through 11 still
valid?
BG...
-----Original Message-----
From: Anthony Martin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 1:16 PM
To: '[EMAIL PROTECTED]'
Subject: RE: JBuilder w/Struts Support
Regarding step 1, you are correct. I had it wrong. The jar files must be
used. This might explain why the .TLD files weren't moving over.
If this is correct, step 2 may not be necessary. But to clarify, Step 2 had
a typo, and wasn't clear to begin with. Sorry about that.
It should read:
2. Move:
o strutsblank\WEB-INF\classes\*.* to strutsblank\src
o strutsblank\WEB-INF\*.tld to strutsblank\src
Again, the purpose of moving the .tld into src was to make sure they got
included in the .war. If I had the open tools wrong, this would explain it.
Anthony
-----Original Message-----
From: Bill G [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 1:06 PM
To: [EMAIL PROTECTED]
Subject: RE: JBuilder w/Struts Support
Anthony,
I am trying to implement your solution and need some clarification on steps
1 and 2.
Step 1 question -
The instruction that come with the downloaded files from Borland
(Nostruts.zip & webinfextension.zip) indicate that the "JAR" files need to
be placed into "c:/jbuilder5/lib/ext" which is different from your
instructions which say to place the "ZIP" files in the directory. I have the
ZIP files in the directory but I am wondering if I missed something here?
Step 2 question -
The instruction "Move: strutsblank\WEB-INFclasses to strutsblank\src". So I
created "strutsblank\" and "strutsblank\src" directories under
"C:/jbuilder5/jakarta-tomcat-3.2.1/webapps/", then extracted (unzipped) the
"struts-blank.war" to the "strutsblank\" directory. Next, I moved
"\strutsblank\WEB-INF\classes" to "\strutsblank\src\classes", is this
correct?
Thanks,
BG...
-----Original Message-----
From: Anthony Martin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: JBuilder w/Struts Support
Here is my recipe for JBuilder5 w/Struts Support. These steps are a
culmination of a variety of posts found on a variety of groups. Thanks to
all who contributed to this, for there are many. I hope these steps work
for everyone. And I hope Borland eventually adds better support for JB5
w/Struts in the near future. The .TLD is the biggest problem, and it's not
even a Struts specific requirement.
Ingredients:
o Borland JBuilder5 Enterprise (not tested on other versions)
o Struts Support Addin
Nostruts.zip & webinfextension.zip
http://codecentral.borland.com/ goto JB5 x OpenTools
o Struts Blank .war file
struts-blank.war http://jakarta.apache.org/struts goto
downloads
Steps:
1. Download/Install the above:
o Extract the Struts Support Addin files to the open tools
directory. Usually it's c:/jbuilder5/lib/ext on Windows.
o Extract the Struts Blank file to your webapps directory. This
allows it to run outside JB5 For example, the path would likely be
C:/jbuilder5/jakarta-tomcat-3.2.1/webapps/strutsblank on Windows. You can
call it whatever you want, but JB5 doesn't like dashes in the project .jpx,
so I took it out.
2. Move:
o strutsblank\WEB-INFclasses to strutsblank\src
o strutsblank\WEB-INF\*.tld to strutsblank\src
o You'll see...
3. In JB5, set up Struts Support Addin
o Tools | Configure Libraries...
o New...
o Name: Struts Support Addin
o Location: User Home (default)
o Add... c:/jbuilder5/lib/ext/Nostruts.zip
o Add... c:/jbuilder5/lib/ext/webinfextension.zip
o Click OK
4. Set Up Struts (still in Configure Libraries)
o New...
o Name: Struts v1.0 Release (or whatever version you have)
o Location: User Home (default)
o Add... path.to.struts.jar
o Click OK
o Click Required Libraries Tab
o Add... Struts Support Addin
o Click OK
5. Start a new project in JB5.
o File | New | Project
o Project name: strutsblank
o Root path: C:/jbuilder5/jakarta-tomcat-3.2.1/webapps
o Project directory name: strutsblank (default)
o Source directory name: src (default)
o Backup directory name: bak (default)
o Documentation directory name: src (default)
o Output directory name: classes (default)
o Next >
o Add... Struts v1.0 Release (or whatever version you have)
o Next >
o [Finish]
6. Start a new Web Application.
o File | New | Web | Web Application
o Name: strutsblank
o Directory: C:/jbuilder5/jakarta-tomcat-3.2.1/webapps/strutsblank
(default)
o Check off Generate WAR
7. Correct .tld file locations:
o Open web.xml
o Select Tab Libraries
o Change all TabLib locations so that they point to the classes
directory.
o Example: /WEB-INF/classes/struts-bean.tld
8. Open Properties for 'strutsblank'
o Right-Click on Web App strutsblank (icon of a hand with a globe)
o Go to Classes Tab
o Add Files... all files in strutsblank/src
(ApplicationResources.properties and *.tld)
o Go to Dependencies Tab
o Change "Exclude All" to "Include All" for both
o Click OK
9. Get correct classpath:
o Right-Click on index.jsp
o Web Run
o Don't worry about Error 500
o Copy classpath at the very top of the output (right after
"C:\jbuilder5\jdk1.3\bin\javaw")
o Copy classpath just above the stack trace (right after "Classpath
according to Servlet Engine is:")
10. Open Project Properties
o Project | Project Properties...
o Go to Run Tab
o Go to JSP/Servlet Tab
o VM parameters: -classpath [Copy of classpath taken from Web Run]
11. Try it for real:
o Stop last Web Run
o Right-Click on index.jsp
o Web Run
Step seven is one way to correct the missing .TLD files. I was told that
the open tools (webinfextension.zip) file did this, but it seems that it
just makes sure it's part of the file system, not the .WAR. Adding the .TLD
files to the src directory makes sure they are included in the build.
Adjusting the web.xml file makes sure they are being addressed correctly.
It's a kludge, but it makes the .WAR files deployable without having to add
the .TLD files later.
The last three steps could be a mystery to some. The goal here is to get
the correct classpath and add it to the VM parameters. Remember that the
first part of the classpath is in quotes and you don't want anything after
the closing quote. Also remember to add a semicolon just before adding the
second part of the classpath. Sorry if this is not clear. Just remember
that your classpath must be 100% complete. If a resource is mentioned below
the -classpath line, add it to the -classpath line.
Anthony
We all know Linux is great... it does infinite loops in 5 seconds. - Linus
Torvalds, Creator of the Linux Operating System