Integrate Orbeon with Struts 2

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Integrate Orbeon with Struts 2

NewUser
Hi,

Facing problems to integrate Struts2 and Orbeon.  I am getting 404 error when I try to access my application for any action.

I am following instruction given as per

http://www.orbeon.com/ops/doc/reference-xforms-java#d45e11

I am trying separate deployment option on Tomcat 6.0

Any help is greatly appreciated.


web.xml is
========
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" 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">

    <display-name>Struts Blank</display-name>

    <filter>
        <filter-name>orbeon-xforms-filter</filter-name>
        <filter-class>org.orbeon.oxf.servlet.OPSXFormsFilter</filter-class>
        <init-param>
            <param-name>oxf.xforms.renderer.context</param-name>
            <param-value>/orbeon</param-value>
        </init-param>
       
    </filter>
   
   <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>    
           
    <filter-mapping>
        <filter-name>ops-xforms-filter</filter-name>
        <url-pattern>/example/Xform*.jsp</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
               
    <filter-mapping>
        <filter-name>orbeon-xforms-filter</filter-name>
        <url-pattern>/orbeon/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
   
   
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

</web-app>


server.xml is
==========

<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
 
    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->
   
   
    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->          
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->
    <!--
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">        
    -->
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->        

      <!-- The request dumper valve dumps useful debugging information about
           the request and response data received and sent by Tomcat.
           Documentation at: /docs/config/valve.html -->
      <!--
      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
      -->

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->
           <Context path="/StrutsOrbeon" docBase="StrutsOrbeon" debug="5" reloadable="true" crossContext="true"></Context>
       </Host>
    </Engine>
  </Service>
</Server>


 


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Integrate Orbeon with Struts 2

Alessandro Vernet
Administrator
On Apr 29, 2009, at 12:23 PM, [hidden email] wrote:

> Facing problems to integrate Struts2 and Orbeon.  I am getting 404  
> error when I try to access my application for any action.

You are getting a 404 error accessing which URL? I guess it is a URL  
of your application? Would you not get a 404 if you didn't have the  
filter setup in the web.xml?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Integrate Orbeon with Struts 2

NewUser
You are correct, I am getting error while accessing URL of my application. Yes, if I take off the filter mapping for Orbeon, I don't get the 404 error. The application runs well.
 
Madhuri

On Thu, Apr 30, 2009 at 3:11 AM, Alessandro Vernet <[hidden email]> wrote:
On Apr 29, 2009, at 12:23 PM, [hidden email] wrote:

Facing problems to integrate Struts2 and Orbeon.  I am getting 404 error when I try to access my application for any action.

You are getting a 404 error accessing which URL? I guess it is a URL of your application? Would you not get a 404 if you didn't have the filter setup in the web.xml?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/



--
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




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Integrate Orbeon with Struts 2

Alessandro Vernet
Administrator
Madhuri,

On Apr 30, 2009, at 3:28 AM, Madhuri Deodhar wrote:

> You are correct, I am getting error while accessing URL of my  
> application. Yes, if I take off the filter mapping for Orbeon, I  
> don't get the 404 error. The application runs well.

Could the orbeon.log file give your more information in this case?  
Otherwise, I'd recommend you create a simple war file that shows the  
issue and that we can run along a regular orbeon.war to reproduce the  
problem.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/



--
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
Reply | Threaded
Open this post in threaded view
|

disable font selector in rich text ditor

Jency Thomas
In reply to this post by Alessandro Vernet
Hi,

Is there any way to disable the font selection combo in the rich text
editor?
<xforms:textarea ref="instance('freetext')/textarea"
mediatype="text/html">
    <xforms:label></xforms:label>
</xforms:textarea>

This is the scenario where we need this:

In the xforms, after entering the data, we store the xml instance in a
database. Since the content inside the rich text editor is html, the
html tags too will be stored. Later, we need to print the data. While
printing, all other data will be in calibri font. So, we need the
content inside the rich text editor too in the same font. Other
formatting tags in the rich text editor should remain the same.

Please help me with your suggestions.

Thanks in advance
Jency



--
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
Reply | Threaded
Open this post in threaded view
|

Re: disable font selector in rich text ditor

Alessandro Vernet
Administrator
Jency ,

Jency Thomas wrote
Is there any way to disable the font selection combo in the rich text
editor?
At this point you will need to change xforms.js for this. Of course, the main downside if you change xforms.js is that every time you upgrade Orbeon Forms you will need to "patch" the xforms.js with your change. If nevertheless this is what you want to, look for "new YAHOO.widget.Editor" and you will find the code that creates the RTE and does the setup of the toolbar.

And if you haven't changed some of the Orbeon Forms JavaScript code before, you might want to have a look at:

http://wiki.orbeon.com/forms/doc/contributor-guide/javascript-development

Alex
Reply | Threaded
Open this post in threaded view
|

RE: Re: disable font selector in rich text ditor

Jency Thomas

Thanks Alex. I'll try to edit the js file or use the Yahoo's editor.

-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: Tuesday, May 26, 2009 12:33 PM
To: [hidden email]
Subject: [ops-users] Re: disable font selector in rich text ditor


Jency ,


Jency Thomas wrote:
>
> Is there any way to disable the font selection combo in the rich text
> editor?
>

At this point you will need to change xforms.js for this. Of course, the
main downside if you change xforms.js is that every time you upgrade
Orbeon
Forms you will need to "patch" the xforms.js with your change. If
nevertheless this is what you want to, look for "new
YAHOO.widget.Editor"
and you will find the code that creates the RTE and does the setup of
the
toolbar.

And if you haven't changed some of the Orbeon Forms JavaScript code
before,
you might want to have a look at:

http://wiki.orbeon.com/forms/doc/contributor-guide/javascript-developmen
t

Alex

-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
--
View this message in context:
http://www.nabble.com/Integrate-Orbeon-with-Struts-2-tp23303853p23717729
.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.

CONFIDENTIALITY NOTICE: The information contained in this electronic
message and any attachments to this message are intended for the
exclusive use of the addressee(s) and may contain proprietary,
confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this
message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.

www.stabilixindia.com



--
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