<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-24384544</id><updated>2012-01-27T06:22:46.620+11:00</updated><category term='apache'/><category term='hibernate'/><category term='xerces'/><category term='ant'/><category term='GWT'/><category term='XSLT'/><category term='javascript'/><category term='JSP'/><category term='PDF'/><category term='jk'/><category term='AJAX'/><category term='JSTL'/><category term='JSE'/><category term='lucene'/><category term='parameters'/><category term='XML'/><category term='tomcat'/><category term='post'/><category term='IIS'/><category term='xalan'/><category term='ie'/><category term='HTTP'/><category term='exceptions'/><category term='firefox'/><category term='no result'/><category term='webkit'/><category term='websphere'/><category term='spring'/><category term='servlets'/><category term='tips'/><category term='JAXB'/><category term='HTML'/><category term='weblogic'/><category term='error messages'/><category term='forms'/><category term='windows'/><category term='eclipse'/><category term='slide'/><category term='1st post'/><category term='axis'/><category term='.NET'/><category term='database'/><title type='text'>Development Answers (No Questions)</title><subtitle type='html'>Solutions to the problems encountered by a Java Developer. No Questions! Just Answers.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>63</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24384544.post-8395960138472366846</id><published>2011-10-19T12:18:00.000+11:00</published><updated>2011-10-21T14:08:03.319+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>Can not remote desktop - no Terminal Server License Servers available</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;remote desktop console disconnected terminal server license "no Terminal Server License Servers available"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;On trying to remote desktop to a machine get the popup message:&lt;br /&gt;&lt;pre&gt;The remote session was disconnected because there are no Terminal Server License Servers available to provide a license.&lt;br /&gt;Please contact the server administrator.&lt;/pre&gt;&lt;br /&gt;A quick search suggests:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Restarting the "Terminal Server" can help&lt;br /&gt;but lets say (hypothetically) that we don't know where this is and/or how to do it.&lt;/li&gt;&lt;li&gt;Installing a Microsoft 'Hotfix'&lt;br /&gt;but after accepting the terms; filling in the hotfix request form; getting the email with the link to the hotfix executable - we (at the moment anyway) get a &lt;code&gt;500 Internal Server Error&lt;/code&gt; on the MS hotfix download site.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;If you just need to access the machine is there another option?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;You can remote desktop to the "console" - this is effectively like 'physically' logging into the machine rather than a remote session. &lt;br /&gt;&lt;pre&gt;mstsc /console&lt;/pre&gt;&lt;br /&gt;or on Vista / Windows Server 2008:&lt;br /&gt;&lt;pre&gt;mstsc /admin&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;mstsc&lt;/code&gt; allows specifying the machine on the command line itself to avoid the computer selection popup (use &lt;code&gt;/help&lt;/code&gt; option for other options):&lt;br /&gt;&lt;pre&gt;mstsc /v:remote-server /admin&lt;/pre&gt;&lt;br /&gt;Be aware that - if someone else had a console session on this machine they'd be kicked off. If you're logged on in console/admin mode anyone with access to the terminal - if it's plugged into a monitor for example - will see what you're doing. &lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-8395960138472366846?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/8395960138472366846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=8395960138472366846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8395960138472366846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8395960138472366846'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2011/10/can-not-remote-desktop-no-terminal.html' title='Can not remote desktop - no Terminal Server License Servers available'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-4597711149410587278</id><published>2011-09-21T16:27:00.002+10:00</published><updated>2011-11-08T15:36:03.610+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='weblogic'/><title type='text'>Get the generated source code for JSPs in WebLogic</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;generated JSP java class source Oracle WebLogic line numbers&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Given a stack trace such as the following:&lt;br /&gt;&lt;pre&gt;java.lang.NullPointerException&lt;br /&gt; at jsp_servlet._web_45_inf._jsp._demo.__example._jspService(__example.java:117)&lt;br /&gt; at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)&lt;br /&gt; at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)&lt;br /&gt; at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)&lt;br /&gt; at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:526)&lt;br /&gt; at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)&lt;/pre&gt;&lt;br /&gt;It won't always be obvious what the issue in &lt;code&gt;example.jsp&lt;/code&gt; corresponds to in the generated &lt;code&gt;__example.java&lt;/code&gt;. How do you get at the generated source code for the JSPs?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The solution involves configuring a &lt;code&gt;&lt;i&gt;[app_name]&lt;/i&gt;/WEB-INF/weblogic.xml&lt;/code&gt; file in your web-app. The documentation is in the WebLogic 10.3 docs - see &lt;a href="http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html#wp1038491"&gt;weblogic.xml Deployment Descriptor Elements&lt;/a&gt; but keep in mind the file will be validated against the schema so the elements must be in the correct spot.&lt;br /&gt;&lt;br /&gt;Below is an example - defining the &lt;code&gt;jsp-descriptor&lt;/code&gt; with &lt;code&gt;keepgenerated&lt;/code&gt; and &lt;code&gt;working-dir&lt;/code&gt; elements:&lt;br /&gt;&lt;pre class="brush:xml; highlight: [6,7,8,9]"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;weblogic-web-app&lt;br /&gt;    xmlns="http://www.bea.com/ns/weblogic/90"&lt;br /&gt;    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd"&amp;gt;&lt;br /&gt;    &amp;lt;jsp-descriptor&amp;gt;&lt;br /&gt;        &amp;lt;keepgenerated&amp;gt;true&amp;lt;/keepgenerated&amp;gt;&lt;br /&gt;        &amp;lt;working-dir&amp;gt;c:/my_folder/temp&amp;lt;/working-dir&amp;gt;&lt;br /&gt;    &amp;lt;/jsp-descriptor&amp;gt;&lt;br /&gt;    &amp;lt;container-descriptor&amp;gt;&lt;br /&gt;        &amp;lt;prefer-web-inf-classes&amp;gt;true&amp;lt;/prefer-web-inf-classes&amp;gt;&lt;br /&gt;    &amp;lt;/container-descriptor&amp;gt;&lt;br /&gt;&amp;lt;/weblogic-web-app&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-4597711149410587278?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/4597711149410587278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=4597711149410587278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4597711149410587278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4597711149410587278'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2011/09/get-generated-source-code-for-jsps-in.html' title='Get the generated source code for JSPs in WebLogic'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7398755560468440593</id><published>2011-08-25T11:41:00.005+10:00</published><updated>2011-08-25T14:29:26.779+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Beware: an empty string in Oracle is NULL</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;empty string '' CLOB varchar varchar2 text null isnull nvl NullPointerException JDBC&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;There's code that is (seemingly) working with writing strings to CLOB columns and with the code from a previous post (&lt;a href="http://dev-answers.blogspot.com/2011/06/convert-oracle-clobs-to-string-in-jstl.html"&gt;Convert Oracle CLOBs to String&lt;/a&gt;) the reading of strings from the CLOB columns is working ok too ... until we get to empty strings - could it be that something is converting &lt;code&gt;''&lt;/code&gt; to &lt;code&gt;NULL&lt;/code&gt;?&lt;br /&gt;&lt;br /&gt;Here's a test case:&lt;pre&gt;create table test_clobtext(&lt;br /&gt;      id   number&lt;br /&gt;    , text clob&lt;br /&gt;);&lt;br /&gt;insert into test_clobtext values (1, 'some clob text');&lt;br /&gt;insert into test_clobtext values (2, '');&lt;br /&gt;select id, text from test_clobtext;&lt;/pre&gt;&lt;br /&gt;You get:&lt;pre&gt;        ID TEXT&lt;br /&gt;---------- ----------------&lt;br /&gt;         1 some clob text&lt;br /&gt;         2                  &lt;/pre&gt;     &lt;br /&gt;What's the value in the 2nd row? You can use the &lt;code&gt;NVL()&lt;/code&gt; (which is just like &lt;code&gt;ISNULL()&lt;/code&gt;):&lt;pre&gt;&lt;br /&gt;select id, NVL(text,'IT IS A NULL') as text from test_clobtext;&lt;/pre&gt;&lt;br /&gt;Shock, horror, this is the result:&lt;pre&gt;        ID TEXT&lt;br /&gt;---------- ----------------&lt;br /&gt;         1 some clob text&lt;br /&gt;         2 IT IS A NULL      &lt;/pre&gt;     &lt;br /&gt;... and because I'm still in disbelief:&lt;pre&gt;&lt;br /&gt;select id, NVL(text,'IT IS A NULL') as text from test_clobtext&lt;br /&gt;where text IS NULL;&lt;/pre&gt;&lt;br /&gt;This is definitely the result:&lt;pre&gt;        ID TEXT&lt;br /&gt;---------- ----------------&lt;br /&gt;         2 IT IS A NULL      &lt;/pre&gt;     &lt;br /&gt;&lt;br /&gt;So it's something to do with CLOBs? No, changing the text column to a &lt;code&gt;varchar&lt;/code&gt; or &lt;code&gt;varchar2&lt;/code&gt; and &lt;span style="font-style:italic;"&gt;you will get the same result&lt;/span&gt;! Is this right?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;This is apparently a well known issue (that I've only just stumbled across). A discussion is on &lt;a href="http://stackoverflow.com/questions/203493/why-does-oracle-9i-treat-an-empty-string-as-null"&gt;stackoverflow: Why does Oracle treat empty string as NULL&lt;/a&gt; which links to more details information on &lt;a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5984520277372"&gt;ask-tom: Strings of Zero Length Not Equivalent To NULL&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It would seem that there are some scenarios where it won't be &lt;code&gt;NULL&lt;/code&gt; but I can't reproduce this - changing the test case to have text as a &lt;code&gt;char(1)&lt;/code&gt; still gives me &lt;code&gt;NULL&lt;/code&gt; for the column. &lt;br /&gt;&lt;br /&gt;The bottom line is if you're working with strings/text in a Oracle database you must expect and handle &lt;code&gt;NULL&lt;/code&gt; values coming back - there will be no way to distinguish between whether what was originally stored was actually a &lt;code&gt;NULL&lt;/code&gt; or an empty string (&lt;code&gt;''&lt;/code&gt;).&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;If you're dealing with &lt;code&gt;CLOB&lt;/code&gt; columns you do have the option of storing (vendor specific) &lt;code&gt;empty_clob()&lt;/code&gt; where you do want to distinguish between the cell being set to empty from it not being set at all (ie &lt;code&gt;NULL&lt;/code&gt;). This post "&lt;a href="http://nuijten.blogspot.com/2009/11/empty-clob-is-not-null-its-not-null.html"&gt;An Empty Clob is not NULL&lt;/a&gt;" is a good discussion.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7398755560468440593?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7398755560468440593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7398755560468440593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7398755560468440593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7398755560468440593'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2011/08/beware-empty-string-in-oracle-is-null.html' title='Beware: an empty string in Oracle is NULL'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-1958359594219298053</id><published>2011-06-20T13:22:00.007+10:00</published><updated>2011-08-25T14:36:08.435+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Convert Oracle CLOBs to String in JSTL and tag file</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;java.lang.ClassCastException oracle.sql.CLOB cast java.lang.String CLOB jstl tag requestScope requestContext pageContext jspContext&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;It's annoying when SQL that works for other vendors fails for a specific one ... in this case a "&lt;code&gt;text&lt;/code&gt;" column in a schema is defined as "&lt;code&gt;clob&lt;/code&gt;" in the corresponding oracle schema. Problem is that this is not necessarily equivalent - especially when querying the data. This is even more complex when the SQL is in JSTL. So with the JSTL code (where &lt;code&gt;&lt;span style="font-weight:bold;"&gt;textValue&lt;/span&gt;&lt;/code&gt; is a CLOB):&lt;pre&gt;&lt;br /&gt;&amp;lt;sql:query var=&amp;quot;data&amp;quot; &amp;gt;&lt;br /&gt;    select id, &lt;br /&gt;    textValue &lt;br /&gt;    from example &lt;br /&gt;    where id=?&lt;br /&gt;    &amp;lt;sql:param value=&amp;quot;${param['id']}&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/sql:query&amp;gt;&lt;br /&gt;&amp;lt;c:forEach items=&amp;quot;${data.rows}&amp;quot; var=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;c:out value=&amp;quot;${row.textValue}&amp;quot;/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;/c:forEach&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You get the result:&lt;pre&gt;&lt;br /&gt;oracle.sql.CLOB@e645e0&lt;br /&gt;oracle.sql.CLOB@1f58913&lt;br /&gt;oracle.sql.CLOB@fa6b82&lt;br /&gt;...&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Or if you try to use the &lt;code&gt;textValue&lt;/code&gt; in something expecting a string, you'll get:&lt;pre&gt;java.lang.ClassCastException: oracle.sql.CLOB cannot be cast to java.lang.String&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;How do you turn a Clob to a String without filling the JSP with vendor-specific code (leaving out the argument for not having SQL in the JSP for now)?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Great discussion of this very issue is on the &lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=168566"&gt;OTN Forum: JSP and CLOB&lt;/a&gt;. It essentially involves putting the Clob to String code in a scriptlet. To keep this vendor-neutral and take some of the "ugliness" out of the JSP I'd opt for putting this code in a tag file and stick to referencing just the &lt;code&gt;java.sql.*&lt;/code&gt; interfaces.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Step 1: create a &lt;code&gt;/WEB-INF/tags/to-string.tag&lt;/code&gt; tag file&lt;/h2&gt;&lt;br /&gt;(Or in a subfolder - the &lt;a href="http://java.sun.com/products/jsp/syntax/2.0/syntaxref2012.html"&gt;path must start with&lt;/a&gt; &lt;code&gt;/WEB-INF/tags/..&lt;/code&gt; if using the &lt;code&gt;tagdir&lt;/code&gt; approach). &lt;br /&gt;&lt;br /&gt;This takes the CLOB (or other) column value and sets it back in the request context as a String.&lt;pre&gt;&lt;br /&gt;&amp;lt;%-- &lt;br /&gt;    Can turn a CLOB to String for Oracle schema&lt;br /&gt;--%&amp;gt;&lt;br /&gt;&amp;lt;%@ tag body-content=&amp;quot;empty&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;%@ attribute name=&amp;quot;var&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;java.lang.String&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;%@ attribute name=&amp;quot;value&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;java.lang.Object&amp;quot; %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ tag import=&amp;quot;java.sql.*&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;%@ tag import=&amp;quot;javax.servlet.jsp.*&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;    String strValue = null; &lt;br /&gt;    if (value == null) {&lt;br /&gt;        strValue = ""; // NB: oracle empty string is null&lt;br /&gt;    } else if (value instanceof Clob) {&lt;br /&gt;        Clob clob = (Clob)value;&lt;br /&gt;        long size = clob.length();&lt;br /&gt;        strValue = clob.getSubString(1, (int)size);&lt;br /&gt;    } else {&lt;br /&gt;        strValue = value.toString();&lt;br /&gt;    }&lt;br /&gt;    jspContext.setAttribute(var, strValue, PageContext.REQUEST_SCOPE);&lt;br /&gt;%&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In this tag file, &lt;code&gt;var&lt;/code&gt; is the name of the variable to define in the requestScope. Note how this is done by referencing the &lt;code&gt;jspContext&lt;/code&gt; variable.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Step 2: Use the &lt;code&gt;to-string&lt;/code&gt; tag for your &lt;code&gt;text&lt;/code&gt;, &lt;code&gt;clob&lt;/code&gt; or &lt;span style="font-style:italic;"&gt;Other&lt;/span&gt; columns&lt;/h2&gt;&lt;br /&gt;This involves first defining the new taglib (putting all .tag files in tagdir in the JSP scope using the "eg" prefix in this example) and then simply using the eg:to-string tag to put the string-value of the column in a "local" requestScope variable.&lt;pre&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&amp;lt;%@ taglib prefix=&amp;quot;eg&amp;quot; tagdir=&amp;quot;/WEB-INF/tags&amp;quot; %&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;sql:query var=&amp;quot;data&amp;quot; &amp;gt;&lt;br /&gt;    select id, &lt;br /&gt;    textValue &lt;br /&gt;    from example &lt;br /&gt;    where id=?&lt;br /&gt;    &amp;lt;sql:param value=&amp;quot;${param['id']}&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/sql:query&amp;gt;&lt;br /&gt;&amp;lt;c:forEach items=&amp;quot;${data.rows}&amp;quot; var=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;&amp;lt;eg:to-string var=&amp;quot;textValue&amp;quot; value=&amp;quot;${row.textValue}&amp;quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &amp;lt;c:out value=&amp;quot;${textValue}&amp;quot;/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;/c:forEach&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-1958359594219298053?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/1958359594219298053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=1958359594219298053' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1958359594219298053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1958359594219298053'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2011/06/convert-oracle-clobs-to-string-in-jstl.html' title='Convert Oracle CLOBs to String in JSTL and tag file'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-6740321968181282159</id><published>2011-04-05T13:06:00.006+10:00</published><updated>2011-10-13T09:30:26.025+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIS'/><category scheme='http://www.blogger.com/atom/ns#' term='jk'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>IIS7 hiding tomcat webapp error pages</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;IIS IIS7 custom error pages hiding masking tomcat 500 webapp error page jk connector AJP &lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;With tomcat integrated into IIS7 using the jk connector error pages from the webapp that have the http-response status set (eg to &lt;code&gt;500&lt;/code&gt;) get "replaced" with a generic IIS custom error page:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;500 - Internal server error. &lt;br /&gt;There is a problem with the resource you are looking for, and it cannot be displayed&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;A quick web-search reveals it's a common issue for ASP.NET developers and the solution is simply to make changes to the ASP.NET application config or in code setting a special &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.httpresponse.tryskipiiscustomerrors.aspx"&gt;HttpResponse.TrySkipIisCustomErrors&lt;/a&gt; property(!) ... but what are the options for when the pages are being supplied by an ISAPI redirector/plugin (i.e. the JK connector in this case)? &lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Based on the detailed notes on the IIS Blog (&lt;a href="http://blogs.iis.net/ksingla/archive/2008/02/18/what-to-expect-from-iis7-custom-error-module.aspx"&gt;What to expect from IIS7 custom error module&lt;/a&gt;) the minimal steps required seem to be the following:&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Step 1: create a &lt;code&gt;Web.config&lt;/code&gt; file in the root folder of the Web Site&lt;/h2&gt;&lt;br /&gt;This is the Web Site where you've configured the "&lt;span style="font-weight: bold;"&gt;jakarta&lt;/span&gt;" virtual directory. If it's "&lt;span style="font-style: italic;"&gt;Default Web Site&lt;/span&gt;" this may be &lt;code&gt;C:\inetpub\wwwroot&lt;/code&gt; but check the properties to be sure (Right click Web Site &amp;gt; Manage Web Site &amp;gt; Advanced Settings ... and note the setting for 'Physical Path'). &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Step 2: add configuration to the &lt;code&gt;Web.config&lt;/code&gt; file&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;   &amp;lt;system.webServer&amp;gt;&lt;br /&gt;      &amp;lt;httpErrors errorMode="Detailed" existingResponse="Auto" /&amp;gt;&lt;br /&gt;   &amp;lt;/system.webServer&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Step 3: restart the web site&lt;/h2&gt;&lt;br /&gt;Eg Right click Web Site &amp;gt; Manage Web Site &amp;gt; Restart&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Be sure to to test this on the local machine (where IIS7 is installed) and from another machine in the network as IIS may give different error-page behaviour for local and 'remote' requests.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-6740321968181282159?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/6740321968181282159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=6740321968181282159' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/6740321968181282159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/6740321968181282159'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2011/04/iis7-hiding-tomcat-webapp-error-pages.html' title='IIS7 hiding tomcat webapp error pages'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-8155627533647256807</id><published>2011-03-08T15:15:00.006+11:00</published><updated>2011-08-15T20:40:13.557+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIS'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='axis'/><title type='text'>NTLM from an Axis (SOAP) service client - in 3 steps</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;NTLM authentication Negotiate Apache axis SOAP IIS Windows Integrated Authentication CommonsHTTPSender NTCredentials&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Authenticating a service request with BASIC authentication is (relatively) straightforward:&lt;pre&gt;&lt;br /&gt;        import java.net.URL;&lt;br /&gt;        import org.apache.axis.client.Stub;&lt;br /&gt;        import com.example.service.Example;&lt;br /&gt;        import com.example.service.ExampleServiceLocator;&lt;br /&gt;        import com.example.service.ExampleRequest;&lt;br /&gt;        import com.example.service.ExampleResponse;&lt;br /&gt;&lt;br /&gt;        // get access to the web service&lt;br /&gt;        ExampleServiceLocator locator = new ExampleServiceLocator();&lt;br /&gt;        String serviceURL = &amp;quot;http://server/application/services/example&amp;quot;;&lt;br /&gt;        Example example = locator.getexample(new URL(serviceURL));&lt;br /&gt;        // set credentials &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;        ((Stub)example).setUsername(&amp;quot;myusername&amp;quot;);&lt;br /&gt;        ((Stub)example).setPassword(&amp;quot;mypassword&amp;quot;);&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        // setup request&lt;br /&gt;        ExampleRequest request = new ExampleRequest();&lt;br /&gt;        request.setProperty(&amp;quot;SomeProperty&amp;quot;);&lt;br /&gt;        &lt;br /&gt;        ExampleResponse response = example.example(request);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What if the (SOAP) service being called required NTLM authentication (e.g. the service is running in IIS and security is set as "Windows Integrated Authentication")?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The following &lt;span style="font-weight:bold;"&gt;three&lt;/span&gt; steps are assuming Axis 1.x. The &lt;a href="http://www.nsftools.com/stubby/ApacheAxisClientTips.htm"&gt;Apache Axis Client Tips and Tricks&lt;/a&gt; is a good reference, in particular for step 2, but also for other "tips". &lt;br /&gt;&lt;h2&gt;Step 1: Add Apache commons-httpclient (3.1) and commons-codec libraries&lt;/h2&gt;&lt;br /&gt;Note you must add the &lt;span style="font-style:italic;"&gt;commons&lt;/span&gt; httpclient jar file and not the (latest/refactored) apache httpclient to the project - or you will get ClassNotFound exceptions. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Step 2: Define custom client-config with CommonsHTTPSender&lt;/h2&gt;&lt;br /&gt;It's mentioned in the "Tips and Tricks" article mentioned above, but you can either: (a) define a custom &lt;code&gt;client-config.wsdd&lt;/code&gt; file in the classpath before &lt;code&gt;axis.jar&lt;/code&gt;; (b) edit the generated &lt;code&gt;...ServiceLocator.java&lt;/code&gt; generated class and make it override &lt;code&gt;getEngine...&lt;/code&gt;; or (c) at runtime simply feed the customised config XML to your &lt;code&gt;...ServiceLocator&lt;/code&gt; object. &lt;br /&gt;&lt;br /&gt;I prefer the latter - for example, define a static method with the config XML as a string:&lt;pre&gt;&lt;br /&gt;    protected static org.apache.axis.EngineConfiguration getEngineConfiguration() {&lt;br /&gt;        java.lang.StringBuffer sb = new java.lang.StringBuffer();&lt;br /&gt;        sb.append(&amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;UTF-8\&amp;quot;?&amp;gt;\r\n&amp;quot;);&lt;br /&gt;        sb.append(&amp;quot;&amp;lt;deployment name=\&amp;quot;defaultClientConfig\&amp;quot;\r\n&amp;quot;);&lt;br /&gt;        sb.append(&amp;quot;xmlns=\&amp;quot;http://xml.apache.org/axis/wsdd/\&amp;quot;\r\n&amp;quot;);&lt;br /&gt;        sb.append(&amp;quot;xmlns:java=\&amp;quot;http://xml.apache.org/axis/wsdd/providers/java\&amp;quot;&amp;gt;\r\n&amp;quot;);&lt;br /&gt;        // sb.append(&amp;quot;&amp;lt;transport name=\&amp;quot;http\&amp;quot; pivot=\&amp;quot;java:org.apache.axis.transport.http.HTTPSender\&amp;quot; /&amp;gt;\r\n&amp;quot;);&lt;br /&gt;        sb.append(&amp;quot;&amp;lt;transport name=\&amp;quot;http\&amp;quot; pivot=\&amp;quot;java:&lt;span style="font-weight:bold;"&gt;org.apache.axis.transport.http.CommonsHTTPSender&lt;/span&gt;\&amp;quot; /&amp;gt;\r\n&amp;quot;);&lt;br /&gt;        sb.append(&amp;quot;&amp;lt;transport name=\&amp;quot;local\&amp;quot; pivot=\&amp;quot;java:org.apache.axis.transport.local.LocalSender\&amp;quot; /&amp;gt;\r\n&amp;quot;);&lt;br /&gt;        sb.append(&amp;quot;&amp;lt;transport name=\&amp;quot;java\&amp;quot; pivot=\&amp;quot;java:org.apache.axis.transport.java.JavaSender\&amp;quot; /&amp;gt;\r\n&amp;quot;);&lt;br /&gt;        sb.append(&amp;quot;&amp;lt;/deployment&amp;gt;\r\n&amp;quot;);&lt;br /&gt;        org.apache.axis.configuration.XMLStringProvider config = &lt;br /&gt;            new org.apache.axis.configuration.XMLStringProvider(sb.toString());&lt;br /&gt;        return config;&lt;br /&gt;    }  &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then the call to the locator would become:&lt;pre&gt;&lt;br /&gt;        // get access to the web service&lt;br /&gt;        ExampleServiceLocator locator = new ExampleServiceLocator(&lt;span style="font-weight:bold;"&gt;getEngineConfiguration()&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;        &lt;br /&gt;&lt;h2&gt;Step 3: Set the username as &lt;code&gt;DOMAIN\username&lt;/code&gt;&lt;/h2&gt;&lt;br /&gt;Set the username as you did with BASIC authentication but you &lt;span style="font-style:italic;"&gt;must&lt;/span&gt; ensure is set in the form &lt;code&gt;DOMAIN\username&lt;/code&gt; (keeping in mind that if expressing this in java code - as a string - or as a property value in a properties file this would be set as &lt;code&gt;"DOMAIN\\username"&lt;/code&gt; - \\ being the escape sequence for \):&lt;pre&gt;&lt;br /&gt;        ((Stub)example).setUsername(&amp;quot;&lt;span style="font-weight:bold;"&gt;MY_NT_DOMAIN\\&lt;/span&gt;myusername&amp;quot;);&lt;br /&gt;        ((Stub)example).setPassword(&amp;quot;mypassword&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;With the above 3 steps covered you're using NTLM.&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Avoid setting the system property &lt;code&gt;-Djava.ext.dirs&lt;/code&gt; as the above relies on the &lt;code&gt;sunjce_provider.jar&lt;/code&gt; library which is in JRE_HOME\lib\ext by default. Ext-path problems may give you errors such as:&lt;br /&gt;&lt;code&gt;"Cannot find any provider supporting DES/ECB/NoPadding"&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Failing to set the username in the form &lt;code&gt;DOMAIN\username&lt;/code&gt; will result in the error:&lt;pre&gt;org.apache.commons.httpclient.auth.InvalidCredentialsException: &lt;br /&gt;    Credentials cannot be used for NTLM authentication: &lt;br /&gt;        org.apache.commons.httpclient.UsernamePasswordCredentials&lt;br /&gt; at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332)&lt;br /&gt; at org.apache.commons.httpclient.HttpMethodDirector.authenticateHost(HttpMethodDirector.java:282)&lt;br /&gt; at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:234)&lt;br /&gt; at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)&lt;br /&gt; at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)&lt;br /&gt; at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:186)&lt;/pre&gt;This is because the format of the username determines the Credentials instance created. With the &lt;code&gt;DOMAIN\...&lt;/code&gt; prefix on the username you get an instance of &lt;code&gt;org.apache.commons.httpclient.NTCredentials&lt;/code&gt; rather than &lt;code&gt;org.apache.commons.httpclient.UsernamePasswordCredentials&lt;/code&gt; - which as the message explains can't be used for NTLM.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-8155627533647256807?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/8155627533647256807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=8155627533647256807' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8155627533647256807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8155627533647256807'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2011/03/ntlm-from-axis-soap-service-client-in-3.html' title='NTLM from an Axis (SOAP) service client - in 3 steps'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-1965326912515858931</id><published>2011-01-28T08:41:00.010+11:00</published><updated>2011-01-28T09:31:59.599+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Is the IBM DB2 UDB service not running? Can't make JDBC Type 4 connections</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;IBM DB2 v8 UDB Universal Driver TCP/IP which port windows service JDBC Type 4&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Attempting to make a &lt;a href="http://www.ibm.com/developerworks/data/library/techarticle/0203zikopoulos/0203zikopoulos.html#N100E7"&gt;JDBC Type 4&lt;/a&gt; connection (ie pure java talking TCP/IP, no native code) to the DB2 server gives me:&lt;pre&gt;&lt;br /&gt;com.ibm.db2.jcc.b.SqlException: IO Exception opening socket to server &amp;lt;myservername&amp;gt; on port 50000. &lt;br /&gt;The DB2 Server may be down.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The DB2 server (running on Windows) is definitely running. In DB2 "Control Center" the "instance" ("DB2" the default name?) is definitely started. Looking at the local TCP ports being listened via &lt;code&gt;netstat -abno&lt;/code&gt; there's no &lt;code&gt;50000&lt;/code&gt; or anything close. So either the service that accepts the Type-4 JDBC connections (UDB) is not running or it's listening on a different port. How do you check?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;I couldn't find any mention of this in searching (though I did find "&lt;a href="http://www.ibm.com/developerworks/data/library/techarticle/0301chong/0301chong2.html"&gt;DB2 Version 8 Connectivity Cheat Sheet&lt;/a&gt;" which is good reference for DB2 generally), but by accident I stumbled on &lt;span style="font-weight:bold;"&gt;"Setup communications...&lt;/span&gt;" on right clicking the "DB2" instance in DB2 Control Center. From here the rest is straight forward:&lt;ol&gt;&lt;br /&gt;&lt;li&gt;so, right click the "DB2" instance and select &lt;span style="font-weight:bold;"&gt;"Setup communications...&lt;/span&gt;"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;check &lt;span style="font-weight:bold;"&gt;TCP/IP&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;click the &lt;span style="font-weight:bold;"&gt;Properties&lt;/span&gt; button and then just click the &lt;span style="font-weight:bold;"&gt;Default&lt;/span&gt; button to get default values&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Note the port number: &lt;code&gt;50000&lt;/code&gt; by default&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;after clicking OK from the Properties and the communications dialog you'll have to restart the instance&lt;ul&gt;&lt;br /&gt;&lt;li&gt;right click the "DB2" instance and select &lt;span style="font-weight:bold;"&gt;Stop&lt;/span&gt; and then &lt;span style="font-weight:bold;"&gt;Start&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Now when you check the open ports via &lt;code&gt;netstat -abno&lt;/code&gt; you should hopefully see:&lt;pre&gt;&lt;br /&gt;  TCP    0.0.0.0:50000          0.0.0.0:0              LISTENING       3012&lt;br /&gt;  [db2syscs.exe]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To recap the IBM DB2 Universal Driver Type 4 (thin) connection details:&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-weight:bold;"&gt;Driver Class:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;com.ibm.db2.jcc.DB2Driver&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-weight:bold;"&gt;URL:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;jdbc:db2://&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]/&amp;lt;database_name&amp;gt;&lt;/code&gt;&lt;br/&gt;&lt;span style="font-style:italic;"&gt;eg:&lt;/span&gt;&lt;code&gt;jdbc:db2://myservername:50000/MYDATABASE&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-weight:bold;"&gt;Driver Class:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;com.ibm.db2.jcc.DB2Driver&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-weight:bold;"&gt;Jar file(s):&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;db2jcc.jar&lt;/code&gt; &amp;amp; &lt;code&gt;db2jcc_license_cu.jar&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-1965326912515858931?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/1965326912515858931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=1965326912515858931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1965326912515858931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1965326912515858931'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2011/01/is-ibm-db2-udb-service-not-running-cant.html' title='Is the IBM DB2 UDB service not running? Can&apos;t make JDBC Type 4 connections'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-5497163168796722173</id><published>2010-08-18T15:31:00.005+10:00</published><updated>2011-10-13T09:31:53.195+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Type coercion in JSTL - for sql:param</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;jstl sql integer string type coercion postgres serial operator does not exist: bigint = character varying&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;After upgrading from PostgreSQL 8.0 to 8.4 the following JSTL that queries a table by a passed in "ID":&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;sql:query var="examples" dataSource="${exampleDataSource}"&amp;gt;&lt;br /&gt;    select ExampleName as "name"&lt;br /&gt;    from ExampleTable &lt;br /&gt;    where ExampleId = ?&lt;br /&gt;    order by ExampleName ASC&lt;br /&gt;    &amp;lt;sql:param value="${param['ID']}"/&amp;gt;&lt;br /&gt;&amp;lt;/sql:query&amp;gt;&lt;/pre&gt;&lt;br /&gt;Fails with the exception:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;javax.servlet.jsp.JspException:&lt;br /&gt;    select ExampleName as "name"&lt;br /&gt;    from ExampleTable&lt;br /&gt;    where ExampleId = ?&lt;br /&gt;    order by ExampleName ASC&lt;br /&gt;&lt;br /&gt;: ERROR: operator does not exist: bigint = character varying&lt;br /&gt;        at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:220)&lt;br /&gt;        ....&lt;br /&gt;Caused by: java.sql.SQLException: ERROR: operator does not exist: bigint = character varying&lt;br /&gt;        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)&lt;br /&gt;        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)&lt;br /&gt;        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)&lt;br /&gt;        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)&lt;br /&gt;        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330)&lt;br /&gt;        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240)&lt;br /&gt;        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)&lt;br /&gt;        at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:215)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Why are there data type errors all of a sudden? ... and how do you fix it?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;There is normally &lt;a href="http://www.informit.com/articles/article.aspx?p=30946&amp;amp;seqNum=5"&gt;Type Coercion&lt;/a&gt; for EL expressions but it's a bit vague for &lt;code&gt;sql:param&lt;/code&gt;. Ideally it should coerce the param into the type required but this would require knowing the schema &amp;amp; the SQL being executed. So looking at the source for &lt;a href="http://www.docjar.com/html/api/org/apache/taglibs/standard/tag/common/sql/QueryTagSupport.java.html#x295"&gt;QueryTagSupport&lt;/a&gt; it will just call &lt;code&gt;setObject&lt;/code&gt; using the default type that was supplied in the param. &lt;br /&gt;&lt;br /&gt;Contrary to the &lt;a href="http://download.oracle.com/docs/cd/E17802_01/products/products/jsp/jstl/1.1/docs/tlddocs/sql/param.html"&gt;&lt;code&gt;sql:param&lt;/code&gt; documentation&lt;/a&gt; the value does not have to be a &lt;code&gt;String&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;To get the right type into &lt;code&gt;sql:param&lt;/code&gt; use type coercion in EL before the param gets the value. To coerce a &lt;code&gt;String&lt;/code&gt; to &lt;code&gt;Integer&lt;/code&gt;, you could multiply by 1. For example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;sql:query var="examples" dataSource="${exampleDataSource}"&amp;gt;&lt;br /&gt;    select ExampleName as "name"&lt;br /&gt;    from ExampleTable &lt;br /&gt;    where ExampleId = ?&lt;br /&gt;    order by ExampleName ASC&lt;br /&gt;    &amp;lt;sql:param value="${param['ID']&lt;span style="font-weight: bold;"&gt;*1&lt;/span&gt;}"/&amp;gt;&lt;br /&gt;&amp;lt;/sql:query&amp;gt;&lt;/pre&gt;&lt;br /&gt;Or in two steps:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;c:set var="exampleId" value="${param['ID']&lt;span style="font-weight: bold;"&gt;*1&lt;/span&gt;}"/&amp;gt;&lt;br /&gt;&amp;lt;sql:query var="examples" dataSource="${exampleDataSource}"&amp;gt;&lt;br /&gt;    select ExampleName as "name"&lt;br /&gt;    from ExampleTable &lt;br /&gt;    where ExampleId = ?&lt;br /&gt;    order by ExampleName ASC&lt;br /&gt;    &amp;lt;sql:param value="${exampleId}"/&amp;gt;&lt;br /&gt;&amp;lt;/sql:query&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Why did this come up after a PostgreSQL upgrade? It seems something to do with different handling of the &lt;a href="http://www.postgresql.org/docs/8.1/interactive/datatype.html#DATATYPE-SERIAL"&gt;&lt;code&gt;SERIAL&lt;/code&gt;&lt;/a&gt; data type which is now compiled to it's actual representation of &lt;code&gt;integer&lt;/code&gt; with &lt;code&gt;sequence&lt;/code&gt; rather than leaving it as it's "notational convenience" name. Perhaps the PostgreSQL JDBC will coerce a &lt;code&gt;String&lt;/code&gt; to a &lt;code&gt;serial&lt;/code&gt; but not an &lt;code&gt;integer&lt;/code&gt;? &lt;br /&gt;&lt;br /&gt;It's hard to say the above work around is best practice but it will be harmless for databases that handle coercion at the JDBC level and necessary for those that don't.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-5497163168796722173?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/5497163168796722173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=5497163168796722173' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/5497163168796722173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/5497163168796722173'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2010/08/type-coercion-in-jstl-for-sqlparam.html' title='Type coercion in JSTL - for sql:param'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-4526932169378640066</id><published>2010-06-03T11:29:00.007+10:00</published><updated>2011-10-13T09:32:33.412+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='axis'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>Stop AXIS output of anonymous complex types in xsi:type</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;apache axis xsi:type anonymous complex type .NET "No type definition found for the type referenced by the attribute 'xsi:type'"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;The schema definition for a response element may define the complex type "inline" rather than by reference. This is known as an "anonymous type". Eg:&lt;br /&gt;&lt;pre&gt;&amp;lt;xs:element name="MyResponse"&amp;gt;&lt;br /&gt;    &amp;lt;xs:annotation&amp;gt;&lt;br /&gt;        &amp;lt;xs:documentation&amp;gt;This is the root element of the Response.&amp;lt;/xs:documentation&amp;gt;&lt;br /&gt;    &amp;lt;/xs:annotation&amp;gt;&lt;br /&gt;    &amp;lt;xs:complexType&amp;gt;&lt;br /&gt;        &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;            &amp;lt;xs:element name="PropertyOne" type="xs:string" minOccurs="0"/&amp;gt;&lt;br /&gt;            &amp;lt;xs:element name="PropertyTwo" type="xs:string" minOccurs="0"/&amp;gt;&lt;br /&gt;        &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;    &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;&amp;lt;/xs:element&amp;gt;&lt;/pre&gt;&lt;br /&gt;When axis generates the SOAP response &lt;i&gt;(with the default settings)&lt;/i&gt; this includes &lt;code&gt;xsi:type&lt;/code&gt; attributes. Eg:&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" &lt;br /&gt;  xmlns:xsd="http://www.w3.org/2001/XMLSchema" &lt;br /&gt;  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&lt;br /&gt;  &amp;lt;soapenv:Body&amp;gt;&lt;br /&gt;     &amp;lt;MyResponse &lt;span style="color: red;"&gt;xsi:type="ns1:MyResponse"&lt;/span&gt; xmlns="http://example.com/service" xmlns:ns1="http://example.com/service"&amp;gt;&lt;br /&gt;        ...&lt;/pre&gt;&lt;br /&gt;This is accepted by AXIS-generated client code but in .NET (and other schema-validating tools such as XMLSpy) you'll get an error along the lines of &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;No type definition found for the type referenced by the attribute 'xsi:type'='ns1:MyResponse' of element &amp;lt;MyResponse&amp;gt;&lt;/pre&gt;&lt;br /&gt;The error inidicates validation is probably doing the right thing with the &lt;code&gt;xsi:type&lt;/code&gt; attribute and checking it - there is actually no type with this name, it's anonymous. Can the behavour in AXIS be changed?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Thankfully there is a &lt;a href="http://ws.apache.org/axis/java/reference.html#GlobalAxisConfiguration"&gt;configuration setting in AXIS&lt;/a&gt; to stop this output - &lt;code&gt;sendXsiTypes&lt;/code&gt;, which is &lt;code&gt;true&lt;/code&gt; by default:&lt;br /&gt;&lt;pre&gt;&amp;lt;parameter name="&lt;span style="font-weight: bold;"&gt;sendXsiTypes&lt;/span&gt;" value="&lt;span style="font-weight: bold;"&gt;false&lt;/span&gt;"/&amp;gt;&lt;/pre&gt;&lt;br /&gt;There are a number of ways to get this setting in there. I'd recommend creating a wsdd deploy file for just the &lt;code&gt;globalConfiguration&lt;/code&gt; and deploy this to the AXIS AdminServlet as you would do with the deploy.wsdd definitions for the other service(s). &lt;br /&gt;So an example &lt;code&gt;globalConfig-deploy.wsdd&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;deployment xmlns="http://xml.apache.org/axis/wsdd/"&lt;br /&gt;    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"&amp;gt;&lt;br /&gt;    &amp;lt;globalConfiguration&amp;gt;&lt;br /&gt;        ...&lt;br /&gt;        &amp;lt;parameter name="sendXsiTypes" value="false" /&amp;gt;&lt;br /&gt;        ...&lt;br /&gt;    &amp;lt;/globalConfiguration&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;You'll find the MyApp/WEB-INF/server-config.wsdd will then be updated and the SOAP excludes this attribute as advertised:&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" &lt;br /&gt;  xmlns:xsd="http://www.w3.org/2001/XMLSchema" &lt;br /&gt;  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&lt;br /&gt;  &amp;lt;soapenv:Body&amp;gt;&lt;br /&gt;     &amp;lt;MyResponse xmlns="http://example.com/service"&amp;gt;&lt;br /&gt;        ...&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The alternative to this (if you do want the &lt;code&gt;xsi:type&lt;/code&gt; attributes) is to define explicit types for your root response elements. Eg:&lt;br /&gt;&lt;pre&gt;&amp;lt;xs:element name="MyResponse" type="MyResponseType"&amp;gt;&lt;br /&gt;    &amp;lt;xs:annotation&amp;gt;&lt;br /&gt;        &amp;lt;xs:documentation&amp;gt;This is the root element of the Response.&amp;lt;/xs:documentation&amp;gt;&lt;br /&gt;    &amp;lt;/xs:annotation&amp;gt;&lt;br /&gt;&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&amp;lt;xs:complexType name="MyResponseType"&amp;gt;&lt;br /&gt;    &amp;lt;xs:annotation&amp;gt;&lt;br /&gt;        &amp;lt;xs:documentation&amp;gt;This is the type for the root element of the Response.&amp;lt;/xs:documentation&amp;gt;&lt;br /&gt;    &amp;lt;/xs:annotation&amp;gt;&lt;br /&gt;    &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;        &amp;lt;xs:element name="PropertyOne" type="xs:string" minOccurs="0"/&amp;gt;&lt;br /&gt;        &amp;lt;xs:element name="PropertyTwo" type="xs:string" minOccurs="0"/&amp;gt;&lt;br /&gt;    &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;&amp;lt;/xs:complexType&amp;gt;&lt;/pre&gt;&lt;br /&gt;The XML from AXIS will then include &lt;code&gt;xsi:type&lt;/code&gt; but the value will be correct - referencing a type that does exist. Eg:&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" &lt;br /&gt;  xmlns:xsd="http://www.w3.org/2001/XMLSchema" &lt;br /&gt;  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&lt;br /&gt;  &amp;lt;soapenv:Body&amp;gt;&lt;br /&gt;     &amp;lt;MyResponse xsi:type="&lt;span style="color: red;"&gt;ns1:MyResponseType&lt;/span&gt;" xmlns="http://example.com/service" xmlns:ns1="http://example.com/service"&amp;gt;&lt;br /&gt;        ...&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-4526932169378640066?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/4526932169378640066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=4526932169378640066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4526932169378640066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4526932169378640066'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2010/06/stop-axis-output-of-anonymous-complex.html' title='Stop AXIS output of anonymous complex types in xsi:type'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7774926591615233722</id><published>2010-03-03T10:53:00.010+11:00</published><updated>2011-10-13T09:33:20.709+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='no result'/><title type='text'>Enable debug/trace level logging for Tomcat 6 Realms</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;tomcat 6 realm logging juli logging.properties debug="9" debug="99" debug="true" JNDIRealm trace verbose jndi realm JNDIRealm&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Apparently &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/logging.html"&gt;Tomcat 6 Logging&lt;/a&gt; is greatly &lt;span style="font-style: italic;"&gt;improved &lt;/span&gt;... more granularity, flexibility in choosing &lt;code&gt;java.util.logging&lt;/code&gt; or &lt;code&gt;log4j&lt;/code&gt;, etc. This is great, but I'm happy with the default logging - ie if something goes wrong let me get the detail from a log file. &lt;br /&gt;&lt;br /&gt;This attitude hits a snag where things go wrong and there's nothing in the logs - in my case, setup of a &lt;code&gt;com.speedlegal.catalina.realm.JNDIRealm&lt;/code&gt; is not letting me in but there's no details why. It used to be a matter of simply setting &lt;code&gt;debug="9"&lt;/code&gt; on the Realm definition and you have verbose logging - the examples in the &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm"&gt;Tomcat 6 Realm&lt;/a&gt; documentation &lt;span style="font-style: italic;"&gt;still &lt;/span&gt;use this:&lt;br /&gt;&lt;pre&gt;&amp;lt;Realm className="org.apache.catalina.realm.JNDIRealm" &lt;span style="font-weight: bold;"&gt;debug="99"&lt;/span&gt;&lt;br /&gt;    connectionURL="ldap://localhost:389"&lt;br /&gt;    userPattern="uid={0},ou=people,dc=mycompany,dc=com"&lt;br /&gt;    roleBase="ou=groups,dc=mycompany,dc=com"&lt;br /&gt;    roleName="cn"&lt;br /&gt;    roleSearch="(uniqueMember={0})"&lt;br /&gt;/&amp;gt;&lt;/pre&gt;But this has no effect on logging. You'll get a warning telling you as much:&lt;br /&gt;&lt;pre&gt;03/03/2010 10:56:08 AM org.apache.tomcat.util.digester.SetPropertiesRule begin&lt;br /&gt;WARNING: [SetPropertiesRule]{Server/Service/Engine/Realm} Setting property 'debug'&lt;br /&gt; to '99' did not find a matching property.&lt;/pre&gt;What's the &lt;span style="font-style: italic;"&gt;minimum&lt;/span&gt; I have to do to enable debug?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;You have to edit the &lt;code&gt;$CATALINA_HOME/conf/logging.properties&lt;/code&gt; file. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;1. Configure debug logging for Realms and Authentication&lt;/h2&gt;Insert the following lines (in blue):&lt;br /&gt;&lt;pre&gt;############################################################&lt;br /&gt;# Facility specific properties.&lt;br /&gt;# Provides extra control for each logger.&lt;br /&gt;############################################################&lt;br /&gt;&lt;span style="color: blue;"&gt;# This would turn on trace-level for everything&lt;br /&gt;# the possible levels are: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST or ALL&lt;br /&gt;#org.apache.catalina.level = ALL&lt;br /&gt;#org.apache.catalina.handlers = 2localhost.org.apache.juli.FileHandler&lt;br /&gt;org.apache.catalina.realm.level = ALL&lt;br /&gt;org.apache.catalina.realm.useParentHandlers = true&lt;br /&gt;org.apache.catalina.authenticator.level = ALL&lt;br /&gt;org.apache.catalina.authenticator.useParentHandlers = true&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO&lt;br /&gt;org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler&lt;/pre&gt;This will give you debug/trace level logging to console and the file assuming you've kept the default config. But you only see debug in the console, not the &lt;code&gt;catalina.[date yyyy-MM-dd].log&lt;/code&gt; file - in fact, the log file empty? The buffering means the file-logging is only written when the buffer is full. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;2. Disable buffering for FileHandler logging&lt;/h2&gt;(until the issue is resolved of course) Insert the line (in blue):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;1catalina.org.apache.juli.FileHandler.level = FINE&lt;br /&gt;1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs&lt;br /&gt;1catalina.org.apache.juli.FileHandler.prefix = catalina.&lt;br /&gt;&lt;span style="color: blue;"&gt;1catalina.org.apache.juli.FileHandler.bufferSize = -1&lt;/span&gt;&lt;/pre&gt;These two inserts give you pretty much the equivalent of the old &lt;code&gt;debug="9"&lt;/code&gt; and you'll (hopefully) get the verbose information required - happy debugging ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7774926591615233722?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7774926591615233722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7774926591615233722' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7774926591615233722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7774926591615233722'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2010/03/enable-debugtrace-level-logging-for.html' title='Enable debug/trace level logging for Tomcat 6 Realms'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7562095849649064673</id><published>2010-02-18T16:01:00.002+11:00</published><updated>2010-02-18T16:17:27.999+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xerces'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='JSE'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Configure endorsed libraries in Tomcat 6</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;Tomcat 6 endorsed java.endorsed.dirs Endorsed Standards Override Mechanism XML libraries xerces&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;If your webapp needs its own XML libraries (xerces in particular) how do you get Tomcat 6 to use this and not the JAXP APIs packaged into the JSE? This used to be as simple as dropping them into &lt;code&gt;${CATALINA_BASE}/common/endorsed&lt;/code&gt; but there's only a &lt;code&gt;${CATALINA_BASE}/lib&lt;/code&gt; folder ...&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Thankfully found the solution in &lt;a href="http://blog.seba3y.com/2007/06/tomcat-6-and-endorsed-dirs.html#c8486671050922196221"&gt;this blog &lt;span style="font-style:italic;"&gt;(and comments)&lt;/span&gt;&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Simply, &lt;span style="font-weight:bold;"&gt;create &lt;/span&gt;a &lt;code&gt;${CATALINA_BASE}/endorsed&lt;/code&gt; folder and drop the jar files in there. Tomcat will be setup to use this if it exists. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;No explicit mention of this in &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html"&gt;Tomcat 6 Class Loader&lt;/a&gt; notes&lt;br /&gt;&lt;br /&gt;It does note the &lt;code&gt;-Djava.endorsed.dirs&lt;/code&gt; system property is set but you need to check &lt;code&gt;setclasspath.[bat|sh]&lt;/code&gt; for when it's set and what it's set to by default - ie &lt;code&gt;${CATALINA_BASE}/endorsed&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7562095849649064673?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7562095849649064673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7562095849649064673' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7562095849649064673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7562095849649064673'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2010/02/configure-endorsed-libraries-in-tomcat.html' title='Configure endorsed libraries in Tomcat 6'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7830454087657093824</id><published>2010-02-04T16:02:00.008+11:00</published><updated>2010-02-04T16:34:02.417+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>HSQL random function - calling scalar functions via JDBC</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;HSQL JDBC select random scalar built-in function rand fn&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;I want to demstrate database interaction but the data doesn't really matter in this case. HSQL is ideal because you can set a connection to in-memory database .. but there's no data. Random would do, is there a random function in HSQL? Where is the function reference? Is it called rand(), random() or other?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Short answer is it's called "&lt;code&gt;rand&lt;/code&gt;". So the SQL would be:&lt;pre&gt;CALL rand()&lt;/pre&gt;With JDBC this is:&lt;pre&gt;PreparedStatement stmt = connection.prepareStatement("CALL rand()");&lt;br /&gt;stmt.execute();&lt;/pre&gt;... and I can't find a complete function reference for HSQL.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Digging a bit further there is JDBC convention for calling scalar/built-in function in a vendor independent way - See &lt;a href="http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC2012"&gt;JDBC 2.0: Escape Syntax and Scalar Functions&lt;/a&gt;. This involves the use of the "fn" keyword and braces - so the syntax is:&lt;pre&gt;{fn &lt;span style="font-style:italic;"&gt;&amp;lt;function()&amp;gt;&lt;/span&gt;}&lt;/pre&gt;Whether the JDBC driver recognises the syntax and maps it correctly to the underlying function ("rand" is called "random" in postgres for example) is up to the vendor. I can confirm that HSQL seems to handle most numeric, string and date functions (as mentioned above, can't find doco for this. The derby &lt;a href="http://db.apache.org/derby/docs/10.5/ref/rrefjdbc88908.html"&gt;JDBC function reference&lt;/a&gt; is a reasonably good overview). So the vendor agnostic random call becomes:&lt;pre&gt;PreparedStatement stmt = connection.prepareStatement("CALL {fn rand()}");&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;What I could find was documentation of HSQL &lt;a href="http://hsqldb.sourceforge.net/web/hsqlFAQ.html#STORED"&gt;"Java Stored Procedures"&lt;/a&gt;. This effectively lets you call any public static java method (from a class in the classpath) right there in the SQL statement. So, yet another (non-JDBC standard) way of making the random call would be:&lt;pre&gt;CALL "java.lang.Math.random"()&lt;/pre&gt;... or doing more work in the SQL:&lt;pre&gt;CALL "java.lang.Math.floor"("java.lang.Math.random"() * 100)&lt;/pre&gt;Pretty cool, I must think of a use for this :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7830454087657093824?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7830454087657093824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7830454087657093824' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7830454087657093824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7830454087657093824'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2010/02/hsql-random-function-calling-scalar.html' title='HSQL random function - calling scalar functions via JDBC'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-4837391346367383736</id><published>2009-09-08T17:29:00.003+10:00</published><updated>2009-09-08T17:51:51.987+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Is Eclipse deleting XML resources from my build path?</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;eclipse 3.4.0 ganymede FileNotFoundException xml properties build classpath filtered resources deleted excluded "class path resource cannot be resolved"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;I have a project where configuration resources (mostly hibernate - hibernate.cfg.xml &amp; *.hbm.xml) exist in the same folders as the java source and it's expected that these are copied to the build output so they can be loaded from the classpath. &lt;br /&gt;&lt;br /&gt;It seems eclipse is "cleaning up" the XML files from the build output folder. Check the include/exclude settings on the project and &lt;code&gt;Included&lt;/code&gt; is set to &lt;code&gt;(All)&lt;/code&gt;. Adding *.xml explicitly to the included list makes no difference. &lt;br /&gt;&lt;br /&gt;Out of curiosity, manually copying an XML file to the build output folder and refreshing the project causes the XML to be deleted. Why?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;I'm not sure if it was an update or plugin that caused this, but the problem is with the &lt;span style="font-style:italic;"&gt;Filtered Resources&lt;/span&gt; setting. &lt;br /&gt;&lt;br /&gt;In &lt;span style="font-weight:bold;"&gt;Window -&gt; Preferences&lt;/span&gt;:&lt;br /&gt;go to: &lt;span style="font-weight:bold;"&gt;Java &gt; Compiler &gt; Building&lt;/span&gt;&lt;br /&gt;in &lt;span style="font-weight:bold;"&gt;Output folder&lt;/span&gt; section:&lt;ul&gt;&lt;li&gt;check the &lt;span style="font-weight:bold;"&gt;Filtered resources&lt;/span&gt; value&lt;/li&gt;&lt;li&gt;if *.xml is in the comma separated list, this is the cause. &lt;br /&gt;Remove from the list and allow the Project rebuild.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;As mentioned, even if you explicitly add *.xml to be included in your Project settings the above global setting will cause it to be excluded.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-4837391346367383736?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/4837391346367383736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=4837391346367383736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4837391346367383736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4837391346367383736'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2009/09/is-eclipse-deleting-xml-resources-from.html' title='Is Eclipse deleting XML resources from my build path?'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-3471006754906336195</id><published>2009-06-19T17:08:00.004+10:00</published><updated>2009-06-19T17:27:45.882+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>JSTL formatNumber as percentage gets invalid attribute error</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;fmt:formatNumber &amp;lt;formatNumber&amp;gt; invalid type attribute: "percentage" percent&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;The &lt;a href="http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fmt/formatNumber.html"&gt;JSTL Tag Library documentation&lt;/a&gt; seems to indicate that to format a number as a percentage you'd use:&lt;pre&gt;&lt;br /&gt;&amp;lt;fmt:formatNumber type="&lt;span style="font-weight:bold;"&gt;percentage&lt;/span&gt;" value="0.5"/&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This gives the error message &lt;br /&gt;&lt;code&gt;&amp;lt;formatNumber&amp;gt;, invalid type attribute: "percentage"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Although the documentation for type says "Specifies whether the value is to be formatted as number, currency, or percentage" these &lt;span style="font-style:italic;"&gt;aren't&lt;/span&gt; the possible values - it's "percent" for percentage:&lt;pre&gt;&lt;br /&gt;&amp;lt;fmt:formatNumber type="&lt;span style="font-weight:bold;"&gt;percent&lt;/span&gt;" value="0.5"/&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;If you know a &lt;span style="font-style:italic;"&gt;good &lt;/span&gt;reference for JSTL I'd like to know ... &lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.manning-source.com/books/bayern/bayern_apxA.pdf"&gt;Appendix A&lt;/a&gt; from &lt;a href="http://www.manning.com/bayern/index.html"&gt;JSTL in Action&lt;/a&gt; is not bad - it documents possible values for formatNumber type at least.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-3471006754906336195?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/3471006754906336195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=3471006754906336195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/3471006754906336195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/3471006754906336195'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2009/06/jstl-formatnumber-as-percentage-gets.html' title='JSTL formatNumber as percentage gets invalid attribute error'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-8049735692620342402</id><published>2009-06-16T10:46:00.008+10:00</published><updated>2011-10-13T09:35:52.190+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>Eclipse build errors - java.lang.object cannot be resolved</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;eclipse 3.4.0 ganymede The type java.lang.object "cannot be resolved" "Cannot find the class file" "refers to the missing type"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Opened eclipse, it needed to do a full workspace build (probably because ant scripts have updated class files and it needs to refresh). Random classes in the project now no longer compile. Examples of the errors being reported:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Resource&lt;/th&gt;&lt;th&gt;Path&lt;/th&gt;&lt;th&gt;Location&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;code&gt;The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;MyClass.java&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;MyProject/src/com/example&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;line 1&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;Java Problem&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;code&gt;The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;MyProject&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;Unknown&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;Java Problem&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;code&gt;The method myMethod(SomeClass) from the type MyOtherClass refers to the missing type (insert java type here: InputStream|File|Vector|IOException|etc)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;MyOtherClass.java&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;MyProject/src/com/example&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;line 123&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;Java Problem&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;It sounds like this &lt;span style="font-style: italic;"&gt;has been&lt;/span&gt; a known issue (Bug &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67414"&gt;67414&lt;/a&gt;)that was resolved in 3.0 ... someone has commented that it's occurring for them in 3.4 as well. &lt;br /&gt;&lt;br /&gt;In the mean time, the work around is to remove the JRE System Library from the project and then add it back again. &lt;br /&gt;Here are the steps:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Go to properties of project with the build error (right click &amp;gt; Properties)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;View the "Libraries" tab in the "Build Path" section&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Find the "JRE System Library" in the list (if this is missing then this error message is not an eclipse bug but a mis-configured project)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Remove&lt;/span&gt; the "JRE System Library"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Hit "Add Library ...", Select "JRE System Library" and add the appropriate JRE for the project (eg. 'Workspace default JRE')&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Hopefully&lt;/span&gt; the error will be resolved ... &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-8049735692620342402?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/8049735692620342402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=8049735692620342402' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8049735692620342402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8049735692620342402'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2009/06/eclipse-build-errors-javalangobject.html' title='Eclipse build errors - java.lang.object cannot be resolved'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-2865550753914623249</id><published>2009-05-08T12:33:00.004+10:00</published><updated>2009-05-08T13:44:26.967+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><title type='text'>Javascript history.back() not working for iframes in Firefox</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;javascript history frame iframe go(-1) back firefox 3 top self&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;You can get a hyperlink to behave as a "back" with a bit of javascript:&lt;pre&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;javascript:history.back()&amp;quot;&amp;gt;back&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or (saying go back one place in the history - equivalent to the above):&lt;pre&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;javascript:history.go(-1)&amp;quot;&amp;gt;back&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This works fine in all browsers when the page is in the main-view. If this javascript is encountered in an iframe you expect that you get the previous page that was loaded in that iframe. In firefox 3+ you're taken back in the main view page not the iframe - a nuisance if there's a detailed browsing history in the iframe view. Why does it work fine in other browsers and previous versions of firefox? &lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;I don't know why, but it seems that in firefox 3+ when you say &lt;code&gt;history&lt;/code&gt; this becomes implicitly &lt;code&gt;top.history&lt;/code&gt;. Someone has tried to raise this with mozilla with not much luck - &lt;a href="http://forums.mozillazine.org/viewtopic.php?f=25&amp;t=899315&amp;start=0&amp;st=0&amp;sk=t&amp;sd=a"&gt;javascript:history.back() and Firefox 3.0.1 and iframes&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The solution is to be explicit about which frame you want to navigate back with. If you just want all browsers to behave the same then &lt;code&gt;self&lt;/code&gt; refers to the frame the user is clicking in (therefore in other browsers &lt;code&gt;history&lt;/code&gt; is implicitly &lt;code&gt;self.history&lt;/code&gt;). So the go-back hyperlink becomes: &lt;pre&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;javascript:self.history.back()&amp;quot;&amp;gt;back&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or:&lt;pre&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;javascript:self.history.go(-1)&amp;quot;&amp;gt;back&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will behave the same regardless of if the page is loaded in the main-view or in an frame/iframe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-2865550753914623249?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/2865550753914623249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=2865550753914623249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2865550753914623249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2865550753914623249'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2009/05/javascript-historyback-not-working-for.html' title='Javascript history.back() not working for iframes in Firefox'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-8423808448790194437</id><published>2009-04-08T14:25:00.008+10:00</published><updated>2011-10-13T09:37:04.877+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='ie'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='servlets'/><title type='text'>IE8 Compatibility Issues and working around them for HTML, Java and GWT</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;IE8 compatibility X-UA-Compatible java filter http-equiv GWT "links not working" broken EmulateIE7 compliance&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;You're either certain your website/webapp is broken in IE8 or suspect it might be. What can you do?&lt;br /&gt;&lt;br /&gt;For browsers such as firefox and IE7, you used the DOCTYPE switch to indicate if it should treat your page as being in "standards" mode or "quirks" mode. As discussed on &lt;a href="http://alistapart.com/articles/beyonddoctype"&gt;A List Apart&lt;/a&gt; "standards" is open to interpretation and even if the page didn't fully comply with the standard it referenced, it could expect the browser to have a reasonable crack at letting it work. &lt;br /&gt;&lt;br /&gt;Not any more. IE8 renders &lt;span style="font-style: italic;"&gt;all&lt;/span&gt; pages in standards mode by default and it's interpretation is as far as I can tell, stricter than any other browser. In this mode, many HTML, CSS and javascript/DOM elements (that were introduced by older versions IE! - and in some cases understood by other browsers such as firefox) are not just deprecated, they're completely not there - meaning any reference to them will in most cases stop the page/application working in the browser. When this happens, the page layout may be askew, links may stop working and miscellaneous javascript errors will be flagged in the status bar.&lt;br /&gt;&lt;br /&gt;If you're not sure if your webpage/webapp is strictly standards compliant, it most probably isn't. &lt;br /&gt;&lt;br /&gt;GWT is effected - see &lt;a href="http://www.mooreds.com/wordpress/archives/000513"&gt;Dan Moore's post&lt;/a&gt; and &lt;a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=3329"&gt;GWT Issue #3329&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;IE8 users can make broken pages work again by opting-out of the "most strict" standards treatment on a site-by-site basis using the "Compatibility View" button but you can save them the trouble by using a &lt;span style="font-style: italic;"&gt;new&lt;/span&gt; http-header tag &lt;code&gt;X-UA-Compatible&lt;/code&gt;. &lt;br /&gt;&lt;br /&gt;The A List Apart article above describes the merits of being able to target specific versions (and the comments seem to mostly disagree :) but in the majority of cases I imagine you just want the page to be treated the way IE7 did - "standards" mode (with "flexibility") for pages that require it and "quirks" mode for all others. So use the &lt;a href="http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx"&gt;"IE=EmulateIE7"&lt;/a&gt; value by either:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;making the server side code add this http header to every response&lt;br /&gt;&lt;pre&gt;X-UA-Compatible: IE=EmulateIE7&lt;/pre&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;or add the following meta tag to the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element of the page (which is essentially the &lt;a href="http://www.w3schools.com/TAGS/att_meta_http_equiv.asp"&gt;equivalent&lt;/a&gt; to setting values on the http response)&lt;pre&gt;&lt;br /&gt;&amp;lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;You can cover the entire java web application by defining a filter as documented by &lt;a href="http://cse-mjmcl.cse.bris.ac.uk/blog/2008/06/12/1213260442881.html"&gt;Mark McLaren&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    public void doFilter(ServletRequest request, &lt;br /&gt;                         ServletResponse response, &lt;br /&gt;                         FilterChain chain)&lt;br /&gt;            throws IOException, ServletException {&lt;br /&gt;        if (response instanceof HttpServletResponse) {&lt;br /&gt;            ((HttpServletResponse) response).setHeader("&lt;span style="font-weight: bold;"&gt;X-UA-Compatible&lt;/span&gt;", "&lt;span style="font-weight: bold;"&gt;IE=EmulateIE7&lt;/span&gt;");&lt;br /&gt;        }&lt;br /&gt;        chain.doFilter(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Apache hosted sites can be covered by using &lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_headers.html"&gt;mod_headers&lt;/a&gt;. For example, assuming you have the module loaded, add the following to the httpd.conf file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Header add &lt;span style="font-weight: bold;"&gt;X-UA-Compatible&lt;/span&gt; "&lt;span style="font-weight: bold;"&gt;IE=EmulateIE7&lt;/span&gt;" &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Having trouble installing the release version of IE8? &lt;span style="font-style: italic;"&gt;(for goodness sake, just &lt;a href="http://www.mozilla.com/firefox/"&gt;get firefox&lt;/a&gt; :)&lt;/span&gt; But, if you really do want to get it working for yourself see &lt;a href="http://www.alanjlee.com/?p=200"&gt;Internet Explorer 8 is not supported on this operating system&lt;/a&gt; for a discussion of common issues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-8423808448790194437?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/8423808448790194437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=8423808448790194437' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8423808448790194437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8423808448790194437'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2009/04/ie8-compatibility-issues-and-working.html' title='IE8 Compatibility Issues and working around them for HTML, Java and GWT'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7513292189969449140</id><published>2009-02-13T14:32:00.004+11:00</published><updated>2011-10-13T09:37:39.695+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xalan'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='no result'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>XSLT output is missing the doctype</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;xslt identity transform missing doctype Document Type java DOM &lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Running an XSLT &lt;a href="http://en.wikipedia.org/wiki/Identity_transform"&gt;'identity transform'&lt;/a&gt; I would expect the XML data out to be &lt;span style="font-style: italic;"&gt;identical &lt;/span&gt;to the data in ... it almost is, but it's missing the doctype declaration. &lt;br /&gt;Can you tell the XSTL to keep the doctype in?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Apparently not ... I can't find a good reference for this, but it seems that the spec (or at least xalan) is a bit vague on how this should be handled. Proposed work-arounds seem to be hard-coding the doctype in the &lt;code&gt;&amp;lt;xsl:output&amp;gt;&lt;/code&gt; element (if outputting to xml) or hiding the doctype in the XSLT via &lt;code&gt;&amp;lt;xsl:text disable-output-escaping="yes"&amp;gt;&lt;/code&gt;. &lt;br /&gt;&lt;br /&gt;If you want to make the inclusion of the doctype generic there's no pure XSTL solution - you can add it after the transform, but even that is not straightforward using pure java DOM elements ... here is the code: &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    // assuming there's an inputDocument&lt;br /&gt;    TransformerFactory factory = TransformerFactory.newInstance();&lt;br /&gt;    StreamSource stylesheet = new StreamSource(stylesheetData);&lt;br /&gt;&lt;br /&gt;    DOMSource source = new DOMSource(inputDocument);&lt;br /&gt;    DOMResult result = new DOMResult();&lt;br /&gt;&lt;br /&gt;    Transformer transformer = factory.newTransformer(stylesheet);&lt;br /&gt;    transformer.transform(source, result);&lt;br /&gt;&lt;br /&gt;    Document outputDocument = (Document)result.getNode();&lt;br /&gt;    if (inputDocument.getDoctype() != null) {&lt;br /&gt;        DocumentType inputDocType = inputDocument.getDoctype();&lt;br /&gt;        &lt;br /&gt;        // you can't importNode for DocumentType nodes but you can create &lt;br /&gt;        // them via DOMImplementation from there insert is easy&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;        DOMImplementation domImpl = outputDocument.getImplementation();&lt;br /&gt;        DocumentType outputDocType = domImpl.createDocumentType(&lt;br /&gt;              inputDocType.getName()&lt;br /&gt;            , inputDocType.getPublicId()&lt;br /&gt;            , inputDocType.getSystemId());&lt;br /&gt;        outputDocument.insertBefore(outputDocType, outputDocument.getDocumentElement());&lt;/span&gt;&lt;br /&gt;    } &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;It's interesting that this code is not allowed:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    DocumentType outputDocType = (DocumentType) outputDocument.&lt;span style="color: red;"&gt;importNode(inputDocType, true /*deep*/);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It seems &lt;code&gt;DocumentType&lt;/code&gt; is a special element that can't be imported. &lt;br /&gt;&lt;br /&gt;It's also interesting there's no method straight on the document:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    DocumentType outputDocType = outputDocument.&lt;span style="color: red;"&gt;createDocumentType(...);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The only way to get this kind of element is to obtain the special &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/DOMImplementation.html"&gt;&lt;code&gt;DOMImplementation&lt;/code&gt;&lt;/a&gt; object via the &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html#getImplementation()"&gt;&lt;code&gt;Document.getImplementation()&lt;/code&gt;&lt;/a&gt; method. &lt;br /&gt;&lt;br /&gt;Quirks with the implementation? I've looked at this issue too long already to bother to find out why :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7513292189969449140?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7513292189969449140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7513292189969449140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7513292189969449140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7513292189969449140'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2009/02/xslt-output-is-missing-doctype.html' title='XSLT output is missing the doctype'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-4107717215677965447</id><published>2009-01-16T10:27:00.003+11:00</published><updated>2011-10-13T09:39:36.681+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='webkit'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='post'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>GWT Button acts as a submit in WebKit browsers</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;HTML button element form WebKit Chrome Safari iPhone&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;In WebKit browsers, the &lt;code&gt;Button&lt;/code&gt; widget in a GWT application seems to always act as a submit, regardless of event sinking (via &lt;code&gt;ClickListener&lt;/code&gt;) behaviour added to it.&lt;br /&gt;&lt;br /&gt;In Firefox (and IE!) the button works fine - that is the 'onclick' behaviour added to the widget via the GWT listening architecture is executed and the page is not submitted.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;A clue to the solution is in the code for the GWT Button (thank goodness for source code - see &lt;code&gt;Button.adjustType(Element button)&lt;/code&gt;). &lt;br /&gt;&lt;br /&gt;It seems to be a work around for Firefox. The W3C spec states that the default value for button type is 'submit'. Firefox does this explicitly in the DOM and when detected, this is fixed by the GWT JSNI (JavaScript Native Interface) code. &lt;br /&gt;&lt;br /&gt;It would seem that for WebKit browsers this default is enforced but not made explicit in the DOM so this GWT snippet does not get a chance to resolve the issue. The work around is to always be explicit about the button type (as recommended in &lt;a href="http://www.w3schools.com/tags/tag_button.asp"&gt;W3Schoools&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;You do this in GWT as follows:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;     Button b = new Button("&lt;b&gt;click here&lt;/b&gt;");&lt;br /&gt;     DOM.setElementAttribute(b.getElement(), "type", "button");&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-4107717215677965447?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/4107717215677965447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=4107717215677965447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4107717215677965447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4107717215677965447'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2009/01/gwt-button-acts-as-submit-in-webkit.html' title='GWT Button acts as a submit in WebKit browsers'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-8468529754999439347</id><published>2008-10-17T16:44:00.005+11:00</published><updated>2011-10-13T09:40:08.434+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='servlets'/><title type='text'>Redirect from a JSP page (to another server)</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;best practice tips JSP redirect XML&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;&amp;lt;jsp:forward&amp;gt; is not for redirecting to an external server (and the address you forward to will have access the request attributes and parameters, which may be desirable, see discussion here: &lt;a href="http://www.theserverside.com/discussions/thread.tss?thread_id=2472"&gt;when to use response redirect and jsp forward&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Is using &lt;code&gt;response.sendRedirect(...)&lt;/code&gt; ok/best-practice?&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The short answer, is it's fine. In summary, there are four approaches I can think of:&lt;br /&gt;&lt;h3&gt;Approach #1: Scriptlet to sendRedirect&lt;/h3&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;    response.sendRedirect("http://www.example.com");&lt;br /&gt;%&amp;gt;&lt;/pre&gt;&lt;br /&gt;This has worked since the introduction of JSPs (see: &lt;a href="http://www.exampledepot.com/egs/javax.servlet.jsp/redirect.html"&gt;Implementing a Redirect in a JSP Page&lt;/a&gt;) ... sometimes you need the servlet API in your JSP page either because there's other content (eg HTML) that makes it reasonable not to be a pure servlet. Other times it's just convenient to have a text file compiled on the fly. &lt;br /&gt;&lt;br /&gt;Though there are &lt;span style="font-style: italic;"&gt;many &lt;/span&gt;that would disagree (Sciptlet snobs? see &lt;a href="http://www.daniweb.com/forums/thread69968.html"&gt;How to redirect a page in JSP&lt;/a&gt; - I don't see why you'd get wound up about scriptlets.  Why would you write a servlet when one line of code in a text file gives you the same result?). &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Approach #2: Use Apache JSTL and the c:redirect tag&lt;/h3&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;c:redirect url="http://www.example.com"/&amp;gt;&lt;/pre&gt;&lt;br /&gt;or scriptlets again:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;c:redirect url="&amp;lt;%=scriptlet logic%&amp;gt;"/&amp;gt;&lt;/pre&gt;&lt;br /&gt;Sure, it's 'pure' XML but you'll need the &lt;code&gt;taglib&lt;/code&gt; definition in the JSP file and include the JSTL jars in your web application - as discussed in the &lt;a href="http://dev-answers.blogspot.com/2006/12/according-to-tld-or-attribute.html#specs"&gt;notes for a previous post&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Approach #3: Refresh meta tag&lt;/h3&gt;&lt;br /&gt;You could get the JSP to produce a HTML page that contains the Refresh meta tag.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;meta http-equiv="Refresh" content="0; url=http://www.example.com/"&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;Where 0 is the delay in seconds. If more than zero, you'd probably want to put some text on the page to explain what's happening. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Approach #4: Javascript&lt;/h3&gt;&lt;br /&gt;As above, you could get the JSP to produce a HTML page that contains javascript to perform the redirect.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;window.location = "http://www.example.com/";&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;You could use setTimeout to get the redirect to happen after a period of milliseconds. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Out of curiosity I checked TCP monitor for what the browser is actually receiving when you use Approach #1 or #2 (sendRedirect or c:redirect)&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;HTTP/1.1 302 Moved Temporarily&lt;br /&gt;Location: http://www.example.com&lt;/pre&gt;&lt;br /&gt;So it saves you from 2 lines of servlet (or scriptlet) code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;response.setStatus(302);&lt;br /&gt;response.setHeader("Location", "http://www.example.com");&lt;/pre&gt;&lt;br /&gt;So the difference to Approaches #3 &amp;amp; #4 isn't great or much more inefficient really, in all cases it's up to the browser to go to the specified address.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-8468529754999439347?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/8468529754999439347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=8468529754999439347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8468529754999439347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8468529754999439347'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2008/10/redirect-from-jsp-page-to-another.html' title='Redirect from a JSP page (to another server)'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-4957886989368910944</id><published>2008-10-10T12:02:00.003+11:00</published><updated>2011-10-13T09:40:40.260+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Comments in JSON</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;comments JSON javascript&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Can you have comments in JSON? &lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;A discussion leading to the answer is on the &lt;a href="http://bytes.com/forum/thread641975.html"&gt;Bytes IT forum&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Basically, though it's not defined in the JSON Grammar - on &lt;a href="http://www.json.org/"&gt;json.org&lt;/a&gt; - you can use slash-star /* ... */ comments to get most(?) javascript engines to ignore the comment text. &lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;    var nested_arrays = {&lt;br /&gt;        cities: [&lt;br /&gt;            ["Sydney", "Melbourne", "Canberra"]  &lt;span style="font-weight: bold;"&gt;/* Australia */&lt;/span&gt;&lt;br /&gt;          , ["London", "Birmingham"]             &lt;span style="font-weight: bold;"&gt;/* UK */&lt;/span&gt;&lt;br /&gt;          , ["Los Angeles", "New York"]          &lt;span style="font-weight: bold;"&gt;/* US */&lt;/span&gt;&lt;br /&gt;        ]&lt;br /&gt;    };&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-4957886989368910944?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/4957886989368910944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=4957886989368910944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4957886989368910944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4957886989368910944'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2008/10/comments-in-json.html' title='Comments in JSON'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-5085008349823623337</id><published>2008-08-15T08:52:00.003+10:00</published><updated>2011-10-13T09:41:04.151+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>How do you remove a windows service?</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;manually remove windows service registry sc&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;OK, I've uninstalled some software but it's left a service definition. It can't do much harm as most (but not all) of the resources it needs have been removed ... but I can't ignore it - how do you get rid of it?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note to self:&lt;/span&gt; before uninstalling software with services it may help to stop them all and possibly disable them all too? I think this is why this particular thing could not be removed. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note to developers:&lt;/span&gt; stop and remove services as part of uninstall programs.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Some solutions talk about using &lt;code&gt;regedit&lt;/code&gt; and modifying:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;A better approach is to use &lt;code&gt;sc&lt;/code&gt; ".. a command line program used for communicating with the Service Control Manager and services".&lt;br /&gt;&lt;br /&gt;It should be as simple as:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sc delete [service name]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But the tricky thing is getting the name of the service right. What you see in the Service window is the &lt;span style="font-weight: bold;"&gt;display name&lt;/span&gt; not the &lt;span style="font-weight: bold;"&gt;service name&lt;/span&gt;. Use:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sc query state= all&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To get a listing like&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;...&lt;br /&gt;SERVICE_NAME: &lt;span style="font-weight: bold;"&gt;ExampleService&lt;/span&gt;&lt;br /&gt;DISPLAY_NAME: Example Service That I Want To Delete&lt;br /&gt;        TYPE               : 10  WIN32_OWN_PROCESS&lt;br /&gt;        STATE              : 1  STOPPED&lt;br /&gt;                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))&lt;br /&gt;        WIN32_EXIT_CODE    : 1077  (0x435)&lt;br /&gt;        SERVICE_EXIT_CODE  : 0  (0x0)&lt;br /&gt;        CHECKPOINT         : 0x0&lt;br /&gt;        WAIT_HINT          : 0x0&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;SERVICE_NAME: &lt;span style="font-weight: bold;"&gt;helpsvc&lt;/span&gt;&lt;br /&gt;DISPLAY_NAME: Help and Support&lt;br /&gt;        TYPE               : 20  WIN32_SHARE_PROCESS&lt;br /&gt;        STATE              : 4  RUNNING&lt;br /&gt;                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))&lt;br /&gt;        WIN32_EXIT_CODE    : 0  (0x0)&lt;br /&gt;        SERVICE_EXIT_CODE  : 0  (0x0)&lt;br /&gt;        CHECKPOINT         : 0x0&lt;br /&gt;        WAIT_HINT          : 0x0&lt;br /&gt;&lt;br /&gt;...&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So the above example listing:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sc delete &lt;span style="font-weight: bold;"&gt;ExampleService&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Just type &lt;code&gt;sc&lt;/code&gt; at the command prompt for usage and more example commands (hit y to get help for the &lt;code&gt;sc query&lt;/code&gt; commands).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-5085008349823623337?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/5085008349823623337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=5085008349823623337' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/5085008349823623337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/5085008349823623337'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2008/08/how-do-you-remove-windows-service.html' title='How do you remove a windows service?'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-837940022232564505</id><published>2008-06-18T16:26:00.002+10:00</published><updated>2011-10-13T09:42:41.048+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HTTP'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='servlets'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>HTTP Status 405 - HTTP method POST is not supported by this URL</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;HTTP Status 405 - HTTP method POST is not supported by this URL form login tomcat&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;What does this error mean when reported by tomcat? &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;u&gt;HTTP Status 405 - HTTP method POST is not supported by this URL&lt;/u&gt;&lt;br /&gt;Status report&lt;br /&gt;&lt;br /&gt;HTTP method POST is not supported by this URL&lt;br /&gt;&lt;br /&gt;The specified HTTP method is not allowed for the requested resource (HTTP method POST is not supported by this URL).&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Simple answer: your servlet needs to implement &lt;code&gt;doPost(HttpServletRequest, HttpServletResponse)&lt;/code&gt;. Your servlet probably already implements doGet() so if you don't care about implementing different logic for POST, then just get it to call doGet():&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public void doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;                throws ServletException, IOException {&lt;br /&gt;        // same logic&lt;br /&gt;        this.doGet(request, response);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;It's a bit confusing if the servlet is a login form. GET should be returning the login form, POST from this form is handled by j_security_check. &lt;span style="font-style: italic;"&gt;But &lt;/span&gt;if the client's initial request was a POST then the login servlet just needs to implement doPost() to keep the servlet container happy (calling doGet() as mentioned above is fine). &lt;br /&gt;&lt;br /&gt;It seems that the servlet container (tomcat at least) makes sure the data from the original POST is not lost once the user gets past the j_security_check: &lt;a href="http://www.nabble.com/Re%3A-post-data-lost-when-redirecting-from-http-to-https-p15805144.html"&gt;Tomcat - User - [is] post data lost when redirecting&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-837940022232564505?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/837940022232564505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=837940022232564505' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/837940022232564505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/837940022232564505'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2008/06/http-status-405-http-method-post-is-not.html' title='HTTP Status 405 - HTTP method POST is not supported by this URL'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-3406962848366531785</id><published>2008-05-13T13:27:00.003+10:00</published><updated>2011-10-13T09:43:06.421+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTTP'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><title type='text'>get/decode/unescape parameters from URL using Javascript</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;GET decode unescape request parameter param URL javascript &lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;You need to get at the (GET) parameters in the URL of the window with some client-slide javascript. There's no built in mechanism to access these by name in an unencoded way so it would seem you have to parse the window location ... this must have been done by some one before. &lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Found two good blogs that discuss this:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.netlobo.com/url_query_string_javascript.html"&gt;Get URL Parameters Using Javascript&lt;/a&gt; - uses regular expressions&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://webborg.blogspot.com/2007/07/querystring-get-parameters-from-url.html"&gt;Get parameters from URL with JavaScript&lt;/a&gt; - uses substrings from the location.search (ie the query portion of the URL)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;I found the second approach easier to read, but both miss unescaping the parameter value once obtained ... there's a built in function for that. So here's what I've used:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;/*&lt;br /&gt; * Retrieves the query parameter with the given parameter name or empty &lt;br /&gt; * string if not defined&lt;br /&gt; * &lt;br /&gt; * @param parameter name of the parameter to retrieve&lt;br /&gt; */&lt;br /&gt;function queryParam(parameter) {&lt;br /&gt;    var searchString = top.location.search;&lt;br /&gt;    searchString = searchString.substring(1);// ommit the leading '?'&lt;br /&gt;&lt;br /&gt;    var paramValue = '';&lt;br /&gt;    var params = searchString.split('&amp;amp;');&lt;br /&gt;    for (i=0; i&amp;lt;params.length;i++) {&lt;br /&gt;        var paramPair = params[i];&lt;br /&gt;        var eqlIndex = paramPair.indexOf('=');&lt;br /&gt;        var paramName = paramPair.substring(0,eqlIndex);&lt;br /&gt;        &lt;br /&gt;        if (paramName == parameter) {&lt;br /&gt;            paramValue = unescape(paramPair.substring(eqlIndex+1));&lt;br /&gt;            return paramValue;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    return paramValue;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So from a URL &lt;code&gt;http://www.example.com/formprocess?name=Fred%20Bloggs&amp;amp;date=01%2f01%2f2008&lt;/code&gt;&lt;br /&gt;You can get the &lt;span style="font-weight: bold;"&gt;unescaped&lt;/span&gt; parameter values via:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var name = queryParam('name'); // 'Fred Bloggs'&lt;br /&gt;var date = queryParam('date'); // '01/01/2008' &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;This doesn't handle multi-valued parameters ... the first (regex) blog post has some comments on how to handle this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-3406962848366531785?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/3406962848366531785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=3406962848366531785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/3406962848366531785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/3406962848366531785'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2008/05/getdecodeunescape-parameters-from-url.html' title='get/decode/unescape parameters from URL using Javascript'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-2187471371737720516</id><published>2008-04-09T10:58:00.005+10:00</published><updated>2011-10-13T09:43:24.126+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Call a stored procedure from a JSP with JSTL</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;Call execute SQL stored procedure JSP JSTL tag library&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;The JSTL SQL tag library is a useful way of getting a rapid prototype going - it's all in a plain text file and will get compile on the fly. Examples I've seen show SELECT, UPDATE, INSERT and DELETE(s) ... can a stored procedure be run?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The short answer is yes, the key thing is to know if the stored procedure is returning a result set or not as you have two tags available: &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;sql:query&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;expects &lt;/span&gt;a ResultSet&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;sql:update&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;does not expect &lt;/span&gt;a ResultSet - will throw an error if gets one. You do have access to an Integer result - eg rows updated.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;For example, calling a stored procedure that returns a result set:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;sql:setDataSource var="myDataSource" dataSource="jdbc/myjndiref"/&amp;gt;&lt;br /&gt;&amp;lt;sql:query var="examples" dataSource="${myDataSource}"&amp;gt;&lt;br /&gt;    exec ExampleProcLoadExample ?&lt;br /&gt;    &amp;lt;sql:param value="${exampleId}"/&amp;gt;&lt;br /&gt;&amp;lt;/sql:query&amp;gt;&lt;br /&gt;&amp;lt;c:choose&amp;gt;&lt;br /&gt;    &amp;lt;c:when test="${fn:length(examples.rows) == 0}"&amp;gt;&lt;br /&gt;        &amp;lt;%-- no rows returned ! --%&amp;gt;&lt;br /&gt;    &amp;lt;/c:when&amp;gt;&lt;br /&gt;    &amp;lt;c:otherwise&amp;gt;&lt;br /&gt;        &amp;lt;c:set var="example" value="${examples.rows[0]}"/&amp;gt;&lt;br /&gt;        &amp;lt;%-- got your object, can access columns with '.' notation --%&amp;gt;&lt;br /&gt;    &amp;lt;/c:otherwise&amp;gt;&lt;br /&gt;&amp;lt;/c:choose&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For example, calling a stored procedure that performs an 'update' (or insert/delete) returning number of rows updated:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;sql:setDataSource var="myDataSource" dataSource="jdbc/myjndiref"/&amp;gt;&lt;br /&gt;&amp;lt;sql:update var="updateCount" dataSource="${myDataSource}"&amp;gt;&lt;br /&gt;    exec ExampleProcRemoveExample ?&lt;br /&gt;    &amp;lt;sql:param value="${exampleId}"/&amp;gt;&lt;br /&gt;&amp;lt;/sql:update&amp;gt;&lt;br /&gt;&amp;lt;c:choose&amp;gt;&lt;br /&gt;    &amp;lt;c:when test="${updateCount le 0}"&amp;gt;&lt;br /&gt;        &amp;lt;%-- no rows updated ! --%&amp;gt;&lt;br /&gt;    &amp;lt;/c:when&amp;gt;&lt;br /&gt;    &amp;lt;c:otherwise&amp;gt;&lt;br /&gt;        &amp;lt;%-- some row(s) has been updated --%&amp;gt;&lt;br /&gt;        &amp;lt;c:out value="${updateCount} row(s) have been updated"/&amp;gt;&lt;br /&gt;    &amp;lt;/c:otherwise&amp;gt;&lt;br /&gt;&amp;lt;/c:choose&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;When calling stored procedures you're getting into RDBMS vendor specific territory. Using the recommended JDBC drivers from the DB vendor for the DB version in use may make some of this work more smoothly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-2187471371737720516?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/2187471371737720516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=2187471371737720516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2187471371737720516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2187471371737720516'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2008/04/call-stored-procedure-from-jsp-with.html' title='Call a stored procedure from a JSP with JSTL'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-2814413813714488669</id><published>2008-02-27T15:54:00.003+11:00</published><updated>2008-03-03T09:10:47.042+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lucene'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Why can you not use a Wildcard as the first character in a Lucene search?</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;apache lucene wildcard search index "why not" leading first&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Reading the Lucene &lt;a href="http://lucene.apache.org/java/2_3_1/queryparsersyntax.html#Wildcard%20Searches"&gt;query parser syntax documentation&lt;/a&gt; for their latest release, there's a line that says &lt;quot&gt;"Note: You cannot use a * or ? symbol as the first character of a search."&lt;/quot&gt;.&lt;br /&gt;&lt;br /&gt;Why not? Sure it may be inefficient, but what if you're willing to wear that. Is it something that is technically not possible, is it something that's up to users of the library to work around or will it eventually be implemented in Lucene?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Out of curiosity for why this is a limitation I found notes in the &lt;a href="http://wiki.apache.org/lucene-java/LuceneFAQ?highlight=%28leading%29%7C%28wildcard%29#head-4d62118417eaef0dcb87f4370583f809848ea695"&gt;Lucene Wiki&lt;/a&gt; that indicate that you can do it and it is possible. &lt;br /&gt;&lt;br /&gt;Seems the Query Syntax guide in the Lucene release simply needs updating(?). &lt;pre&gt;&lt;br /&gt;&lt;a href="http://lucene.apache.org/java/2_3_1/api/org/apache/lucene/queryParser/QueryParser.html#setAllowLeadingWildcard(boolean)"&gt;queryParser.setAllowLeadingWildcard(true);  &lt;/a&gt;      &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Note the Wiki says this feature is available as of 2.1. But it seems there was a &lt;a href="http://www.mail-archive.com/java-user@lucene.apache.org/msg14088.html"&gt;bug &lt;/a&gt;in this release. I've tested this with lucene 2.3.1 and it works fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-2814413813714488669?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/2814413813714488669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=2814413813714488669' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2814413813714488669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2814413813714488669'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2008/02/why-can-you-not-use-wildcard-as-first.html' title='Why can you not use a Wildcard as the first character in a Lucene search?'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-3449701100090327444</id><published>2007-10-31T10:58:00.000+11:00</published><updated>2011-10-13T09:44:56.621+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAXB'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Generate is property set methods in JAXB objects</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;JAXB "is property set" method object&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Defining a default value in the schema does not come through as a default value in the generated objects. This could be worked around if you could check for when a field has been explicitly set in the XML (as opposed the value being returned by the &lt;code&gt;get&lt;/code&gt; or &lt;code&gt;is&lt;/code&gt;) method being the default). &lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Along the lines of past post - &lt;a href="http://dev-answers.blogspot.com/2007/07/jaxb-xsany-xml-content-missing-from.html"&gt;Getting xs:any as DOM object&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You simply add another custom binding property:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;xs:appinfo&amp;gt;&lt;br /&gt;    &lt;span style="color: red; font-weight: bold;"&gt;&amp;lt;jaxb:property generateIsSetMethod="true"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/xs:appinfo&amp;gt; &lt;/pre&gt;&lt;br /&gt;This post has the snippet: &lt;a href="http://archives.java.sun.com/cgi-bin/wa?A2=ind0306&amp;amp;L=jaxb-interest&amp;amp;P=1202"&gt;How do you pick up default values from XSD/JAXB&lt;/a&gt;&lt;br /&gt;Reasonable summary of Customizing JAXB Bindings (though not that easy to read): &lt;a href="http://docs.rakeshv.org/java/jaxb/users-guide/jaxb-custom.html"&gt;Customizing JAXB Bindings&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-3449701100090327444?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/3449701100090327444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=3449701100090327444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/3449701100090327444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/3449701100090327444'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/10/generate-is-property-set-methods-in.html' title='Generate is property set methods in JAXB objects'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7388806972703305872</id><published>2007-08-24T17:13:00.000+10:00</published><updated>2007-08-24T17:22:53.921+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Firefox does not animate my gifs</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;firefox gif not animated&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Why is my animated gif working fine in IE but not firefox?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The solution was on &lt;a href="http://forums.mozillazine.org/viewtopic.php?p=994582#994582"&gt;mozillaZine&lt;/a&gt; - I'm fairly sure I haven't turned image animation off explicitly, but to turn it on again:&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Type about:config in the address bar&lt;/li&gt;&lt;br /&gt;&lt;li&gt;filter for "&lt;span style="font-weight: bold;"&gt;image.animation_mode&lt;/span&gt;"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;if you're like me, you'll see this is set to "&lt;span style="font-weight: bold;"&gt;none&lt;/span&gt;". Change this to the &lt;span style="font-style: italic;"&gt;default&lt;/span&gt; value of "&lt;span style="font-weight: bold;"&gt;normal&lt;/span&gt;".&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7388806972703305872?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7388806972703305872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7388806972703305872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7388806972703305872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7388806972703305872'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/08/firefox-does-not-animate-my-gifs.html' title='Firefox does not animate my gifs'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-1839781647656547822</id><published>2007-08-16T10:49:00.002+10:00</published><updated>2011-10-13T09:45:20.378+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='ie'/><category scheme='http://www.blogger.com/atom/ns#' term='HTTP'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Firefox does not reflect input form field values via innerHTML</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;firefox innerHTML form input field value text select textarea&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;In IE (and therefore the GWT test shell running on windows) you can call innerHTML on a DOM object and where it contains HTTP form input fields you will see an up-to-date reflection of the inputs from the user.&lt;br /&gt;&lt;br /&gt;On firefox you simply get a reflection of the DOM as it was originally served up to the user.&lt;br /&gt;&lt;br /&gt;This is a problem if you want to move HTML around and not loose the inputs already made by the user.&lt;br /&gt;&lt;br /&gt;Eg: On clicking the button in firefox you won't see the input entered in the text box.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;form action="" method="get"&amp;gt;       &lt;br /&gt;    &amp;lt;SPAN id="MyContent"&amp;gt;           &lt;br /&gt;        &amp;lt;input type="text" name="textField" value="" /&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;    &amp;lt;/SPAN&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;           &lt;br /&gt;  &lt;br /&gt;&amp;lt;button onClick="window.alert(MyContent.innerHTML);"&amp;gt;discover user input&amp;lt;/button&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Found the solution on &lt;a href="http://groups.google.com.au/group/comp.lang.javascript/msg/6343710162d15020?&amp;amp;hl=en"&gt;comp.lang.javascript - Firefox does not reflect selected option via innerHTML&lt;/a&gt;. I've extended the example code from this post to handle checkbox, radio and textarea ...&lt;br /&gt;&lt;br /&gt;The idea is, every input field on the page must have an onBlur="updateDOM(this)" event handler, forcing the DOM to be updated and reflect the user's input.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;//&lt;br /&gt;// Will be called by input fields when in 'update DOM' mode. This will&lt;br /&gt;// make sure that changes to input fields in the form will be captured&lt;br /&gt;// in the DOM - not necessary in IE but is required in Moz, etc as the DOM&lt;br /&gt;// will otherwise reflect the page as it was initially.&lt;br /&gt;//&lt;br /&gt;// inputField : the input field that has just been tabbed out of (onBlur) OR the ID of the input field&lt;br /&gt;function &lt;span style="font-weight: bold;"&gt;updateDOM(inputField)&lt;/span&gt; {&lt;br /&gt;    // if the inputField ID string has been passed in, get the inputField object&lt;br /&gt;    if (typeof inputField == "string") {&lt;br /&gt;        inputField = document.getElementById(inputField);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    if (inputField.type == "select-one") {&lt;br /&gt;        for (var i=0; i&amp;lt;inputField.options.length; i++) {&lt;br /&gt;            if (i == inputField.selectedIndex) {    &lt;br /&gt;                inputField.options[inputField.selectedIndex].setAttribute("selected","selected");&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    } &lt;span style="font-weight: bold;"&gt;else if (inputField.type == "select-multiple") {&lt;br /&gt;        for (var i=0; i&amp;lt;inputField.options.length; i++) {&lt;br /&gt;            if (inputField.options[i].selected) {&lt;br /&gt;                inputField.options[i].setAttribute("selected","selected");&lt;br /&gt;            } else {&lt;br /&gt;                inputField.options[i].removeAttribute("selected");&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;/span&gt; else if (inputField.type == "text") {&lt;br /&gt;        inputField.setAttribute("value",inputField.value);&lt;br /&gt;    } else if (inputField.type == "textarea") {&lt;br /&gt;        inputField.setAttribute("value",inputField.value);&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        inputField.innerHTML = inputField.value;&lt;/span&gt;&lt;br /&gt;    } else if (inputField.type == "checkbox") {&lt;br /&gt;        if (inputField.checked) {&lt;br /&gt;            inputField.setAttribute("checked","checked");&lt;br /&gt;        } else {&lt;br /&gt;            inputField.removeAttribute("checked");&lt;br /&gt;        }&lt;br /&gt;    } &lt;span style="font-weight: bold;"&gt;else if (inputField.type == "radio") {&lt;br /&gt;        var radioNames = document.getElementsByName(inputField.name);&lt;br /&gt;        for(var i=0; i &amp;lt; radioNames.length; i++) {&lt;br /&gt;            if (radioNames[i].checked) {&lt;br /&gt;                radioNames[i].setAttribute("checked","checked");&lt;br /&gt;            } else {&lt;br /&gt;                radioNames[i].removeAttribute("checked");&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form action="" method="get"&amp;gt;        &lt;br /&gt;    &amp;lt;SPAN id="MyContent"&amp;gt;            &lt;br /&gt;        &amp;lt;input type="text" name="textField" value="" &lt;span style="font-weight: bold;"&gt;onBlur="updateDOM(this)"&lt;/span&gt;/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;    &amp;lt;/SPAN&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;            &lt;br /&gt;    &lt;br /&gt;&amp;lt;button onClick="window.alert(MyContent.innerHTML);"&amp;gt;discover user input&amp;lt;/button&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;It gets slightly trickier if you have input fields that don't get filled in by the user - eg a date picker dropdown, which will set the textbox with the date for the user, hence they never click in the box and trigger the 'onBlur'. In this case, you'd put the onBlur event on the date picker button&lt;br /&gt;&lt;br /&gt;Eg:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;input type="text" name="dateField" id="dateField" value="" &lt;span style="font-weight: bold;"&gt;onBlur="updateDOM(&lt;span style="color: red;"&gt;this&lt;/span&gt;)"&lt;/span&gt;/&amp;gt;&lt;br /&gt;&amp;lt;button id="myDatePicker" onClick="... do datepicking stuff ..." &lt;span style="font-weight: bold;"&gt;onBlur="updateDOM('&lt;span style="color: red;"&gt;dateField&lt;/span&gt;')"&lt;/span&gt;&amp;gt;&lt;br /&gt; ... date picking image ...&lt;br /&gt;&amp;lt;/button&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Post updated (Thu, 25 Mar 2010):&lt;/span&gt; With thanks to the helpful commentors, the above script incorporates better handling for textArea &amp;amp; radio fields as well as an issue I came across for 'select-multiple' (was missing from the original script). It should work fine with the update via document or form approaches discussed in the comments - as opposed to the onBlur which continues to be good enough for my usage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-1839781647656547822?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/1839781647656547822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=1839781647656547822' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1839781647656547822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1839781647656547822'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/08/firefox-does-not-reflect-input-form.html' title='Firefox does not reflect input form field values via innerHTML'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-6174693598760771315</id><published>2007-07-20T13:22:00.000+10:00</published><updated>2011-10-13T09:28:49.280+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAXB'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='no result'/><title type='text'>JAXB xs:any xml content missing from marshalled output</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;JAXB xs:any xml content missing from marshalled output processContents="lax"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;I'm defining an XML schema that needs to be able to include any XML - "xs:any" seems perfect for the job. Also need to generate JAXB objects from this schema ... everything seems fine on compilation and in constructing the JAXB objects. The problem is at runtime, it appears that the "any" content is missing from the JAXB objects.&lt;br /&gt;&lt;h2&gt;example schema&lt;/h2&gt;&lt;pre&gt;&amp;lt;xs:schema&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;targetNamespace="http://example.com/xml"&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;xmlns="http://example.com/xml"&lt;br /&gt;&lt;tt style="background-color: transparent;"&gt;    &lt;/tt&gt;&lt;span style="background-color: transparent;"&gt;xmlns:xs="http://www.w3.org/2001/XMLSchema"&lt;/span&gt;&lt;br /&gt;&lt;tt style="background-color: transparent;"&gt;    &lt;/tt&gt;&lt;span style="background-color: transparent;"&gt;elementFormDefault="qualified"&lt;/span&gt;&lt;br /&gt;&lt;tt style="background-color: transparent;"&gt;    &lt;/tt&gt;&lt;span style="background-color: transparent;"&gt;attributeFormDefault="unqualified"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:element name="&lt;span style="font-weight: bold;"&gt;MyXmlObject&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:complexType &lt;span style="color: red;"&gt;mixed="true"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:sequence minOccurs="0"&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;&lt;span style="color: red; font-weight: bold;"&gt;xs:any &lt;/span&gt;namespace="&lt;span style="color: red; font-weight: bold;"&gt;##any&lt;/span&gt;" processContents="&lt;span style="color: red;"&gt;lax&lt;/span&gt;" minOccurs="0"/&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:attribute name="firstName" type="xs:string" use="required"/&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:attribute name="lastName" type="xs:string" use="required"/&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:attribute name="happy" type="xs:boolean" use="optional"/&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&amp;lt;/xs:schema&amp;gt;&lt;/pre&gt;&lt;h2&gt;example JAXB object usage&lt;/h2&gt;&lt;code&gt;String xmlContent = "&amp;lt;foo&amp;gt;misc. text&lt;/code&gt;&lt;code&gt;&amp;lt;/foo&amp;gt;&lt;/code&gt;&lt;code&gt;";&lt;br /&gt;&lt;br /&gt;InputSource source = new InputSource(new StringReader(xmlContent));&lt;br /&gt;Element domElem = (Element)NodeUtils.parseStream(source, true);&lt;br /&gt;myXmlObject.getContent().add(domElem);&lt;br /&gt;&lt;br /&gt;JAXBContext jc = JAXBContext.newInstance("com.example.xml");&lt;br /&gt;// marshal to System.out&lt;br /&gt;Marshaller m = jc.createMarshaller();&lt;br /&gt;m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);&lt;br /&gt;m.marshal( response, System.out);&lt;/code&gt;&lt;br /&gt;&lt;h2&gt;example XML output (missing my any content)&lt;/h2&gt;&amp;lt;MyXmlObject xmlns="http://example.com/xml"  firstName="bar" lastName="bar" happy="true"&amp;gt;&lt;br /&gt;&amp;lt;/MyXmlObject&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The JAXB 1.0.x FAQ had the answer - &lt;a href="https://jaxb.dev.java.net/faq/jaxb10faq.html#dom_bind"&gt;Can I access &amp;lt;xs:any&amp;gt; as a DOM node?&lt;/a&gt;. There's detailed notes here with links to example schema and the Bug report, but basically "the spec doesn't support the mapping to DOM, so the RI is not allowed to do this" ... but it will if you put it in "extension mode".&lt;br /&gt;&lt;br /&gt;This involves adding some extra elements to your schema and compiling with the "-extension" switch (or extension="true" attribute if using the XJC ant task).&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;new example schema (with JAXB customisation)&lt;/h2&gt;&lt;pre&gt;&amp;lt;xs:schema&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;targetNamespace="http://example.com/xml"&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;xmlns="http://example.com/xml"&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;xmlns:xs="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;&lt;tt style="font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"&lt;/span&gt;&lt;br /&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;elementFormDefault="qualified"&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;attributeFormDefault="unqualified"&lt;br /&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;jaxb:extensionBindingPrefixes="xjc"&lt;/span&gt;&lt;br /&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;jaxb:version="1.0"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:element name="MyXmlObject"&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:complexType mixed="true"&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:sequence minOccurs="0"&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;&lt;span style="color: red; font-weight: bold;"&gt;xs:any&lt;/span&gt; namespace="&lt;span style="color: red; font-weight: bold;"&gt;##any&lt;/span&gt;" processContents="&lt;span style="color: red; font-weight: bold;"&gt;lax&lt;/span&gt;" minOccurs="0"&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;&amp;lt;xs:annotation&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;&amp;lt;xs:appinfo&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;&amp;lt;xjc:dom/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;&amp;lt;/xs:appinfo&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;tt style="color: red; font-weight: bold;"&gt;    &lt;/tt&gt;&lt;span style="color: red; font-weight: bold;"&gt;&amp;lt;/xs:annotation&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;/&lt;span style="color: red; font-weight: bold;"&gt;xs:any&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:attribute name="firstName" type="xs:string" use="required"/&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:attribute name="lastName" type="xs:string" use="required"/&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;xs:attribute name="happy" type="xs:boolean" use="optional"/&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;&lt;tt&gt;    &lt;/tt&gt;&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&amp;lt;/xs:schema&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-6174693598760771315?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/6174693598760771315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=6174693598760771315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/6174693598760771315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/6174693598760771315'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/07/jaxb-xsany-xml-content-missing-from.html' title='JAXB xs:any xml content missing from marshalled output'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-1693901627368478462</id><published>2007-07-18T10:55:00.000+10:00</published><updated>2011-10-13T09:46:42.505+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='servlets'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>NullPointerException tomcat5 realWriteChars</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;NullPointerException tomcat5 realWriteChars servlet&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Getting this stack trace on each access of a servlet:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;java.lang.NullPointerException&lt;br /&gt; at org.apache.coyote.tomcat5.OutputBuffer.realWriteChars(OutputBuffer.java:569)&lt;br /&gt; at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:435)&lt;br /&gt; at org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:366)&lt;br /&gt; at org.apache.coyote.tomcat5.OutputBuffer.write(OutputBuffer.java:516)&lt;br /&gt; at org.apache.coyote.tomcat5.CoyoteWriter.write(CoyoteWriter.java:149)&lt;br /&gt; at org.apache.coyote.tomcat5.CoyoteWriter.write(CoyoteWriter.java:158)&lt;br /&gt; at org.apache.coyote.tomcat5.CoyoteWriter.print(CoyoteWriter.java:208)&lt;br /&gt; at org.apache.coyote.tomcat5.CoyoteWriter.println(CoyoteWriter.java:265)&lt;br /&gt; at com.example.MyServlet.doGet(MyServlet.java:56)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The line number in "MyServlet" code that's kicking this off is a simple PrintWriter.println() ... what it's writing to the stream is definitely not null. How could a NPE be caused in tomcat?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;I wouldn't have guessed at the issue if not trying the same servlet on WebSphere ... then you get a more useful error message:&lt;br /&gt;&lt;code&gt;Invalid character encoding "UTF&lt;span style="font-weight: bold;"&gt;=&lt;/span&gt;8"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There's a typo (ie '=' instead of '-') in the call to set the content type on the HttpResponse object! Correcting this to "UTF-8" fixes the issue:&lt;br /&gt;&lt;code&gt;response.setContentType("text/html; charset=UTF&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;8");&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-1693901627368478462?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/1693901627368478462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=1693901627368478462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1693901627368478462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/1693901627368478462'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/07/nullpointerexception-tomcat5.html' title='NullPointerException tomcat5 realWriteChars'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-4829901494298507228</id><published>2007-06-28T08:33:00.000+10:00</published><updated>2011-10-13T09:47:08.497+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='ie'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>IE ignores inline script added to DOM</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;internet explorer GWT DHTML AJAX inline javascript "Object expected"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;I've got javascript code (GWT in this case) that adds an inline script to the DOM:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;lt;input ... onClick="myFunction()"/&amp;gt;&lt;br /&gt;   &amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;       function myFunction() {&lt;br /&gt;           ... do stuff&lt;br /&gt;       }&lt;br /&gt;   &amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If this code was on the page from the beginning, the event call to the function works fine. When this HTML is added to the page after it's loaded it appears the function call from the event fails.&lt;br /&gt;&lt;br /&gt;IE Error (from the bottom left "! Done" in the status bar):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Line: 1&lt;br /&gt;Char: 1&lt;br /&gt;Error: Object expected&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Further frustration - it works fine in Firefox.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Aside: I haven't actually worked out why, but in GWT, if you use the method in a FlexTable setHTML the javascript will also not work in Firefox - you need to use setWidget(..).&lt;br /&gt;&lt;br /&gt;Internet Explorer will not compile inline javascript code added to the DOM after the page has been loaded. What IE is trying to tell me in its cryptic error message is it's trying to call the function but can't find it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;A good example of how to "smuggle" javascript into the DOM via img onLoad - &lt;a href="http://24ways.org/2005/have-your-dom-and-script-it-too"&gt;Have Your DOM and Script It Too&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-4829901494298507228?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/4829901494298507228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=4829901494298507228' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4829901494298507228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4829901494298507228'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/06/ie-ignores-inline-script-added-to-dom.html' title='IE ignores inline script added to DOM'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7806049793536471179</id><published>2007-05-21T11:13:00.002+10:00</published><updated>2011-10-13T09:47:35.955+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><title type='text'>Avoid Copy &amp; Paste with Ant MacroDef</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;ant java copy paste macrodef gwt compile task&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;There's no convenient ant task to allow you to compile (or re-compile) the GWT client files, but you can get some decent up-to-date check &amp;amp; compile behaviour going with a few lines of ant&lt;br /&gt;&lt;br /&gt;... problem is, you need to duplicate these lines of code for every module in the project. It would be nice if you could modularise this.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The Ant "macrodef" task lets you define a sequence of ant steps in a parameterised way and then call it any number of times with different parameters.&lt;br /&gt;&lt;br /&gt;As can be seen in the example below (which handles 2 modules), adding a new module will require:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;add a new entry to the "depends" list for &lt;code&gt;gwt-generate&lt;/code&gt; (eg 'gwt-generate-newmod')&lt;/li&gt;&lt;li&gt;create a &lt;code&gt;gwt-compile &lt;/code&gt;target 'gwt-generate-newmod' with an "unless" attribute of 'gwtGenerate.newmod.notRequired'&lt;/li&gt;&lt;li&gt;create a &lt;code&gt;gwt-uptodate&lt;/code&gt; target to set the property 'gwtGenerate.newmod.notRequired' accordingly.&lt;/li&gt;&lt;/ol&gt;Yes, there's still some copy and paste, but you're just defining the module name and location rather that repeating the gwt-compile definition so there's less chance for a mistake.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;!-- this is the root target which will do all the generation (if required) --&amp;gt;&lt;br /&gt;&amp;lt;target name="gwt-generate" description="Generate GWT code"&lt;br /&gt;  depends="&lt;span style="color: #cc0000;"&gt;gwt-generate-common&lt;/span&gt;, &lt;span style="color: #000099;"&gt;gwt-generate-demo&lt;/span&gt;"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;&amp;lt;target name="gwt-generate-common" depends="compile, gwt-check" unless="gwtGenerate.common.notRequired"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;    &amp;lt;gwt-compile module="com.example.gwt.common.MyCommonModule"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000099;"&gt;&amp;lt;target name="gwt-generate-demo" depends="compile, gwt-check" unless="gwtGenerate.demo.notRequired"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000099;"&gt;    &amp;lt;gwt-compile module="com.example.gwt.demo.MyDemoModule"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000099;"&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- this sets the *.notRequired properties if gwt code is uptodate --&amp;gt;&lt;br /&gt;&amp;lt;target name="gwt-check"&amp;gt;&lt;br /&gt;  &amp;lt;!-- won't have any effect if the dirs are already there --&amp;gt;&lt;br /&gt;  &amp;lt;mkdir dir="${build.home}/gwt"/&amp;gt;&lt;br /&gt;  &amp;lt;mkdir dir="${build.home}/gwt/tmp"/&amp;gt;&lt;br /&gt;  &amp;lt;mkdir dir="${build.home}/gwt/out"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;    &amp;lt;gwt-uptodate property="gwtGenerate.common.notRequired"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;            module="com.example.gwt.common.MyCommonModule"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;            package="src/com/example/gwt/common"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #000099;"&gt;    &amp;lt;gwt-uptodate property="gwtGenerate.demo.notRequired"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000099;"&gt;                    module="com.example.gwt.demo.MyDemoModule"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000099;"&gt;                    package="src/com/example/gwt/demo"/&amp;gt;    &lt;/span&gt;      &lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- this defines a macro task 'gwt-uptodate' --&amp;gt;&lt;br /&gt;&amp;lt;macrodef name="gwt-uptodate" description="sets a property indicating if the module is up to date"&amp;gt;&lt;br /&gt; &amp;lt;attribute name="property"/&amp;gt;&lt;br /&gt; &amp;lt;attribute name="module"/&amp;gt;&lt;br /&gt; &amp;lt;attribute name="package"/&amp;gt;&lt;br /&gt; &amp;lt;sequential&amp;gt;&lt;br /&gt;         &amp;lt;!-- the module is uptodate if the .nocache.html is not older than any of the module src files --&amp;gt;&lt;br /&gt;      &amp;lt;uptodate property="@{property}"&lt;br /&gt;              targetfile="${build.home}/gwt/out/@{module}/@{module}.nocache.html"&amp;gt;&lt;br /&gt;          &amp;lt;srcfiles dir="@{package}" includes="**/*.*"/&amp;gt;&lt;br /&gt;      &amp;lt;/uptodate&amp;gt;                      &lt;br /&gt; &amp;lt;/sequential&amp;gt;&lt;br /&gt;&amp;lt;/macrodef&amp;gt;  &lt;br /&gt;&amp;lt;!-- this defines a macro task 'gwt-compile' --&amp;gt;&lt;br /&gt;&amp;lt;macrodef name="gwt-compile" description="generates the GWT client code"&amp;gt;&lt;br /&gt; &amp;lt;attribute name="module"/&amp;gt;&lt;br /&gt; &amp;lt;sequential&amp;gt;&lt;br /&gt;         &amp;lt;!-- you must fork or it will fail --&amp;gt;&lt;br /&gt;         &amp;lt;java dir="${build.home}/gwt/tmp" classname="com.google.gwt.dev.GWTCompiler" fork="true"&amp;gt;&lt;br /&gt;          &amp;lt;classpath&amp;gt;&lt;br /&gt;              &amp;lt;!-- src directory containing module definition must be first! --&amp;gt;&lt;br /&gt;              &amp;lt;pathelement location="src"/&amp;gt;&lt;br /&gt;              &amp;lt;pathelement location="${build.home}/classes"/&amp;gt;&lt;br /&gt;              &amp;lt;pathelement location="${gwt.user}"/&amp;gt;&lt;br /&gt;              &amp;lt;pathelement location="${gwt.dev}"/&amp;gt;&lt;br /&gt;              &amp;lt;pathelement location="${gwt.widgets}"/&amp;gt;&lt;br /&gt;            &amp;lt;/classpath&amp;gt;&lt;br /&gt;          &lt;br /&gt;          &lt;span style="color: #00cc00;"&gt;&amp;lt;sysproperty key="java.awt.headless" value="true"/&amp;gt;&lt;/span&gt;             &lt;br /&gt;          &amp;lt;arg value="-out"/&amp;gt;&lt;br /&gt;          &amp;lt;arg value="../out"/&amp;gt;&lt;br /&gt;          &amp;lt;arg value="@{module}"/&amp;gt;  &lt;br /&gt;      &amp;lt;/java&amp;gt;&lt;br /&gt; &amp;lt;/sequential&amp;gt;&lt;br /&gt;&amp;lt;/macrodef&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Note, you only need to GWT-compile modules with an EntryPoint class in them. This is because it's only EntryPoint classes that you need to reference from your HTML and on compilation all the classes (and files in com.example.gwt.package/public!) are compiled/copied to this module. This means if you have multiple EntryPoint modules in your project (as I do) that reference a common Module, they will have their own compiled copy of this (and the /public files) rather than referencing it in a common location.&lt;br /&gt;&lt;br /&gt;Note also, this means that the gwt-uptodate won't trigger a recompile if there's a change to a referenced module - as it's only checking the source folder containing the EntryPoint module ... so in those cases, you'll need to do a clean of the build folder containing generated source to guarantee everything is compiled up to date.&lt;br /&gt;&lt;br /&gt;New Note: the sysproperty to set awt to headless is crucial on linux (if you're using ImageBundles). See &lt;a href="http://code.google.com/support/bin/answer.py?hl=en&amp;amp;answer=71442"&gt;Does the GWT 1.4 Compiler Need an X11 Window in Linux? &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7806049793536471179?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7806049793536471179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7806049793536471179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7806049793536471179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7806049793536471179'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/05/avoid-copy-paste-with-ant-macrodef.html' title='Avoid Copy &amp; Paste with Ant MacroDef'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-4560439956192532307</id><published>2007-05-07T12:13:00.000+10:00</published><updated>2011-10-13T09:48:00.032+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>JavaMail Exception 550 relaying mail is not allowed</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;JavaMail Exception 550 relaying mail to is not allowed&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Running server side code that sends an email is being rejected by the SMTP server:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;javax.mail.SendFailedException: Invalid Addresses;&lt;br /&gt;  nested exception is:&lt;br /&gt;        com.sun.mail.smtp.SMTPAddressFailedException: 550 relaying mail to example.com is not allowed&lt;br /&gt;        at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)&lt;br /&gt;        at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)&lt;br /&gt;        at javax.mail.Transport.send0(Transport.java:169)&lt;br /&gt;        at javax.mail.Transport.send(Transport.java:98)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Contrary to the error message, its not an issue isolated to the "To" recipient address. No matter what the "To" field was, the relay error was the same with the ???.com substituted in. &lt;br /&gt;&lt;br /&gt;Other posts/support-resources on the web point to issues with authentication - but this SMTP server does not require authentication, just that the host is one of a set of IP addresses. Other web applications on the same host, running in the same (tomcat) application server are sending mail to this SMTP server with no problems.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;In this case, the difference was the spec of the JavaMail libraries. The apps that were working were all using spec 1.2 (deployed with activation.jar, mail.jar and mailapi.jar). &lt;br /&gt;&lt;br /&gt;Our app getting the relay error was using spec 1.3 (implementation version 1.4). Downgrading the libraries (ie putting the 3 older jars in WEB-INF/lib) resolved the problem - no more errors from the SMTP server. &lt;br /&gt;&lt;br /&gt;There may be a change in spec to do with the way the host is identified. If the libraries were identifying the client code's host as anything other than the IP address then this may be the problem. Perhaps the new libraries require additional properties to configure this behaviour? For the moment things are working but I may get to the bottom of this later ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-4560439956192532307?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/4560439956192532307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=4560439956192532307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4560439956192532307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/4560439956192532307'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/05/javamail-exception-550-relaying-mail-is.html' title='JavaMail Exception 550 relaying mail is not allowed'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-8981849340027538702</id><published>2007-03-21T11:38:00.000+11:00</published><updated>2007-03-21T11:52:51.798+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='no result'/><title type='text'>JSP EL expressions are being ignored by tomcat</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;tomcat JSP JSTL EL &lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Hopefully this is my last post about the possible problems with JSP/web-app specs and EL. In this case, there's a JSP using EL &lt;br /&gt;Eg:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;    String myUrl = (String)session.getAttribute("SESSION_KEY_MY_URL");&lt;br /&gt;    pageContext.setAttribute("myUrl", returnUrl);&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;form name="load" action="${myUrl}" method="GET"&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;It's coming out in HTML with the EL untouched (but the scriptlet is definitely being run). &lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;form name="load" action="${myUrl}" method="GET"&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Why is the EL being ignored?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;As with the previous 2 posts on this issue, you have to fix the schema reference in the web.xml (there's too many differing copies of the web.xml(s) I'm dealing with here) and make sure the JSP has the right tablib uri reference - see &lt;a href="http://dev-answers.blogspot.com/2006/12/according-to-tld-or-attribute.html"&gt;this post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For the first time I found this didn't immediately solve the problem! The HTML is coming out the same with EL unevaluated. The issue is that the JSP has been compiled to TOMCAT_HOME\work\Catalina\localhost\MyApp\org\apache\jsp\jsp\myfolder\MyJSP.java and tomcat sees no need to recompile even though I've updated the spec of the webapp. &lt;br /&gt;&lt;br /&gt;The solution is to stop tomcat, remove the contents of TOMCAT_HOME\work and restart (OR update the timestamp on the JSP source file(s) to force recompilation). The JSP will be recompiled (to the right spec 2.0 now) and the EL will be evaluated as you expect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-8981849340027538702?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/8981849340027538702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=8981849340027538702' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8981849340027538702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/8981849340027538702'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/03/jsp-el-expressions-are-being-ignored-by.html' title='JSP EL expressions are being ignored by tomcat'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-893642584448631638</id><published>2007-03-20T12:03:00.000+11:00</published><updated>2011-10-13T09:48:34.008+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>How-to turn off tomcat session serialization</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;tomcat session serialization NotSerializableException "Cannot serialize session attribute" Manager&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;On restarting tomcat there's a stacktrace (below) about an attribute in the session not being serializable. It doesn't seem to effect the application starting up and the application works fine, but these messages at startup are annoying. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;2007-03-20 10:50:57,890 INFO [org.apache.catalina.session.ManagerBase@898] - &lt;cannot [myattributename]="" [sessionkey]="" attribute="" for="" serialize="" session=""&gt;&lt;br /&gt;java.io.NotSerializableException: com.example.package.MyBeanClassName&lt;br /&gt;        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)&lt;br /&gt;        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)&lt;br /&gt;        at java.util.ArrayList.writeObject(ArrayList.java:531)&lt;br /&gt;        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/cannot&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you want to put (transient) non-serializable objects in the session, how do you stop tomcat from serializing them at shutdown/startup?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;This was hard to find, but you need to configure a Manager in the context of the application. This should be put in either:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the YourApp.war:/META-INF/context.xml&lt;/li&gt;&lt;br /&gt;&lt;li&gt;the TOMCAT_HOME/conf/Catalina/localhost/YourApp.xml file&lt;/li&gt;&lt;br /&gt;&lt;li&gt;OR the default context ...&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;!-- Turn off session serialization --&amp;gt;&lt;br /&gt;    &amp;lt;Manager className="org.apache.catalina.session.PersistentManager"&lt;br /&gt;      debug="0" distributable="&lt;span style="font-weight: bold;"&gt;false&lt;/span&gt;" saveOnRestart="&lt;span style="font-weight: bold;"&gt;false&lt;/span&gt;"&amp;gt;&lt;br /&gt;        &amp;lt;Store className="org.apache.catalina.session.FileStore"/&amp;gt;&lt;br /&gt;    &amp;lt;/Manager&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The tomcat documentation for the &lt;a href="http://tomcat.apache.org/tomcat-5.0-doc/config/manager.html"&gt;Manager&lt;/a&gt; element will give a &lt;span style="font-style: italic;"&gt;bit&lt;/span&gt; more information, but it doesn't show the className for the file-store Store element, which is crucial if you're using the PersistentManager class - even if you're configuring it to do nothing!&lt;br /&gt;&lt;br /&gt;You'll know it's working when there are no longer any files called "SESSIONS.ser" in the TOMCAT_HOME/work/Catalina/localhost/YourApp folder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-893642584448631638?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/893642584448631638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=893642584448631638' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/893642584448631638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/893642584448631638'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/03/how-to-turn-off-tomcat-session.html' title='How-to turn off tomcat session serialization'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-2004668968704440052</id><published>2007-03-15T11:30:00.000+11:00</published><updated>2007-03-15T11:37:20.481+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='no result'/><title type='text'>Can't get or find errorData attribute in JSP pageContext</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;error JSP pageContext errorData scriplet&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Writing a JSP that handles errors from JSP, servlets (and other!) need to access the ErrorData object in a scriptlet rather that the convenient JSP EL ${pageContext.errorData}. &lt;br /&gt;&lt;br /&gt;Tried:&lt;br /&gt;&lt;code&gt;pageContext.getAttribute("errorData");&lt;/code&gt; but this returns null. Maybe it's not in the page scope.&lt;br /&gt;&lt;code&gt;pageContext.findAttribute("errorData");&lt;/code&gt; but still null.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Thankfully there's the convenience method:&lt;br /&gt;&lt;code&gt;pageContext.getErrorData();&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;This works. It seems the JSP EL ${pageContext.errorData} is a way of referencing this accessor rather than an element in the pageContext "map".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-2004668968704440052?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/2004668968704440052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=2004668968704440052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2004668968704440052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/2004668968704440052'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/03/cant-get-or-find-errordata-attribute-in.html' title='Can&apos;t get or find errorData attribute in JSP pageContext'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7698509913610316027</id><published>2007-03-14T14:12:00.000+11:00</published><updated>2011-10-13T09:49:17.133+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parameters'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='servlets'/><title type='text'>Structured data to GWT component with JSON</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;GWT JSON stuctured initialisation data&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;In a &lt;a href="http://dev-answers.blogspot.com/2007/01/how-to-give-initialisation-parameters.html"&gt;previous post&lt;/a&gt; I described using the internationalisation Dictionary class to pass in initialisation data. But what if the data is more complex than key-value pairs? You could define a dictionary value as being a delimited (e.g. space or comma separated) list of tokens but is there an easier way of getting in basic structured data without writing your own parser?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;JavaScript Object Notation (JSON) is a ".. text-based, human-readable format for representing objects and other data structures" (definition from &lt;a href="http://en.wikipedia.org/wiki/Json"&gt;wikipedia&lt;/a&gt; - the article includes a good introduction with examples). GWT supports reading and producing data in this format via the &lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.json.client.html"&gt;com.google.gwt.json.client&lt;/a&gt; package. For data interchange I think your still better off using a GWT remote service and sending your beans to it (let GWT handle the encoding/decoding) but for the &lt;span style="font-style: italic;"&gt;host page&lt;/span&gt; giving data to the component JSON comes into its own.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Step 1&lt;/h2&gt;&lt;br /&gt;In the host page, define a dictionary as before but the value (or values) is/are now JSON strings rather than plain strings. In this example I'm creating an array of objects, each object having a property "id" and optionally a property "label" (it's got to be on one line as far as I can tell for the dictionary to allow it):&lt;br /&gt;&lt;pre&gt;showHide: "[{\"id\": \"A\", \"label\": \"see A detail?\"}, {\"id\": \"B\", \"label\": \"include B detail?\"}, {\"id\": \"C\"}]"&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Step 2&lt;/h2&gt;&lt;br /&gt;In the GWT component, use the dictionary to get at the JSON string. Then use the &lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.json.client.JSONParser.html"&gt;JSONParser&lt;/a&gt; to convert this to a JSON instance - in this example a &lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.json.client.JSONArray.html"&gt;JSONArray&lt;/a&gt; of &lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.json.client.JSONObject.html"&gt;JSONObject&lt;/a&gt;s. For a JSONObject you can get at each of its properties like you would a map via the &lt;code&gt;&lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.json.client.JSONObject.html#get(java.lang.String)"&gt;get(String key)&lt;/a&gt;&lt;/code&gt; method.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public void onModuleLoad() {&lt;br /&gt;    Dictionary properties = Dictionary.getDictionary("ModuleProperties");&lt;br /&gt;  &lt;br /&gt;    String showHideConfigString = properties.get("showHide");&lt;br /&gt;    JSONArray showHideConfigs = (JSONArray)JSONParser.parse(showHideConfigString);&lt;br /&gt;    &lt;br /&gt;    List panels = new ArrayList();&lt;br /&gt;    for (int i = 0; i &amp;lt; showHideConfigs.size(); i++) {&lt;br /&gt;        JSONObject config = (JSONObject)showHideConfigs.get(i);&lt;br /&gt;        &lt;br /&gt;        JSONString idValue = (JSONString) config.get("id");&lt;br /&gt;        String id = idValue.stringValue();&lt;br /&gt;        &lt;br /&gt;        JSONString labelValue = (JSONString) config.get("label");&lt;br /&gt;        String label = (labelValue == null)? "include?" : labelValue.stringValue();&lt;br /&gt;        &lt;br /&gt;        // ... now we can do stuff with the data&lt;br /&gt;        ShowHidePanel showHidePanel = new ShowHidePanel(label, id);&lt;br /&gt;        RootPanel.get(id).add(showHidePanel);&lt;br /&gt;        panels.add(showHidePanel);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    // ... etc&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Someone asked me via comments how would you handle request parameters ... it's up to you to make something that can process the request parameters (CGI, java servlet, ASP?) and write a &lt;span style="font-weight: bold;"&gt;host page&lt;/span&gt; containing the data from the request params for the GWT component to then have access to them. &lt;br /&gt;&lt;br /&gt;For many this will be obvious, but I felt bad for not including their comment ... but I don't want questions on the blog. Hope that helps.&lt;br /&gt;&lt;br /&gt;If the data is more complex/rich than what JSON allows, there's XML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7698509913610316027?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7698509913610316027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7698509913610316027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7698509913610316027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7698509913610316027'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/03/structured-data-to-gwt-component-with.html' title='Structured data to GWT component with JSON'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-7448858647855175940</id><published>2007-02-28T11:40:00.000+11:00</published><updated>2011-10-13T09:49:38.788+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;Compile JSP tomcat JSTL error functions "org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Some fairly standard use of JSTL:&lt;br /&gt;&lt;code&gt;&amp;lt;c:out value="${fn:escapeXml(myvalue)}" /&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;i.e. using a function in the value field of the c:out tag gives the error:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;org.apache.jasper.JasperException:&lt;br /&gt;    &amp;lt;h3&amp;gt;Validation error messages from TagLibraryValidator for c&amp;lt;/h3&amp;gt;&lt;br /&gt;    &amp;lt;p&amp;gt;41: tag = 'out' / attribute = 'value': &lt;br /&gt;        An error occurred while parsing custom action attribute "value" with value "${fn:escapeXml(myvalue)}": &lt;br /&gt;            org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.&amp;lt;/p&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;It's the old mismatched spec issue again. Same solution as described in &lt;a href="http://dev-answers.blogspot.com/2006/12/according-to-tld-or-attribute.html"&gt;According to TLD or attribute directive in tag file, attribute &lt;i&gt;X&lt;/i&gt; does not accept any expressions&lt;/a&gt; - namely, fix the schema reference in the web.xml and make sure the JSP has the right tablib uri reference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-7448858647855175940?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/7448858647855175940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=7448858647855175940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7448858647855175940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/7448858647855175940'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/02/orgapachetaglibsstandardlangjstlparserp.html' title='org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116952649610395523</id><published>2007-01-23T15:18:00.001+11:00</published><updated>2011-10-13T09:50:24.292+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parameters'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='post'/><category scheme='http://www.blogger.com/atom/ns#' term='HTTP'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='no result'/><title type='text'>GWT POST request doesn't include parameters</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;GWT POST request parameters HTTP HTML RequestBuilder AJAX&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Following the GWT documentation for making a http-post but it's not clear what the post data should look like if you want it to include form parameters. The newer documentation for &lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.http.client.html"&gt;com.google.gwt.http.client&lt;/a&gt; has a bit more detail but the server side code processing the request (a java servlet) says there's no parameters in the request.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;It's not in the documentation, but if you want to post form data you must set the "Content-type" header value in the request to "application/x-www-form-urlencoded"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;For Example:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;StringBuffer postData = new StringBuffer();&lt;br /&gt;// note param pairs are separated by a '&amp;amp;' &lt;br /&gt;// and each key-value pair is separated by a '='&lt;br /&gt;postData.append(URL.encode("YourParameterName")).append("=").append(URL.encode("YourParameterValue"));&lt;br /&gt;postData.append("&amp;amp;");&lt;br /&gt;postData.append(URL.encode("YourParameterName2")).append("=").append(URL.encode("YourParameterValue2"));&lt;br /&gt;&lt;br /&gt;RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, "/yourserver/formprocessor"));&lt;br /&gt;builder.setHeader("Content-type", "application/x-www-form-urlencoded");&lt;br /&gt;try {&lt;br /&gt;  builder.sendRequest(postData.toString(), this /* or other RequestCallback impl*/);&lt;br /&gt;} catch (RequestException e) {&lt;br /&gt;  // handle this&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;This sample chapter from the JavaScript™ Phrasebook is useful: &lt;a href="http://www.quepublishing.com/articles/article.asp?p=669066&amp;amp;seqNum=3&amp;amp;rl=1"&gt;Sending a POST Request&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116952649610395523?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116952649610395523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116952649610395523' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116952649610395523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116952649610395523'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/01/gwt-post-request-doesnt-include.html' title='GWT POST request doesn&apos;t include parameters'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116882840771557607</id><published>2007-01-15T13:23:00.000+11:00</published><updated>2007-01-28T12:32:50.866+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parameters'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='servlets'/><title type='text'>How to give initialisation parameters to a GWT component</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;GWT init initialisation parameter dynamic config&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Where you have a servlet, JSP or other technology dynamically producing the HTML "host page" for a GWT component, it makes sense that you may want to parameterise the way the GWT component renders/behaves based on certain initialisation/input parameters.&lt;br /&gt;&lt;br /&gt;How do pass parameters into the Module?&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;There is a useful Dictionary facility in the Internationalisation (I18N) module ... it doesn't really have anything to do with Internationalisation but it's in this module because you &lt;span style="font-style: italic;"&gt;could &lt;/span&gt;get the host page to provide key-to-locale-specific-message mappings to save the Module using any hard coded message text in a specific language.&lt;br /&gt;&lt;br /&gt;It's generic enough that you could use it for any mapping of values.&lt;br /&gt;&lt;br /&gt;The GWT documentation for &lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.i18n.client.Dictionary.html"&gt;Dictionary&lt;/a&gt; shows how to import the I18N module to your own module and then load the key-value mappings defined in the host page from your GWT code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116882840771557607?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116882840771557607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116882840771557607' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116882840771557607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116882840771557607'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/01/how-to-give-initialisation-parameters.html' title='How to give initialisation parameters to a GWT component'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116797335602993640</id><published>2007-01-05T16:01:00.000+11:00</published><updated>2011-10-13T09:50:55.218+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>GWT shell resource not found *.nocache.html</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;GWT AJAX shell resource not found nocache.html cache.html&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Following the Developer guide for making a GWT UI module. The code compiles fine with the GWT compiler and I now what to test and run using the GWT shell.&lt;br /&gt;&lt;br /&gt;It starts up fine but I get the following error in the tree log of the shell when it opens up the HTML test page:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;The development shell servlet received a request for&lt;br /&gt;'com.example.gwt.mypackage.client.MyEntryPointClass.nocache.html'&lt;br /&gt;in module 'com.example.gwt.mypackage.MyModuleName'&lt;/pre&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;My examplisation of the error message highlights what the problem was ...&lt;br /&gt;&lt;br /&gt;The HTML "host page" must reference the module name in the meta tag, not the EntryPoint class or the ".client" package (it should be called .client if you want to use the GWT expectations for where things are). The module name is typically the package name parent of the ".client" package plus the name of the *.gwt.xml config file minus the extension.&lt;br /&gt;&lt;br /&gt;Eg:&lt;br /&gt;&amp;lt;meta name='gwt:module' content='com.example.gwt.MyModuleName'/&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116797335602993640?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116797335602993640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116797335602993640' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116797335602993640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116797335602993640'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/01/gwt-shell-resource-not-found.html' title='GWT shell resource not found *.nocache.html'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116788063604779317</id><published>2007-01-04T13:59:00.000+11:00</published><updated>2011-10-13T09:51:10.297+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xalan'/><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>JSTL TransformerFactoryImpl ClassCastException on WAS 6.0.2.11</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;JSTL TransformerFactoryImpl ClassCastException WAS 6.0.2.11 xalan JAXP core xerces&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;A web application that has the following properties:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;includes the JAXP api jar files (in WEB-INF\lib)&lt;/li&gt;&lt;li&gt;deploys with the class loader properties of "Parent Last"&lt;/li&gt;&lt;li&gt;uses JSTL core&lt;/li&gt;&lt;/ol&gt;Will encounter the following stack trace from WAS when ever a JSP is loaded that contains JSTL (core reference):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;JSP Processing Error&lt;br /&gt;HTTP Error Code: 500&lt;br /&gt;java.lang.ClassCastException: org.apache.xalan.processor.TransformerFactoryImpl&lt;br /&gt;at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)&lt;br /&gt;at com.ibm.ws.jsp.translator.visitor.validator.PageDataImpl._getInputStream(PageDataImpl.java:125)&lt;br /&gt;at com.ibm.ws.jsp.translator.visitor.validator.PageDataImpl.getInputStream(PageDataImpl.java:117)&lt;br /&gt;at org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:156)&lt;br /&gt;at org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)&lt;br /&gt;at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateTagLib(ValidateVisitor.java:939)&lt;br /&gt;at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspRootStart(ValidateVisitor.java:453)&lt;br /&gt;at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:124)&lt;br /&gt;at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:110)&lt;br /&gt;at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:121)&lt;br /&gt;at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:168)&lt;br /&gt;at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:81)&lt;br /&gt;at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.translateJsp(JSPExtensionServletWrapper.java:360)&lt;br /&gt;at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper._checkForTranslation(JSPExtensionServletWrapper.java:329)&lt;br /&gt;at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.checkForTranslation(JSPExtensionServletWrapper.java:237)&lt;br /&gt;at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:144)&lt;br /&gt;at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3003)&lt;br /&gt;at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)&lt;br /&gt;at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)&lt;br /&gt;at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)&lt;br /&gt;at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:88)&lt;br /&gt;at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)&lt;br /&gt;at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)&lt;br /&gt;at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)&lt;br /&gt;at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)&lt;br /&gt;at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)&lt;br /&gt;at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)&lt;br /&gt;at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)&lt;br /&gt;at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1470)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;In short, make sure the JSPs, JSTL refs and the web app are 2.4 compliant (see past post: &lt;a href="http://dev-answers.blogspot.com/2006/12/according-to-tld-or-attribute.html#specs"&gt;What Spec?&lt;/a&gt;) and install the latest fix pack for WAS from IBM.&lt;br /&gt;&lt;br /&gt;In detail, the following Problem ID is a different issue but underlying problem is the same - incorrect handling of loading XML &amp;amp; XSLT API classes for Parent Last apps - &lt;a href="http://www-1.ibm.com/support/docview.wss?rs=180&amp;amp;uid=swg1PK26233"&gt;IBM - PK26233&lt;/a&gt;. The comment says it is resolved in the fix pack 6.0.2.15 for WebSphere Application Server, but I used 6.0.2.17 seeing it was newer - &lt;a href="http://www-1.ibm.com/support/docview.wss?rs=180&amp;amp;uid=swg24014309"&gt;V6.0.2 Fix Pack 17&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116788063604779317?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116788063604779317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116788063604779317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116788063604779317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116788063604779317'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2007/01/jstl-transformerfactoryimpl.html' title='JSTL TransformerFactoryImpl ClassCastException on WAS 6.0.2.11'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116588718331443789</id><published>2006-12-12T12:24:00.002+11:00</published><updated>2011-10-13T09:51:51.208+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>According to TLD or attribute directive in tag file, attribute value does not accept any expressions</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;Compile JSP tomcat JSTL error "According to TLD or attribute directive in tag file, attribute value does not accept any expressions"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Compile error from tomcat when it encounters a JSP: "According to TLD or attribute directive in tag file, attribute value does not accept any expressions"&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;For some reason the JSP is using the 1.2 JSP (and 1.0 JSTL) and EL expressions aren't understood. There's a lot of hits on the web for this but in summary there are 2 important things to do to ensure you're getting the right version of the spec:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Reference the correct servlet specification in your deployment descriptor:&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;web-app version="2.4"&lt;br /&gt; xmlns="http://java.sun.com/xml/ns/j2ee"&lt;br /&gt; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Reference the correct JSTL uri in your JSP:&lt;br /&gt;change&lt;pre&gt;&lt;br /&gt;&amp;lt;%@ taglib uri='http://java.sun.com/jstl/core' prefix='c'%&amp;gt;&lt;/pre&gt;&lt;br /&gt;to&lt;pre&gt;&lt;br /&gt;&amp;lt;%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="" name="specs"&gt;&lt;/a&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="4" style="text-align: center;"&gt;&lt;b&gt;What Specification goes with what?&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td nowrap="nowrap" rowspan="2"&gt;&lt;b&gt;Web-app&lt;i&gt;(deployment schema)&lt;/i&gt;&lt;/b&gt;&lt;/td&gt;&lt;td&gt;2.3&lt;/td&gt;&lt;td&gt;2.4&lt;/td&gt;&lt;td&gt;2.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;http://java.sun.com/dtd/web-app_2_3.dtd&lt;/td&gt;&lt;td&gt;http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&lt;/td&gt;&lt;td&gt;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Servlet&lt;/b&gt;&lt;/td&gt;&lt;td&gt;2.3&lt;/td&gt;&lt;td&gt;2.4&lt;/td&gt;&lt;td&gt;2.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;JSP&lt;/b&gt;&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;&lt;td&gt;2.0&lt;/td&gt;&lt;td&gt;2.1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="2"&gt;&lt;b&gt;JSTL&lt;i&gt;(core uri reference)&lt;/i&gt;&lt;/b&gt;&lt;/td&gt;&lt;td&gt;1.0&lt;/td&gt;&lt;td&gt;1.1&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;http://java.sun.com/jstl/core&lt;/td&gt;&lt;td&gt;http://java.sun.com/jsp/jstl/core&lt;/td&gt;&lt;td&gt;http://java.sun.com/jsp/jstl/core&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Tomcat&lt;/b&gt;&lt;/td&gt;&lt;td&gt;4.x&lt;/td&gt;&lt;td&gt;5.x&lt;/td&gt;&lt;td&gt;6.x&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;WebSphere&lt;/b&gt;&lt;/td&gt;&lt;td&gt;5.x&lt;/td&gt;&lt;td&gt;6.x&lt;/td&gt;&lt;td&gt;7.x (?)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116588718331443789?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116588718331443789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116588718331443789' title='97 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116588718331443789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116588718331443789'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/12/according-to-tld-or-attribute.html' title='According to TLD or attribute directive in tag file, attribute value does not accept any expressions'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>97</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116553942658902010</id><published>2006-12-08T11:51:00.000+11:00</published><updated>2011-10-13T09:52:26.098+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xalan'/><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>WebSphere DTMConfigurationException: No default implementation found</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;WebSphere DTMConfigurationException DTMManager xalan 6.0.2.11&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;After upgrading the WebSphere Application Server JDK with the .11 Fix pack (making it 6.0.2.11) there is the following error when my web app. tries to get a transformer:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;org.apache.xml.dtm.DTMConfigurationException: No default implementation found&lt;br /&gt;    at org.apache.xml.dtm.DTMManager.newInstance(DTMManager.java:177)&lt;br /&gt;    at org.apache.xpath.XPathContext.&lt;init&gt;(XPathContext.java:125)&lt;br /&gt;    at org.apache.xalan.transformer.TransformerImpl.&lt;init&gt;(TransformerImpl.java:398)&lt;br /&gt;    at org.apache.xalan.templates.StylesheetRoot.newTransformer(StylesheetRoot.java:197)&lt;/init&gt;&lt;/init&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The problem seems to be at least associated with the fix pack creating a new file "xalan.properties" in APPSERVER_HOME\java\jre\lib. It could also be upgrading the xalan libraries as well (in xml.jar).&lt;br /&gt;&lt;br /&gt;Edit this file - you'll notice this isn't defining any properties, everything is commented out - and add the property:&lt;br /&gt;org.apache.xml.dtm.DTMManager=org.apache.xml.dtm.ref.DTMManagerDefault&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Alternatively, remove or rename this file and the problem should also go away.&lt;br /&gt;&lt;br /&gt;Alternatively again, add the JVM system property "org.apache.xml.dtm.DTMManager". You can do this on WebSphere by going to:&lt;br /&gt;Application servers &amp;gt; server1 &amp;gt; Process Definition &amp;gt; Java Virtual Machine&lt;br /&gt;... and adding to the Generic JVM arguments:&lt;br /&gt;&lt;code&gt;-Dorg.apache.xml.dtm.DTMManager=org.apache.xml.dtm.ref.DTMManagerDefault&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Restart the server and the problem should also go away - use this approach for where you don't have access to the APPSERVER_HOME\java\jre\lib files and can only configure your application's JVM.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116553942658902010?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116553942658902010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116553942658902010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116553942658902010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116553942658902010'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/12/websphere-dtmconfigurationexception-no.html' title='WebSphere DTMConfigurationException: No default implementation found'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116357031698830418</id><published>2006-11-15T16:53:00.000+11:00</published><updated>2006-12-08T12:17:59.766+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PDF'/><category scheme='http://www.blogger.com/atom/ns#' term='IIS'/><category scheme='http://www.blogger.com/atom/ns#' term='no result'/><title type='text'>IIS not streaming PDF</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;IIS 6.0 not streaming PDF IE&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;As is the theme for many of these posts. The setup is IIS -&gt; ISAPI/JK -&gt; Tomcat. The application running on Tomcat is generating PDF. If you access the application directly via Tomcat the PDF content is returned fine - ie. Opens via the Adobe Reader plugin in IE. If you access the application via IIS you get a blank page in IE. All other formats work fine.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The problem in this case was a setting in IIS that zips the content it's serving up. This is fine for HTML as browsers recognise this and unzip. For the Adobe PDF reader, the content is not expected to be compressed - hence the blank page, it doesn't know what to do (but an error message would have helped). &lt;br /&gt;&lt;br /&gt;In IIS Manager, right click on the folder "Web Sites" and choose Properties. Click the "Services" tab. &lt;br /&gt;&lt;br /&gt;You need to make sure HTML Compression is turned off. I’m not sure about the IIS 5.0 isolation setting ...&lt;br /&gt;&lt;br /&gt;Restart IIS – right click the server (above the Web Sites folder) and choose All Tasks &gt; Restart IIS ...&lt;br /&gt;&lt;br /&gt;Select the "Restart Internet Services on YOUR-SERVER" option. It will only take only a few seconds (rather than 300).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116357031698830418?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116357031698830418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116357031698830418' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116357031698830418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116357031698830418'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/11/iis-not-streaming-pdf.html' title='IIS not streaming PDF'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116345840955561409</id><published>2006-11-14T09:44:00.000+11:00</published><updated>2006-11-14T09:54:34.166+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIS'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>Can't start IIS "World Wide Web Publishing Service" Error 126</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;Could not start IIS "World Wide Web Publishing Service" "Error 126"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Trying to manually start the WWW service for IIS gives the following message:&lt;br /&gt;"ERROR 126: The specified module could not be found."&lt;br /&gt;&lt;br /&gt;The "World Wide Web Publishing Service" goes back to a stopped status. While this service is stopped, in the IIS Manager, the Web Sites folder is marked with an X and none of the Web Sites can be started.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Need to check the Event Logs (Start &gt; Programs &gt; Administrative Tools &gt; Event Viewer)&lt;br /&gt;&lt;br /&gt;Clicking on the Application section shows a number of Errors. The most recent two errors were the most relevant:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Could not load all ISAPI filters for site/service.  Therefore startup aborted.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The HTTP Filter DLL C:\[path to a DLL that no longer exists] failed to load.  The data is the error.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;I had to go into IIS Manager. View the ISAPI Filters (right click the Web Sites Folder &gt; Properties &gt; ISAPI Filters) and remove the filter that was referencing this DLL.&lt;br /&gt;&lt;br /&gt;Going back to services, the WWW Publishing Service then starts fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116345840955561409?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116345840955561409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116345840955561409' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116345840955561409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116345840955561409'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/11/cant-start-iis-world-wide-web.html' title='Can&apos;t start IIS &quot;World Wide Web Publishing Service&quot; Error 126'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116296582084067815</id><published>2006-11-08T16:56:00.000+11:00</published><updated>2006-11-08T17:04:31.056+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>spring webflow 1.0 build fails</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;spring webflow 1.0 build sample&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Downloaded the latest spring webflow distribution (1.0) and trying to build (just a sample app. in this case) causes NoClassDefFoundError errors ... but surely this is shipped with the right libraries?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ivy.configure:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      [echo] reading ivy config&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; [ivy:configure] :: Ivy 1.4 - 20061009124215 :: http://ivy.jayasoft.org/ ::&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; BUILD FAILED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; java.lang.NoClassDefFoundError: org/apache/commons/httpclient/UsernamePasswordCredentials&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;It's not enough to make sure you have Java 1.5+ and Ant 1.6+ ... these must also not have different versions of the dependent libraries.&lt;br /&gt;&lt;br /&gt;In my case, there was an different version of apache commons-httpclient in the ant/lib folder ... removing this from the /lib folder or pointing at a 'clean' version of Ant resolves the issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116296582084067815?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116296582084067815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116296582084067815' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116296582084067815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116296582084067815'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/11/spring-webflow-10-build-fails.html' title='spring webflow 1.0 build fails'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-116253128129094313</id><published>2006-11-03T16:18:00.000+11:00</published><updated>2006-11-03T16:24:25.026+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>java.io.FileNotFoundException spring-beans_2_0.dtd</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;java.io.FileNotFoundException spring-beans_2_0.dtd spring java 2.0 MVC&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Following the guide (such as the "Spring Framework MVC application step-by-step") and you get this error about the DTD reference in the &lt;appname&gt;-servlet.xml file. &lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;This is an easy one, the file seems to have been renamed ... the DTD is actually accessed from the web. Change the _2_0 to -2.0&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans_2_0.dtd"&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"&amp;gt;&lt;/code&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-116253128129094313?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/116253128129094313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=116253128129094313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116253128129094313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/116253128129094313'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/11/javaiofilenotfoundexception-spring.html' title='java.io.FileNotFoundException spring-beans_2_0.dtd'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-115810800903956918</id><published>2006-09-13T10:37:00.000+10:00</published><updated>2006-09-13T10:47:57.043+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>vmware "parent of this virtual disk could not be opened"</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;vmware "parent of this virtual disk could not be opened" moved windows linux&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Moved a Virtual Machine setup (Windows 2003 Server RC2) that was created on a machine running Windows (2003 server) to a Linux machine (RedHat Enterprise 4) and get the following error when you try to view the the disk properties or start the Virtual Machine:&lt;br /&gt;&lt;br /&gt;... "parent of this virtual disk could not be opened" ...&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;If you've taken a snapshot for this VM in the past there will be a text file with a name like: "Windows Server 2003 Standard Edition-000001.vmdk". Stupidly, this contains a full path reference to the location of the "parent file" (which by default will be in the same folder). This has to be changed if you move the VM to another host machine.&lt;br /&gt;&lt;br /&gt;Below is what this file looked like ... simply remove the full path reference, save the file and try again.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# Disk DescriptorFile&lt;br /&gt;version=1&lt;br /&gt;CID=e615c3de&lt;br /&gt;parentCID=67e1d188&lt;br /&gt;createType="twoGbMaxExtentSparse"&lt;br /&gt;parentFileNameHint="&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;c:\virtual machines\test-server\&lt;/span&gt;Windows Server 2003 Standard Edition.vmdk"&lt;br /&gt;# Extent description&lt;br /&gt;RW 4192256 SPARSE "Windows Server 2003 Standard Edition-000001-s001.vmdk"&lt;br /&gt;RW 4192256 SPARSE "Windows Server 2003 Standard Edition-000001-s002.vmdk"&lt;br /&gt;RW 4192256 SPARSE "Windows Server 2003 Standard Edition-000001-s003.vmdk"&lt;br /&gt;RW 4192256 SPARSE "Windows Server 2003 Standard Edition-000001-s004.vmdk"&lt;br /&gt;RW 8192 SPARSE "Windows Server 2003 Standard Edition-000001-s005.vmdk"&lt;br /&gt;&lt;br /&gt;# The Disk Data Base&lt;br /&gt;#DDB&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-115810800903956918?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/115810800903956918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=115810800903956918' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115810800903956918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115810800903956918'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/09/vmware-parent-of-this-virtual-disk.html' title='vmware &quot;parent of this virtual disk could not be opened&quot;'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-115388903560036121</id><published>2006-07-26T14:16:00.000+10:00</published><updated>2011-10-13T09:53:48.661+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='slide'/><title type='text'>Slide 2.1 working with Security on WebSphere 6.0.2.11</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;slide 2.1 security websphere 6.0.2.11 &lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Slide 2.1 does not work "out-of-the-box" with WebSphere 6. It seems most slide-users have worked around it by turning off security. Clearly, this is not an option for a production system - so we need to get it working.&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;This is a elaboration on my post &lt;a href="http://www.mail-archive.com/slide-user@jakarta.apache.org/msg12099.html"&gt;#12099&lt;/a&gt; to the slide-user list. Thanks to the post on the list from Lynn Richards &lt;a href="http://www.mail-archive.com/slide-user@jakarta.apache.org/msg10690.html"&gt;#10690&lt;/a&gt;. A committer is welcome to add any content from here to the Slide-Wiki on &lt;a href="http://wiki.apache.org/jakarta-slide/WebSphereSetup"&gt;WebSphere Setup&lt;/a&gt;. It certainly needs more detail. You will need: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;slide-server-2.1 &lt;a href="http://jakarta.apache.org/site/downloads/downloads_slide.cgi"&gt;source code&lt;/a&gt; - in order to make corrections and re-build.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;IBM HTTP Server (IHS) and the Web Server Plugin&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Slide Source Changes - UTF-8&lt;/h2&gt;There are a two places (that I could find) in the code where the content type is set to &lt;code&gt;"text/xml; charset=\"UTF-8\""&lt;/code&gt;. The WebSphere servlet container can't handle the quotes around the encoding. This needs to be changed to &lt;code&gt;"text/xml; charset=UTF-8"&lt;/code&gt;. This works for Tomcat too, so perhaps it should be committed in the server source?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;jakarta-slide-server-src-2.1\src\webdav\server\org\apache\slide\webdav\method\AbstractWebdavMethod.java&lt;br /&gt;     &lt;pre&gt;128c128&lt;br /&gt;&amp;lt; public static final String TEXT_XML_UTF_8 = "text/xml; charset=\"UTF-8\"";&lt;br /&gt;---&lt;br /&gt;&amp;gt; public static final String TEXT_XML_UTF_8 = "text/xml; charset=UTF-8";&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;jakarta-slide-server-src-2.1\src\webdav\server\org\apache\slide\webdav\util\DirectoryIndexGenerator.java&lt;br /&gt;     &lt;pre&gt;145c145&lt;br /&gt;&lt;br /&gt;&amp;lt;         res.setContentType("text/html; charset=\"UTF-8\"");&lt;br /&gt;---&lt;br /&gt;&amp;gt;         res.setContentType("text/html; charset=UTF-8");&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;Slide Configuration&lt;/h2&gt;&lt;h3&gt;"/" Path "Forbidden"&lt;/h3&gt;The issue where all paths appear to be "/" no matter what path is accessed on Slide is due to the following code in jakarta-slide-server-src-2.1-\src\webdav\server\org\apache\slide\webdav\util\WebdavUtils.java and a difference in implementation between WebSphere and Tomcat&lt;br /&gt;&lt;pre&gt;    String result = null;&lt;br /&gt;  if (config.isDefaultServlet()) {&lt;br /&gt;      result = req.getServletPath();&lt;br /&gt;  } else {&lt;br /&gt;      result = req.getPathInfo();&lt;br /&gt;  }&lt;/pre&gt;req.getServletPath() seems to always be "/" in WebSphere when the WebDAV servlet is mapped to "/". The solution is to force slide to use the getPathInfo() method by turning off the Default Servlet flag in the web.xml:&lt;br /&gt;&lt;pre&gt; &amp;lt;param-name&amp;gt;default-servlet&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;lt;param-value&amp;gt;false&amp;lt;/param-value&amp;gt;&lt;/pre&gt;&lt;h3&gt;The EAR file might be corrupt? web.xml validation&lt;/h3&gt;When you install a war file on WebSphere the web.xml is parsed and validated against the spec. Any discrepancies with the spec will give you the un-helpful error that the "EAR file might be corrupt". Add the detail below to you opening node in the web.xml and make sure it is valid according to the schema (using an editor such as XML Spy) before including it in the war file:&lt;br /&gt;&lt;pre&gt;&amp;lt;web-app&lt;br /&gt; version="2.4"&lt;br /&gt; xmlns="http://java.sun.com/xml/ns/j2ee";&lt;br /&gt; xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt; schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&amp;gt;&lt;/pre&gt;You'll find that all the &amp;lt;description&amp;gt; nodes are in the wrong place within the &amp;lt;init-param&amp;gt; nodes - they should be the first child rather than the last.&lt;br /&gt;More importantly is the security-constraint section. To get authentication, you must define the constraint for all the possible http (WebDAV) methods. The problem is according to the web.xml spec, the only valid http-method values are: HEAD, GET, POST, PUT, DELETE, OPTIONS and TRACE. To have the other WebDAV methods secure as well, leave the specific http-method constraints out. This node is optional and if you don't specify any, all Http methods will be secure and this will include the WebDAV extensions too.&lt;br /&gt;&lt;pre&gt; &amp;lt;!-- Uncomment this to get authentication --&amp;gt;&lt;br /&gt;&amp;lt;security-constraint&amp;gt;&lt;br /&gt;  &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;      &amp;lt;web-resource-name&amp;gt;DAV resource&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;      &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;      &amp;lt;!-- comment out the explicit http-method list                     &lt;br /&gt;   'valid' Http Methods&lt;br /&gt;         &amp;lt;http-method&amp;gt;GET&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;HEAD&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;OPTIONS&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;POST&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;PUT&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;DELETE&amp;lt;/http-method&amp;gt;&lt;br /&gt;         Http Extensions&lt;br /&gt;         &amp;lt;http-method&amp;gt;COPY&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;LOCK&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;MKCOL&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;MOVE&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;PROPFIND&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;PROPPATCH&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;UNLOCK&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;VERSION-CONTROL&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;REPORT&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;CHECKIN&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;CHECKOUT&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;UNCHECKOUT&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;MKWORKSPACE&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;UPDATE&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;LABEL&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;MERGE&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;BASELINE-CONTROL&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;MKACTIVITY&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;ACL&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;SEARCH&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;BIND&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;UNBIND&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;REBIND&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;SUBSCRIBE&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;UNSUBSCRIBE&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;POLL&amp;lt;/http-method&amp;gt;&lt;br /&gt;         &amp;lt;http-method&amp;gt;NOTIFY&amp;lt;/http-method&amp;gt;&lt;br /&gt;  --&amp;gt;&lt;br /&gt;  &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;  &amp;lt;auth-constraint&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;SlideAdmin&amp;lt;/role-name&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;User&amp;lt;/role-name&amp;gt;&lt;br /&gt;  &amp;lt;/auth-constraint&amp;gt;&lt;br /&gt;&amp;lt;/security-constraint&amp;gt;&lt;/pre&gt;&lt;h2&gt;WebSphere Configuration&lt;/h2&gt;&lt;h3&gt;Global Security&lt;/h3&gt;How to configure WebSphere with a Custom or LDAP realm is beyond the scope of this post (maybe later) but with Security turned on, you will need to either Turn off "Java 2 Security" or define a policy file for the slide web-app. &lt;br /&gt;With Java 2 security on, slide will get AccessControlException(s) when it tries to check for the existence of things like its properties file (from the "java.home" location? See Configuration.java - it will catch the exception if the load fails but not if the file.exists() check is forbidden).&lt;br /&gt;&lt;h3&gt;WebServer Integration&lt;/h3&gt;It appears that when the WebSphere AppServer handles HTTP requests it assumes the same default as the IBM WebServer, namely - content is only to be expected and read for POST and PUT requests. This page on IBM's support site is old but seems to apply for v6 as well: &lt;a href="http://www-1.ibm.com/support/docview.wss?rs=180&amp;amp;uid=swg21145705"&gt;Software&lt;br /&gt; Group Ref #1145705&lt;/a&gt;.&lt;br /&gt;To get the WebDAV extensions to HTTP working you need to configure the IBM WebServer with the AppServer using IBM's WebServer Plugin. It's in the Plugin where you're then able to allow content in all HTTP/WebDAV requests. Ie "true" for &lt;br /&gt;&lt;b&gt;AcceptAllContent&lt;/b&gt;&lt;br /&gt; Specifies whether or not users can include content in POST, PUT, GET, and HEAD requests when a Content-Length or Transfer-encoding header is contained in the request header. You can specify one of the following values for this attribute:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;&lt;li&gt;true if content is to be expected and read for all requests&lt;/li&gt;&lt;li&gt;false if content only is only to be expected and read for POST and PUT requests. &lt;/li&gt;&lt;/ul&gt;false is the default. &lt;br /&gt;If you have version 6, with the WebServer and AppServer on the same machine and the Server setup to propagate changes to the plugin-cfg.xml file, you can set this flag in the Admin Console:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Web servers &amp;gt; webserver1 &amp;gt; Plug-in properties &amp;gt; Request and response&lt;br /&gt;Check the box for - Accept content for all requests &lt;/li&gt;&lt;/ul&gt;I found integrating the AppServer with the WebServer via plugin not a simple process. You should do this before installing slide and use the /snoop servlet to check if things are working via the WebServer.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Aside:&lt;/i&gt; If you try a URL like: http://localhost/snoop/hello/world/ok you will see the difference between the ServletPath and PathInfo in WebSphere and why we need to force slide to use the later.&lt;br /&gt;You could actually use a WebServer other than IBM's. The difference will be that you may need to manually configure the Plugin in the AppServer and WebServer and then when the Admin console updates the plugin-cfg.xml file you may need to copy this to the place where the WebServer expects.&lt;br /&gt;&lt;h2&gt;Installing Slide&lt;/h2&gt;After you install/deploy the slide.war (I gave it the enterprise application name of "slide") you need to edit the Class Loading properties.&lt;br /&gt;Class loader mode = Parent Last&lt;br /&gt;WAR class loader policy = Application&lt;br /&gt;This avoids the problem of WebSphere v6 including an older version of JDOM (1.0Beta7) in its lib folder as well as property file loading issues. Check that slide has been correctly associated with the WebServer Plugin:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Enterprise Applications &amp;gt; slide &amp;gt; Map modules to servers&lt;br /&gt;You should see something like:&lt;br /&gt;Server&lt;br /&gt;WebSphere:cell=wasNode01Cell,node=webserver1_node,server=webserver1&lt;br /&gt;WebSphere:cell=wasNode01Cell,node=wasNode01,server=server1&lt;/li&gt;&lt;/ul&gt;It's important to see both the server and the webserver "module" in this list. &lt;br /&gt;After starting the slide application it should be accessible via the WebServer (port 80 by default). All access will have to be via the WebServer and this should hopefully work without error and will be secure.&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-115388903560036121?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/115388903560036121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=115388903560036121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115388903560036121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115388903560036121'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/07/slide-21-working-with-security-on.html' title='Slide 2.1 working with Security on WebSphere 6.0.2.11'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-115318738728632746</id><published>2006-07-18T11:48:00.000+10:00</published><updated>2011-10-13T09:55:49.691+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>AccessControlException access denied WebSphere</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;java.security.AccessControlException: access denied websphere&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;After enabling global security in WebSphere, all access to file system resources from the web app gives "AccessControlException" messages. The application can't load it's properties file(s).&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;I actually found this solution pretty quickly with a google search. Need to turn off "Java 2 Security" in the Global Security settings or define a policy that allows your application access to the resources it needs.&lt;br /&gt;&lt;br /&gt;To disable "Java 2 Security"&lt;br /&gt;&lt;ol&gt;&lt;li&gt;  Open the administrative console and go to Security--&amp;gt;Gloabal Security&lt;/li&gt;&lt;li&gt;  Uncheck "Enforce Java 2 Security"&lt;/li&gt;&lt;li&gt;  Save the changes and restart WebSphere&lt;/li&gt;&lt;/ol&gt;To define a policy&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This is a little bit more complex, See: &lt;a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.zseries.doc/info/zseries/ae/tsec_dynamic.html"&gt;Configuring Java 2 security policy files&lt;/a&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;It may help to know how to grant everything&lt;pre&gt;&lt;br /&gt;grant {&lt;br /&gt;  java.security.AllPermissions;&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-115318738728632746?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/115318738728632746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=115318738728632746' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115318738728632746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115318738728632746'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/07/accesscontrolexception-access-denied.html' title='AccessControlException access denied WebSphere'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-115311399122969192</id><published>2006-07-17T15:07:00.000+10:00</published><updated>2011-10-13T09:55:45.129+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Can't deploy WAR on WebSphere 6 - AppDeploymentException</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;websphere war deploy install "The EAR file might be corrupt or incomplete" DeploymentDescriptorLoadException&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Trying to deploy ("install") a war file (for the Jakarta Slide WebDAV Server) in WebSphere after it appeared to work fine on Tomcat &amp;amp; JBoss gets the following &lt;em&gt;two&lt;/em&gt; messages in the WebSphere Administration Console:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The EAR file might be corrupt or incomplete.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;AppDeploymentException: [null] com.ibm.etools.j2ee.commonarchivecore.exception.DeploymentDescriptorLoadException: IWAE0022E Exception occurred loading deployment descriptor for module "&lt;span style="font-style: italic;"&gt;[warfilename]&lt;/span&gt;.war" in EAR file "&lt;span style="font-style: italic;"&gt;[WebSphereHome]&lt;/span&gt;\profiles\&lt;span style="font-style: italic;"&gt;[ProfileName]&lt;/span&gt;\wstemp\&lt;span style="font-style: italic;"&gt;[TempFolder]&lt;/span&gt;\upload\&lt;span style="font-style: italic;"&gt;[warfilename]&lt;/span&gt;_war.ear" &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The first message (and the .ear part of the second) is very confusing and from a quick google it seems that many developers are thrown off and attempt to put their war file in an ear ... it's not necessary.&lt;br /&gt;&lt;br /&gt;The clue was the cause exception "DeploymentDescriptorLoadException" in the second message. It's a long story how I got to this, but the issue was my deployment descriptor - WEB-INF\web.xml. WebSphere validates this against the schema for the web.xml and is not flexible. Add this detail to you opening &amp;lt;web-app&amp;gt; node in your web.xml and make sure it is valid according to the schema (using an editor such as XML Spy):&lt;br /&gt;&lt;pre&gt;&amp;lt;web-app &lt;span style="font-weight: bold;"&gt;version="2.4" &lt;br /&gt;xmlns="http://java.sun.com/xml/ns/j2ee"   &lt;br /&gt;xsi="http://www.w3.org/2001/XMLSchema-instance" &lt;br /&gt;schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In my situation slide contained a security-constraint which in turn referenced http-method names that aren't valid according to the web.xml spec (limited to HEAD, GET, POST, PUT, DELETE, OPTIONS, TRACE). But WebDAV extends the HTTP spec ... not sure what to do about that. Commenting out the entire security-constraint section or the offending http-method references fixes the issue for the mean time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Next issue is how to configure some basic users and roles in WebSphere. The documentation seems very thorough on overviews and definitions, but light-on when it comes to how-tos.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-115311399122969192?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/115311399122969192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=115311399122969192' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115311399122969192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115311399122969192'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/07/cant-deploy-war-on-websphere-6.html' title='Can&apos;t deploy WAR on WebSphere 6 - AppDeploymentException'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-115257646162508975</id><published>2006-07-11T10:06:00.000+10:00</published><updated>2011-10-13T09:54:48.143+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jk'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>Cannot load mod_jk.so into server: The specified procedure could not be found</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;apache mod_jk mod_jk.so "The specified procedure could not be found" tomcat&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;I've download the Apache HTTP server and according to the apache.org site "2.2.2 is the best available version". The downloaded mod_jk from the tomcat.apache.org where it claimed that the mod_jk-1.2.14-apache-2.0.54.so download was for Apache 2.0, and works with Apache 2.0.55 and later ... there was no 2.2.x download so I assumed (wrongly) that this would work with Apache 2.2.x as it is "later". &lt;br /&gt;&lt;br /&gt;Added the LoadModule line in the httpd.conf file as instructed in &lt;a href="http://tomcat.apache.org/connectors-doc/howto/apache.html"&gt;http://tomcat.apache.org/connectors-doc/howto/apache.html&lt;/a&gt; &lt;br /&gt;and got the following error: &lt;br /&gt;&lt;pre&gt;Cannot load &lt;em&gt;[full path]&lt;/em&gt;/mod_jk.so into server: The specified procedure could not be found&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;You can't use a Apache 2.0.x module with Apache 2.2.x apparently - it must be built pointing at that specific version of Apache (if you're clever enough to build your own modules with the source code then this is no problem - you could get the source for JK 1.2.15 and build it pointing at your install Apache 2.2.x). &lt;br /&gt;&lt;br /&gt;If you rely on the binaries built by Apache, use the HTTP server 2.0.x&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-115257646162508975?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/115257646162508975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=115257646162508975' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115257646162508975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115257646162508975'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/07/cannot-load-modjkso-into-server.html' title='Cannot load mod_jk.so into server: The specified procedure could not be found'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-115206034875396960</id><published>2006-07-05T10:42:00.000+10:00</published><updated>2011-10-13T09:54:56.868+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xalan'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>xalan parameter must be a "valid Java Object"</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;xalan IllegalArgumentException "The value of param" "must be a valid Java Object"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;On an application server (JBoss) where you can't control the version of xalan that is getting loaded with your web application, you get the following error in the preparation phase of a XML transform:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;java.lang.IllegalArgumentException: The value of param &lt;em&gt;[param-name]&lt;/em&gt; must be a valid Java Object&lt;br /&gt;at org.apache.xalan.transformer.TransformerImpl.setParameter(TransformerImpl.java:1587)&lt;/pre&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;The issue here is that the object being set in the &lt;span style="font-family: 'courier new';"&gt;javax.xml.transform.Transformer.setParameter(String name, Object)&lt;/span&gt; is a null. In xalan 2.5.0  this doesn't seem to be an issue, but in xalan 2.7.0 it is!&lt;br /&gt;&lt;br /&gt;Stop the null being put set as a parameter and the issue is solved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;The last few posts have been around this issue of the web application not being able to control its classpath in JBoss. I've tried the &lt;a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration"&gt;ClassLoadingConfiguration &lt;/a&gt;advice in the JBoss Wiki with no success. The endorsed directory contains the different xalan library (as visible in the "sun.boot.class.path" system property) and despite specifying some sort of isolation, the endorsed directory still applies. As the issue was ultimately with a newer version of xalan and it's probably be bad to be putting nulls in anyway I haven't tried to force this class/library loading issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-115206034875396960?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/115206034875396960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=115206034875396960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115206034875396960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115206034875396960'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/07/xalan-parameter-must-be-valid-java.html' title='xalan parameter must be a &quot;valid Java Object&quot;'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-115188635530695285</id><published>2006-07-03T10:25:00.000+10:00</published><updated>2011-10-13T09:55:20.936+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSE'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>Invalid or corrupt jarfile</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;"Invalid or corrupt jarfile" java -jar manifest file&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Packaging up a class with a main method into a jar-file using ant gives the following error when you try to run it with the &lt;code&gt;java -jar &lt;em&gt;[jarfile]&lt;/em&gt;&lt;/code&gt; command: "Invalid or corrupt jarfile".&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Using the ant task to create the manifest file on-the-fly gives you and entry like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Manifest-Version: 1.0&lt;br /&gt;Ant-Version: Apache Ant 1.6.2&lt;br /&gt;Created-By: 1.4.2_07-b05 (Sun Microsystems Inc.)&lt;br /&gt;Main-Class: com.example.MyMainClass&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Creating the manifest file myself, with the bare essentials fixes the issue:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Manifest-Version: 1.0&lt;br /&gt;Main-Class: com.example.MyMainClass&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;With more investigation I'm sure I could have got the dynamic meta-file creation working with Ant as I know other people do - there must be some peculiarity in the combination of my ant version (1.6.2), java version (1.4.2_07) and perhaps the current phase of the moon.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Parsing of the Meta-inf file has been an issue that has come-up, been fixed and then come-up again for sun. See: &lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4991229"&gt;Bug Id: 4991229&lt;/a&gt;. If you can work out if this bug exists in the your (or my) version of the Java SE you have more patience that me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-115188635530695285?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/115188635530695285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=115188635530695285' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115188635530695285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/115188635530695285'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/07/invalid-or-corrupt-jarfile.html' title='Invalid or corrupt jarfile'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-114983237083465461</id><published>2006-06-13T15:52:00.000+10:00</published><updated>2011-10-13T09:55:32.176+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xerces'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='JSE'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>What version of xerces have I got?</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;xerces version print classpath parser&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;This is kind of related to the previous two posts. With XML parsing + classpath issues it's often useful to know not only what version of Xerces you're using but also where it's been loaded from.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;This is based on the equivalently useful site of &lt;a href="http://javaalmanac.com/egs/java.lang/ClassOrigin.html"&gt;Java Almanac - Determining from Where a Class Was Loaded&lt;/a&gt;. The point they make about the system classloader is crucial: "It is not possible to determine the location of classes loaded by the system class loader in the same way since the class' code source is null."&lt;br /&gt;&lt;br /&gt;If your Xerces is the one loaded by the system, then this may explain some unusual behaviour if your web application expects to ship with it's own version.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  public static String getXercesDetails() {&lt;br /&gt;       // no hard-writed references to the version class because it might be unavailable&lt;br /&gt;       Class c;&lt;br /&gt;       Method m;&lt;br /&gt;       Object obj;&lt;br /&gt;&lt;br /&gt;       try {&lt;br /&gt;           c = Class.forName("org.apache.xerces.impl.Version");&lt;br /&gt;           m = c.getDeclaredMethod("getVersion", new Class[] {});&lt;br /&gt;           if (Modifier.isStatic(m.getModifiers())) {&lt;br /&gt;               // Xerces 2.x&lt;br /&gt;               obj = null;&lt;br /&gt;           } else {&lt;br /&gt;               // Xerces 2.1.x&lt;br /&gt;               obj = c.newInstance();&lt;br /&gt;           }&lt;br /&gt;          &lt;br /&gt;           ProtectionDomain pDomain = c.getProtectionDomain();&lt;br /&gt;           CodeSource cSource = pDomain.getCodeSource();&lt;br /&gt;           String loc = "?";&lt;br /&gt;           if (cSource != null) {&lt;br /&gt;               loc = cSource.getLocation().toString();&lt;br /&gt;           } else {&lt;br /&gt;               // CodeSource is null, Xerces loaded by system class loaded.&lt;br /&gt;               loc = "(system classloader? sun.boot.class.path = " + System.getProperty("sun.boot.class.path") + ")";&lt;br /&gt;           }&lt;br /&gt;          &lt;br /&gt;           return ((String) m.invoke(obj, new Object[] {})) + " from " + loc;&lt;br /&gt;       } catch (Exception e) {&lt;br /&gt;           return "unkown (" + e.getMessage() + ")";&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Xerces (and Xalan) in the endorsed directory can cause some nasty issues for applications that expect to use their own version. See the JBoss Issue: &lt;a href="http://jira.jboss.com/jira/browse/JBAS-2073"&gt;JBAS-2073&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-114983237083465461?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/114983237083465461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=114983237083465461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114983237083465461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114983237083465461'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/06/what-version-of-xerces-have-i-got.html' title='What version of xerces have I got?'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-114983216880142086</id><published>2006-06-10T15:49:00.000+10:00</published><updated>2011-10-13T09:57:20.054+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='JSE'/><title type='text'>How do you print the java classpath?</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;java servlet "print classpath"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;This requirement came in trying to diagnose the previous post. It'd be quite useful in a any enterprise/web application to be able to see the classpath in use (perhaps via an administration page).&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;This is based on post on &lt;a href="http://www.java-tips.org/java-se-tips/java.lang/how-to-print-classpath.html"&gt;Java Tips&lt;/a&gt; (very useful site), but with the difference that your web application will have a different classloader to the system one. You'll need the classloader being used by a class within the web application (such as the one responsible for producing your admin-output).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; public String getClasspathString() {&lt;br /&gt;     StringBuffer classpath = new StringBuffer();&lt;br /&gt;     ClassLoader applicationClassLoader = this.getClass().getClassLoader();&lt;br /&gt;     if (applicationClassLoader == null) {&lt;br /&gt;         applicationClassLoader = ClassLoader.getSystemClassLoader();&lt;br /&gt;     }&lt;br /&gt;     URL[] urls = ((URLClassLoader)applicationClassLoader).getURLs();&lt;br /&gt;      for(int i=0; i &amp;lt; urls.length; i++) {&lt;br /&gt;          classpath.append(urls[i].getFile()).append("\r\n");&lt;br /&gt;      }    &lt;br /&gt;     &lt;br /&gt;      return classpath.toString();&lt;br /&gt;  }&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-114983216880142086?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/114983216880142086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=114983216880142086' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114983216880142086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114983216880142086'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/06/how-do-you-print-java-classpath.html' title='How do you print the java classpath?'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-114983213470752773</id><published>2006-06-09T15:48:00.000+10:00</published><updated>2006-07-03T10:41:59.333+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xerces'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>An invalid XML character (Unicode: 0x0) was found in the comment</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;xerces "An invalid XML character (Unicode: 0x0) was found in the comment"&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;This is a very specific problem I admit, but what are you meant to do? From the &lt;a href="http://xmlconf.sourceforge.net/xml/reports/report-xerces-jnv.html"&gt;error message list&lt;/a&gt; for the Xerces parser, it's clear that this "0x0" character is a bad thing, but it's also clear that I haven't put this character in the document.&lt;br /&gt;&lt;br /&gt;Something's wrong with the reading/processing of the byte stream containing the XML content.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;A very specific solution too. In this case it was that file was being stored using a Slide implementation that came with JBoss. I don't know anything about this implementation, but it doesn't seem to work when you're accessing it (via WebDAV) with jakarta-slide-client libraries. Switching the storage to using the latest version from &lt;a href="http://jakarta.apache.org/slide"&gt;Jakarta&lt;/a&gt; fixed this issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-114983213470752773?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/114983213470752773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=114983213470752773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114983213470752773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114983213470752773'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/06/invalid-xml-character-unicode-0x0-was.html' title='An invalid XML character (Unicode: 0x0) was found in the comment'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-114465034776267628</id><published>2006-04-10T16:25:00.000+10:00</published><updated>2006-04-13T22:20:33.936+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='error messages'/><title type='text'>shell script 'bad interpreter'</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;tomcat catalina.sh "bad interpreter" sh shell&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Can't execute the shell script on linux. Everything seems in fine. The environment variables required by the script, the $PATH and the script has user has execute permission on the script (chmod +x catalina.sh).&lt;br /&gt;&lt;br /&gt;Error each time is&lt;br /&gt;bad interpreter: No such file or directory&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;DOS/Non-Ascii characters in the script! Not sure vi doesn't highlight this (as ^M for example) - it could be a quirk with that version of vi or the console being used (putty in this case). &lt;br /&gt;&lt;br /&gt;The solution is simple: &lt;br /&gt;dos2unix catalina.sh catalina.sh&lt;br /&gt;&lt;br /&gt;Try again via: &lt;br /&gt;./catalina.sh run &lt;br /&gt;&lt;br /&gt;All works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-114465034776267628?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/114465034776267628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=114465034776267628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114465034776267628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114465034776267628'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/04/shell-script-bad-interpreter.html' title='shell script &apos;bad interpreter&apos;'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-114342382000316982</id><published>2006-03-27T12:43:00.000+11:00</published><updated>2006-03-27T12:48:24.936+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Property/Variable reference in log4j.properties</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;environment variable log4j.properties&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;In your log4j.properties file a relative reference to a folder is fine as long as you start the program (eg tomcat) the same way from the same location every time.&lt;br /&gt;Eg: log4j.appender.LOGGER.File=../logs/slide.log&lt;br /&gt;(Ok if you're starting tomcat from CATALINA_HOME/bin/catalina.bat)&lt;br /&gt;&lt;br /&gt;If not, you will get FileNotFound exceptions when the parent folder can't be found. In the above example, starting tomcat from a windows service will have the user.dir=C:\WINDOWS\SYSTEM32, so ../logs is C:\WINDOWS\logs &amp;amp; doesn't exist.&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Make explicit file references using system properties in the log4j.properties file. Note, you &lt;em&gt;can not&lt;/em&gt; use environment variables (that's a platform specific concept).&lt;br /&gt;&lt;br /&gt;System properties can be set in code or for this purpose should be set with the "-D" JVM option.&lt;br /&gt;&lt;br /&gt;With the above tomcat example, most of the important environment variables to tomcat are copied into corresponding system properties if you use the standard scripts.&lt;br /&gt;Eg: in catalina.bat: -Dcatalina.home=%CATALINA_HOME%&lt;br /&gt;&lt;br /&gt;This allows you to reference the property using ${...} notation&lt;br /&gt;Eg: log4j.appender.LOGGER.File=${catalina.home}/logs/slide.log&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-114342382000316982?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/114342382000316982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=114342382000316982' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114342382000316982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114342382000316982'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/03/propertyvariable-reference-in.html' title='Property/Variable reference in log4j.properties'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-114333669061483900</id><published>2006-03-26T12:30:00.000+11:00</published><updated>2006-03-27T12:16:51.966+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Missing JAAS Config</title><content type='html'>&lt;span class="daKeywords"&gt;Keywords:&lt;/span&gt;&lt;br /&gt;"Unable to locate a login configuration" JAAS Tomcat&lt;br /&gt;&lt;br /&gt;&lt;span class="daProblem"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Starting up tomcat as a service on Windows the above error message with stack trace displayed. The file it's referring to as missing is in the folder %CATALINA_HOME%/conf/jaas.config&lt;br /&gt;&lt;br /&gt;&lt;span class="daSolution"&gt;Solution:&lt;/span&gt;&lt;br /&gt;You need to make sure the system property "java.security.auth.login.config"&lt;br /&gt;is defined &amp; this should be a full path to the file. This can be via the -D JVM option. eg:&lt;br /&gt;-Djava.security.auth.login.config=%CATALINA_BASE%\conf\jaas.config&lt;br /&gt;&lt;br /&gt;Depending on whether you run tomcat via "catalina.bat" or the windows service will determine the best place to put this option.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="daNotes"&gt;Notes:&lt;/span&gt;&lt;br /&gt;Ok, not a profound solution to start with but it's a solution with a problem description that will hopefully come up in a similar keyword search. I had to scroll to the 6th search result on &lt;a href="http://www.google.com.au/search?hl=en&amp;amp;q=%22Unable+to+locate+a+login+configuration%22+JAAS+Tomcat"&gt;http://www.google.com.au/search?hl=en&amp;amp;q=%22Unable+to+locate+a+login+configuration%22+JAAS+Tomcat&lt;/a&gt;&lt;br /&gt;which actually isn't too bad.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-114333669061483900?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/114333669061483900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=114333669061483900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114333669061483900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114333669061483900'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/03/missing-jaas-config.html' title='Missing JAAS Config'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24384544.post-114283924489315061</id><published>2006-03-20T18:15:00.000+11:00</published><updated>2006-05-08T09:35:08.496+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='1st post'/><title type='text'>Tired of googling questions with no answers</title><content type='html'>&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;&lt;/o:p&gt;As a Developer/Architect, &lt;span style="font-weight: bold;"&gt;questions &lt;/span&gt;are almost an everyday part of life. Particularly working with Java and Open Source technologies; limited documentation, weird stack traces, unexpected behaviour typically lead me to the web for help. I'm not alone ... &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;     &lt;p class="MsoPlainText"&gt;The typical sequence of problem solving goes as follows:&lt;br /&gt;&lt;/p&gt; &lt;ol&gt;   &lt;li&gt;Putting question/error message/keywords in a web search.&lt;/li&gt;   &lt;li&gt;This will almost always find results - in the hundreds &amp;amp; thousands - great!&lt;/li&gt;   &lt;li&gt;Follow links to the search results and I'll find at least one if not dozens of descriptions of the exact same problem scenario.&lt;/li&gt;   &lt;li&gt;Scroll down, follow the links to posted comments/replies. I'll find heaps of people saying they have the same problem ... but no solution. If I'm really unlucky, I'll find the last comment from the original poster saying "Oh forget it, I've resolved the issue ... thanks".&lt;/li&gt;   &lt;li&gt;The wording/phrasing of someone's comment may lead me to thinking about my problem differently, inspire me to try something else and alleluia! The problem is solved and I move on the next one. &lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt; &lt;/ol&gt;             &lt;p class="MsoPlainText"&gt;&lt;o:p&gt;&lt;/o:p&gt;If I'm conscientious I'll note this in my trusty notebook for future reference. On the (very) rare occasion I'm feeling good will toward all people-kind I'll try to see if I can put at least my take on the solution on one of the websites I saw the exact same question. Inevitably they’ll only allow posts from "members" or the site will be an extract from some mailing list that I'm not on or that stopped existing months or even years ago. Then I go back to work. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;     &lt;p class="MsoPlainText"&gt;&lt;o:p&gt;&lt;/o:p&gt;The web is a great place for collaboration ... but I can't help but feeling that when it comes to the specific field of developer problems we're collaborating our questions very well but not the solutions. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoPlainText"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoPlainText"&gt;Hence the Dev-Answers blog is born. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;     &lt;p class="MsoPlainText"&gt;&lt;o:p&gt;&lt;/o:p&gt;I really wouldn't expect people to read this regularly ... I expect this to be the longest post. My only hope is that if you search for a specific problem and end up being directed here, the specific solution (for me at least) will be here. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;     &lt;p class="MsoPlainText"&gt;&lt;o:p&gt;&lt;/o:p&gt;Comments are welcome as long as they add to the understanding of the problem/solution described. If you have a question use one of the various other forums to post it and then when you have an answer, post it here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;     &lt;p class="MsoPlainText"&gt;&lt;o:p&gt;&lt;/o:p&gt;If no one uses this at all then at least it's an online version of my notebook ... &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;     &lt;p class="MsoPlainText"&gt;&lt;o:p&gt;&lt;/o:p&gt;No Questions!&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24384544-114283924489315061?l=dev-answers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-answers.blogspot.com/feeds/114283924489315061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24384544&amp;postID=114283924489315061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114283924489315061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24384544/posts/default/114283924489315061'/><link rel='alternate' type='text/html' href='http://dev-answers.blogspot.com/2006/03/tired-of-googling-questions-with-no.html' title='Tired of googling questions with no answers'/><author><name>Kevin Jansz</name><uri>http://www.blogger.com/profile/18251927796029491111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_eN2tCLV2N8A/SFGyk1T5OvI/AAAAAAAAAjo/wYCU3EEdRcQ/S220/KEVIN.JPG'/></author><thr:total>0</thr:total></entry></feed>
