struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Poimtsev (JIRA)" <>
Subject [jira] Created: (WW-1561) Exception using form tag
Date Thu, 14 Dec 2006 15:47:57 GMT
Exception using form tag

                 Key: WW-1561
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.1
         Environment: Windows XP
Jetty 6.0.1
Caucho Resin 3.0.22
            Reporter: Alexey Poimtsev

Hi, all.
I try to develop simple forms application with this code:


<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
		<title>My page</title>
 	<s:form action="sendSMS" method="post">
			<s:textfield name="smsFrom">Message From:</s:textfield> 
					<s:textfield name="smsTo">Message To:</s:textfield>
					<s:textarea name="smsMessageBody" cols="20" rows="10">Message:</s:textarea>
					<s:submit type="submit" value="Submit" />


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">
    <display-name>Struts 2 TestApp</display-name>


<?xml version="1.0" encoding="UTF-8" ?>
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
	<package name="default">
		<default-interceptor-ref name="defaultStack" />
		<action name="sendSMS" class="com.alec_c4.testApp.SendSMS">
			<result name="success" type="dispatcher">
			<result name="error" type="dispatcher">/fail.jsp</result>
			<interceptor-ref name="servlet-config" />


package com.alec_c4.testApp;

import java.util.Map;
import org.apache.struts2.interceptor.ParameterAware;
import com.opensymphony.xwork2.ActionSupport;
 * @author Alec C4
public class SendSMS extends ActionSupport implements ParameterAware {

	private static final long serialVersionUID = 2775840359087216729L;
	String[] smsFrom;
	String[] smsTo;
	String[] smsMessageBody;

	public Map parameters;
	  public Map getParameters() {
		    return parameters;

	  public void setParameters(Map parameters) {
		    this.parameters = parameters;
	public String execute () throws Exception {
		// Some Business Logic
		smsFrom = (String[]) parameters.get("smsFrom");
		smsTo = (String[]) parameters.get("smsTo");
		smsMessageBody = (String[]) parameters.get("smsMessageBody");
		if (smsFrom == null || smsFrom[0] == null || smsFrom[0].length() == 0) 
		return ERROR;
		else return SUCCESS;

and when i have compiled application i put this one in webapp root and start the server. As
a result i see this exception:

2006-12-14 18:35:11.713::WARN:  /testApp/index.jsp
        at org.apache.struts2.components.UIBean.evaluateParams(
        at org.apache.struts2.components.UIBean.end(
        at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTa
        at org.apache.jsp.index_jsp._jspx_meth_s_textfield_0(org.apache.jsp.inde
        at org.apache.jsp.index_jsp._jspx_meth_s_form_0(org.apache.jsp.index_jsp
        at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:93)
        at org.apache.jasper.runtime.HttpJspBase.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(
        at org.apache.jasper.servlet.JspServlet.service(
        at javax.servlet.http.HttpServlet.service(
        at org.mortbay.jetty.servlet.ServletHolder.handle(
        at org.mortbay.jetty.servlet.ServletHandler.handle(
        at org.mortbay.jetty.servlet.SessionHandler.handle(

Could you tell me please - what the problem is ? This problem is actual for Jetty and Resin.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message