1

質問が示すように。RAD/Eclipse で動的 Web 3.0 プロジェクトを使用し、Websphere 8.5.1 にデプロイするライブラリ struts 1.2.9 を使用すると、競合が発生しますか?理由は、Struts 1.1 を使用して Websphere 5.1 から移行しているためです。この移行を行うと問題が発生します。

乾杯。

次のエラーが発生しました。

javax.servlet.jsp.JspException: org.apache.struts.taglib.html.JavascriptValidatorTag.renderJavascript(JavascriptValidatorTag.java:384) の org.apache.struts.taglib のロケール「en_US」の「SAChangeSecretQAsFormBean」の下にフォームが見つかりません。 html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:349) at org.apache.strutsel.taglib.html.ELJavascriptValidatorTag.doStartTag(ELJavascriptValidatorTag.java:218) at com.ibm._jsp._SA_5F_SecretQuestions._jspx_meth_html$1el_javascript_0(_SA_5F_SecretQuestions 304) com.ibm._jsp._SA_5F_SecretQuestions._jspService(_SA_5F_SecretQuestions.java:140) で com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99) で javax.servlet.http.HttpServlet.service (HttpServlet.java:668) com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456) com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122) com.ibm.ws.jsp .webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:216) com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain) .java:79) com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928) com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384) com.ibm.ws .webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:193) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java) :398) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241) で org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) で org.apache.struts.action. ActionServlet.doGet(ActionServlet.java:414) で javax.servlet.http.HttpServlet.service(HttpServlet.java:575) で javax.servlet.http で。HttpServlet.service(HttpServlet.java:668) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java: 774) com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456) com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) com.ibm.ws .webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79) com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter (WebAppFilterManager.java:928) com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) com.ibm.ws.webcontainer.webapp.org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085) で com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:193) で WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398) で org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241) で org.apache.struts.action.ActionServlet.process (ActionServlet.java:1196) で org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) で javax.servlet.http.HttpServlet.service(HttpServlet.java:575) で javax.servlet.http で。 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224) の HttpServlet.service(HttpServlet.java:668)。com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456) の webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774) com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest( ServletWrapperImpl.java:178) com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) com com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) の .web.sa.SecurityServlet.doFilter(SecurityServlet.java:75) com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter の(WebAppFilterChain.java:91) com.web.sa.SAReqLoggerServlet.doFilter(SAReqLoggerServlet.java:62) で、com.ibm.ws.webcontainer.filter で。com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) の FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java: 928) com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87) com.ibm.ws .webcontainer.WebContainer.handleRequest(WebContainer.java:895) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java) :195) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312) com.ibm.ws.http. channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283) com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1048) com.ibm.ws.ssl.channel で。 impl.SSLConnectionLink.readyInboundPostHandshake(SSLConnectionLink.java:716) com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyHandshakeCompletedCallback.complete(SSLConnectionLink.java:412) com.ibm.ws.ssl.channel.impl で。 SSLUtils.handleHandshake(SSLUtils.java:1066) com.ibm.ws.ssl.channel.impl.SSLHandshakeIOCallback.complete(SSLHandshakeIOCallback.java:87) com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) com.ibm .io.async.AsyncFuture.completed(AsyncFuture.java:138) com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java) :775) com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) で com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1814) でasync.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) で com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1814) でasync.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) で com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1814) で

ただし、フォームはソースにあります: web\src\com\web\sa\SAChangeSecretQAsFormBean.java

私のウェブ設定:web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
...
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
        <param-name>config/jsp/sa</param-name>
        <param-value>/WEB-INF/struts-config-sa.xml</param-value>
    </init-param>
...
        <load-on-startup>2</load-on-startup>
</servlet>
...
</web-app>

私の開始設定は次のとおりです: struts-config.xml

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
                               "struts-config_1_2.dtd">
<struts-config>
    <!-- Data Sources -->
    <data-sources></data-sources>

    <!-- Form Beans -->
    <form-beans>
...
        <form-bean name="SAChangeSecretQAsFormBean" type="com.web.sa.SAChangeSecretQAsFormBean"></form-bean>
...
</form-beans>
...
</struts-config>

struts-config-sa.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
                               "struts-config_1_2.dtd">

<struts-config>
...
    <form-beans>
...
    <form-bean name="SAChangeSecretQAsFormBean" type="com.web.sa.SAChangeSecretQAsFormBean"></form-bean>
...
    </form-beans>
...
    <action-mappings>
...
    <action path="/SAChangeSecretQAs" 
            name="SAChangeSecretQAsFormBean" 
            type="com.web.sa.SAChangeSecretQAsAction" scope="session" input="success">
        <forward name="success" path="jsp/sa/SA_SecretQuestions.jsp"></forward>
        <forward name="logout" path="jsp/sa/SALogout.do?buttonPressed=logout&amp;CASE_FORWARD=YES"></forward>
        <forward name="access" path="jsp/sa/SAAccessDetails.do?CASE_FORWARD=YES"></forward>
    </action>
...
    </action-mappings>
</struts-config>

SAChangeSecretQAsFormBean.java

package com.web.common;

public class SAChangeSecretQAsFormBean extends ValidatorForm
{
...
}

SAChangeSecretQAsAction.java

package com.web.sa;
public class SAChangeSecretQAsAction extends Action
{
    public ActionForward executeAction(
                    ActionMapping mapping,
                    ActionForm form,
                    HttpServletRequest req,
                    HttpServletResponse res)
                    throws IOException, ServletException
    {
...
    }
...
}

SA_SecretQuestions.jsp

<%@ include file = "../common/header.inc"%>
<%
  try {
      %>
<html-el:javascript formName="SAChangeSecretQAsFormBean" staticJavascript="false" dynamicJavascript="true" page="0" />
      <%
  }
  catch (Exception x) {
    x.printStackTrace();
  }
%>

株式会社ヘッダー

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="../../WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="../../WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="../../WEB-INF/struts-logic-el.tld" prefix="logic-el" %>
<%@ page import ="com.constant.*" buffer="16kb" errorPage="../errorpages/GenericErrorPage.jsp"  %>

<%String cacheReq=null;%>

<html-el:base/>
<html> 
<HEAD>

他の情報が不足している場合は教えてください..ありがとう

4

0 に答える 0