Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!

James Drinkard

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

Recent posts by James Drinkard

Hello Seema,
I've seen more than a few simulators and practice exams for Java Certification out on the web, what makes your product unique and what is the average success rate for those that purchase it and take an exam?
Hello All,
I'm converting a simple simple form application to use the DynaValidatorForm and I believe I have the plugins and xml files configured properly. My question is: how do I code for the validation in the action class? My code is:
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
DynaValidatorForm f = (DynaValidatorForm) form;
System.out.println(f.toString());
//ActionErrors errors = new ActionErrors();

ActionErrors errors = f.validate(mapping, request);
System.out.println(errors);

// Report any errors we have discovered back to the original form
if (!errors.empty())
{
saveErrors(request, errors);
return new ActionForward(mapping.getInput());
}

// Forward control to the specified success in the struts-config.xml file.
return (mapping.findForward("success"));
}
but ActionErrors never get thrown, even though I use "required" to check for null fields on the submit from the jsp form.

Not sure what I have wrong here.
Thanks,
James
16 years ago
I had heard complaints from other developers that of the few Struts books available, more than one was just a rehash of the online documentation. You said in another post that wasn't your intent. What makes your book different and do you get into design considerations like pro's and con's of using the 3 different forms of validation with Struts?
16 years ago
I have 3 years of Java programming and I'm studying for the SCJP test right now. The best book I've found is: "A Programmers Guide to Java Certification" by Khalid Mughal and I'm thinking about purchasing the Whizlabs software. It's worth it to pass the first time, so put it the study time and buy some cert. books at the very least. Even if you are an experienced java developer you could fail the test if you don't study for it. The test hits on things you don't use everyday and really gets down to the fine details of java.
No, that helps! Thanks for the information. I wasn't trying to split hairs, but I realized I didn't have a full grasp of the concept. I just found a definition, not sure if it's the best one: A service is a contractually defined behavior that can be implemented and provided by any component for use by any component, based solely on the contract.

If found that you can use something by having knowledge of it, but not really understand it. If you can explain it to someone else, then that constitutes understanding.
16 years ago
Hello All,
I'm not a beginning java developer, but I've noticed that different authors use different terms for the same thing in java when it comes to the OOP concepts. Anyway, I haven't found a simple explanation of what a service is that an object offers to it's clients? I've read that it's the contract that defines what services are offered and the implementation that defines how these services are provided, so methods don't seem to be services as they are part of the implementation.

Anyone want to shed some light on this?

Thanks,
James
16 years ago
Hello Jim,
I saw the email for your new book: "Java Demystified". It's a unique title. I assume there was a group of people you had in mind when you wrote the book. Is it for people that don't know programming already and with all the java books out there, what makes yours different than the rest?
16 years ago
Do you review any rules of thumb in your book as to how to determine if Struts is the best solution to your particular applications web layer and why? The reason I ask is that recently some of the other java developers in my group thought there was too much overhead with Struts to be used with apps that have less than 10-12 jsp's. I thought that was a short-sighted approach and we opted for using Struts to develop a common framework for our web apps, even though some of the apps only have a few jsp pages.

James
16 years ago
Hello All,
We just started using STRUTS as our framework for jsps and servlets. I like it a lot, but quickly got stuck with the differenct configurations you can have in the xml files, validator, etc... Is there a basic minimal struts template somewhere that just has only what you need to run it for something like a "Hello World" application?
16 years ago
I just started using Struts at work. I've completed two simple tutorials using struts and wondered if there is a rule(s) of thumb on when to use them? I wanted to use them in my next web project, but I was told if you don't have many jsp's it's not a good idea to use a framework. I disagree but was thinking maybe the overhead with struts on an app with only 5 or 6 pages makes it a bad choice?
Thoughts?
James
16 years ago
Hello All,
I recently had a situation where I was running code that another developer had written using WSAD 5.0 and SOAP. I had always added additional projects that the code referenced in the main ear file, however, they put everything in the server path tab under the server config. It appeared that was the only way it would run, but I'm not certain of this as I couldn't get it working properly running the other projects as part of my ear file. My question is when you have a J2EE application with EJB's, what is the best way to run any additional projects or ejb's: in the ear or under the server path? and why?
Thanks,
James
16 years ago
Yes, you need to provide more info. We have an ejb transaction based program that uses the thin XA driver for Oracle. Just like anything else in
WSAD it's very configuration dependent. From past experience I would guess the first place to look is your datasource configuration.
16 years ago
I like using the redbooks from IBM the best. I had purchased a book specific to VAJ 3.5.3 and it became obsolete in a short time when we upgraded to WSAD 4 and then 5.0 Another developer I knew said the same thing. You will probably only be able to use it for a few months at best. The changes in WSAD 4 to 5 apply as well. A book on version 4 won't help a whole lot for WSAD 5.0
There are more selections now than just the programmers guide for redbooks. Topics include: WSAD 5 Programmers Guide, AppDevHandbook, EJB Development, Websphere Quick Reference to name a few. Just do a search under the redbooks site.
Bill Hahn has some very good tutorials available as well. Those have helped me with WSAD more than books I had purchased. I use the purchased books for more general topics, like Servlet Programming, EJB's, Java 2, etc...
16 years ago
Hello All,
I'm addressing (2) problems I'm having:
1.) I have to do a bean to bean call running localhost in my test environment under WSAD 5 and it's no problem using a reference for local beans, but trying to find a remote ejb home gives me a lookup error. I believe it works fine when deployed on our test server, just a problem under localhost. Anyone come across this before?
2.) I'm doing another bean to bean call to a remote bean using soap, which I'm not familiar with yet. I'm using code from another developer who told me they had it working fine in their local WSAD 5 test environment. I find the first bean: Validate, which in turn has to call another bean: GetMyInfo to access it's methods to create a database call to a third bean: DB_GetAll, which has a local reference to the GetMyInfo bean. Everything works fine until the GetMyInfo bean tries to make the call for the DB_GetAll bean and I get this error stating it can't find the bean's localhome:
ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "validate" on bean "BeanId(ValidateEAP#ValidateEAPEJB.jar#TMS_Validate, null)". Exception data: java.lang.NoClassDefFoundError: com/ejb/DB_GetAllLocalHome
I've made successfull calls to all these beans before, but using references and not soap, well using a local ref. and not a remote one to validate in my test environment. This looks like a simple configuration issue, but I don't see it. Any ideas as to what can cause this error?
The actual bean names/methods have been changed for this discussion, but the idea is the same.
Thanks,
James
16 years ago
Hello All,
I started yesterday with SOAP for the first time. What I'm attempting to do is to make a SOAP request from an ejb, after I passed jsp form data into some collection object. I didn't find much on the web either!
My questions are:
1.) What is the best way for receiving jsp form data placed into the HttpServletRequest, so that later it can be put into a SOAP request? I have loaded httprequest data into Vectors, HashMaps and Hashtables, but it appears that when you load parameters for a SOAP request it must be from a vector and it's getting complicated loading a hashmap into a vector of vectors to match the key value pairs.
Here are the arguments for parameter:
Parameter(java.lang.String name, java.lang.Class type, java.lang.Object value,
java.lang.String encodingStyleURI)
One example I had found hardcoded the keys(form element name) and added each element value singularly into a vector for the SOAP request.
For example:
Vector params = new Vector();
params.addElement(new Parameter("firstName", String.class, args[0], null));
params.addElement(new Parameter("lastName", String.class, args[1], null));
I may have to duplicate this as I have different datatypes involved, but it seems like very bad coding.
2.) Does anyone know of any good code examples on the web for creating a SOAP request with an ejb as I may be doing a wrong approach here?
Thanks,
James
16 years ago