Note: The code is based on Java EE 6.
Monday, June 27, 2011
Determining Absolute Path in a Web Application
I was looking at the NetBeans EE forums, and someone asked how to determine the path in a web application. This is a common question so I thought I would provide two examples. The first is a servlet which returns the absolute path to the web application root. The other is a JSF application that does the same thing, and lists the files.
Note: The code is based on Java EE 6.
Note: The code is based on Java EE 6.
Login Page Examples (j_security_check)
I have created a number of login page examples for use with Tomcat 6 which use j_security_check in the browser. There are three examples included:
Note: The JSF based login page is REQUIRED to still use an HTML <form> tag.
These examples were developed in NetBeans and are located here: LoginPageExamples.zip.
- HTML based login page
- HTML and JSF Hybrid login page
- JSF based login page
Note: The JSF based login page is REQUIRED to still use an HTML <form> tag.
These examples were developed in NetBeans and are located here: LoginPageExamples.zip.
Related articles
- JSF 2.x Facelets Form Based Authentication (j_security_check) (javaevangelist.blogspot.com)
- JSF 1.2 Facelets Form Based Authentication (j_security_check) (javaevangelist.blogspot.com)
- Internet Explorer 8 and XHTML Comments (javaevangelist.blogspot.com)
Sunday, June 26, 2011
How to Check JDK Supported Encodings and Locales
charsets.jar for use in an international application.I figured out the issue by creating a simple web application to check the encodings. I figured I would provide it just in case other folks may be able to use it Otherwise it would just be good simple code gone to waste. Here is a link to the maven project: SupportedLocales.zip
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...