Erik Pragt

Ranch Hand
+ Follow
since Sep 08, 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 Erik Pragt

Hello all,

I've read this article http://www.jenitennison.com/xslt/grouping/muenchian.xml about the Muenchian Grouping method. However, I'm having a little problem while using the described method. I have an xml file, see below (sorry for the amount of XML!), and an XSLT file (which can be provided if you are interest, but the most important part is typed below) I'd like to use the XML to group by the 'Group' element, but I cannot use the new XSLT 2.0 for grouping.
Using the XML below, I'd like to create 3 different (unique) groups. However, while using this XSL:


<xsl:key name="acts-by-group" match="Act" use="Sample/Analysis/Group" />
<xsl:template match="Result">
<xsl:for-each select="Act[count(. | key('acts-by-group', Sample/Analysis/Group)[1]) = 1]">
<xsl:sort select="Sample/Analysis/Group" />


My sorting only works on the first Group in the nested Analysis. I'd like to have it to work on all of them (Group A, Group B (twice) and Group C, creating three unique groups). The resulting HTML should look something like the HTML below.

Any help would be greatly appreciated, cause it's really giving me a headache!!

Thank!

Erik Pragt

-=-=-=-=-=-=-
XML
-=-=-=-=-=-=-



-=-=-=-=-=-=-=
HTML
-=-=-=-=-=-=-=-



(PS, I crossposted this question here and on http://p2p.wrox.com, since this is quite important to me. If an answer will be provided somehow, I will post it on both fora.)
[ August 09, 2005: Message edited by: Erik Pragt ]
Jeroen, I agree with you, it could be a security hole, but this could maybe be prevented by the Security Manager or the file system.

Maybe you have a suggestion than how to handle file uploads and be able to present the upload files to other users?

Any help would be greatly appreciated, and thanks for your suggestions so far.
19 years ago
Hello Bear,

Thanks for your reply. Probably it's not so hard, but is it the only way, or are there other ways to do so?

Erik
19 years ago
Hello all,

I have a quite simple question which I have a hard time solving. People can upload files (images) to my site. I'd like to display the images to the visitors of the site, but I do not want to store the images in the document root, but outside of it.

Does anyone know how to accomplish such a task? Do I have to work with different RequestDispatchers, or is there some other way?

Thanks, Erik
19 years ago
Hello all,
We are migrating from iPlanet 4.1 to Tomcat 5. In iPlanet 4.1, our directory structure looked like this:

The html/content directory was the root of our document base, and our classes were in WEB-INF/classes/.
Now, I've set up a Tomcat 5 service, with the application base to /netscape, and the documentbase to platform (so it is pointing to /netscape/platform).
Everything works fine, except for our jsp pages. We use includes in our jsp pages, like <%@ include file="/procedures/pageName.jsp"> which used to work fine, but now our html document base (or document root, I don't know the correct name) seems to be /netscape/platform, so the includes don't work any longer!
How can I set the document root to /netscape/platform/html/content, without breaking the servlets? (I already changed the web.xml, the ROOT.xml, etc, but the effect of changing the document base or document root was that the servlets no longer worked!)
Thanks for any ideas, at the moment I'm clueless!
Erik
20 years ago
Sorry, but a search on this forum, or google, would probably reveal more than 100 questions which are all the same as this one.
Before giving you an answer, please take the effort to use the forum search, or google search.
Thank you.
Erik
20 years ago
JSP
I've Googled, searched the forums, etc, but I could not find the answer to this simple question.
I've just started working with JSP 2.0. In JSP 1.2 is usualled used contants (or macro names) like this to retreive my session variables:

Now would like to do the same thing in JSP 2.0, but I was wondering if it's possible?
Consider the following example:

This doesn't look to nice, does it? I could rewrite it to:

But now it doesn't use macro's anymore, and making typing errors, like writing command with a captial C, could mess up my whole application without knowing about it.
My question is: is there a nice solution to this issue?
Thanks,
Erik Pragt
20 years ago
JSP
Update:
It is solved now.
This is my solution:

(the sequence of the cfm matters!)
with this manifest:

Only my L&F is not working yet, but I think I'll get it to work.
20 years ago

Very easy
20 years ago
Thanks Dirk, for your reply.
I tested your suggesting, by typing the following command:

But no file gets created. Instead, the usage of jar.exe shows, and the suprising thing is that is says the following:

To be more specific, the usage says to put the manifest file behind the name of the jar file. Could you help me al little further?
Greetings, Erik
20 years ago
And, as an add-on, this even works for Interfaces.
*spooky* !!
20 years ago
Hello all, the questions seems not that hard, but I can't figure it out. What I want to do is create an executable jar.
But my directory structure is like this

In my jar, I want to include the lib (for my L&F), the resources (for .properties and images) and the classes tree, starting at the /net.
I created a manifest file, called mainClass.txt (also had other names, but no effect) which looked like this:

Now, I jarred everything up using

This works, but when double clicking on the .jar file, it gives an error about an incorrect manifest, and when I open the jar file with Winzip, I see the manifest, but it does not containt the Main-Class line, only a version number, and something else (can't remember which line).
What am I doing wrong??
Thanks for any replies,
Erik Pragt
[ January 12, 2004: Message edited by: Erik Pragt ]
[ January 12, 2004: Message edited by: Erik Pragt ]
20 years ago
Hello Dana,
thanks for the tip! I'm downloading the log4j source files now!
Don, also thanks for your help! However, I'm not very familier with the preferences API, so I will go for Dana's tip first. If I don't succeed (and maybe also when I do succeed!), I will look at the preferences API.
both, thanks for your help!
Greetings, Erik
20 years ago
Hello Namaste Sathi,
You can "Use the switch statement to conditionally perform statements based on an integer expression".
This means that you can have a short, byte, int or char as an input value, and execute a piece of code based on in input value using the 'case' statement. The advantage to using this over a if/else construct is that a switch statement usually looks better.
You can look at the first example at http://java.sun.com/docs/books/tutorial/java/nutsandbolts/switch.html and magine how it would look if you would use an if else statement there.
I hope this made things a little clearer, if not, let me know.
Erik
edit: I also found another link which might be useful: http://developer.java.sun.com/developer/onlineTraining/new2java/supplements/2001/sept01.html#basics
[ June 17, 2003: Message edited by: Erik Pragt ]
20 years ago
Here is some sample code I just created. I works for demonstration purposed, which means it has some bugs in it, but you might get the idea of what I want to do. The missing part in this is the createStructure, which should use the properties instead of the dummy structure I'm using now. Any help still appreciated!
20 years ago