Bryan Douglas

+ Follow
since Oct 25, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bryan Douglas

Thank you! That did the trick!
15 years ago
I am studying about servlets currently from the Headfirst book series, and I am stuck in chapter 3. I have to test some model logic, which is simply a plain old java class. I come from a C++ background, and while I have no problem designing and writing java code, I am quite lost on the art of building and compiling with Java.

I have one file,, which I have alread compiled. It's compiled .class file is located in C:\projects\beerV1\classes\com\example\model. I have another file,, which is located in C:\projects\beerV1\src\com\example\model, which is also where is located. In both java files, I put "package com.example.model;" at the top of the files. The source for the files is located at the bottom of this post.

When I try to compile, javac returns an error saying that the symbol BeerExpert cannot be found. When I compile, however, I am setting the classpath:
C:\projects\beerV1\src\com\example\model>javac -cp C:\projects\beerV1\classes\com\example\model

Where I am making the mistake? In the source files? Do I have to call javac from a specific directory due to the pacakge naming?
15 years ago
Nevermind, I deleted the "...../servlet-api.jar:classes:." part and it worked. I wonder why that is put in the book?
15 years ago
I am currently studying about servlets using "Head First Servlets and JSP", and I am stuck trying to build my first servlet from Ch. 3 of the book. Yes I know, it is pathetic.

I plan to move to eclipse for Java development soon, but for now I want to understand what I am doing. Unfortunately, I am stuck developing on a Windows workstation, and I am having a world of trouble getting a simple servlet to build. Windows is not exactly my forte, so I might not having something set correctly. When I compile standard java programs not using any special libraries, everything compiles just fine. When I try to make a servlet, it blows up on me. I suspect the issue is a CLASSPATH problem, but it should work unless I am missing something.

Here is my CLASSPATH variable:
CLASSPATH=.;C:\IBM\SQLLIB\java\;C:\IBM\SQLLIB\java\db2jcc.jar;C:\IBM\SQLLIB\java\;C:\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\IBM\SQLLIB\bin;C:\IBM\SQLLIB\java\common.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib

So I have this really simple code:

Below is the screen output (sorry the workstation is Japanese...but right now I am only concerned about the first error--I will do this one step at a time...slowly). It basically says that "import javax.servlet.*;" line is failing and that it does not exist.

Any ideas? The build command is the same as the one in the textbook, except that they use UNIX and I am using Windows.
15 years ago
I successfully installed apache and tomcat, and the both work well alone. I want to connect apache and tomcat, however. I follow the directions at mod_jk connector docs, but neither the automatic config mode nor the manual settings mode worked. After making the changes, tomcat starts, but apache cannot. When I try to restart the apache service, it says "The requested operation has failed!" If I comment out the lines that I added to httpd.conf, the server starts perfectly.

Question: Is there a way I find out which line the error occured on while reading httpd.conf? There is no entry writtn to error.log in the logs directory. And that is the specified file in the httpd.conf file. Frown

Reference information:
Host System: Windows XP Pro
Apache: v2.2.3
Tomcat: v5.5.17

In order to try to get tomcat and apache to place nice together, first, I downloaded from the tomcat homepage, and I copied it to the apache modules directory.

In the apache conf folder, I created a file that contains:

At the bottom of the apache httpd.conf file, I appended:

15 years ago
Thanks for all the input and advice. Well, I shall get started with Tomcat and JSP then! Thanks again!
Thank you for taking the time to reply to my post. I really appreciate it. I have a few more questions though.

Um, it is called Apache Tomcat. Apache is just an organization, not a product.

So I do not need the apache web server then? I just need tomcat? I thought that Apache was the name of an organization that produced a web server also called apache. Then, using modules, the server could be extended for use of perl, php, and even java. In order for tomcat to handle the servlets, mod_jk is installed, though which the apache server exchanges information. It seems there are extensions for IIS as well. Is my understanding incorrect?

About JavaBeans, so they are really just a predefined interface to an object? When I read about them, they seemed a lot like ActiveX objects. I am coming from an MFC/C++ background so I guess I am just tryinig to relate technology in my mind. THat is probable not a good thing, but anyway. One could drag and drop them into a project with a GUI editor, and then manipulate the properties of the object. One can also progamatically manipulate the object. So where do beans fit in, in regard to the picture at whole?

So, for new projects, would it be better to use JSF over Struts, or are they both accepatble solutions?

I am curious about Spring. It appears to be a framework making J2EE technology more transparent in designs.

So, I am guessing the best place to start is with JSP and Servlets. The seems to be very foundational, similar to ASP.NET it seems.
Hello, I have been learning Java slowly, always with the goal of trying to learn web programming and web services for Java. I feel I have a good grasp of basic java skills (Swing, networking, jdbc, etc.), and I would like to get started with J2EE. So far I have gotten Apache installed, and Tomcat is also installed. I cannot get them to work together yet, but I am working on it.

While browsing the Apache and Sun websites, I was overwhelmed with information. I am a bit confushed about J2EE though, it seems like there are so many technologies. I read a bit about each, and I would like to write what I understand about them. If I make any mistakes, please let me know so I can better understand J2EE. Thank you for your time and help!

Java related:
Servlets - program that runs on the web server for working with HTML, XML, etc.
JSP - for creating web pages with dynamic content
JSF - I do not really understand this one...
Java Beans - reusable components, like ActiveX objects in Windows

Server Related:
Jakarta - For working with Java on the Apache server
Ant - This is for aiding in debugging programs on a web server
Struts - A framework for writing programs that use the Model-View-Controller
Tomcat - A mini-webserver for JSP and Servlets
Maven - For managing development projects
Spring - ???

For web services, what does Java use? Does it also use SOAP? Is there a special java-oriented technology?
I recently have gained an interest in Java technology and have been studying J2SE programming. I just joined the forum today, so if this is the wrong area, please kindly direct me to the proper area.

So I want to learn J2EE. I work in Japan, and the Java scene is where most of the software engineering jobs are these days. Specifically J2EE and enterprise development. However, I am not an enterprise developer(but I hope to be!); in fact my background is completely different. I am currently employed as an engineer writing device firmware, Windows device drivers, and Visual C++/MFC software. I would like to eventually make the career move if possible. I have limited experience with web applications as I built some tools using ASP.NET/SQL Server2000/IIS5 for my projects at work.

I feel comfortable with J2SE now, and I will be taking the SCJ-P and SCJ-D exams shortly. Next I want to learn J2EE, but I am not even sure where to start. What tools will I need to get started in J2EE? Do I need a web server, or can I use IIS5 that comes with Windows XP? SQL Server 2000 should be okay??

It seems there is just so much J2EE technology out there. So what concepts should I try to learn first? Servlets? JSP? JSF? EJB? Struts? Web Services? I suppose I am lost in the buzzwords, but any advice on getting started would be greatly, greatly appreciated. Thank you for taking the time to read this post.
16 years ago