Elisabeth Van

Ranch Hand
+ Follow
since Feb 09, 2001
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 Elisabeth Van

Just in case anyone else runs into this problem, thought I'd post the solution to the problem that I was having.
What was causing problems for me was having parser.jar in my tomcat lib directory. Once I removed this, all was well.
Of course what I don't know now is what the purpose of parser.jar was, or if it's actually needed if I have the xalan.jar and xerces.jar files.
I'm trying to use XML and XSL within a servlet to produce HTML output.
From the command line, I can use

and I get the results that I want.
I have tried accomplishing the same thing via a servlet (in Tomcat) using

as well as with

Either of these versions will compile, but when I access the servlet via the browser, I get the following error:

Anyone have any ideas on this? Thanks!

[ Ajith disabled smilies in this post ]
[This message has been edited by Ajith Kallambella (edited May 18, 2001).]
Holger,
Could you please tell me what version of Xalan you are using? I have searched the API docs and can not find XSLTProcessor, XSLTInputSource, or XSLTResultTarget.
I'm having a devil of a time trying to use a servlet to do exactly what you described.
Your help (or anyone's) would be greatly appreciated.
I certainly didn't mean to suggest that a "buddy system" would be able to do nearly the great job that the nitpickers do. (Obviuosly I still have much to learn, as Marilyn and JC keep pointing out to me ).
But, I thought it might help to eliminate some of the simple errors, like adhering to the style guide, or if you happened to see something that you know you'd gotten nitpicked on, then you could point it out.
That way the nitpickers could focus their attention on the more serious nits. If it just resulted in one less submission by each person on an assignment, I'm sure it would mean less of a load on the nitpickers--certainly you guys DO have a life beyond the Java Ranch.
23 years ago
Thanks for clearing that up. Hope you could notice the tongue-in-cheek on that one. The "no outside classes" just struck me as funny.
(But doggone it, I thought I was going to get that assignment on the first try!)
23 years ago
Thought I'd share a nit that just got picked in my submission of Say-4b. I had used the following line of code:
long divisor = (long)( Math.pow( 10 , i ) ) ;
And got the following comment regarding that code:

there is a purpose to this assignment that is covered by doing this without external methods. Please do this assignment with no outside classes.


No outside classes? Well, upon viewing my code, I noticed that I also use the System class (System.out.print), the Long class (Long.parseLong), and the String class.
Whew! This is going to be tough rewriting my code to avoid all those outside classes.
(Marilyn, am I correct in assuming that it's just the Math class that you want me to avoid using here?)

[This message has been edited by Elisabeth Van (edited March 17, 2001).]
23 years ago
I submitted Java-4b a couple days ago.
Took FOREVER to get through 4a. Marilyn must have had a few laughs over the way I was trying to approach it, and especially how hard I fought against changing that approach. Of course, once I abandoned my approach, my code got much leaner and easier to follow. Thanks for pushing me toward the light!
23 years ago
Take your time on the assignments. I really appreciate the feedback that you've given me on my assignments, and it's worth waiting for.
Besides, I think perhaps you spoil us a bit with replies that are too quick. Knowing how many assignments you are trying to nitpick, and that it may be a few days before I get mine back, I find myself spending a lot more time going over my code to find those elusive little nits myself--hopefully more diligence on my part (and on the part of others) will help to reduce your workload.
Here's a thought--maybe those of us on the cattle drive could start up a "buddy system" where we partner up with someone and send each other our assignments for "nit screening" before submitting them to you. Since Johannes has already started posting everyone's status on assignments, we could find someone who's already finished the assignment who'd be willing to do the screening. At the least, we could help pick out those little things like not following the style guide.
What do y'all think?
23 years ago
Thanks. I guess that means that a different type of error message other than the usage error has to be given.
Thanks for the clarification.
23 years ago
Thanks. Now if I'm not mistaken, we need to check to see that the number is between 0 and 99. However, at the same time I checked to see that a single argument was passed, I also checked to see that the argument had a length <= 2, which I believe accomplishes the same thing as checking to see if the value is between 0 and 99.
I prefaced that line of code stating that I was checking to see that there was only one argument and that it had 2 or fewer digits.
So why am I getting the comment "Where is the range checking?"
23 years ago
I'm working on the Java 4a (Say) assignment. Perhaps someone can shed some light on a my question.
Is it safe to assume that the person will enter a number of some form or should we check for that?
Thanks!
23 years ago
Angela,
If I'm understanding your question correctly, you want to print the substrings without using an array.
If that is the case, can you just print out the substrings as you parse them instead of putting them into an array?
Replace afterParse[num] = s; with System.out.println(s);
Just a suggestion in case you were still working on this...couldn't quite tell if you'd gotten your question answered or not.
23 years ago
Kind of hard to say without seeing that bit of code. Are you populating the names within the for loop or after you've gone through the for loop?
If you're setting the values after the for loop, you'll need to do something like
namePeople[0] = "Mary";
namePeople[1] = "Bob";
and so on. Use namePeople[i] if you're setting values while you're in the for loop.
That may be enough to get you going, otherwise if you could post the code with the loop and where you're trying to set the values, that would be helpful.
HTH
23 years ago
Thanks for taking that a step further! I can certainly see the value of that approach.
Guess that's why I like hanging out here on the ranch so much--learn new things every day.
23 years ago
Just a shot here...
I see that you have ClassFileServer in a package, but you don't have ClassServer declared in the same package. Doing that eliminates the error that you're getting.
A subclass doesn't have to be in the same package as the superclass, but I'm not sure how to tell the compiler where to find the superclass (modify classpath?) if it's not declared to be in the same package.
Hope this helps...
23 years ago