xapp:choice gives internal error

X-Application Version: 4.1.1
Tamino Version :,
Platform : WinXP
WebContainer : Tomcat 4.1.17
JDK Version : 1.4.1

When I add an xapp:choice to my coding I get an internal error - web page attached. Without the xapp:choice the web page is displayed. The coding snippet follows:

Hello <xapp:display select="/User/EmployeeNumber"/>

Type <xapp:display select="/User/UserType"/>
<xapp:choice select="/User/UserType" type=“1”>


Where have I gone wrong?

Apache_Tomcat-4_1_17_-_Error_report.htm (6.79 KB)

Hi Patricia,

sorry I can’t read your error page. Could you please wrap it with a zip container?

By the way, we currently have public holidays in Germany and therefore not all working on X-Application are in the office.

But afterwards we will help you as soon as possible.

Bye and a happy new year


Hi Thorsten
We too have holidays here so I really wasn’t expecting any help before next week. In the meantime I have got around the error by using xapp:if statements. I have saved the error as a text file so hope you can read this one.

Happy New Year
Apache_Tomcat-4_1_17_-_Error_report.txt (6.27 KB)


I had a look at the error text. The problem is that the internal exception caused by the choice tag is encapsulated or hidden by a


and does not occur within the stacktrace.

Perhaps, a newer Tomcat version provides a better exception handling.

Therefore, I can only guess what the reason could be:

(1) The path “/User/UserType” does not refer a choice. We could verify this possibility if you post us the XML schema of your application.

(2) The User document is not have an associated schema. If you create / read / select a document without schema (not using the attribute ‘schema’ of an xapp:action or xapp:directcommand), yoiu can not use the tags xapp:loop and xapp:choice.


Hi Christian
I think I know what the problem is - I am trying to do a “choice” on the contents of an element and not on something defined as a choice in the schema. Please confirm if this is the case. I am attaching the schema and 2 jsp pages. The idea is to enter an employee number on testlogon.jsp and depending on the type of user the menu options will be displayed on testchoice.jsp.

Thanks - Priscilla
Choicezip.zip (2.42 KB)


yes, your suggestion was right. You are referencing to an element (UserType) with simple content, but not to a choice. An element is a ‘choice’ if it is a complex element with choice term.


<xs:element name = "UserType">
      <xs:element name="Administrator">
        <xs:complexType />
      <xs:element name="SDF">
        <xs:complexType />
      <xs:element name="Manager">
        <xs:complexType />
      <xs:element name="Employee">
        <xs:complexType />

In this case, you could use the xapp:choice for the element ‘UserType’.

In your case, you can use the xapp:if tag.