Ben Rainville

Greenhorn
+ Follow
since Dec 22, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ben Rainville

Actually, the struts app does live on the production server, but there is a mirror of the application on another server. The struts app sends and receives xml, and in this case, the mirror was sending and the production server was receiving.

After I posted, I thought that maybe the keystore was the problem, so I reimported the production certificate, but to no avail. Then I had our IT guy restart the linux box that hosts the production app, and now everything works fine.

Weird. Thanks for your help though.
19 years ago
Not easily, as far as I know. There are two things you could do, however:

1. Write a scriptlet that defines a string as the concatenation of all the things you want (first name, last name, ssn, etc) and use that string as the labelProperty.

2 (Better, in my opinion). Modify your bean so that there is a getLabel() method that returns firstName + lastName + ssn etc. and use labelProperty="label" in the tag.

Hope that helps.
19 years ago
I always just use an html:hidden tag in tandem with the bean:write tag. But if there's a better way to do it I'd like to know.
19 years ago
Hi everyone,

I am running a struts application on jboss 3.2.1. Part of my application deals with posting xml over https. Two problems popped up today, and because they appeared at the same time, I have a hunch they're related.

1. Our production server (which we recently purchased a new SSL certificate for) cannot post xml over https.
2. All of our testing servers can post xml over https (these are running the exact same code). However, when we try to post to our production server, the code breaks.

Here is the code that does the posting:



While using Eclipse's debugger to step through this code on my local machine to QA problem #2, everything goes fine until the line header = uc.getHeaderField(j); No exception is thrown that I can see, but the system hangs, and the debugger stops working. I thought maybe some kind of exception was being thrown (hence the try/catch) but nothing is caught.

Any ideas what might be the problem? Does this sound like an issue with the cert? It was purchased two weeks ago or so, and is valid from 7/21/2005 to 8/11/2006.

Any help would be greatly appreciated. Thank you,


Ben Rainville
19 years ago
Oh, good idea. Not sure why I didn't think of that myself. I looked in the ear, and the jar I want is in there. So my guess was wrong.

Any ideas what else could be the problem? What else could cause a ClassDefNotFoundError?
20 years ago
Hi everyone,

I work on a struts application that runs on Jboss, and I am having a problem that I believe is due to my build.xml. I am a bit of an Ant newbie, so please bear with me.

Basically, I wanted to the jakarta commons-httpClient jar to my application, and for some reason, whenever I create an instance of the class that imports the PostMethod class (which is inside the jar) I get a NoClassDefFoundError. It's my guess that somehow the jar is not making it into the ear.

Attached is my build.xml. It's kind of large (I didn't write it -- I'm just modifying it) but the part that I think pertains to this problem is the <path id="shared.classpath"> tag. As far I can tell, it should be copying everything from the lib directory that matches commons-*.jar, and the jar in question is /lib/commons-httpClient-3.0-rc1.jar

Any ideas why I might be getting this error?

Thanks in advance,


Ben Rainville

Here's the build.xml (I couldn't figure out how to post it in here -- something about illegal HTML tags? If anyone can tell me, I'll post the xml here instead of an external link).
20 years ago
well, that didn't quite work out. that's supposed to be:

jdbc: odbc: Database
I am working on a project servlet whose purpose is to receive an xml file and, based on some characteristics of the xml, perform a set of operations on an Advantage Database (not exactly my database of choice, but it's not my decision). The servlet is running on resin, and I'm connecting to the database using the Jdbc-Odbc Bridge.
A little background on advantage (at least the version I have to use) -- there are no dictionaries or anything like that. Basically, a database is just a collection of .adt files in a directory.

Initially, I was working with one database. I set up a User DSN in the Windows Control Panel, entered in the directory of the databse in options, and gave it the name "Database". Then in my resin.conf, I put this:

<database>
<jndi-name>java:/BenDB</jndi-name>
<driver>
<type>sun.jdbc.odbc.JdbcOdbcDriver</type>
<url>jdbc:odbc:Database</url>
</driver>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
</database>

In my app, I connect to the database using it's jndi name -- java:/BenDB.

Here's the problem I'm having -- a field (call it i.d.) in the xml tells me which database (of many) I need to connect to. I have a properties file that is a mapping between ids and directories:

1=c:\firstDB\data
2=c:\secondDB\data
...

My question is, I guess, how can I change which database the getConnection() method connects to on the fly? I suppose I *could* create User DSN's and JNDI names for each of the databases (somewhere between 8 and 10) and bloat up my resin.conf, but that seems kind of distasteful. Any ideas?

[edited to disable smilies]
[ December 22, 2004: Message edited by: Jeanne Boyarsky ]