struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Martin <>
Subject JBuilder w/Struts Support
Date Wed, 01 Aug 2001 17:14:47 GMT
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.


	o Borland JBuilder5 Enterprise (not tested on other versions)

	o Struts Support Addin & goto JB5 x OpenTools

	o Struts Blank .war file
		struts-blank.war goto


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/
	o Add... c:/jbuilder5/lib/ext/
	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...
	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
	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
	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
( 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
	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 ( 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.


We all know Linux is great... it does infinite loops in 5 seconds. - Linus
Torvalds, Creator of the Linux Operating System

View raw message