Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Will Fleming

+ Follow
since Sep 28, 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 Will Fleming


I would like to know the particular advantages of migrating to Jboss5 with regards to a grails application that uses GORM. I am running my application on 4.2.3 right now and am considering a more lightweight container since jBoss seems a little heavy for my needs. I really like jBoss and don't want to shift if I can streamline jBoss5.

13 years ago
I am just taking a look at Groovy right now, so this is just a stab, but you might need to add the groovy-all*.jar file to your classpath.
14 years ago
After digging through HF:EJB, I have become interested in the 'business' components of J2EE and would like to continue. Right now, Java is more of a hobby for me, but definitely something that is interesting. I hope to make a career change in a few years to start using it.

As such, I would like to know if I should study EJB 3.0 or just stick to 2.0/2.1. In the Head First book, they stick with the older spec and I also noticed that there is no certification exam for any of the newer specs on the site.

Has 3.0 been well accepted by developers? If so, I would expect that it will be worth studying the 3.0 spec vice the older ones. Sun's literature says it is fully compliant with 2.0/2.1 and the greatest thing on earth, but I don't like buying their hype. If 3.0 is not well received, it seems like a bit of a pain (finding help, compliant containers, good books/examples) and it might be better sticking to 2.0/2.1.
jBoss 4.0.4 has Tomcat 5.5.
[ June 21, 2006: Message edited by: Will Fleming ]
15 years ago
1. JSTL 1.1.2 from on all systems

2. EL is enabled. ${param.login } prints out the entered login in the code above (if I comment out the future forwards)

3. MySQL connector 3.1.13 and 3.1.12 before. I upgraded jdbc drivers as one of the first steps in troubleshooting. Nothing in the update seemed to apply to me, but I did it anyway since it is easy.

4. I checked jBoss 4.0.4 release notes, but did not upgrade that. Again, nothing in the release notes would help my problem and it is a bit harder of an upgrade. I figrue I will switch to whatever the latest jBoss version is when I go "live", I will do one upgrade then.

5. I only have the one Db setup in MySQL and again, the query works when hardcoded or entered via mysql client. I am confident it works just fine.


That is straight out of one of my textbooks. Probably O'Reiley's JSP 3rd edition, but maybe HF: S&J.

I will try the scripting example to see if I get different results. That is something I did not think of before.

As for SQL on jsp, I agree they should be separate. Please keep in mind that I am just a newbie SCJP type guy and this is my first real java project. All of the other coding has been for book examples and seldom more than one page. I get about 4-6 hours a week to work on this in my spare time and 80% of that is trying to remember where I left off. It is for fun and learning. If I really like Java, I might try it for a career, but right now it is a hobby.

Maybe using jBoss makes it seem like I know more, but I chose that simply because I thought it would be good to learn since I plan to study J2EE/EJB later on. I used tomcat some before, but why not try to learn more? I really like jBoss now that I have it working.

Anyway, I think a bit of SQL in my jsp is OK for now. I have some tables that do the same thing. I just manually enter the data into the database with open office database.

FWIW, my "plan" with the project is to use SQL in jsp for retrieval queries only. I plan to make a SQL utility class (or several) for actually changing data in the database. I want to do some basic sanity checks before entering it. I don't even have my hiking boots for crossing that river yet.

The answer may be that there is just some weird quirk that I will never figure out.

EDIT: Thanks for the good replies. Maybe not the answer I need, but you have me digging for the answer again. That ain't a bad thing.
[ June 21, 2006: Message edited by: Will Fleming ]
15 years ago
That is correct. If hard coded into the SQL statement, it works. It also works when the same SQL statement is run in the mysql command line client. It works fine on all 3 other computers, but of course the one I want to use as my server is the one that it fails on.

As for the logs, I will have to check them when I get home, but due to further processing on the page, zero results are returned and the user gets the message that the user is not valid.

Here is the code for that section of the page. The error message gets assigned and the page forwards (to itself).

On the second pass, the error message is present, so no SQL is attempted and the forward below is skipped. Later on the page either forwards a valid user to his last page (or index.jsp) or prints the error message if present.

It works like a champ on the other 3 computers.

EDIT: No error messages/stack trace from the container and the page processing continues until the error message is assigned and displayed to the user. The user is not sucessfully logged in.
[ June 20, 2006: Message edited by: Will Fleming ]
15 years ago
Here is the source of my problems. This code works fine on 3 out of the 4 computers that I have, but when executed on one of them with the same input and the same database, I fail to get a response while the other 3 respond perfectly.

The little check before the actual query returns the same/correct values in all situations.

I have tried replacing the correct values into the SQL statement and then I get a valid result. i.e.

Returns the correct information about the user. The mysql command line client also returns the correct values.

When I take it a step further and insert the following, I also fail to get a valid result.

This totally baffles me. I am running jBoss 4.0.3SP1, JDK 1.5-6, MySQL 5.0 on all 4 machines. I even copied the entire jBoss directory over to the faulty computer in thoughts that I had a mistake in a config file, but that still results in the above behavior.

Good comps
AMD64X2 with x64smp kernel 2.6.15, 2G RAM,
P-M with 686 kernel 2.6.15, 2G RAM
Celeron-D 686 kernel 2.6.15 768M RAM

Bad comp
P4-HT with 686smp kernel 2.6.15, 1G RAM

Java install identical (Sun Java via repsoitories) on all 4 systems.
[ June 20, 2006: Message edited by: Will Fleming ]
15 years ago
Good book that does what it says--it gets you ready to pass the exam. There isn't much else to it and other than taking the mock exam and reviewing my mistakes, I don't think I will use it again.

Since I don't have a lot of experience with Java just yet, I wished the book would have forced you to write a bit and maybe do some trial and error. Possibly a small beerApp that would use the concepts mentioned in the chapters. There is a lot of good info there, but I think that actually doing something with it will really make it sink in. The first book had a lot of exercises that you could work through if you wanted to, but there isn't much in this book.

I suggest having a project of your own as you go along with the book. Something flexible where you can try out the ideas presented and see how they really work.

If you are comfortable with Java, JSP and servlets but want to get ready for the exam in minimal time, this book is for you. If you are like me and need a bit of practice, I would read this book, but pick up something else to give you some examples of JSP/Servlets in action.

I am reading The JSP Book from O`Reilly and working on an educational project of my own. HF: S&J is really helping me to understand the JSP book a lot better the second time through. (I tried the JSP Book before HF: S&J, but gave up about half way)

So, get this book, but get something else if you don't already have a good grasp of Java/JSP/Servlets. I liked the first HF:J book more, but this one is certainly worth the cash. (8 out of 10)

[ March 19, 2006: Message edited by: Will Fleming ]
[ March 19, 2006: Message edited by: Will Fleming ]
15 years ago
I just finished the Developer's notebook and liked it. (maybe 7.5/10) It wasn't perfect, but it got me up and running and even got me a little excited about using jBoss.

If I find the time, I will get "jBoss at Work", but for my needs (just get running) the dev notebook and some google searches did the trick.
15 years ago
Emacs or vi both work great. I like vi for quick editing or small files, but emacs is nice when the project gets larger. Both have windows versions which are lightweight and darn handy to have.

Right now, I am trying to learn Eclipse and it is a bit of a hassle dealing with it, so I may skip it. It looks great and does a lot of work for you, but I still end up getting frustrated trying to do what seems like a simple task. Rather than learning Java, I am learning how to use Eclipse which may or may not be worthwile.

One other advantage of a simple text editor is that you would be able to migrate to one of the IDE's fairly easily, but that might not be true if you go from NetBeans to Eclipse.

As mentioned, Linux seems like a much better enviornment to develop on than windows. Never tried Mac OS's, but it seems KS&BB like Macs in their books so you might give that a try.

Originally posted by Tom Marrs:
We also felt that the JBoss community was under-served - there just wasn't enough good documentation for developers.

I have to agree--I am definately a newbie with jboss, but it has been a lot of work trying to find good documentation.

FWIW, your book was my second choice. I went with the developers notebook because I saw a few good reviews and it looks quick and dirty. I just want to get up and running right now in a test environment so that is all I need. If/when I decide to actually depoly the application in the real world, I will come back for a more complete guide.
15 years ago
Found it.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Needed to be removed from my jsp file.
15 years ago
MySQL would certainly be more robust. You could also easily deploy it on separate machines or setup a clustering server.

Which is what I am going to try and learn how to do.

If you just need a quick and dirty Db, I would go with the default one.
15 years ago
I have been having a devil of a time getting EL to work on jBoss. I installed the latest build and have JDK1.5 working. I downloaded the JSTL packages and installed them in the correct place. Everything works fine with a standalone version of Tomcat (5.5.x or 5.x)

I tried the jBoss forums and looked for problems with EL, but didn't find any fixes.

<%@ taglib prefix="c" uri="" %>
<%@ taglib prefix="fn" uri="" %>

Work fine, but when I get to:


They don't get evaluated and the web page prints out the EL.

I know it is just something simple. Is EL turned off by default in jBoss?
15 years ago
This helped me when I switched Tomcat -> jboss.

So much to learn....
15 years ago