FAQ – Frequently asked questions

Installation and Configuration

I downloaded the installer but couldn’t start it. What’s wrong?

One possible problem could be that .jar files are not linked to the JAVA executable on your system. You can start the installer from the command line with the following syntax: java -jar betterform.jar .

I running betterFORM under Tomcat 7 but keep getting CSRF Securitry errors – how can this be fixed?

DWR and Tomcat security features clash since Tomcat 7. This can be overcome by configuring the context of Tomcat with the following statement:

 <Context useHttpOnly=”false”> 

If you do not have a context.xml already create one and add attribute ‘useHttpOnly’ with a value of ‘false’. This will fix the error. Once DWR 3 is released betterFORM will upgrade to that and the issue will be gone.

An alternative method is to switch off the CSRF checking in DWR (not recommended on production systems) by setting ‘crossDomainSessionSecurity’ param to ‘false’ for DWRServlet in web.xml. See  http://directwebremoting.org/dwr/server/configuration/servlet/index.html for details.

My server is running into ClassCastException? with Xerces classes – what can be done?

On certain servers (e.g. Weblogic and JBOSS) the Xerces classes that come with betterFORM are not correctly loaded. Instead these servers use the Java-internal version of Xerces though the webapp classloader should handle webapp-specific libs with priority.

For a possible fix please see https://betterform.de/trac/ticket/81

How can i disable the debug bar?

To disable the debug bar that shows at the bottom of the page you have to change the property ‘betterform.debug-allowed’ in betterform-config.xml to ‘false’. In a deployed environment the betterform-config.xml is located in WEB-INF directory.

How change i change the port for betterFORM running on Jetty (betterFORM XML Suite formely betterFORM XRX)

In your install go to directory ‘tools/jetty/etc/’ and open jetty.xml in an editor. Change the entry

<SystemProperty name="jetty.port" default="8080"/>

Page authoring

How can i switch off the page exit confirmation?

By default each form which has changed data will display a page exit confirmation dialog when you click a link, close the page or hit the back button. However this may be unwanted in certain situations. To switch off the confirmation dialog add the following code snippet to the head of your page:

betterFORM RC5 and newer:

require(["dojo/ready","dojo/domReady!"], function(ready){
      console.debug("skipshutdown = true")

Before betterFORM RC5:

dojo.subscribe("/xf/ready", function(){

How can i set the width and height of a control with CSS?

betterFORM assigns CSS classes to all controls at init time. You can use these to style your controls. An example: for a input control in your form

<xf:input ref="foo"> ...

you will get an output looking similar to this:

<span class="xfControl xfInput ...>

Put the following in your CSS (either in the head of your document or some external CSS file you reference):

.xfInput > .xfValue{

Every control will have a child element with class ‘xfValue’ for the actual widget in the output. You can access and style any control in the output like this.

How can i suppress betterFORM CSS styling?

By adding the CSS class ‘no-bf-css’ to the body element of your HTML page the inclusion of the betterFORM default styles can be suppressed. This can be useful if you want to apply a completely custom rendering to your pages.

XForms submissions

How do i make PUT work with the ‘file:’ protocol?

PUT is supported for the file: protocol but you must be aware that your have to specify @replace=”none” on your submission. No other replace mode is supported.

Explanation: If no @replace is given it will default to “all” which will return a response stream that replaces the current viewport of your browser and shutdown the XForms processor. This surely make not much sense with a PUT to a file and therefore will be supported by betterFORM. The submission will fail without any effect.

Same is true for a replace=”instance” as it makes not much sense to echo the instance that you just submitted to a file.


What are the license terms when using betterFORM?

betterFORM is licensed under BSD and Apache 2 licenses. You may choose whatever is appropriate for you. The goal was to make betterFORM as free and business-friendly as possible. You may do anything with the sources as long as you retain the original copyright notices.

Is it possible to integrate betterFORM into my own applications and redistribute the bundle?

Yes it is.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

%d bloggers like this: