Yoo-Jin Lee

Ranch Hand
+ Follow
since Nov 01, 2000
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 Yoo-Jin Lee

Hi,

I'm trying to setup a JNDI datasource in Spring's applicationContext.xml file but I get the following error:



I'm using Spring 1.2, Hibernate 3, MySql, and Weblogic 8.1.

My applicationContext.xml file:



I know the JNDI name is valid because I can get a connection in a main code.


Any ideas?

thanks in advance.

Yoo-Jin
Ah just found UserType.... Excellent.
Hi,

In hibernate 3.0 is there a way to map a varchar (in database) to a java.util.Date for your DTO?

The simplest solution I know is to add the following to your hbm.xml class and DTO:

(1) private field with private getter/setter that hibernate will populate
- the setter will convert the format for (2)
(2) public field with public getter/setter that users will use

Any other ideas?

Thanks in advance.

Yoo-Jin
[ May 04, 2005: Message edited by: Yoo-Jin Lee ]
You can also use a jdbc driver for csv files. There are many free ones out there.

-Yoo-Jin
14 years ago
Hi,

The following program can read the contents of a https site from my local windows box but cannot from a solaris box, what could be the cause?



This only occurs for a particular website. Other sites I've tested there is no problem. The solaris box can read it just fine. I've also tested different jvms 1.3 and 1.4 and have used the same jnet.jar/jcert.jar/j22e.jar.

I've done a diff on both outputs and the only difference is:
1. all-> Key: com.sun.rsajca.JSA_RSAPublicKey@2c84d9
2. RandomCookie
3. Hash
4. The non-reading solaris box stops after:
main, WRITE: SSL v3.1 Handshake, length = 59
[write] MD5 and SHA1 hashes: len = 77
etc...
main, WRITE: SSL v2, contentType = 22, translated length = 16310

Any thoughts?

Thanks in advance.
-Yoo-Jin
14 years ago
Hi,

I want to restrict directory listings for iplanet web server 6.0.

For example, if you type in http://mylink.com/temp you'll get a list of all the files in that directory.

As a further complication I have mapped a url to a physical directory in the obj.conf file:

-------obj.conf snippet ------------
NameTrans fn="pfx2dir" from="/temp/ca" dir="/tmp/ca" name="es-internal"

<Object name="es-internal">
PathCheck fn="check-acl" acl="es-internal"
</Object>

I know I can put in a index.html file in the child directories as a solution but I was hoping there was another way.

Any ideas?


cheers,
Yoo-Jin

[ August 12, 2004: Message edited by: Yoo-Jin Lee ]
[ August 12, 2004: Message edited by: Yoo-Jin Lee ]
14 years ago
1.5
Does Java 1.5 have any additions to regular expressions? Is it faster?
I love regular expressions there so powerfull.
cheers,
Yoo-Jin
15 years ago
Hi Vishy,
The great thing about TreeSet is that you can set the Comparator. So you can base your sort on the objects you are expecting to add.
From the API:

You cannot use a HashSet because it has no internal order. That is, when you call iterator() on it, it will return your elements in no particular order.
Take a look at the API for each classes and I'm sure it'll be much more clearer.
Makes sense?
-Yoo-Jin
[ December 15, 2003: Message edited by: Yoo-Jin Lee ]
Hi,
How about subclassing ParameterAction to add keyValue to the path?

I think that would be the easiest...?
-Yoo-Jin
15 years ago
Hi Bianca,
I think I would encapsulate each 'action' as a bean and then save these beans in a list.
If I understand correctly you could do:
// to set list
List configItems = (List) session.getAttribute("configItems");
if (configItems == null) {
configItems = new LinkedList();
session.setAttribute("configItems", configItems);
}
ConfigItem action = new ConfigItem();
// populate the action or else use an actionform... etc..
configItems.add(action);

// to save the list
List configItems = (List) session.getAttribute("configItems");
Iterator it = list.iterator();
ConfigItem item;
while (it.hasNext()) {
item = (ConfigItem ) it.next();
// save the item in the database
}
Does this make things clearer?
-Yoo-Jin
15 years ago
Hi,
Your compiler cannot see where the package org.apache.struts.action is. When you say mount what exactly do you mean by that? Are all the jars in one big zip file? And are you just adding that big zip in your classpath? If so unzip it and then add each jar individually to the classpath. If not, then I would make sure that indeed the package org.apache.struts.action is in your jars. It also looks like you don't have the most updated version of Struts...struts-1.1b2.jar? Am I right? I'd suggest getting the most updated version.
-Yoo-Jin
15 years ago
Hi,
Yes, you can.
1. In each action that needs the ArrayList.


-Yoo-Jin
[ October 28, 2003: Message edited by: Yoo-Jin Lee ]
15 years ago
Hi,
Sorry it's been a while but work has been hectic.
1. Chris 'priority' is not an attribute of java.util.Map. It's just a name I gave to a request attribute.
2. Eric - you can use a java.util.Map. The attribute collection for html ptions tag is a little misleading and the API for it doesn't really explain it fully.
The following from the logic:iterate tag applies to the html ptions tag - I believe.

-----------------------
--------LoopActionForm.java--------

------------------------
----------loop.jsp-----------

The url you would navigate to is http://localhost:8080/struts/loop.do.
I'm using Tomcat 4.1.24 on port 8080 and Struts 1.1.
- Hope this helps.
-Yoo-Jin
[ October 27, 2003: Message edited by: Yoo-Jin Lee ]
15 years ago
Hi,
Try:
http://jakarta.apache.org/struts
When you download the latest struts release you also get example wars in the webapps directory to help you get started.

Some other good links are:
http://www.husted.com/struts/
http://www.manning.com/husted/
(has code and examples chapters on tiles and validator)
-Yoo-Jin
15 years ago
I just looked at getOutputStream and getWriter they both throw an java.lang.IllegalStateException.
---
java.lang.IllegalStateException - if the getOutputStream method has already been called for this response object
---
If you are using Struts 1.0 then there could be a bug or else both getOutputStream() and getWriter() are being called somewhere.
15 years ago