Paul Hoffman

+ Follow
since Nov 04, 2005
Merit badge: grant badges
For More
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 Paul Hoffman

Wow - that seemed pretty obvious. Can't believe I missed that...THANK YOU!
11 years ago
This won't work:

//prompt user for input. I want it to be a 1, 2, or 3. If it's not, I want to ask them again until they get it right
while((x != 1) || (x != 2) || (x != 3))

I have to do this instead:
while((x < 1) || (x > 3))

Does anybody know why? I realize that the correct way is shorter code, but just curious why the first one use != won't work?

11 years ago
I didn't think so and your explanation is very helpful...THANK YOU!
12 years ago
After I have instaniated an object from a class, is it then possible to add methods to my object?
12 years ago
Hello -

I'm using Eclipse to create/test JSP pages. Can anyone give me any guidance as to where I should be putting my graphic files? Standard HTML says that if the graphic is in the same directory as the Web page, the code should work.

I use Eclipse/Tomcat 6.0 as my IDE. When I run a servlet it uses the URL //locahost/<dynamic Web project name>/TheServlet

My servlet hosting provider however has me use the virtual directory name of 'servlet' to access the servlet (for example,

Because my code locally is written one way (referring to my dynamic Web project name) and my code up on the server needs to be different (using the virtual directory name 'servlet') it is causing me to keep two copies of my code.

Is there any way to configure Eclipse/Tomcat 6.0 locally so that I can refer to servlets using the 'servlet' virtual directory name so I don't have to have two separate copies of my code?


I am using Eclipse and Tomcat. Everytime I create a servlet and run it through my server I get a 404 error - which I then restart and then it works. I have to do this quite often.

Does anyone know why I must restart my server so often?

15 years ago
Thank you much...I'm running the Eclipse IDE with the Tomcat Web server. I have been able to get my servlets to compile and run...I've just been wondering if I was SUPPOSED to install a different JDK. Thanks again!
17 years ago
I have been working with J2SE for a while now and want to move to J2EE. My first question - I have installed the JDK for creating J2SE applications...I understand that J2EE uses some additional I need to install a different JDK?
17 years ago
Unfortunately, the virus scan did not find any viruses. I even downloaded the nimda cleaning tool specifically to find it and it wasn't found.
17 years ago
I have been successfully able to install the JDK 5, update 8 on a number of PCs without issue. However, I just acquired a new laptop from my employer that is running Windows XP SP2 and when I try to install the JDK, I get an error right away when the Windows Installer is attempting run that states:

Error 2894.Internal Error 2894.123

It is obviously something specific to this laptop build that our PC support staff put on for me. Any ideas as to what might cause an error like this when installing the JDK?

On a side note, I have been able to install other software without issue on this new machine

Thanks for any help!
17 years ago
Hello All,

What is the "standard convention" for querying a database and then displaying the data? Currently, I have a JSP page which contains a simple form that submits the search criteria to a servlet. The servlet then (which has a doPost() method and a query_db() method) simply connects to the database and pulls the related records. I can get it to work - that's not the problem.

My question is - what is the "protocol"? The way I am doing it has some downfalls - when I want to display my results, I'm forced to do so through a series of out.println statements. I realize that using JSP is a better method because it is much easier to code the presentation, but I'm just not sure how to do it.

Any feedback on how everyone else does it?

17 years ago
Hi Folks,

Hope someone can help me because I'm getting awfully frustrated.

I am getting the following error upon trying to connect my servlet to a MySQL database:

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

I have downloaded the MySQL/J Connector. I have updated my CLASSPATH so that it points to:

C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\mysql-connector-java-3.1.12\mysql-connector-java-3.1.12-bin.jar

My connection string looks like this:


Any ideas?

Thanks in advance
Hello all,

Why use JavaBeans? Are JavaBeans anything more than just regular class files that follow certain structural criteria? In all of my research, the word reusability comes up a lot.

Could someone give me a real-world example of where a JavaBean could be used in one application and then re-used in another?

17 years ago
Hi, I'm having a problem linking to an external CSS file in JSP. I'm simply using the following line of code, but it isn't working:

<link href="style.css" type="text/css" rel="stylesheet" />

Is there something else I need to be doing?

17 years ago