DomainValidator to validate a domain name.
Thursday, February 22, 2018
Validating a Domain Name using Commons-Validator
A quick example of using
Labels:
example
Thursday, November 16, 2017
JSF 2.3 Tip of the Day: Single Select Menu Item Example
One of my new colleagues is new to JSF development, and asked for some assistance in creating a JSF
The web page (index.xhtml) looks like the following:
The backing bean (IndexBean.java) contains the list of items for the menu and the logic to hold the selected value:
All in all a very simple example. I was asked what my dependencies looked like so here is the one last piece.
The NetBeans Maven project can be downloaded here: jsf23-cdi-selectonemenu-example
<h:selectOneMenu/> which had a blank option. I came up with a quick example using JSF 2.3 and CDI on GlassFish 5.0.The web page (index.xhtml) looks like the following:
The backing bean (IndexBean.java) contains the list of items for the menu and the logic to hold the selected value:
All in all a very simple example. I was asked what my dependencies looked like so here is the one last piece.
The NetBeans Maven project can be downloaded here: jsf23-cdi-selectonemenu-example
Monday, October 09, 2017
JAX-RS 2.0 Tip of the Day: Using MOXy and Forms Example on GlassFish 5.0
| Glass Fish |
MOXy is enabled by default if you add the dependency to your Maven project.
This is a great feature, and I wanted to give it a spin instead of using Jackson, or Jettison. The usage was as simple as adding a
@XmlRootElement annotation to the model class. The rest was handled automagically.The entire project including a war file are available on Github: jaxrs-form-data-parameters.
A simple platform independent file is used to setup the application.
We set up web resource (service) to handle our requests.
That's it! You now have a JAX-RS Web Service. The project runs successfully on GlassFish 5.0 (.war file on GitHub).
NOTE: MOXy has some issues running on GlassFish 4.1, 4.1.1, and 4.2.
Subscribe to:
Posts
(
Atom
)