- Add JSTL
Grab the JSTL API (jstl-api.jar) and JSTL implementation (jstl-impl-1.2.jar).
Add the jars to your Container (e.g. Tomcat) lib directory (or your webapp lib).
Alternatively add them using maven dependencies:
<dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency>
- Make sure the web-app root element in web.xml supports at least servlet 2.4/JSP 2.0
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
If you use <taglib> elements in web.xml, make sure they are embedded in a <jsp-config> element.
19 December 2010
Adding JSTL/JSP EL to your web applicaton (updated)
4 December 2010
Wikileaks: free speech to the test
- Wikileaks got bumped from US Amazon cloud servers. A good indication of inherent risks of control one has when running cloud based services.
- Wikileaks was also removed from French servers. Because France does not want confidential diplomatic information of other coutnries to be available. I doubt that France is applying this as a general rule to all diplomatic information from all countires.
- Wikileaks was removed from DNS provider EveryDNS, because it breached the terms of contract. The ongoing denial of service attacks against the site were compromising the service for other clients. Instead of giving good service and protection and going after the attackers, the service provider says the customer is in error? Fun: now botnets can remove all EveryDNS customers by picking them as a DOS target.
- Paypal (a subsidiary of US based eBay) blocks donations for WikiLeaks because they do not transfer money for criminal activities. The strange thing about these actions by US companies is that they are based on private company regulations rather than public law.
27 November 2010
Using JPA with Spring
If you want to use Spring with JPA, the java code is just like in Java EE. Here's how the configuration files for Spring look for an example similar to the Java SE example:
persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="StockPU" transaction-type="RESOURCE_LOCAL"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <properties> <property name="javax.persistence.jdbc.user" value="public"/> <property name="javax.persistence.jdbc.password" value="public"/> <property name="javax.persistence.jdbc.url" value="jdbc:derby:MyDB;create=true"/> <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/> <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/> <property name="eclipselink.logging.level" value="SEVERE"/> </properties> </persistence-unit> </persistence>Spring XML configuration snippet(e.g. in application-config.xml):
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean" lazy-init="true"> <property name="persistenceUnitName" value="StockPU" /> </bean> <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <tx:annotation-driven />
IPFilter Components / Solaris 10
- Commands
- svcadm: enable/disable ipfilter
- ipf: manage rulebase
- -Fa: flush (remove) all rules
- -f file: load rules from file
- ipnat: manage Network Access Translation rules
- -F: flush (remove) all rules
- -f file: load rules from file
- ipfstat: show statistics
- -io: show active rulebase
- Daemons
- ipmon: monitor logging device
- -D: daemon mode
- -s: log to syslog local0 facility
- ipmon: monitor logging device
- Files
- /dev/ipl: device from which you can read log entries
- Kernel module
- ipf
- Links
21 November 2010
Windows 7: Subsystem for Unix-based applications (SUA)
While being in turn features on/off there was some other interesting stuff:
- NFS client (!)
- Subsystem for Unix-based applications
After rebooting I could go to All Programs > Subsystem for Unix-based applications and... download utilities for Subsystem for Unix-based applications. That's right, it just enables the possibility to run POSIX programs, but Unix utilities themselves were not bundled, not even a shell.
Going to the download page you get these choices:
- Utilities and SDK for UNIX-based Applications_AMD64.exe
- use for 64 bit Windows on Intel or AMD x86 processors
- Utilities and SDK for UNIX-based Applications_IA64.exe
- Use for Intel itanium
- Utilities and SDK for UNIX-based Applications_X86.exe
- use for 32bit Windows on Intel or AMD x86 processors
When installing, choose custom installation if you want to include GNU stuff. When installation is done, Windows prompts for another reboot.
Your system is by default installed with a root directory mapped to c:\Windows\SUA. You can now start a shell from the SUA menu. You can also run commands from windows by passing them as arguments to c:\Windows\posix.exe. From a SUA shell you can access your windows drives from /dev/fs (e.g. /dev/fs/C is your C drive).
20 November 2010
Solaris Bookmarks (updated)
Oracle
- documentation
- Oracle Technology Network (OTN) (was bigadmin)
- Solaris for Linux administrators
- OpenSolaris
- With the purchase by Oracle the open source distribution of Solaris was discontinued. OpenIndiana is a public domain fork. Solaris Express continues with binary snapshots, starting with Solaris 11.
Information
Software
Solaris 11 express released
New feature digest:
- Image Packaging System (IPS)
- A new software package system
- Repositories (depot servers) providing packages over the network
- mirrors
- can assist in network install (Automated Installer)
- Automatic updates
- legacy solaris packages (pkg) supported
- Distribution constructor builds an OS image from a manifest (descriptor file). Images can be
- directly installed on client
- ISO image
- VM image
- Boot environments: streamlined Live Upgrade using ZFS snapshots
- ZFS
- ZFS boot/root environment
- deduplication: detect duplicate data and store single copy
- encrypted datasets
- security
- root is a role now
- labeling extensions
- apply labels to IPSec
- apply labels to ZFS datasets
- require an extra password to access a labeled resource
- bash is the default user shell, ksh the default system shell
- optional graphical boot screen
- CUPS printing service is the default printing service
- printer discovery
- Open Sound System API support (Boomer)
- Linux removable media management replaces the volume manager (vold)
- Command assistant: full text search tool to get information on Solaris commands
- git is bundled (distributed version control system for development)
- Networking enhancements
Solaris 11 networking enhancements
- Network automagic (NWAM): dynamically configure fixed or wireless network depending on discovery and profiles
Network automagic - sockets no longer use STREAMS
- Solaris can work as a (L2) bridge (IETF TRILL)
- unified handling of different types of network interfaces (project Clearview)
- dladm extended (project Brussels)
- virtual interfaces, IP tunnels and IPMP can now be accessed as generic IP interfaces. They can now be sniffed (e.g. lo0, traffic between zones...) , asssigned as an exlusive stack to a zone...
- use virtual network interfaces (VNIC), virtual switches (etherstubs) and virtual routers, bridges and servers (zones) to siumulate an entire network on a single system (project Crossbow)
- zones can exclusivly own an IP stack without a dedicated physical interface (NIC)
- Link protection: limit ability of NIC to send spoofed packets
- VRRP (Virtual Router Redundancy protocol)
7 November 2010
3 November 2010
Solaris 10 networking enhancements by release overview (updated)
3/5 (base)
- specify source IP by (virtual) interface. Example:
# ifconfig eri0 usesrc vni0
The virtual IP vni interface is not associated with any physical hardware and is thus immune to hardware failures. If vni0 has address 10.0.0.1 assigned to it, the system will prefer 10.0.0.1 as the source address for any packets originated by local connections that are sent through eri0. - RIPv2, BGP, and OSPF through GNU Zebra (adapted for Solaris)
- /usr/lib/mail -> /etc/mail/cf
- routeadm command
- rdisc wrapped into in.routed
- use ifconfig to configure ipforwarding for individual interfaces
- IP quality of service (IPQoS)
- WAN boot installation
- SSH 3.5p1 (adapted for Solaris)
- Stream Control Transmission Protocol (SCTP)
- SMTP over TLS
- source address filtering on multicast traffic
- dladm command for data link (layer 2) configuration, link aggregation (ethernet trunk)
- IGMPv3 and MLDv2 (IPv6) routing support
- IPFilter for IPv6
- Mandatory Access Control (from Trusted Solaris) for networking and other functions
- Set secure by default network profile during installation
- SMF based routing services (svcadm in addition to routeadm)
- merge /etc/inet/ipnodes (for IPv6) into /etc/inet/hosts
- GNU Quagga routing suite replaces GNU Zebra
- Key Management Framework for PKI
- encryption kit included + MD4, MD5, SHA1, and SHA2
- exclusive access to physical network interfaces by non-global zones
- DHCPv6 client
- IPFilter firewall enhancements
- pfil driver/daemon removed (replaced by packet filter hooks)
- IPv6 support
- loopback interface support
- SHA2 512bit, Diffie-Hellman 4096 bit
- NTP 4.1.2
- The client queue runner is now a separate daemon (svc:/network/smtp:sendmail-client). It used to be part of sendmail (svc:/network/smtp:sendmail).
- The net_access privilege has been added to the basic privilege set. Denying this privilege, cuts network access.
14 October 2010
Handling comments with SAX
With SAX 2 you will need to register an extra handler, LexicalHandler, to be called for comments and other lexical events (CDATA, DTD, Entities). The JAXP adapter class DefaultHandler2 is an adapter for all SAX2 handlers, including the LexicalHandler.
Here's a little code snippet, that shows how to set up your SAX parser to print comments:
SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); parser.setProperty( "http://xml.org/sax/properties/lexical-handler", new LexicalHandler() { public void comment(char[] ch, int start, int length) throws SAXException { System.out.println( "/* comment: " + String.valueOf(ch, start, length) + " */"); } public void startDTD(String name, String publicId, String systemId) throws SAXException { } public void endDTD() throws SAXException { } public void startEntity(String name) throws SAXException { } public void endEntity(String name) throws SAXException { } public void startCDATA() throws SAXException { } public void endCDATA() throws SAXException { } });
10 October 2010
DOM editing validation
We are adding a text node instead of a comment now, to generate a schema inconsistency.
The checking kicks off when you call normalizeDocument.
Also compare with the parsing validation example.
// SimpleDOML3MemXSD.java import com.sun.xml.internal.ws.developer.ValidationErrorHandler; import org.w3c.dom.*; import org.w3c.dom.bootstrap.DOMImplementationRegistry; import org.w3c.dom.ls.*; import javax.xml.XMLConstants; import java.io.OutputStreamWriter; public class SimpleDOML3MemXSD { public static void main(String args[]) { Document doc; try { // Create DOM Document using DOM Level 3 Load DOMImplementationLS ls = (DOMImplementationLS) DOMImplementationRegistry. newInstance().getDOMImplementation("LS"); LSParser builder = ls.createLSParser( DOMImplementationLS.MODE_SYNCHRONOUS, "http://www.w3.org/2001/XMLSchema"); doc = builder.parseURI(args[0]); DOMConfiguration config = doc.getDomConfig(); // for DTD use XMLConstants.XML_DTD_NS_URI config.setParameter("schema-type", XMLConstants.W3C_XML_SCHEMA_NS_URI); config.setParameter("validate", true); config.setParameter("error-handler", new StdErrorHandler()); //Obtain root elements Element root = doc.getDocumentElement(); // Add text (NOT ALLOWED BY SCHEMA) Text text = doc.createTextNode("Training text"); root.appendChild(text); //Now validate doc.normalizeDocument(); // Output to standard output; using DOM Level 3 save LSOutput target = ls.createLSOutput(); target.setCharacterStream(new OutputStreamWriter(System.out)); ls.createLSSerializer().write(doc, target); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); System.exit(0); } } private static class StdErrorHandler implements DOMErrorHandler { public boolean handleError(DOMError e) { String prefix = "Severity "; if (e.getLocation().getLineNumber() != -1) { prefix = "Line " + e.getLocation().getLineNumber() + " column " + e.getLocation().getColumnNumber() + ", severity "; } System.err.println( prefix + e.getSeverity() + " issue: " + e.getMessage()); return true; } } }
DOM XML Load validation
The example also features a DOM Level 3 DOMErrorHandler.
Also compare with the editing validation example.
// SimpleDOML3XSD.java import org.w3c.dom.*; import org.w3c.dom.bootstrap.DOMImplementationRegistry; import org.w3c.dom.ls.*; import javax.xml.XMLConstants; import java.io.OutputStreamWriter; public class SimpleDOML3LSXSD { public static void main(String args[]) { Document doc; try { // Create DOM Document using DOM Level 3 Load DOMImplementationLS ls = (DOMImplementationLS) DOMImplementationRegistry. newInstance().getDOMImplementation("LS"); LSParser builder = ls.createLSParser( DOMImplementationLS.MODE_SYNCHRONOUS, // for DTD use XMLConstants.XML_DTD_NS_URI XMLConstants.W3C_XML_SCHEMA_NS_URI); DOMConfiguration config = builder.getDomConfig(); config.setParameter("validate", true); config.setParameter("error-handler", new StdErrorHandler()); doc = builder.parseURI(args[0]); // Obtain root elements Element root = doc.getDocumentElement(); // Add comment texts Comment comment = doc.createComment("Training text"); root.appendChild(comment); // Output to standard output; using DOM Level 3 save LSOutput target = ls.createLSOutput(); target.setCharacterStream(new OutputStreamWriter(System.out)); ls.createLSSerializer().write(doc, target); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); System.exit(0); } } private static class StdErrorHandler implements DOMErrorHandler { public boolean handleError(DOMError e) { String prefix = "Severity "; if (e.getLocation().getLineNumber() != -1) { prefix = "Line " + e.getLocation().getLineNumber() + " column " + e.getLocation().getColumnNumber() + ", severity "; } System.err.println( prefix + e.getSeverity() + " issue: " + e.getMessage()); return true; } } }
9 October 2010
Load and Save XML with DOM (Level 3)
Below is the SL-385 code 4-2 modified to use the standard DOM level 3 Load and Save (LS) API.
An alternative JAXP (but not DOM standard) way is to read using the JAXP DocumentBuilder and to write using the JAXP transformer (TrAX XSLT).
(I included a comment showing DOM LS writing starting from a DocumentBuilder obrained from JAXP reading as well.)
// SimpleDOML3LS.java import org.w3c.dom.*; import org.w3c.dom.bootstrap.DOMImplementationRegistry; import org.w3c.dom.ls.*; import java.io.OutputStreamWriter; public class SimpleDOML3LS { public static void main(String args[]) { Document doc; try { // Create DOM Document using DOM Level 3 Load DOMImplementationLS ls = (DOMImplementationLS) DOMImplementationRegistry. newInstance().getDOMImplementation("LS"); LSParser builder = ls.createLSParser( DOMImplementationLS.MODE_SYNCHRONOUS, null); doc = builder.parseURI(args[0]); // Obtain root elements Element root = doc.getDocumentElement(); // Add comment texts Comment comment = doc.createComment("Training text"); root.appendChild(comment); // Output to standard output; using DOM Level 3 save // If you parsed using a JAXP DocumentBuilder // you can also get your LSimplementation from your Document: // DOMImplementationLS ls = (DOMImplementationLS) doc. // getImplementation().getFeature("LS","3.0"); LSOutput target = ls.createLSOutput(); target.setCharacterStream(new OutputStreamWriter(System.out)); ls.createLSSerializer().write(doc, target); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); System.exit(0); } } }To add newlines/indents to enhance readability of the output, replace in the above example
ls.createLSSerializer().write(doc, target);with
LSSerializer serializer = ls.createLSSerializer(); DOMConfiguration serializerConfig = serializer.getDomConfig(); serializerConfig.setParameter("format-pretty-print", Boolean.TRUE); serializer.write(doc, target);
6 October 2010
Oracle buys Passlogix SSO
The last buy is a very rational one, and one that will easily integrate into the company.
Oracle was already reselling Passlogix under its own brand as part of its Identity and access management suite and is in-housing the technology now. Additionally Sun Microsystems, which became a piece of the Oracle pie last year, was partnering with PassLogix for Sun Identity and Access management as well.
Oracle's Identity and Access Management suite, will emerge as of the completest in the market.
3 October 2010
Google adds keyboard search navigation

We already have suggest, a drop down box with search term autocompletion suggestions.
Only last month we got instant search, showing search results as you type.
Both are shown in the picture to the left.

Now Google is adding keyboard navigation, allowing you to move down through results (and to next page) using the arrow keys. Keyboard navigation starts after you hit enter in the search box. The current selected item is indicated by the little blue arrow head to the left. Hit enter again to go to the target page.
You need to be logged in with instant search enabled.
Still, criticists say that the blue arrow could be interpreted as a recommendation of the link to the user. It will point to the first position which is often an advertisement, Google's primary source of revenue.
1 October 2010
jspx document
The document must be saved in a .jspx file (e.g. index.jspx):
<html xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core"> <jsp:directive.page contentType="text/html;charset=UTF-8"/> <head><title>Header jspx page</title></head> <body> Request headers: <ul> <c:forEach var="zheader" items="${header}"> <li>${zheader}</li> </c:forEach> </ul> </body> </html>
28 September 2010
LibreOffice: OOo without Oracle
Back in the previous millenium Sun Microystems bought a German office suit, called StarOffice, running on Unix as well as Windows.
Sun rebranded the product to OpenOffice and made it a free, public domain competitor for MS Office.
OpenOffice came under the stewardship of Oracle, when it acquired Sun.
Oracle's decision to charge for a previously free MSOffice plugin, that allows it to read the Open Document Format (ODF), created a lot of irritation in the public domain community.
Meanwhile Oracle is continuing work on, Oracle Cloud Office, based on JavaFX technology. Remark that it does not have the Open word in its name.
Recently Oracle closed up Sun's OpenSolaris OS. In response a community project, OpenIndiana, was created.
In a preemtive strike, the community (FSF, Oasis, Google, Novell, Red Hat, Gnome...) now has declared it's independance of Oracle. Because Oracle holds the trademark, the suite has been rebranded to LibreOffice.
22 September 2010
Glassfish 3 Admin Console hangs behind a proxy
If the proxy settings do not match the currently active proxy the glassfish admin console may hang.
The glassfish web admin console will not forward your browser proxy settings to the updatetool, which has its own settings. It will wait for the updatetool to return, which never happens.
Here's a solution from the forums:
Change the update configuration using updatetool in GlassfishInstallDir/bin (it may ask you to install the tool first, just do so and start updatetool again).
In the tool go to preferences and enter correct proxy settings (or disable automatic updates in the updates tab).
Alternatively, if you fail to install the tool, you can just kick out the module $GLASSFISH_HOME/glassfish/modules/console-updatecenter-plugin.jar by renaming it.
18 September 2010
Google just bought you some GWT tools
17 September 2010
16 September 2010
Bronze medal for website Sint-Niklaas
Great news!
15 September 2010
How to get Java EE6 libraries
That’ a whole lot of bloat if you just want to compile a little webapp. You can just put a small subset of the glassfish jars in your classpath:
- glassfish_install_dir/glassfish/modules/javax.servlet.jar
- glassfish_install_dir/glassfish/modules/javax.servlet.jsp.jar
- glassfish_install_dir/glassfish/modules/javax.servlet.jsp.jstl.jar
- glassfish_install_dir/glassfish/modules/jstl-impl.jar
- glassfish_install_dir/glassfish/modules/javax.ejb.jar (if using ejb)
<dependencies> <dependency> <groupId>javaee</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> </dependencies> <repository> <id>java.net</id> <name>GlassFish Maven Repository</name> <url>http://download.java.net/maven/2</url> </repository>Use artifactId javaee-web-api if you just want the web profile.
If you are not using maven, you can just download the jars from the maven repository:
- http://download.java.net/maven/2/javax/javaee-api/6.0/javaee-api-6.0.jar
- http://download.java.net/maven/2/javax/javaee-web-api/6.0/javaee-web-api-6.0.jar
<dependency> <groupId>javaee</groupId> <artifactId>javaee-api</artifactId> <version>5</version> <scope>provided</scope> </dependency>
11 September 2010
10 September 2010
9 September 2010
French/Belgian newspapers sue public television
Having worked for the Corelio newspapers, I've seen the difficulty of making an online newspaper profitable.
You can argue that a public server is not needed where a good commercial service exists.
Then again, I would not like to see public television dropped in favour of commercial television, which is a case that is very similar to the public/commercial e-newspaper debate.
8 September 2010
Google scribe
Superb toy, at first glance it seems a bit too eager though, when positioned in the middle of a sentence, it tends to add stuff without asking.
28 July 2010
Intel integrates optical connections in a chip
In the medium term this can signal the end of electronical chip wiring.
27 July 2010
Joda Time Presentation
The national cloud
It is interesting to see if this service will also come to Google App Engine and commercial applications.
It may remove an important legal hurdle: the country where an application's are stored will determine the laws that will be applied to them and under which jurisdiction actions on your data can be ordered.
Note that although Google guarantees where your data are stored, it does not guarantee where your application runs.
21 June 2010
18 June 2010
Google to introduce micropayment links
12 June 2010
Applying UML and patterns: Quotes
Le temps est un gran professeur,
mais malheureusement il tue tous ses élèves.
Hector Berlioz
You should use iterative development only on projects you want to succeed.Martin Fowler
Le mieux est l’ennemi du bien.Voltaire
Fast, cheap, good: choose any two.
In theory, there’s no difference between practice and theory.
But, in practice, there is.Jan van de Snepscheut
Hardware, n: The parts of a computer system that can be kicked.
0x2B | ~0x2BHamlet
Je n’aime pas ce mot bombe.
Ce n’est pas une bombe mais simplement un appareil qui explose.Jacques Le Blanc, French ambassador to New Zealand, on France's nuclear testing
Cats are smarter than dogs.
You can’t get eight cats to pull a sled through the snow.Jeff Valdez
To iterare is human,
to recurse divine.
Any sufficiently advanced bug is indistinguishable from a feature.Rich Kulawiec
Luck is the residue of design.Branch Rickey
Virtue is insufficient temptation.George Bernard Shaw
Error, no keyboard – Press F1 to continueearly PC BIOS message
If you were plowing a field,
which would you rather use?
Two strong oxen or 1024 chickens?Seymour Cray
The most likely way for the world to be destroyed, most experts agree, us by accident.
That’s where we come in;
we’re computer professionals.
We cause accidents.Nathaniel Borenstein
10 June 2010
internet liability
- A German court ruled someone can be liable if his WIFI connection is unprotected and that connection is used for illegal acts.
- Many end users do not understand a thing about internet security, it seams a bit harsh to punish them for that.
- It is like jailing someone because he left his car open and it was stolen to rob a bank.
- A US court ruled that if you are mailing a link to a website, you are liable for the contents of the page it links to.
- This is similar to an earlier ruling on links to illegal downloads.
- Liability for actual text is a different case all together.
4 June 2010
standalone tomcat?
While apache is more feature rich (non-JVM technologies, URL rewriting, authentication features...) performance is fine on a standalone tomcat:
25 May 2010
JSP history of writing bean properties
- JSP 0.9
<% ActionForm form = (ActionForm) request.getAttribute(”LoginForm”); %>
<%= form.getUserName()%>
- JSP 1.0
<jsp:useBean id=“form" class=“be.uniway.LoginForm" />
<jsp:getProperty name=“form" property=“userName" />
- Struts
<bean:write name=“loginForm" property="userName"/>
- JSP 1.2
<c:out value} ="${loginForm.userName}">
- JSP 2.0
${loginForm.userName}
17 May 2010
16 May 2010
JSTL/JSP EL alternate Struts excercise solution
- Struts
- tags-bean
- tags-logic
- tags-html
- JSP scriptlets
- Struts
- tags-html
- JSTL
- JSP expression language
<c:forEach var="product" items="${List}" varStatus ="status"> <tr class="${(status.index%2==1)?'odd':'even'}"> <td> <html:link action="<%=modify%>" paramId="id" paramName="product" paramProperty="id"> <html:img srcKey="icon.edit" altKey="icon.alt.edit" border="0"/> </html:link> </td> <td> <html:link action="<%=remove %>" paramId="id" paramName="product" paramProperty="id"> <html:img srcKey="icon.trash" altKey="icon.alt.trash" border="0"/> </html:link> </td> <td> ${product.name}</td> <td> ${product.description}</td> </tr> </c:forEach>
15 May 2010
SAP buys Sybase
Both have now been sold within a short interval:
Sybase to SAP
Sun to Oracle
28 April 2010
Dealing with Hibernate proxies
Pitfalls for this approach have been documented. Basically the instanceof operator can fail on a sublcass of an entity.
The bug ticket on this has been rejected, with typical JBoss flair:
If you think this through a bit more carefully, you will see why it is impossible.Still JPA compliancy requires the instanceof operator to work correctly.
Gavin King
Here are some ways to deal with the proxies:
26 April 2010
22 April 2010
20 April 2010
Oracle free software reality check
- Oracle has blocked access to Solaris security patches for people without a support contract.
- Oracle has stopped shipping free OpenSolaris CD’s.
- Oracle is discontinuing the open and free Sun Identity Manager.
- Oracle has made the MS Office ODF 1.2 plugin paying (with a minimum of $9000 for 100 users).
17 April 2010
7500 users sell their soul online
By placing an order via this Web site on the first day of the fourth month of the year 2010 Anno Domini, you agree to grant Us a non transferable option to claim, for now and for ever more, your immortal soul. Should We wish to exercise this option, you agree to surrender your immortal soul, and any claim you may have on it, within 5 (five) working days of receiving written notification from gamestation.co.uk or one of its duly authorised minions.
15 April 2010
Solaris disk layout
On a SPARC system
- VTOC is in cylinder 0, sector 0 and can contain 8 slices
- slice 2 by convention represents the entire disk
- the primary boot block is in cylinder 0, sectors 1-15
- A file system can start on cylinder 0, sector 16
If Solaris is installed on cylinder 1 (typical) disk cylinder 1 = Solaris (relative) cylinder 0.
Solaris x86 VTOC supports 16 slices:
- 0-7: like SPARC slices
- 8: boot slice (relative cylinder 0)
- 9: on IDE/SATA disks default alternate slice (relative cylinder 1 and 2)
- 10-15: unused
Register a Solaris system for patch updates
You can bring a Solaris automatically up to date with the latest recommended or security (if you do not have a support contract) patches.
You can do this using
- a graphical tool: /usr/bin/updatemanager
- a command line tool: /usr/sbin/smpatch
updatemanager will guide you through a series of screens to register yourself and your system. Even if you use the graphical tool to register, you can use the command line interface later on to keep your system up to date.
Here’s the procedure to register without using the graphical updatemanager tool.
- Register for a Sun Online account on the web. This is a common account for accessing SunSolve, Sun developer connection…
- Prepare a registration file and fill in your user name, password, system and optionally other information like contract number and proxy. You can use /usr/lib/breg/data/RegistrationProfile.properties as a template.
- Register your system
# sconadm –a –r <yourRegistrationFile>
11 April 2010
Gosling Goes
A great many people will be yelling the end is nigh.
Not me.
31 March 2010
Black hat SEO
Hackers automatically create pages with popular keywords (breaking news...) based on resources like Google Trends. They create networks of crosslinked bogus pages hosted on compromised, legitimate websites. When a crawler comes along the page is fed to the search engine.
When a user is redirected to the URL by a search engine, the site detects that this is a normal browser access and redirects the user to malware sites.
A paper by Sophos explains the technique.
30 March 2010
25 March 2010
GUI architecture patterns
There are however many variations on it, partly depending on the underlying technology.
As a result MVC is often misunderstood, and the same names are used for different beasts.
Here's a clear overview of MVC and its brethern.
24 March 2010
18 March 2010
Revision control tools survey
- you can work with revisions while being diconnected
- faster access
- commit and publish are separate events.
- developers can more easily make an intermediate commit before starting to write speculative code, without having to worry about the commit breaking the published code.
- extra actions can be added between commit and publish
- publish permission can be restricted
3 March 2010
Belgian EID risks
Belgian e-ID description
The Belgian e-ID card is a smart card that allows Belgian citizens to prove their identity and to sign electronic documents. Private information such as the owner's name, his address, a digital picture of the owner and his National Registry Number (Social Security Number) is stored on the card and signed by the government. Two PIN-protected key pairs allow digital authentication and signing.
Pilot projects for foreigner and kids e-ID cards are being executed.
To use the card in (web) applications the user needs a card reader and a middleware application (by the fedict government service). Applications typically interact with the card via an API offered by this middleware, which is documented in the developer guide.
The card's public keys are embedded in a certificate containing the RRN and the name of the card holder, signed by the government. The private keys can only be activated (not read) with a PIN code.
Some of Pieter's remarks
- The unique identity key is the National Registry Number (RRN). The Belgian Privacy commission states that this key may only be stored by applications after official approval by them (National register act of 8/8/1983, ammended 25/3/2003, art 5), as mentioned in the FAQ. The FAQ sugggests to use a hash instead of the RRN.
- As the RRN is not protected by the PIN, developers tend to think that just reading it is sufficient for authentication, rather that using client side SSL authentication.
- Once the authentication PIN is entered, the authentication certificate can be used multiple times without notifying the user. A malicious application might authenticate to other sites on the user's behalf
Some tips on using e-ID in an application.
12 February 2010
11 February 2010
Lucene in the cloud (with diamonds)
Acquia, the company behind Drupal, is selling Acquia Search, a commercial service based on it.
Another Lucene based server which we've been using, Searchblox, is also available commercially on AmazonEC2.
4 February 2010
Java / web application security links
- Java security libraries and frameworks
- Java 6 SE Security
- JEE 5 tutorial security chapters
- Spring Security (formerly acegi)
- Java security guidelines, vulnerabilities and assessment
- Security checklists (application development, webserver general, tomcat, weblogic, apache...)
- Web server STIG
- JavaScript (GWT)
28 January 2010
27 January 2010
On google, human rights and business opportunities
Chinese efforts to censor the Internet have been very limited.
Bill Gates
21 January 2010
Sunset
I have been working on Sun almost from the start of my working life, so this is a bit of a sad moment.
The delay was caused by opposition by former MySQL owners, and hurt Sun badly.
These guys first cashed in when they sold their product and now wanted to have their word to say on what happens with it. I entirely agree with old JBoss badmouth Marc Fleury on this.