I want to use HtmlEmail in apache commons-email in a spring app, so i use the config xml as following:
<bean id="commonsEmail" class="org.apache.commons.mail.HtmlEmail">
<property name="hostName" value="smtp.example.com" />
<property name="TLS" value="true"/>
<property name="smtpPort" value="587"/>
</bean>
But i can't initialize it...
How can I tell Apache Axis 1.4 not to look for a transport client properties instance (an implementation of org.apache.axis.components.net.TransportClientProperties) and instead supply my own?
My problem is that both my Eclipse plugin and another Eclipse plugin are using Axis 1.4, which, via Apache Discovery, looks for a system property...
Since everyone praises Google Collections (e.g. in here)
How come I can't find the equivalent of ArrayUtils.toObject() and ArrayUtils.toPrimitive()? is it that unusable? did I miss it?
...
Hello,
I am trying to pull the latest file out of a directory, which is located on a sftp server. The way I do it right now is more or less:
public FileObject getLatestFile(String directory) throws FileSystemException {
FileObject fo = fsManager.resolveFile(this.host+directory, fsOptions);
FileObject latestFile = null;
long...
I'm porting over a Java project that I wrote which uses the Apache Commons StringEscapeUtils class (particularly the
escapeXml
unescapeXml
escapeHtml
unescapeHtml
methods). Is there a .Net equivalent? Or perhaps some totally logical bit of C# code that accomplishes the same thing?
...
Hello,
I'm having a hard time trying to tar some files using the compress library.
My code is the following, and is taken from the commons.compress wiki exemples :
private static File createTarFile(String[] filePaths, String saveAs) throws Exception{
File tarFile = new File(saveAs);
OutputStream out = new FileOutputStream...
Does anybody know if Apache Commons is under active development? It seems to me like it requires a serious refresh. I cannot find any roadmap referencing a newer version.
...
Java code:
Transformer TRANSFORM_TO_INTEGER = new Transformer() {
public Object transform(Object input) {
Integer i = new Integer((String) input);
return i;
}
};
String begin = "1,2,3,4,5";
List strList = Arrays.asList(StringUtils.split(begin, ","));
CollectionUtils.transform(strList, TRANSFORM_TO_INTEGER);
Th...
Does anyone know if there is an equivalent in Common.Logging (for .Net) to set properties for the log4net factory adapter? I have had great success when just using log4net by doing:
<appender name="FileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="logs\Log_%property{BrokerID}....
I have a process that is supposed to ftp a file to a remote location every 5 minutes.
It seems to have become stuck for a number of hours and hasn't been sending files.
I took a thread dump to see what was going on and this is the state of my thread:
"SPPersister" prio=6 tid=0x03782400 nid=0x16c4 runnable [0x0468f000..0x0468fd14]
j...
I have always understood there to be two types of equality in Java,
value equality : uses the .equals() method to test that two objects implement an equivalence relation on non-null object references.
reference equality : uses the == operator to test that two primitive types or memory locations are equal.
The following pages describe...
I am writing a small file upload utility thing as part of a larger project. Originally I was handling this from a servlet using the Apache commons File utility classes. Here is a snippet from a quick test client I wrote for the service:
public static void main(String[] args) {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean...
Apache returns this error while trying to upload a file (I only kept the first lines of the stacktrace and root causes):
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JS...
I usually use Commons Configuration for manage my applications configs. I have used properties files configuration. Now I'm interested in using a JNDIConfiguration but I'm not able to understand how this works reading the documentation or googling it.
Contextualizing, I'm working in webapps running in an JBoss AS.
Where will be the pro...
Does anyone have any experience in using the ReloadingClassLoader of the Apache Commons JCI API?
The only usage example can found in the following page: http://commons.apache.org/jci/usage.html
I am assuming that whenever the directory or jar changes, it will automatically reload the classes within the classloader?
If so, you would...
ORMapper that I use extends some of its own attributse all objects that mapped, now I need to generate XML from objects, but I don't want to generate information about my ORMapper related objects, so how can I exclude ORMapper related classes from being generated to XML?
...
I have a problem where i need to walk through an object graph and pick out a particular property value. My original solution caches a linked list of property names that need to be applied in order to get from point A to point B in the object graph. I then use apache commons PropertyUtils to iterate through the linked list calling getProp...
I can't seem to find apache common logging when using eclipse w/maven2 plugin.
I need it for spring3 mvc apparently.
...
Hello..I am taking a class on Android and I am a newbie with JDeveloper. I am working on a Web Services application. I downloaded some code that has a "Import org.apache.commons.binary.Base64". JDeveloper is barking "not found" for this import. I found on the apache website the org.apache.commons.binary.Base64 module and downloaded i...
Is there a simple way to get the Content of an apache commons-email SimpleEmail object?
Something like this:
SimpleEmail simpleEmail = new SimpleEmail();
simpleEmail.setMsg(someMsg);
String anotherMsg = simpleEmail.getMsg(); //this dont work obviously.
I don't want to use any reflection black-magic :) Thank you!
...