Login  Register

Problem rendering the form with Java framework

Posted by Blue Rose on Jan 12, 2010; 4:35pm
URL: https://discuss.orbeon.com/Problem-rendering-the-form-with-Java-framework-tp1012246.html

Hello,

I'm a newbie. I need info on how to tell my servlet to display the xform I created. For security reason, I purposely placed my xform under WEB-INF directory. Since I don't know how to display my xform from my servlet app (yet), I'm trying to access it using a simple HTML file for now.

FYI, I followed the guide on Orbeon Wiki (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications) very closely but since I run my app and the xform both on the same context, I skipped the configuration on the application server, e.g. server.xml.

=======
test.html
=======

<html>
  <head></head>
  <body>
   <a href="resources/xforms">My xform</a><br />
  </body>
</html>

I went to access the page at http://localhost:8080/xform_context/test.html and clicked on the hyperlink, it appeared blank. Nothing was displayed. Tomcat log did not show any error messages either. From what it seemed, it looks like Tomcat didn't know how to render the xform correctly.

======
web.xml
======
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

  <display-name>Testing xforms</display-name>
  <description>Testing of sample hello-xforms</description>

    <!-- Declare and configure the Orbeon Forms XForms filter -->
    <filter>
        <filter-name>orbeon-xforms-filter</filter-name>
        <filter-class>org.orbeon.oxf.servlet.OrbeonXFormsFilter</filter-class>
        <init-param>
            <param-name>oxf.xforms.renderer.context</param-name>
            <param-value>/xform_context</param-value>
        </init-param>
    </filter>   

    <!-- This is necessary so that XForms engine resources can be served appropriately -->
    <filter-mapping>
        <filter-name>orbeon-xforms-filter</filter-name>
        <url-pattern>/resources/xforms/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>

</web-app>

==================
My webapp structure
==================
- xform_context
- test.html
- WEB-INF
- web.xml
- lib
- orbeon-xforms-filter.jar
- resources
- xforms
- page-flow.xml
- view.xhtml

=========
Environment
=========
Orbeon-3.7.1
Tomcat 5.5
Windows XP

Let me know if you need additional information from my end.

Any feedback would be greatly appreciated.


Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws