At times we write methods in Java classes with local variables that we need to access even after the methods finish execution. Here's an example:
At times we write methods in Java classes with local variables that we need to access even after the methods finish execution. Here's an example:
At times you need to visit web sites, login, navigate through pages, select portions of HTML, click on links, check for the existence of a form, submit the form,.... and do all these things programmatically. So you need a programmable web browser that can execute and have a cup of tea while it will do the job.

If you want to test your Java application which requires digital certificates, here's a collection of such certificates with associated public/private keys in .jks format (the Java standard format - Java Key Store).
For example, you can use these to test Web services or enable SSL support of a Java server (and clients - if you want).
This doesn't look to be something trivial that you can simply do by passing the URL, proxy server host, port, user name and password to an already available class and getting the connection established.
Many XML validators exist. Here's how you may implement an XML validator in Java. At times you may need to take a programmatic approach like this.
JPA (Java Persistence Architecture) greatly simplifies the persistence implementation of Java applications. In web-tier, the following forces/constraints exist:
With Spring 3.x, you can develop JPA applications very easily. Here you find guidelines in creating such an application with the following features:
Environment: JDK 1.6, JBoss 5.1, Eclipse 3.5 (Galileo)
I came across the following JBoss error when a JAX-WS Web service was accessed:
11:15:18,008 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:441)
at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:87)
Updated version available: If you are looking for how JPA can be used in JBoss 5 and Spring 3.x versions, look at "Spring JPA web applications (JTA transactions, JBoss 5)". What you find below is a workaround to use JTA transactions in JBoss 4.x versions.
Here's how one might go about deploying a Spring application in JBoss (4.something) that uses JPA with Hibernate as the provider for persistence and JTA for transaction demarcation.