myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wu, Billy" <Billy...@stercomm.com>
Subject RE: Trinidad 1.0.9 - Malformed Form Action URI
Date Fri, 10 Oct 2008 11:33:35 GMT
Ah that works, after removing myfaces-api-1.1.5.jar and
myfaces-impl-1.1.5.jar.  The only reason I have it there is because
Trinidad-demo-1.0.9.war has those jars inside.

Thanks for your help.

Billy

-----Original Message-----
From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
Matthias Wessendorf
Sent: Friday, October 10, 2008 12:12 AM
To: MyFaces Discussion
Subject: Re: Trinidad 1.0.9 - Malformed Form Action URI

On Fri, Oct 10, 2008 at 6:13 AM, Wu, Billy <Billy_Wu@stercomm.com>
wrote:
> OK, so I still can't make this to work.  It seems that the URI is
> generated from myfaces' org.apache.myfaces.application.jsp
> .JspViewHandlerImpl.  And it seems that the problem is from
> getServletMapping method.  When the form is generating, the method
> couldn't find the servletMapping by using the external context,
> and just return the first one, which is not right.  It seems to me



> that Trinidad 1.0.9 is not compatible with Sun's JSF 1.1 reference

u said
org.apache.myfaces.application.jsp.JspViewHandlerImpl

which is the MyFaces impl

please make sure there is only 1 jsf impl.

-M



> implementation.  Can anyone confirm that?
>
> So here is the summary of my problem,
>
> I have a logon page (the very first page of my app) that has a form.
> When looking at the generated HTML source, the action of the form is
> action="/myapp/adf/logon.jsp", as opposed to
> action="/myapp/faces/logon.jsp"
>
> My environment, Sun's JSF 1.1 RI running on embedded Jetty 6.1.11.  I
> didn't change my logon.jsp page to add any of the Trinidad stuff.  I
> was just trying to run the trinidad's demo pages on my webapp.
>
> I have set default render kit (as described below).  And my web.xml
> is the following.  Any help is appreciated.
>
> Thanks,
>
> Billy
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app 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">
>
>
<context-param><param-name>javax.faces.STATE_SAVING_METHOD</param-name><
> param-value>server</param-value></context-param>
>
<context-param><param-name>javax.faces.CONFIG_FILES</param-name><param-v
>
alue>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value></c
> ontext-param>
>
<context-param><param-name>com.sun.faces.validateXml</param-name><param-
> value>true</param-value></context-param>
>
<context-param><param-name>com.sun.faces.verifyObjects</param-name><para
> m-value>false</param-value></context-param>
>
>
<filter><filter-name>UploadFilter</filter-name><filter-class>com.sun.rav
>
e.web.ui.util.UploadFilter</filter-class><init-param<param-name>maxSize<
>
/param-name><param-value>1000000</param-value></init-param><init-param<p
>
aram-name>sizeThreshold</param-name><param-value>4096</param-value></ini
> t-param></filter>
>
> <!-- trinidad stuff -->
>  <filter>
>    <filter-name>trinidad</filter-name>
>
>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-
> class>
>  </filter>
>  <filter>
>    <filter-name>demoRedirect</filter-name>
>
>
<filter-class>org.apache.myfaces.trinidaddemo.webapp.RedirectFilter</fil
> ter-class>
>  </filter>
>
> <!-- trinidad stuff -->
>  <filter-mapping>
>    <filter-name>trinidad</filter-name>
>    <servlet-name>faces</servlet-name>
>  </filter-mapping>
>  <filter-mapping>
>    <filter-name>demoRedirect</filter-name>
>    <url-pattern>*.jspx</url-pattern>
>  </filter-mapping>
>
>  <servlet>
>    <servlet-name>faces</servlet-name>
>    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>  </servlet>
>
>  <servlet>
>    <servlet-name>resources</servlet-name>
>
>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servl
> et-class>
>  </servlet>
>
>  <!-- resource loader servlet -->
>
>
<servlet><servlet-name>ThemeServlet</servlet-name><servlet-class>com.sun
> .rave.web.ui.theme.ThemeServlet</servlet-class></servlet>
>
>
>
<servlet-mapping><servlet-name>ThemeServlet</servlet-name><url-pattern>/
> theme/*</url-pattern></servlet-mapping>
>
>   <servlet-mapping>
>                <servlet-name>faces</servlet-name>
>                <url-pattern>/faces/*</url-pattern>
>        </servlet-mapping>
>
>   <servlet-mapping>
>                <servlet-name>resources</servlet-name>
>                <url-pattern>/adf/*</url-pattern>
>        </servlet-mapping>
>
>    <session-config>
>        <session-timeout>30</session-timeout>
>    </session-config>
>    <welcome-file-list>
>        <welcome-file>faces/logon.jsp</welcome-file>
>
>
</welcome-file-list><error-page><exception-type>javax.servlet.ServletExc
>
eption</exception-type><location>/DashboardErrorHandler</location></erro
>
r-page><error-page><exception-type>java.io.IOException</exception-type><
>
location>/DashboardErrorHandler</location></error-page><error-page><exce
>
ption-type>javax.faces.FacesException</exception-type><location>/Dashboa
>
rdErrorHandler</location></error-page><error-page><exception-type>com.su
>
n.rave.web.ui.appbase.ApplicationException</exception-type><location>/Da
> shboardErrorHandler</location></error-page>
>    <jsp-config>
>
>
<jsp-property-group><url-pattern>*.jspf</url-pattern><is-xml>true</is-xm
> l></jsp-property-group>
>
> <!-- trinidad stuff -->
>    <taglib>
>      <taglib-uri>http://myfaces.apache.org/trinidad/demo</taglib-uri>
>      <taglib-location>/WEB-INF/survey.tld</taglib-location>
>    </taglib>
>
>    <taglib>
>      <taglib-uri>http://myfaces.apache.org/trinidaddemo</taglib-uri>
>      <taglib-location>/WEB-INF/trinidaddemo.tld</taglib-location>
>    </taglib>
>
>        </jsp-config>
>    <security-constraint>
>        <display-name>Login Redirect for http</display-name>
>        <web-resource-collection>
>            <web-resource-name>HTTPS Login</web-resource-name>
>            <description>HTTPS Login</description>
>            <url-pattern>/*</url-pattern>
>            <http-method>GET</http-method>
>            <http-method>POST</http-method>
>            <http-method>HEAD</http-method>
>            <http-method>PUT</http-method>
>            <http-method>OPTIONS</http-method>
>            <http-method>TRACE</http-method>
>            <http-method>DELETE</http-method>
>        </web-resource-collection>
>        <user-data-constraint>
>            <description/>
>            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
>        </user-data-constraint>
>        </security-constraint>
>    </web-app>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Wu, Billy
> Sent: Thursday, October 09, 2008 11:38 AM
> To: 'MyFaces Discussion'
> Subject: RE: Trinidad 1.0.9 - Malformed Form Action URI
>
> I don't think this is related to the renderkit.  It doesn't matter if
I
> have it defined or not in my faces-config.xml, I am still getting the
> malformed URI.
>
> The form that I am using is from Sun's JSF 1.1 RI implementation.
>
> xmlns:ui="http://www.sun.com/web/ui"
> <ui:form id="form1">
>
> Can anyone tell me how the URI is generated?  Or what class it is so I
> can check out the logic?  It seems like it is also related to the
order
> of the servlet definition.  When I moved the servlets around, the URI
> was getting generated differently.
>
> Thanks,
>
> Billy
>
>
> -----Original Message-----
> From: Wu, Billy
> Sent: Thursday, October 09, 2008 10:59 AM
> To: 'MyFaces Discussion'
> Subject: RE: Trinidad 1.0.9 - Malformed Form Action URI
>
> Oh, and so yes, I have also added the stuff from web.xml.  The action
> URI is still malformed.
>
> -----Original Message-----
> From: Wu, Billy
> Sent: Thursday, October 09, 2008 10:58 AM
> To: 'MyFaces Discussion'
> Subject: RE: Trinidad 1.0.9 - Malformed Form Action URI
>
> Yes, I actually did that already when I added the demo to my app.  Is
> this the place that's causing the problem?
>
> -----Original Message-----
> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf
Of
> Matthias Wessendorf
> Sent: Thursday, October 09, 2008 10:53 AM
> To: MyFaces Discussion
> Subject: Re: Trinidad 1.0.9 - Malformed Form Action URI
>
> <faces-config>
>
>  <application>
>    <!-- Use the Trinidad RenderKit -->
>    <default-render-kit-id>
>      org.apache.myfaces.trinidad.core
>    </default-render-kit-id>
> ....
>
>
> the stuff from the web.xml (trinidad filter, resource servlet, etc)
> you added already, right ?
>
> -M
>
> On Thu, Oct 9, 2008 at 5:47 PM, Wu, Billy <Billy_Wu@stercomm.com>
wrote:
>> No, I have not.  How do I do that?
>>
>> I forgot to add that I am totally new to Trinidad, and pretty new to
> the
>> whole JSF technologies.
>>
>> Thanks,
>>
>> Billy
>>
>> -----Original Message-----
>> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf
> Of
>> Matthias Wessendorf
>> Sent: Thursday, October 09, 2008 10:44 AM
>> To: MyFaces Discussion
>> Subject: Re: Trinidad 1.0.9 - Malformed Form Action URI
>>
>> have you added the renderkit ?
>> we replace the renderer for <h:form>
>>
>> -M
>>
>> On Thu, Oct 9, 2008 at 5:39 PM, Wu, Billy <Billy_Wu@stercomm.com>
> wrote:
>>> Hi Everyone,
>>>
>>>
>>>
>>> I am using Sun's JSF 1.1's RI implementation, and would like to add
>>> Trinidad's AJAX Tree to my application.  My first step was trying to
>> add
>>> Trinidad's demo (version 1.0.9) to my web application without
> changing
>>> anything else.  After I added Trinidad's jars and added the settings
>> to the
>>> web.xml file, my application stopped working.  For some reason, the
>> adf
>>> resource uri was added to the action uri of the form (Sun's RI
form).
>> for
>>> example,
>>>
>>>
>>>
>>> <form id="form1" ... action="/mywebapp/adf/logon.jsp" >
>>>
>>>
>>>
>>> as opposed to the correct one,
>>>
>>>
>>>
>>> <form id="form1" ... action="/mywebapp/logon.jsp" >
>>>
>>>
>>>
>>> I got similar result by just adding trinidad's jars
>> (myfaces-api-1.1.5.jar,
>>> myfaces-impl-1.1.5.jar, Trinidad-api-1.0.9.jar,
>> Trinidad-impl-1.0.9.jar)
>>> without changing my web.xml.  (in this case, the action uri will
have
>>> another servlet's url interjected.)  Can someone help me with this?
>>>
>>>
>>>
>>> Oh, and we are using embedded Jetty 6.1.11.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Billy
>>>
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Mime
View raw message