wood burning stoves 2.0
The moose likes Struts and the fly likes JavaRanch Article About Struts 1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JavaRanch Article About Struts 1.1 " Watch "JavaRanch Article About Struts 1.1 " New topic

JavaRanch Article About Struts 1.1

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I followed the JavaRanch Article About Struts 1.1 at http://www.javaranch.com/newsletter/Mar2003/newslettermar2003.jsp#struts
No problem encountered. I succeeded in getting the output. However, I have two questions:
1. It is clear that we have to extract the struts.jar file and copy it
into the application /WEB-INF/lib directory.

Do we have to keep the struts.jar file in the C:\j2sdk1.4.1_02\jre\lib\ext directory while compiling servlets and then remove the struts.jar file from the C:\j2sdk1.4.1_02\jre\lib\ext directory while running our struts? I know that the struts.jar cannot be in the classpath at runtime.
To me, it is quite tedious to do. Will servlets be compiled properly if the struts.jar is not in the classpath? :roll:
2. Toward the end of the instruction, it says that "ActionForm class can be deleted". But, where is the ActionForm class? I know that the LoginForm.java extends ActionForm. And I saw only LoginAction.java, LoginBean.java, and LoginForm.java, I did not see ActionForm. I am confused.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

In order to compile things like your ActionForms, ActionBeans, etc, you will need struts.jar in your javac.classpath. There is no need to remove it from your classpath if you don't want to.
Here is what I do. I have a folder called java. Inside this folder is where I do ALL my developement for whatever JAVA stuff. I have a folder in there called lib. In this lib folder I have every possible JAR file that any of my applications might need. So I use that as my classpath for every application. There is no harm in this because javac will just look for what it needs. Nothing more.
When it is time to build, I will use ANT to copy any jar files I need into the current build folder for my app.
So let's say I find a new JAVA Library to use on a new project. Where does it go? My java\lib folder. It's just a global classpath folder for myself.
You don't have to do it this way. You can cut, copy, move, paste all you want. But you don't have to.

GenRocket - Experts at Building Test Data
I agree. Here's the link: http://aspose.com/file-tools
subject: JavaRanch Article About Struts 1.1
It's not a secret anymore!