This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JavaRanch Article About Struts 1.1 " Watch "JavaRanch Article About Struts 1.1 " New topic
Author

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: 15299
    
    6

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
 
Similar Threads
STRUTS 1.0.x TO 1.1
A Link to an Example?
how to use validation.xml
Difference between struts 1.0.2 and struts 1.1
which technology to learn