Someone asked how simple is it to create a servlet using 3.0 technology which could upload a file. It took me about 5 minutes to do using NetBeans 7.2, and another 10 minutes to tweak for the file name. I hope that this proves how quick and easy it is to do. The code is also very readable.
Here is the code for my servlet, and form:
Wednesday, October 31, 2012
Tuesday, October 30, 2012
NetBeans 7.2.x Tip of the Day: Sharing PMD Configuration Files
I use the PMD plugin for NetBeans 7.2 for my development. If you are not using it, you should consider it. The plugin uses the ruleset from PMD project for static code analysis. Members of my team asked which rules I use when I evaluate their code so that they can handle it before I look at their code. I thought it would be as simple as exporting it, but that was not the case.
I filed an enhancement request for the feature: Export PMD Default Configuration Ruleset. Until it is added as a feature, here is how to pass your selected ruleset along.
The file that contains the rules which I am using is called pmd.properties. The file is located in a couple of different places depending on if you are using Windows, or Mac OS X.
On Mac OS X it is located:
I filed an enhancement request for the feature: Export PMD Default Configuration Ruleset. Until it is added as a feature, here is how to pass your selected ruleset along.
The file that contains the rules which I am using is called pmd.properties. The file is located in a couple of different places depending on if you are using Windows, or Mac OS X.
On Mac OS X it is located:
/Users/{USER_HOME}/Library/Application Support/NetBeans/7.2.1/config/PreferencesOn Windows it is located:
C:\Users\{YOUR_USER_DIRECTORY}\AppData\Roaming\NetBeans\7.2\config\PreferencesI hope that helps if you need to share your rules.
Wednesday, October 24, 2012
JSF 2.x Tip of the Day: Creating RichFaces <a4j:commandLink/> Programmatically
As soon as I posted the previous blogpost Java Evangelist John Yeary's Blog: JSF 2.x Tip of the Day: Programmatic <h:commandLink/> I got a request for how to do it with RichFaces. The process is almost the same.
Here is an example for creating <a4j:commandLink/>
This example creates one for a table sorter on a RichFaces data table.
Here is an example for creating <a4j:commandLink/>
This example creates one for a table sorter on a RichFaces data table.
Subscribe to:
Posts
(
Atom
)
Popular Posts
-
Introduction This article is not another diatribe to tell you the importance of unit testing. I think we can all agree that it is important...
-
A friend of mine asked me if there was a list of reserved words in EL and JSF. He had previously looked for it, and after some Google search...
-
I saw a question posed on stackoverflow called Trouble with Primefaces 3.0.M2 SelectOneMenu Ajax behavior and I had just done an example a...
-
I was working on a couple of SSL based issues when I made a couple of observations. The default self-signed key generation in Java does not ...
-
This is an example on how to make a system call to the local operating system to execute external programs. This example was written to work...
-
We have been doing a lot of work lately with PrimeFaces. A common set of questions comes up about displaying <p:dialog/> boxes on a pa...
-
I was asked earlier today how to reset fields in a JSF application, if the validation fails. In his case, he had a Richfaces table which had...
-
Previously, I posted an example of how to use JSF 1.2 with form based authentication (j_security_check). In this example, I use JSF 2.x to...
-
Image by quasarkitten via Flickr The basics for creating a Maven archetype can be found in the Maven - Guide to Creating Archetypes . The ...
-
Abstract A common use case is to iterate over a collection of elements, and display them on a page. In the world of JSP, we would use a Ja...