tag:blogger.com,1999:blog-42221973940793148482024-03-05T01:38:36.975-06:00Mark A. ZiesemerMark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.comBlogger119125tag:blogger.com,1999:blog-4222197394079314848.post-37797466035534753202017-08-06T21:16:00.000-05:002017-08-06T21:16:43.868-05:00A faster, "complete" Java HttpServletRequest.getRequestUrl() replacement
As another performance-focused method for reuse: It should be easier to obtain the "complete" URL from a HttpServletRequest in Java.
This is even a popular question on Stack Overflow: HttpServletRequest to complete URL - though I have various issues with each of the current answers.
Following is a self-written version that I've been using for a number of years now.
I previously had Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-62412065505932981562017-08-06T16:43:00.000-05:002017-08-06T16:56:07.096-05:00MarkUtils-CLI: Annotations (and more) for Apache Commons CLI
So much of Java development in the enterprise often seems to be focused around web applications and other aspects of JEE.
Sometimes it is almost comical to watch another developer who has typically been focused on this type of work try to develop a stand-alone Java program.
One of the challenges faced here is typically proper acceptance, handling, and validation of command-line arguments.
Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-9074832559384415672017-05-29T19:49:00.000-05:002017-05-30T07:05:47.100-05:00MarkUtils Refresh, New Hosting
It's been a few years, but I just completed a much-needed refresh to my open source Java libraries ("MarkUtils").
The code is vastly unchanged, and has held up incredibly well over the Java 1.6, 1.7, and 1.8 upgrades (and soon, 1.9) - probably mostly due to 90%+ unit test coverage on everything. The main driving factor here was to get things re-hosted following the shutdown of java.net. In Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-20183408654577659002013-02-23T23:19:00.000-06:002013-02-23T23:22:39.000-06:00How to (not) Validate an Email Address
A common requirement to a software developer often follows the lines of "accept a valid email address".
Somewhat appropriately, use of a regular expression is typically considered to fulfill this requirement.
Unfortunately, many times this is made more complicated than necessary - and only causes additional issues due to becoming too restrictive.
This scenario is best explained by "I Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com1tag:blogger.com,1999:blog-4222197394079314848.post-44500957608060209162012-08-11T15:12:00.001-05:002018-02-21T00:02:59.553-06:00parent-updates-maven-plugin
I've had the privilege of working with Apache Maven (official site) in most of my projects almost since its official release in 2005.
Maven is so much more than a build automation tool - providing dependency resolution, project configurations, and automatically-generated project reports / web sites, just to name a few features.
It isn't often that I find something that I can't accomplish withMark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com2tag:blogger.com,1999:blog-4222197394079314848.post-91378882004494640392012-03-31T21:14:00.001-05:002012-03-31T21:15:00.727-05:00"Connection Reset" errors, MTU, DHCP, and Time Warner CableSo long, AT&T DSL
Not too long ago, I made the move from AT&T DSL to Time Warner Cable for my family's home Internet connection.
AT&T's pricing was no longer competitive, and their terms of service were nothing to be proud of.
Hopefully most readers have heard about the recent AT&T policies regarding 150 GB data caps for DSL connections.
While most people have recently been complaining aboutMark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com2tag:blogger.com,1999:blog-4222197394079314848.post-13154944260089617782012-02-02T21:33:00.004-06:002014-10-28T09:02:50.451-05:00Prepping Cygwin for a multi-user installation
I was working on installing Cygwin on a base Windows 7 image that will be used by a significant number of developers.
As much as I like Cygwin, following the same experience I previously documented in Fixing Cygwin's user groups, sometimes things just don't work as smoothly as one would hope.
First, even though this will be a "install once" situation that will be copied as part of the image, Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-13209778660221084762011-10-30T21:03:00.001-05:002011-10-30T21:05:28.320-05:00Ubuntu Linux 11.10 Install Notes
This past week, I finally got around to installing the latest version of Ubuntu Linux on my home server - 11.10, "Oneiric Ocelot" (released 2011-10-13).
There shouldn't be anything too significant here - these are mainly notes for myself, but posted here in case something is useful to others.
I always do a full, clean re-installation - so several of the notes listed here won't be of concern for Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-80529501836728151852011-10-01T16:19:00.002-05:002011-10-01T18:22:57.928-05:00Fixing UPnP/DLNA sharing on 2nd drive under Windows 7Background
Though I may be a few years late to the party, I finally have a capable Home Theater PC (HTPC) and HDTV setup in my living room.
For simplicity for the entire family, it's running Windows 7's Media Center.
My favorite feature of a HTPC-solution is the digital video recorder (DVR) functionality - including the options to pause and replay live TV.
My family previously had a Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com7tag:blogger.com,1999:blog-4222197394079314848.post-14188453316321468252011-10-01T12:29:00.000-05:002011-10-01T12:29:07.796-05:00HP LaserJet PCL Errors and Driver Availability
My primary printer for the past 10 years has been a trusted Hewlett-Packard (HP) LaserJet 2200D, with an added network adapter making it the equivalent of a 2200DN.
12,600 pages later, it is still working like new (though recognizing in a shared office environment, this same print volume would probably be used within a fraction of a year.)
After recently completing a Windows 7 x64 reinstall, Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com7tag:blogger.com,1999:blog-4222197394079314848.post-25740654761325350212011-04-16T19:19:00.002-05:002011-04-18T09:19:46.437-05:00Improving code and quality with Checkstyle
I've always been picky about the quality my code and the code that I work with.
For good reason.
It makes the code easier to read and work with.
Consistency makes the program flow easier to understand, bugs and other potential issues easier to spot, and difference comparisons between files and versions more effective.
Sun Microsystems (original designer of the Java platform, now part of Oracle) Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-58394822590006312362011-01-02T21:54:00.002-06:002011-01-02T21:58:40.135-06:00LDAP authentication for Samba
As part of my OpenLDAP under Ubuntu Linux project, this post documents configuring Samba to use LDAP - as a storage back-end, as well as for authentication and authorization.
(Samba is a free software re-implemenation of the SMB networking protocol, and is useful for providing network file shares that are recognized by Microsoft Windows.)
As with my previous posts, this post was written against Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com1tag:blogger.com,1999:blog-4222197394079314848.post-61192399676377776192010-12-29T20:23:00.004-06:002015-05-11T22:52:14.970-05:00Linux client authentication with LDAP, PAM, and NSS
As part of my OpenLDAP under Ubuntu Linux project, this post documents configuring Linux client authentication and authorization through LDAP,
using Pluggable Authentication Modules (PAM) and Name Service Switch (NSS).
As with my previous posts, this post was written against Ubuntu Linux's latest release, 10.10 ("Maverick Meerkat").
As Linux uses numeric IDs for users and groups (in separateMark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com2tag:blogger.com,1999:blog-4222197394079314848.post-27258051466133707282010-12-28T16:40:00.005-06:002010-12-29T10:37:40.026-06:00LDAP authentication for Apache HTTP Server
As part of my OpenLDAP under Ubuntu Linux project, this post documents configuring the Apache HTTPD Server to use LDAP for authentication and authorization.
The Apache HTTPD Server will simply be referred to as "Apache" for the remainder of this post.
As with my previous post on phpLDAPadmin, this post was written against Apache 2.2.16, and Ubuntu Linux's latest release, 10.10 ("Maverick MeerkatMark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com1tag:blogger.com,1999:blog-4222197394079314848.post-2721745359231068322010-12-27T20:23:00.005-06:002015-11-29T13:12:14.015-06:00LDAP web administration with phpLDAPadmin
As part of my OpenLDAP under Ubuntu Linux project, I wanted to find a good web administration tool for the directory.
The best option I found was phpLDAPadmin (Wikipedia), a.k.a. PLA.
I meant to complete several other LDAP-related posts since I started this project in April, but other priorities took precedence.
However, a side benefit is that my previous configurations have now been Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com4tag:blogger.com,1999:blog-4222197394079314848.post-36127549943403294682010-09-06T17:55:00.004-05:002011-12-05T06:51:44.447-06:00Oracle Database Server Install Frustrations
After once again installing a local Oracle Database server instance for some local development, this post is mostly focused on some repeated frustrations that I felt are worth sharing.
Database Server
The first issue is the download.
2.06 GB for "Oracle Database 11g Release 2 (11.2.0.1.0) for Microsoft Windows (x64)".
This should be easily and significantly reducible, if a "core" package Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-37903473107043628472010-08-29T20:20:00.003-05:002018-02-21T01:08:08.903-06:00YUI "website top nav" Menu from JavaScript only
I recently had the opportunity to observe someone running into some difficulties trying to implement a YUI 2 Menu.
The menu items were to be retrieved from a database, and needed to be dynamically updatable through an AJAX call - so using JSON rather than HTML to build the menu made sense in this case.
According to YUI's menu page, "Menus can be created from simple, semantic markup on the page Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-64232772810194741362010-07-11T21:49:00.004-05:002010-07-12T19:34:49.705-05:00Updated Blogger Tools
I've updated the "Blog Archive" and "Labels" gadgets on this site - as visible in the right-hand margin of this page.
Please leave a comment with any issues or suggestions.
Over a year ago, I had already replaced Blogger's default Labels gadget with the Yahoo! UI Library (YUI)'s TreeView component, which provided:
A view that is collapsed by default, saving screen space for other features Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com2tag:blogger.com,1999:blog-4222197394079314848.post-19988595736861000232010-07-05T21:56:00.012-05:002010-07-09T20:28:30.788-05:00JavaScript conditional oversights and solutions
While this is nothing new or particularly noteworthy, I felt this post would be good to share after fixing a number of conditionals in various JavaScript code - as well as having received some interesting and surprising feedback after suggesting the same fixes to others.
The code in question looked something like this:
var x;
// …
if(x == ""){
// …
}
While the exact validity of this Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com1tag:blogger.com,1999:blog-4222197394079314848.post-42757902632098490282010-06-07T17:13:00.003-05:002010-06-07T17:13:00.420-05:00Eclipse Web Tools Spell Check Broken
Just a quick warning to anyone looking to upgrade to the upcoming release of Eclipse 3.6 / "Helios" and uses the HTML Editor or Web Page Editor.
As of all the release candidates, including RC4 of Classic with the WTP editors installed and RC3 of the JEE / "Eclipse IDE for Java EE Developers" package, spell check is broken.
Quite simply, HTML content is no longer being checked for misspellings.
Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-26573725060391796362010-06-06T23:50:00.005-05:002010-06-09T00:52:20.308-05:00OpenLDAP Password Permissions Configuration Example
Following my post on OpenLDAP under Ubuntu Linux Lucid Lynx 10.04, I'd like to address a question submitted as a comment submitted by "raerek":
I plan to set up things like this:
-Group A: members can change the password of anyone, except the password of other Group A members.
-Group B: members can change their own passwords, and the passwords of Group C members.
-Group C: members can only Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com2tag:blogger.com,1999:blog-4222197394079314848.post-37164517911338540262010-05-09T22:55:00.017-05:002011-01-02T21:55:06.715-06:00OpenLDAP under Ubuntu Linux Lucid Lynx 10.04Introduction
Somewhat as a follow-up to my Ubuntu Linux router upgrade project over a year and a half ago, I've worked on extending my home setup to include a complete LDAP solution.
My router upgrade project was completed under the latest version of Ubuntu Linux at the time, 8.04 ("Hardy Heron"), which also happened to be a Long Term Support (LTS) release.
That guide has held up very well Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com7tag:blogger.com,1999:blog-4222197394079314848.post-85406549518144077542010-04-07T23:42:00.001-05:002017-05-29T19:27:23.546-05:00MarkUtils-JMX
Following my recent post on JMX Secure Connections / Avoiding Java System Properties, I am making another addition to MarkUtils: MarkUtils-JMX.
JMX Management Bean Metadata
My primary inspiration for this library was that JMX provides a generous amount of metadata along with each management bean, attribute, operation, and parameter - including names, descriptions, and impacts
(INFO, Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com0tag:blogger.com,1999:blog-4222197394079314848.post-18934672746569089402010-03-08T21:29:00.014-06:002010-03-19T20:56:51.375-05:00Thoughts on Google Fiber for Appleton / ISPs
Tonight I attended a public hearing at Appleton City Hall (PDF) regarding the city's consideration to submit a response to Google's request for information on the Google Fiber for Communities experiment. (Don't miss Google's project overview and other linked pages.) Also, please join the Google Fiber for Appleton Facebook group.
I was pleasantly surprised to see this public hearing bring Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com1tag:blogger.com,1999:blog-4222197394079314848.post-35744252075604385082010-03-08T18:58:00.009-06:002010-07-18T14:25:51.369-05:00The Need for IPv6
Almost a year ago, I brought IPv6 connectivity to my home network / LAN.
Background
Similar to the past Y2K issue, the Internet is facing a similar issue that just hasn't been publicized too much in the mainstream media yet: Exhaustion of the IPv4 addresses currently being used.
I found a very interesting and detailed IPv4 Address Report by Geoff Huston that is auto-generated daily.
Mark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.com2