Frits Jalvingh's blog

Better fonts in Ubuntu Feisty

I just tried the new font code as detailed here and am blessed with way better font rendering in my Ubuntu Feisty. They look sharper and less blurred. I can finally even read the small print again ;-)

Delay in SSH connection in Ubuntu Feisty

I just grew fed up with all of my ssh connections taking more than 15 seconds before a connection was established. I ruled out the usual suspects:

  • Misconfigured DNS can cause it as a reverse lookup times out. This however was not the case. dig -x [ipaddress] worked fine on the server.
  • When ipv6 on the workstation is misconfigured it can cause the problem because ssh will try to connect over ipv6 before connecting thru ipv4. I disabled ipv6 (alias net-pf-10 off in /etc/modprobe.d/aliases) but still no go. I could have guessed since my ipv6 route table was empty..

I fired up wireshark and traced a connection. The cause of the problem was mdns which did lookups that timed out. $DEITY knows why it does; I just disabled it by removing all references to mdns in /etc/nsswitch.conf - and all works fast again

Fixing Eclipse JSP Parsing 2: Complex attri

 The next part to fix are complex attribute values. These are attributes where the content contains some JSP region like a JSP expression or EL expression. In tokenising we again have two possibilities: a JSP Content region within a JSP taglib tag and a JSP content region in a non-JSP tag (template text as far as JSP is concerned).

Since Eclipse parses both the template text (to allow for HTML/XML checking) and the JSP it needs to distinguish these cases. For non-JSP tag values (and all places where JSP scriptlets are used outside of a tag attribute) there are no quoting rules except the rules for the embedded language itself. So a properly escaped piece of code using a non-JSP attibute value would be:

Fixing Eclipse JSP Parsing: part 1

What is fixed

The first thing I'll fix is the erroneous quoting of constructs like:

<navi:form method="hello \"world\"">

This is a properly escaped invocation of a JSP taglib, and it gets mistreated in the JSPTokenizer. It treats tag attribute values of JSP tags the same as attribute values of html (template text) values. So the fix is to remedy that.

First we have to distinguish between JSP tags and non-JSP tags. This must be done at lexing time because the behaviour of the lexer changes wrt the type. For now I just added a variable, boolean fInJspTag to the lexer. When a tag name is found the lexer checks to see if it is a prefixed name (contains a ':') and if so sets this variable.

Syndicate content