JSF Struts Integration Action lost on submit

Hi All
I've been tearing my hair out with this one for half a day. I am producing a web app using struts and jsf in conjunction. I have succesfully used the integration library on several pages, so I know the framework is in place. However for the following page I can produce valuechange events and process them on a javascript submit, and perform a quick return render, but when I press the submit button, the action is not forwarded through to struts action.
The jsp page :
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="s" uri="http://struts.apache.org/tags-faces" %>
<f:view>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<s:html>
<head>
<s:base/>
<title>selectplot.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<s:form action="/redirectSelectSite">
<table border="0">
<tr>
<td>Site Code</td>
<td><h:selectOneMenu id="siteSelect" value="#{SelectPlotForm.sitecode}" valueChangeListener="#{SelectPlotForm.processSiteChange}" onchange="this.form.submit();">
<f:selectItems id="siteSelectItem" value="#{SelectPlotForm.sites}" />
</h:selectOneMenu>
</td>
</tr>
<tr>
<td>Plot Number</td>
<td><h:selectOneMenu id="plotSelect" value="#{SelectPlotForm.plotno}" >
<f:selectItems id="plotSelectItem" value="#{SelectPlotForm.plots}" />
</h:selectOneMenu>
</td>
</tr>
<tr>
<td colspan="2" align="center"><h:commandButton id="submit" type="SUBMIT" value="Continue"/></td>
</tr>
</table>
<s:errors/>
</s:form>
</body>
</s:html>
</f:view>Backing Bean:
public class SelectPlotForm extends ActionForm {
// Omitted unwanted detail.
* @param event
* @throws AbortProcessingException
public void processSiteChange(ValueChangeEvent event)
throws AbortProcessingException {
if (null != event.getNewValue()) {
sitecode = ((String)event.getNewValue());
// Get the list of plots for the new sitecode.
this.setPlots(ChoicesInterface.getPlotsList(sitecode));
// Do a quick render response
FacesContext.getCurrentInstance().renderResponse();
}struts-config.xml extract
<action attribute="SelectPlotForm" name="SelectPlotForm" path="/redirectSelectSite" scope="session"
type="com.millwood.struts.action.RedirectSelectPlot"
validate="false" input="/selectPlot.faces" >
<forward name="success" path="/printchoices.faces" />
</action>and finally the struts action file :
package com.millwood.struts.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.config.ForwardConfig;
import com.millwood.Choices.Web.SelectPlotForm;
* Redirects the user of the selectPlot page to the appropriate action.
* @author James Salt
* @since 0.1
public class RedirectSelectPlot extends Action {
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
SelectPlotForm scf = (SelectPlotForm) form;
// Construct the foward entity on the fly.
ForwardConfig fc = new ForwardConfig();
fc.setName("result");
fc.setPath(scf.getActionurl()+ ".do?plotno=" + scf.getPlotno() + "&sitecode="+ scf.getSitecode());
mapping.addForwardConfig(fc);
return (mapping.findForward("result"));
}Sorry about the massive posting but I thought it better to provide all the information relevant as currently I am at a bit of a loss.
I have placed debug points at all the accessible parts of code, but non are triggered, so it must be being bounced in the ActionListener either in Struts or Faces before it tries to get the action.
Any help would be really, really appreciated.
Yours thankfully,
james salt

Change you action from:
<s:form action="/redirectSelectSite">
To:
<s:form action="/redirectSelectSite.do">
So that your request gets processed by the Srtuts Controller. Assuming you have *.do mapped to your struts controller in web.xml.

Similar Messages

  • JSF - Struts Integration

    Hi,
    At my work place we r trying to integrate JSF and Struts. After doing some research we found out that Struts-Faces is d way we can achieve d same. But d problem is that struts-faces is not available...........
    Wat we need 2 know, are there any other alternatives and from where do we get d struts-faces package.........
    Thanks a lot in advance.

    Change you action from:
    <s:form action="/redirectSelectSite">
    To:
    <s:form action="/redirectSelectSite.do">
    So that your request gets processed by the Srtuts Controller. Assuming you have *.do mapped to your struts controller in web.xml.

  • JSF / Struts - I can't see attributes of my form.

    Hi,
    i've a problem with JSF. I'm using struts in my projects and I need to use a JSF component. So, i integrated JSF & Struts using struts-faces.jar. I converted my jsp file and I succeeded to fill combos but when I submitted form I can't get attributes of my form in action. ( i can see but all of them are null)
    Anybody help me?
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="/WEB-INF/struts-faces.tld" prefix="s"%>
    <%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@taglib uri="http://www.ibm.com/jsf/rte" prefix="r"%>
    <script>
         function gonder() {
              if ( confirm('E-Postay&#305; göndermek istedi&#287;inizden emin misiniz?') ) {
                   document.forms[0].action = "/Admin/admin/testMail.do?method=kurumUygulamaGonder";
                   //alert("document.forms[0].elements['_id0:konu'].value : " + document.forms[0].elements['_id0:konu'].value);
                   document.forms[0].submit();
    </script>
    <f:view>
         <body>
         <hx:scriptCollector id="scriptCollector1">
              <s:form action="/admin/testMail" >
                   <jsp:include page="/common/header_center.jsp" />
                   <center>
                   <fieldset style="width: 80%">
                        <table border="0" align="center" id="oddEvenTable" width="98%">
                             <tbody>
                                  <tr class="listOddEven">
                                       <td><h:outputText value="Kurum" /></td>
                                       <td><br>
                                            <h:selectManyListbox styleClass="selectManyListbox"
                                       id="kurumlar" value="#{mailForm.kurumlar}" size="7">
                                       <f:selectItems
                                            value="#{selectitems.requestScope.kurumList.kurumAdi.kurumAdi.toArray}" id="selectItems0" />
                                  </h:selectManyListbox>
                                       </td>
                                       <td></td>
                                       <td><h:outputText value="Uygulama" /></td>
                                       <td>
                                            <h:selectManyListbox styleClass="selectManyListbox"
                                       id="uygulamalar" value="#{mailForm.uygulamalar}" size="7">
                                       <f:selectItems
                                            value="#{selectitems.requestScope.uygulamaList.uygulamaAdi.uygulamaAdi.toArray}"
                                            id="selectItems1" />
                                  </h:selectManyListbox>                         
                                       </td>
                                  </tr>
                                  <tr class="listOddEven">
                                       <td><h:outputText value="Konu" /></td>
                                       <td colspan="4"><h:inputText id="konu" size="118" value="#{mailForm.konu}"/></td>
                                  </tr>
                                  <tr class="listOddEven">
                                       <td><h:outputText value="&#304;çerik" /></td>
                                       <td align="center" colspan="4"><r:inputRichText width="702"
                                            height="352" id="content" value="#{mailForm.content}"></r:inputRichText>
                                       </td>
                                  </tr>
                                  <tr class="listOddEven">
                                       <td colspan="5" align="center" valign="middle">
                                       <hx:commandExButton
                                                 type="button" value="Gönder" styleClass="commandExButton"
                                                 id="btnKriterlereGoreAra" onclick="gonder()">
                                            </hx:commandExButton>
                                       </td>
                                  </tr>
                             </tbody>
                        </table>
                   </fieldset>
                   </center>
              </s:form>
    </f:view>

    Settings>Mail, Contacts, Calendars>Show
    http://i1224.photobucket.com/albums/ee374/Diavonex/382b7c7505f26ac775b54ce257655 5b4.jpg

  • J2EE MVC模式JSF与Struts的异同

    J2EE MVC模式JSF与Struts的异同
    Struts和JSF/Tapestry都属于表现层框架,这两种分属不同性质的框架,后者是一种事件驱动型的组件模型,而Struts只是单纯的MVC模式框架,老外总是急吼吼说事件驱动型就比MVC模式框架好,何以见得,我们下面进行详细分析比较一下到底是怎么回事?
      首先事件是指从客户端页面(浏览器)由用户操作触发的事件,Struts使用Action来接受浏览器表单提交的事件,这里使用了Command模式,每个继承Action的子类都必须实现一个方法execute。
      在struts中,实际是一个表单Form对应一个Action类(或DispatchAction),换一句话说:在Struts中实际是一个表单只能对应一个事件,struts这种事件方式称为application event,application event和component event相比是一种粗粒度的事件。
      struts重要的表单对象ActionForm是一种对象,它代表了一种应用,这个对象中至少包含几个字段,这些字段是Jsp页面表单中的input字段,因为一个表单对应一个事件,所以,当我们需要将事件粒度细化到表单中这些字段时,也就是说,一个字段对应一个事件时,单纯使用Struts就不太可能,当然通过结合JavaScript也是可以转弯实现的。
      而这种情况使用JSF就可以方便实现,
    <h:inputText id="userId" value="#{login.userId}">
      <f:valueChangeListener type="logindemo.UserLoginChanged" />
    </h:inputText>
      #{login.userId}表示从名为login的JavaBean的getUserId获得的结果,这个功能使用struts也可以实现,name="login" property="userId"
      关键是第二行,这里表示如果userId的值改变并且确定提交后,将触发调用类UserLoginChanged的processValueChanged(...)方法。
      JSF可以为组件提供两种事件:Value Changed和 Action. 前者我们已经在上节见识过用处,后者就相当于struts中表单提交Action机制,它的JSF写法如下:
    <h:commandButton id="login" commandName="login">
      <f:actionListener type=”logindemo.LoginActionListener” />
    </h:commandButton>
      从代码可以看出,这两种事件是通过Listerner这样观察者模式贴在具体组件字段上的,而Struts此类事件是原始的一种表单提交Submit触发机制。如果说前者比较语言化(编程语言习惯做法类似Swing编程);后者是属于WEB化,因为它是来自Html表单,如果你起步是从Perl/PHP开始,反而容易接受Struts这种风格。
      基本配置
      Struts和JSF都是一种框架,JSF必须需要两种包JSF核心包、JSTL包(标签库),此外,JSF还将使用到Apache项目的一些commons包,这些Apache包只要部署在你的服务器中既可。
      JSF包下载地址:http://java.sun.com/j2ee/javaserverfaces/download.html选择其中Reference Implementation。
      JSTL包下载在http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
      所以,从JSF的驱动包组成看,其开源基因也占据很大的比重,JSF是一个SUN伙伴们工业标准和开源之间的一个混血儿。
      上述两个地址下载的jar合并在一起就是JSF所需要的全部驱动包了。与Struts的驱动包一样,这些驱动包必须位于Web项目的WEB-INF/lib,和Struts一样的是也必须在web.xml中有如下配置:
    <web-app>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
    </web-app>
      这里和Struts的web.xml配置何其相似,简直一模一样。
      正如Struts的struts-config.xml一样,JSF也有类似的faces-config.xml配置文件:
    <faces-config>
      <navigation-rule>
        <from-view-id>/index.jsp</from-view-id>
        <navigation-case>
          <from-outcome>login</from-outcome>
          <to-view-id>/welcome.jsp</to-view-id>
        </navigation-case>
      </navigation-rule>
      <managed-bean>
        <managed-bean-name>user</managed-bean-name>
        <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>
      在Struts-config.xml中有ActionForm Action以及Jsp之间的流程关系,在faces-config.xml中,也有这样的流程,我们具体解释一下Navigation:
      在index.jsp中有一个事件:
    <h:commandButton label="Login" action="login" />
      action的值必须匹配form-outcome值,上述Navigation配置表示:如果在index.jsp中有一个login事件,那么事件触发后下一个页面将是welcome.jsp
      JSF有一个独立的事件发生和页面导航的流程安排,这个思路比struts要非常清晰。
      managed-bean类似Struts的ActionForm,正如可以在struts-config.xml中定义ActionForm的scope一样,这里也定义了managed-bean的scope为session。
      但是如果你只以为JSF的managed-bean就这点功能就错了,JSF融入了新的Ioc模式/依赖性注射等技术。
    Ioc模式
      对于Userbean这样一个managed-bean,其代码如下:
    public class UserBean {
      private String name;
      private String password;
      // PROPERTY: name
      public String getName() { return name; }
      public void setName(String newValue) { name = newValue; }
      // PROPERTY: password
      public String getPassword() { return password; }
      public void setPassword(String newValue) { password = newValue; }
    <managed-bean>
      <managed-bean-name>user</managed-bean-name>
      <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>name</property-name>
        <value>me</value>
      </managed-property>
      <managed-property>
        <property-name>password</property-name>
        <value>secret</value>
      </managed-property>
    </managed-bean>
      faces-config.xml这段配置其实是将"me"赋值给name,将secret赋值给password,这是采取Ioc模式中的Setter注射方式。
      Backing Beans
      对于一个web form,我们可以使用一个bean包含其涉及的所有组件,这个bean就称为Backing Bean, Backing Bean的优点是:一个单个类可以封装相关一系列功能的数据和逻辑。
      说白了,就是一个Javabean里包含其他Javabean,互相调用,属于Facade模式或Adapter模式。
      对于一个Backing Beans来说,其中包含了几个managed-bean,managed-bean一定是有scope的,那么这其中的几个managed-beans如何配置它们的scope呢?
    <managed-bean>
      <managed-property>
        <property-name>visit</property-name>
        <value>#{sessionScope.visit}</value>
      </managed-property>
      这里配置了一个Backing Beans中有一个setVisit方法,将这个visit赋值为session中的visit,这样以后在程序中我们只管访问visit对象,从中获取我们希望的数据(如用户登陆注册信息),而visit是保存在session还是application或request只需要配置既可。
      UI界面
      JSF和Struts一样,除了JavaBeans类之外,还有页面表现元素,都是是使用标签完成的,Struts也提供了struts-faces.tld标签库向JSF过渡。
      使用Struts标签库编程复杂页面时,一个最大问题是会大量使用logic标签,这个logic如同if语句,一旦写起来,搞的JSP页面象俄罗斯方块一样,但是使用JSF标签就简洁优美:
    <jia:navigatorItem name="inbox" label="InBox"
      icon="/images/inbox.gif"
      action="inbox"
      disabled="#{!authenticationBean.inboxAuthorized}"/>
      如果authenticationBean中inboxAuthorized返回是假,那么这一行标签就不用显示,多干净利索!
      先写到这里,我会继续对JSF深入比较下去,如果研究过Jdon框架的人,可能会发现,Jdon框架的jdonframework.xml中service配置和managed-bean一样都使用了依赖注射,看来对Javabean的依赖注射已经迅速地成为一种新技术象征,如果你还不了解Ioc模式,赶紧补课。

    JSF在很大程度上类似Struts,而不是类似Tapestry,可以说是一种Struts 2.0,都是采取标签库+组件的形式,只是JSF的组件概念没有象Struts那样必须继承ActionForm的限制;JSF在事件粒度上要细腻,不象Struts那样,一个表单一个事件,JSF可以细化到表单中的每个字段上。
      JSF只有在组件和事件机制这个概念上类似Tapestry,但是不似Tapestry那样是一个完全组件的框架,所以,如果你做一个对页面要求灵活度相当高的系统,选用Tapestry是第一考虑。
      Struts/JSF则适合在一般的数据页面录入的系统中,对于Struts和JSF的选用,我目前个人观点是:如果你是一个新的系统,可以直接从JSF开始;如果你已经使用Struts,不必转换,如果需要切换,可以将JSF和Tapestry一起考虑。
      另外,JSF/Tapestry不只是支持Html,也支持多种客户端语言如WML或XUI等。
      这三者之间关系:如果说Struts是左派;那Tapestry则是右派;而JSF则是中间派,中庸主义是SUN联盟的一贯策略。

  • JSF/Spring integration - managed-property problem

    I am using JSF 1.1_01 (MyFaces 1.1), Spring 1.2, Ajax4Jsf.
    The JSF application has h:selectOneMenu .
    On change event of h:selectOneMenu sets "selectedValue" into backing bean as shown below:
    page.jsp
    <h:selectOneMenu value="#{test.selectedDevice}" >
    <f:selectItem itemValue="0" itemLabel="--New--"/>
    <f:selectItem itemValue="1" itemLabel="WorkStation"/>
    <f:selectItem itemValue="2" itemLabel="Router"/>
    <f:selectItem itemValue="3" itemLabel="Switch"/>
    <ajax:support action="#{test.loadDevice}" event="onchange" reRender="t2,t3,t4,t5"/>
    </h:selectOneMenu>
    TestBean.java (Backing Bean)
    public String getSelectedDevice() {
    logger.info(" *** In getSelectedDevice *** ");
    if (selectedDevice == null) {
    selectedDevice = "0"; // This will be the default selected item.
    return selectedDevice;
    public void setSelectedDevice(String selectedDevice) {
    logger.info(" *** In setSelectedDevice *** ");
    this.selectedDevice = selectedDevice;
    Here are the configuration file snippets for integrating JSF Spring
    web.xml
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    faces-config.xml
    <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    <managed-bean>
    <managed-bean-name>test</managed-bean-name>
    <managed-bean-class>test.TestBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>deviceManager</property-name>
    <property-class> test.DeviceTypeManager </property-class>
    <value>#{deviceManager}</value>
    </managed-property>
    </managed-bean>
    The above code results in the following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    The error occurs only if i include <managed-property> inside the <managed-bean> in faces-config.xml.
    The moment i remove <managed-property> from face-config.xml the error disappears & page gets rendered properly.
    The purpose in having <managed-property> inside managed-bean is to call Spring's Manager class (i.e. deviceManager) from JSF application
    Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

    The TestBean have a property for DeviceManager along with setter/getter methods as shown below. Sorry for not including in earlier posting
    TestBean.java (Backing Bean)
    private DeviceTypeManager deviceManager;
    public DeviceTypeManager getDeviceManager() {
         return deviceManager;
    public void setDeviceManager(DeviceTypeManager deviceManager) {
         this.deviceManager = deviceManager;
    Here are the two scenarios
    Scenario 1 : without <managed-property> the code works fine
    Scenario 2 : with <managed-property> the code results in following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    Scenario 1 has only JSF whereas Scenario 2 has JSF-Spring integration
    The Scenario 1 works absolutely fine as the expression '#{test.selectedDevice}' gets its value from setter/getter method in the backing bean(TestBean.java) . This is expected behaviour & wondering why it doesn't work similarly in Scenario 2 instead it complains
    Cannot get value for expression '#{test.selectedDevice}'
    I am willing to upload the war file. Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

  • BC4J/Struts Integration classes

    Does anyone know of any documentation on the BC4J classes that are used in Jdeveloper for struts integration?
    I have access to the source that came packaged in jdeveloper but I still have questions about the classes BC4JActionMapping,BC4JRequestProcessor,BC4JActionForm,BC4JUtils,BC4JContext, and HTTPContainer.
    One of my initial questions is whether I should specify the view object name I'm using in an action in my struts-config.xml file as I do with the application module? Also, when I do this how do I programmatically access it.
    I'm also interested in how the BC4J Client Data Model ".cpx" is used and if this needs to be packaged when deploying a bc4j/struts web application.
    The postings at Re: re:Using Struts without Datatags <jbo:xxx> by Steven Muench were terrific. A great start for understanding the integration of the two technologies. I would just like more detail on how/why bc4j leverages struts extension points.
    Thanks in advance!

    part 2 of posting:
    <action path="/navigateEmpView1" parameter="jboEvent" type="oracle.jbo.html.struts11.actions.NavigationAction">
    <set-property property="viewobject" value="EmpView1"/>
    <set-property property="application" value="Mypackage1Module"/>
    <set-property property="releasemode" value="Stateful"/>
    </action>
    Since NavigationAction is a Struts DispatchAction (instead of calling the execute method on the action, the method name to execute is passed using a request parameter), you will need to specify the event name on the request with the URL:
    /nextEmpView1.do?jboEvent=next
    To understand how this work, you need to look at how the BC4JContext is initialized:
    The following code is extracted from BC4JrequestProcessor:
    BC4JContext context = (BC4JContext)request.getAttribute(BC4JContext.ContextAttrName);
    // Instantiate the context and save it on the request
    if (context == null)
    context = new BC4JContext();
    request.setAttribute(BC4JContext.ContextAttrName, context);
    if (initPageFromPath(bc4jMapping, request, response))
    // First initialize context with the existing mapping values
    bc4jMapping.initializeContext(request, response, context);
    // Then use request para[i]Long postings are being truncated to ~1 kB at this time.

  • SAP ME Integration Action Block in SAP MII14.0

    Hi All
    Since ME 6.1 and MII 14.0 are now on the same platform,  the transfer of data between shop floor (PLC) and ME via MII is now easy using ME Integration action blocks present in MII 14.0. These action blocks have different kinds of API's present which can be used as per the requirement.
    At the time of MII installation in my landscape, these SAP ME Integration action blocks were installed successfully and  were working perfectly fine.
    Now, again I got a requirement to use API (SAP ME Integration Action Blocks) and could not find them in my MII 14.0 workbench. The complete SAP ME INTEGRATION folder is missing from the MII workbench, just like it got disappeared from its place.
    Following are the messages I am able to fetch from MII logs after executing the transactions which were created at the time when API's folder was present:
    Info: Deprecated scope of type SERVERSESSION_AT_LEAST_ONE_APP_SCOPE is used! Please replace the usage of scopes with new mechanism based on "Cross
    application session communication API".
    Warning: Link execution failed: java.lang.NullPointerException: while trying to invoke the method java.util.Map.containsKey(java.lang.Object) of a null object loaded from
    field com.sap.xmii.bls.legacy.LegacyActionWrapper.types of an object loaded from local variable 'this'.
    Error: Uncaught exception from (TRX Name), while trying to invoke the method java.util.Map.containsKey(java.lang.Object) of a null object loaded from field com.sap.xmii.bls.legacy.LegacyActionWrapper.types of an object loaded from local variable 'this'.
    Please guide.
    Thanks in advance.
    Avichal

    Hi Avichal,
    This is a one time activity if you do not undeploy MII or MEINT at any point in time. From what you are saying it appears that you have either undeployed and re-deployed MII. Or you have undeployed MEINT from your system.
    You can check if MEINT is deployed by navigating to System Resources -> Custom Actions within MII. If you see sap.com~xapps~me~integration~action~actions.mii-actions.jar, it means MEINT classes exist within MII server. Else they are lost.
    Regards,
    Anushree

  • How to call another action from Struts dispatch action?

    Hi all,
    there is a method in dispatch action that needs data from another chained action. How should other action determine which method in dispatch action will receive response and how should these data be returned from called action? Called action does not have associated form bean
    thanks,

    Not sure, why are there then "chained actions" is struts practice? Struts allows action without form bean to be configured and the action is a class?

  • Reg. JSF Spring Integration issue.

    Hi All,
    I am using JSF for the front end and using the Spring Core, DAO and AOP for the BO and DAO layers. When i try to inject the Objects using the DI to the JSF, i am getting the following error and the objects are not getting set from the Spring.
    Error Log:*
    javax.servlet.ServletException: Unable to create managed bean dataUploadControllerBean. The following problems were found:
    - Bean or property class #{dataUploadVO} for managed bean dataUploadControllerBean cannot be found.
    - Bean or property class #{dataUploadVO} for managed bean dataUploadControllerBean cannot be found.
    - Bean or property class #{dataUploadVO} for managed bean dataUploadControllerBean cannot be found.
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
    org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
    i have defined the respective entries correctly to integrate the JSF & Spring. But still the JSF&Spreing is not integrated successfully. Please find the configs defined and help to resolve the issue. i am stuck in this for 2 days...
    Web.xml
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>WEB-INF/applicationContext.xml</param-value>
    </context-param>
    Faces-Config.xml
    <application>
    <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> <!-- have used this ELResolver to injects objects from Spring-->
    </application>
    <managed-bean>
    <managed-bean-name>dataUploadControllerBean</managed-bean-name>
    <managed-bean-class>com.sgspace.model.dataupload.DataUploadControllerBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>dataUploadBean</property-name>
    <value>#{dataUploadBean}</value> _<!-- Already present in the faces-config.xml-->_ </managed-property>
    <managed-property>
    <property-name>dataUploadVO</property-name>
    <property-class>#{dataUploadVO}</property-class> _<!-- Injected from Spring DI. This is currently not working.-->_
    <value></value>
    </managed-property>
    <managed-property>
    <property-name>dataUploadBO</property-name>
    <property-class>#{dataUploadBO}</property-class>_<!-- Injected from Spring DI. This is currently not working.-->_ <value></value>
    </managed-property>
    </managed-bean>
    applicationContext.xml:_
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    <bean id="dataUploadDAO"
    class="com.sgspace.dao.dataupload.DataUploadDAOImpl">
    <property name="dataSource" ref="dataSource"></property>
    </bean>
    <bean id="dataUploadBO"
    class="com.sgspace.bo.dataupload.DataUploadBOImpl">
    <property name="dataUploadDAO" ref="dataUploadDAO"></property>
    </bean>
    <bean id="dataUploadVO" class="com.sgspace.vo.dataupload.DataUploadVO"></bean>
    </beans>
    Warm Regards,
    Praveen S

    The TestBean have a property for DeviceManager along with setter/getter methods as shown below. Sorry for not including in earlier posting
    TestBean.java (Backing Bean)
    private DeviceTypeManager deviceManager;
    public DeviceTypeManager getDeviceManager() {
         return deviceManager;
    public void setDeviceManager(DeviceTypeManager deviceManager) {
         this.deviceManager = deviceManager;
    Here are the two scenarios
    Scenario 1 : without <managed-property> the code works fine
    Scenario 2 : with <managed-property> the code results in following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    Scenario 1 has only JSF whereas Scenario 2 has JSF-Spring integration
    The Scenario 1 works absolutely fine as the expression '#{test.selectedDevice}' gets its value from setter/getter method in the backing bean(TestBean.java) . This is expected behaviour & wondering why it doesn't work similarly in Scenario 2 instead it complains
    Cannot get value for expression '#{test.selectedDevice}'
    I am willing to upload the war file. Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

  • JSF & Spring integration

    Hi there,
    i want to integrate spring with my existing application. is there any good tutorials in net to give good view on that. i google it but not fully satisfied.
    please help me if you have any idea..
    Regards,
    A.

    The TestBean have a property for DeviceManager along with setter/getter methods as shown below. Sorry for not including in earlier posting
    TestBean.java (Backing Bean)
    private DeviceTypeManager deviceManager;
    public DeviceTypeManager getDeviceManager() {
         return deviceManager;
    public void setDeviceManager(DeviceTypeManager deviceManager) {
         this.deviceManager = deviceManager;
    Here are the two scenarios
    Scenario 1 : without <managed-property> the code works fine
    Scenario 2 : with <managed-property> the code results in following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    Scenario 1 has only JSF whereas Scenario 2 has JSF-Spring integration
    The Scenario 1 works absolutely fine as the expression '#{test.selectedDevice}' gets its value from setter/getter method in the backing bean(TestBean.java) . This is expected behaviour & wondering why it doesn't work similarly in Scenario 2 instead it complains
    Cannot get value for expression '#{test.selectedDevice}'
    I am willing to upload the war file. Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

  • JSF & Struts

    After reading several articles about JSF and Struts,
    where opinions concur and also differ,
    I would like to get an opinion from this list regarding starting a new project.
    If I start a new project, should I even bother to
    consider Struts, or should I just use JSF?
    Most of the comments that I've seen are about recommendations for migrating Struts to JSF (specially the
    html part). How about starting a brand new project?
    Will it be OK if I only use JSF? Will there be
    a lot of work if I start with JSF and later decide
    to replace some of the pieces with Struts?
    I'd appreciate some comments.
    gs

    I think any project started today with implementation schedule early next year should be focused on Struts (like Jonathan said earlier). If you are in the exploritory stages of an implementation that will probably finaly deliver in '05 then I'd say JSF is the way to go. My reasoning is based on the industry support that was apparent at JavaOne and all the buzz. Most, if not all, J2EE servers will have JSF by sometime in '04 and I susspect that by late '05 many execs will be wondering why they allowed Struts to be used...
    Not that there is anything wrong with Struts. Its great and has a lot of mind share (books, knowledge base etc), its really cool, and fun to work with, it does a reasonable job of separating the view from the model etc. Its good stuff. But since out of the box app servers will support JSF, Struts will be less and less important from an enterprise perspective. I susspect that this will really happen in full force when JSF becomes part of the J2EE spec (just speculation on my part, but it seems reasonable given the 'http://java.sun.com/j2ee/javaserverfaces' url :-).
    This is of course only my $0.02 worth...
    TTFN,
    -bd-
    http://bill.dudney.net/roller/page/bill

  • How to return and display an image created by a Struts 2 action object?

    Hi all, I'm Andrea and this is my first post on SDN.
    I'm developing a web based application using Struts 2 and I've got a problem with images management. It follows a brief description:
    Using a form in a jsp page it is possible to make a call to the execute() method implemented in a class, extending ActionSupport.
    At the end of the method there's the following instruction:
    BufferedImage image = generateChart();
    My problem is that I need to return this image to the client, so that his browser could display it.
    Unfortunately I don't know exactly how to proceed.
    I've seen it's possible to define result type for Struts 2 actions through xml config file, but I don't what I need to write into che action class.
    Could you help me with this topic?

    Ok I found the answer to your problem. If you download the tutorial they have the code there it's in one folder. I hope this helps.
    http://java.sun.com/docs/books/tutorial/

  • Struts integration with ADF

    HI All,
    I have questions related to the architecure .
    I have plans to integrate the Struts with ADF11g ,i think this kind of requirement is very less .
    Plase tell me the adavantges and disadvantages over it ,give some refrences links,videos
    Thanks

    Hi.
    Struts was one of the possible options in ADF 10g for the controller layer. It has been dropped in 11g since we now provide task flows, which we feel are better suited to modern rich applications. Do not forget that Struts is Action-based, whereas JDF/ADF are Component-based. Thus, Struts and ADF 11g are not a really good fit together. (See http://java.dzone.com/articles/categorization-web-frameworks)
    For reference, the main advantages of ADF task flows are:
    - The application can be broken up into a series of modular flows that call one another.
    - You can add to the task flow diagram nodes such as views, method calls, and calls to other task flows.
    - Navigation is between pages as well as other activities, including routers.
    - ADF task flows are reusable within the same or an entirely different application.
    - After you break up your application into task flows, you may decide to reuse task flows containing common functionality.
    - Shared memory scope (for example, page flow scope) enables data to be passed between activities within the task flow. Page flow scope defines a unique storage area for each instance of an ADF bounded task flow.
    (Source: http://docs.oracle.com/cd/E23943_01/web.1111/b31974/taskflows.htm)
    Best Regards,
    Frédéric.

  • No support (wizard) for JSF & struts portlets

    I can create portlets (JSR 286 & Oracle PDK-Java) in JDevelopers. However I feel the wizard is not mature. I can only create one kind of portlet (JSR 286) using JDeveloper if we consider only standards based portlet - this portlet is called Java portlet in WebLogic. Can't create JSP, URL etc protlets, even no support (wizard) for JSF & struts portlets...
    Is there anyway to enable these features?
    Thanks.

    Check below link if useful
    http://docs.oracle.com/cd/E17904_01/portal.1111/e10238/pdg_java_adv.htm#CHDFAHEC
    http://docs.oracle.com/cd/E12524_01/webcenter.1013/e12434/jpsdg_java_adv.htm#CHDFAHEC
    Edited by: ngsankar on Jun 6, 2012 10:56 AM

  • Edit action on purple submit button

    I am creating interactive PDF forms, and I see that Acrobat adds a submit button in the purple message bar, but how do I add or edit the action for that submit button? It is only visible when in preview mode so I am unable to double click and add an action (such as email) like when creating a new button within Properties.

    No Jay. The embedded buttons on quiz slides are not normal buttons.
    If you tell what you want to achieve? Because after the two-step process (submitting) either the action specified under Success or Last Attempt will be executed. You can replace the default action 'Continue' by an Advanced action.
    Question Question Slides in Captivate - Captivate blog
    Lilybiri

Maybe you are looking for

  • Accent in the file name or folder name

    Hi You guy, I am encountering the problem about an accent in the parent folder name of the applet that if i put an accent in the folder name after that the applet cannot be loaded onto the browser. I am not sure if i put not only accents but also put

  • Why is Adobe Reader X deleting my PDF files when I try to burn to CD?

    I am using Adobe Reader X 10.0.1.  Within Windows Explorer I mark a pdf file for burning, then click burn at the top of the page.  Adobe tells me the file is missing.  Then when I check for the file, it is gone!  And not in the recycle bin either.  I

  • Raid drive periodically "missing"

    I have an xserv 2.8 quad xeon with an internal raid (3 drives, RAID 5). Drive in bay 3 periodically showed up as missing and the raid set was degraded. I marked it as a spare and the raid set rebuilt. This happened several times so I replaced the dri

  • Procedures needed

    Gurus, Need your help on this one. There are 2 tables one used by application and other used by database.Structures is given inthe script create table table_1_appln (reqd_session number(10),file_name varchar2(32767)) create table table_2_act (reqd_se

  • ExecuteUpdate error

    Hi Im having a stupid little error and cant see what it is that is causing it. Im trying to set up an admin to allow user to update values in the DB of an application. However, I was using the executeQuery statement and getting the NoResultSet found