I updated the Darwin10Build instructions for building the BSD port of OpenJDK 7 on the OpenJDK wiki at Oracle. I successfully built 32-bit binaries, but decided to see if I could get it to build 64-bit binaries by changing the ARCH_DATA_MODEL=64 parameter to the build script. It worked. It reports that the build is amd64, but it is running on a MacBook Pro Intel Core Duo system. I added my 64-bit build script to the Darwin10Build instructions. Here is an image of my 64-bit build running tomcat. You can see the build is listed 1.7.0-internal-jyeary, and the OS Architecture amd64.
Saturday, July 31, 2010
Monday, July 19, 2010
Maven Web Application on NetBeans
I was looking through the nbj2ee forums for NetBeans this morning. One of the items that caught my attention was a question about how to use the taglibs in the editor. It seems that once you add a taglib to the jsp page you get a TagLibraryValidator exception. I would have thought that the default project would have included the required libraries, but it does not. I opened a bug 188765 on it, but it probably should be an enhancement. My only issue is that the default project is a JSP page, and without the JSTL it is simply html. So the addition of the library is required to do something useful. Also, it is not apparent what the issue is with auto-complete without the library.
To get the Editor to work properly, you need to add a dependency to the pom.xml for the standard tag libraries.
This should allow the auto-complete functionality to work as expected for the standard tag libraries. Here is an example of the error message:
To get the Editor to work properly, you need to add a dependency to the pom.xml for the standard tag libraries.
<dependency> <groupid>taglibs</groupid> <artifactid>standard</artifactid> <version>1.1.2</version> <scope>provided</scope> </dependency>
This should allow the auto-complete functionality to work as expected for the standard tag libraries. Here is an example of the error message:
Sunday, July 18, 2010
Java Applet Permissions Mac OS X
I was working on Applets for the first time in a long time the other day. I found that I was getting SecurityException messages, and the applets would not work. This was related to the applet security policies not being set. I thought this should be easy to find and fix. It was not. It appears that this is somewhat arcane knowledge. There are plenty of documents, even release notes from Sun/Oracle on Windows, Linux, and Solaris, but Mac OS X...nothing.
Anyway here is the arcane part you are interested in.
The applet security policy is stored in the user's home directory in a file called .java.policy. Here is a wide open policy which probably should not be used except when absolutely necessary. You can comment the policy out using the /* */ syntax when it is not necessary.
A more conservative approach would be to use something like this for testing from your localhost development system. The trailing "-" indicates any sub-directory from the top level.
I have attached a NetBeans 6.9 project which includes code from Oracle which demonstrates the Java Security Manager. WriteFileApplet.zip
Anyway here is the arcane part you are interested in.
The applet security policy is stored in the user's home directory in a file called .java.policy. Here is a wide open policy which probably should not be used except when absolutely necessary. You can comment the policy out using the /* */ syntax when it is not necessary.
grant { permission java.security.AllPermission; };
A more conservative approach would be to use something like this for testing from your localhost development system. The trailing "-" indicates any sub-directory from the top level.
grant codeBase "http://localhost/-" { permission java.security.AllPermission; };
This allows you to do wide open development and testing, but keeps the permissions limited from code outside of the current machine.
I have attached a NetBeans 6.9 project which includes code from Oracle which demonstrates the Java Security Manager. WriteFileApplet.zip
Thursday, July 08, 2010
Mac OS X Leopard/Snow Leopard Web Sharing Forbidden Issues
Forbidden You don't have permission to access /~username/ on this server.
Have you received an error like the one above, then I may have the solution for you. There are a number of posts on the web around permissions, and Apache configuration files, etc. I found that the solution was really simple, yet not obvious.
It has to do with File Sharing, you need to add the Sites directory to the list of directories which are shared, even if sharing is not turned on. See the example below.
Once you add the Sites directory to the list and turn on Web Sharing, you should be able to see the local sites for users on the local system.
Labels:
Apache
,
Apache2
,
HTTPD
,
OS X
,
Web Server
Friday, July 02, 2010
HTML 5
I was looking at the presentation from Google on the HTML5 Rocks site. I found that the demo works for the most part on Firefox. I imagine that the presentation works better on Chrome, but I am not really interested in installing it. I went to the Microsoft site for HTML 5. It has a lot more quirks in it on Firefox.
It is really horrible that we are on the cusp of changing to HTML 5, and I am seeing the same issues that erupted during the browser wars of the 1990s. I am glad that Google has released the free video encoding codec WebM. It is a nice gesture on the part of Google. I only hope the rest of the vendors like Microsoft promote open codecs. It is not likely.
I am bothered that the HTML 5 Working Group at W3C considered putting a requirement for video codecs in the specification for which there was no freely available software. It is a fine demonstration of the the power of influence over standards bodies. The W3C should work to keep the Internet free.
It is really horrible that we are on the cusp of changing to HTML 5, and I am seeing the same issues that erupted during the browser wars of the 1990s. I am glad that Google has released the free video encoding codec WebM. It is a nice gesture on the part of Google. I only hope the rest of the vendors like Microsoft promote open codecs. It is not likely.
I am bothered that the HTML 5 Working Group at W3C considered putting a requirement for video codecs in the specification for which there was no freely available software. It is a fine demonstration of the the power of influence over standards bodies. The W3C should work to keep the Internet free.
Labels:
article
,
Google
,
open source
,
Web
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...
-
Image by quasarkitten via Flickr The basics for creating a Maven archetype can be found in the Maven - Guide to Creating Archetypes . The ...
-
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...
-
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...