JSF: Load a view from an external servlet

Hi,

The application is build with jsf(myfaces).

I need to display into an existing view a view generated by an external servlet.

I declared in the web.xml:

<servlet>

<servlet-name>TestServlet</servlet-name>

<servlet class>package.TestServlet</servlet-class>

<load-on-startup>2</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>TestServlet</servlet-name>

<url-pattern>/sevlet/TestServlet</url-pattern>

</servlet-mapping>

In the .jsp I just added on a button:

action="#{bean.invoke}"

Where:

public void invoke()

{

String url = "/servlet/TestServlet";

FacesContext context = FacesContext.getCurrentInstance();

try

{

//ExternalContext ex=context.getExternalContext().;

context.getExternalContext().dispatch(url);

}

catch (Exception e)

{

e.printStackTrace();

}

finally

{

context.responseComplete();

}

}

If I try to run it I get:

message HTTP method POST is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method POST is not supported by this URL).

[1328 byte] By [LoadView_From_External_Servleta] at [2007-11-26 15:45:01]
# 1
><url-pattern>/sevlet/TestServlet</url-pattern>did u change this to <url-pattern>/servlet/TestServlet</url-pattern> and see?did check this may be the reason
kalania at 2007-7-8 22:04:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thank you, I changed the .jsp :<f:verbatim><iframe id="frm" src="../../../Sevlet_JSF/exteranl.faces" width="100%" LANGUAGE=javascript ONLOAD="return frm_onload(frm)"/></f:verbatim>With the above it is working.
LoadView_From_External_Servl at 2007-7-8 22:04:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...