Jim Coble

Greenhorn
+ Follow
since Oct 27, 2002
Merit badge: grant badges
For More
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 Jim Coble

Bear Bibeault wrote:You should not have to add that mapping. In fact, it's a bad idea to do so.

The .jspf file type should only be used on files included via the include directive. Files included with the include action should have a file type of .jsp.



I didn't know that. Our .jspf files are being "included" using the Apache Tiles 2 framework. I'm curious why it's a "bad idea" to use the .jspf extension the way we are. I don't doubt that it is ... otherwise the .jspf servlet-mapping would have been included in the default web.xml ... just curious as to why.

--Jim
12 years ago
I figured out the source of the problem. The scriptlets and expressions that weren't executing were in .jspf files. I needed to add the following servlet-mapping to the web.xml file in Tomcat's conf directory ...

Once I had done that, the scriptlets and expressions executed correctly.
--Jim
12 years ago
I have deployed a Java web app in a Tomcat 6.0.24 instance and scriptlets and expressions are being passed through as HTML without being executed. For example, my JSP page contains the following code:



When I view the resulting HTML page, instead of seeing something like "Last generated September 20, 2011 4:11:33 PM EDT", I am seeing "<% java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("MMMM d, yyyy h:mm:ss a z"); %> Last generated <%= sdf.format(new java.util.Date()) %>".

Any ideas why this might be?

Thanks in advance for any help you can provide.

--Jim
12 years ago
The prerequisite for the SCJP6 Upgrade Exam is "Successful completion of previous version of Sun Certified Programmer for Java 2 Platform exam" (cf. http://www.sun.com/training/catalog/courses/CX-310-066.xml). Am I correct in interpreting this as meaning _any_ previous version? I am currently a SCJP "for the Java 2 Platform 1.4". Can I take the SCJP6 Upgrade Exam ... or do I first need to take the SCJP5 Upgrade Exam and then the SCJP6 Upgrade Exam? I think I can go directly to the SCJP6 Upgrade but wanted to verify that before purchasing the voucher.
Thanks.
--Jim
Keith, thanks for your response.

However, if I'm correctly following what you're suggesting, the reason I don't create the object as a Participant object to begin with is that I don't know that I will want it to be a Participant at the time I create it ... at that point, all I know is that it is a Person. The reason that I don't create it as a Participant just in case is that I have other subclasses of Person (e.g., User). Besides, not every Person is a Participant, so it would seem sort of non-OO to create a Person as a Participant just in case I later decided that Person is a Participant.

If the way I described in my original post is the best (or only) way to handle this, that's fine. Just wanted to be sure I wasn't missing something obvious.

--Jim
17 years ago
Consider the following class structure:


I have a Person object and I want to create a Participant object based on it (i.e., use case is that Person is now a Participant). The only way I've been able to figure out to do this is to add a constructor to the Participant class that takes a Person object as a parameter, like this ...

I can't help but thinking there must be a better way to do this. What am I missing?

Thanks.
--Jim
[ August 16, 2006: Message edited by: Jim Coble ]
17 years ago
My assignment instructions say that my submission must have been tested and shown to work

under a production (not development) version of the Sun Microsystems' Java 2 platform and that platform must not have been superseded by a new production version for more than 18 months by the time you make your submission.



Since J2SE 5.0 (1.5.0) was released on Sept 29, 2004 (according to J2SE Code Names), I'm assuming that, if I want to use J2SE 1.4.2, I have until approximately March 28, 2006, to submit my assignment. Does that sound right?

Thanks.
Since the Javaranch Coding Standard is offered as an alternative to Sun's Coding Conventions and differs from them in certain respects, I would not recommend use of the Javaranch Coding Standard for the SCJD exam. Rather, I think you should follow Sun's Code Conventions.
Upon re-reading the specification for my assignment, I found something else that further supports Ellen's opinion that it is not necessary (at least in my version of the assignment) to implement search options other than those explicitly named in the specification. The interface that I am required to implement includes only one find method, which takes a string array of "criteria". The comment preceding the method declaration includes the notation that "A non-null value in criteria[n] matches any field value that begins with criteria[n]." That is a fairly specific indication of the kinds of searches that that particular find method is expected to support, which would not include "costs less than" or "types of work includes" (though it does, however, allow for the types of searches explicitly mentioned in the specification).

Of course, I guess I could add methods to the implementing class that are not included in the interface (as long as I do implement all the interface methods) but this seems to me one further indication that I don't need to bother with that.

Now, I just need to figure out if I should worry about a possible discrepancy between a find method that functions essentially like a "starts with" and a user interface requirement for a search "where the name and/or location fields exactly match values specified by the user."
Recognizing that there appear to be different versions of the B&S assignment, I wonder if the reply statement "these searching features are not required by the assignment" would actually apply in my case? In the Background section of the assignment, it says (using "must"), "The new application, using the existing data file format, must allow the CSRs to generate a list of constractors [sic] that match a customer's criteria. This is the project that you have been commissioned to implement."

True enough, later on in the specification, in "The User Interface" section, the only search criteria actually mentioned are search for all records or "for records where the name and/or location fields exactly match values specified by the user".

However, I have been inclined to interpret the earlier "must" statement in the Background section as meaning that I have to provide search capabilities based on such criteria as types of work performed and hourly charge, both of which seem reasonably to be "a customer's criteria". Do you think I'm reading too much into the Background statement and making things unnecessarily hard on myself?

Thanks.
--Jim