Source Code:

MyAction.java:

public class MyAction {
    private String message;
    
    public MyAction() {
    }
    
    public String execute () {
        message = "message";
        
        return ("success");
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }
}

Struts.xml:

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd";>
<struts>
    <constant name="struts.locale" value="es_ve"/>
    <constant name="struts.tag.altSyntax" value="true"/>
    <package name="default" extends="struts-default">
      <default-interceptor-ref name="basicStack"/>
      <action name="myaction" class="myaction.MyAction">
        <result name="input">/myaction.jsp</result>
        <result name="success">/myaction.jsp</result>
        <result name="error">/myaction.jsp</result>
      </action>
    </package>
</struts>

Web.xml:

<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
<web-app>
    <display-name>My Action</display-name>
    <filter>
        <filter-name>struts</filter-name>
 
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <session-config>
        <session-timeout>35</session-timeout>
    </session-config>
</web-app>

Myaction.jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<%@ page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
charset=windows-1252"/>
    <title>myaction</title>
  </head>
  <body>
    <jsp:include page="myaction2.jsp"/>
    <s:property value="message"/>
  </body>
</html>

Myaction2.jsp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<%@ page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
charset=windows-1252"/>
    <title>myaction2</title>
  </head>
  <body>
  </body>
</html>

Regards,

Néstor Boscán
-----Mensaje original-----
De: mitch gorman [mailto:mitch.gor...@gmail.com] 
Enviado el: Wednesday, April 15, 2009 4:48 PM
Para: Struts Users Mailing List
Asunto: Re: When using jsp:include or s:include in a JSP page the next
Struts 2 tags will throw java.lang.NullPointerException on WebLogic 10.3

Néstor Boscán wrote:
> I created a simple project with an Action and two JSP pages and the
problem
> reproduces. 
>   
    it might be helpful if you posted your source.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to