Hello everybody.
I am new in struts. I am using tomcat 5.5 and struts 1.1.
However, there is an error--"Expecting "jsparam" standard
action with "name" and "value" attributes" when I browse it.
Could anybody tell me why I have the error?
Thank you in advance.
BearPalm!
-------------Error Trace(localhost.log)
Nov 4, 2005 3:47:05 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index.jsp(3,0) Expecting "jsparam" standard action with "name" and "value" attributes
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
at org.apache.jasper.compiler.Parser.parseParam(Parser.java:861)
at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1813)
at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1069)
at org.apache.jasper.compiler.Parser.parseForward(Parser.java:911)
at org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1222)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1572)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:831)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:652)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)
at java.lang.Thread.run(Unknown Source)
--------------JSP(employeelist.jsp)
<%@ taglib uri="WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
<html>
<head>
<title><bean:message key="app.title" /></title>
</head>
<body>
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="7"> </td>
</tr>
<tr>
<td height="68" width="48%">
<div align="left">
<img src="images/helloween.gif">
</div>
</td>
</tr>
<tr>
<td colspan="7"> </td>
</tr>
</table>
<html:errors />
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr align="left">
<th><bean:message key="app.username" /></th>
<th><bean:message key="app.name" /></th>
<th><bean:message key="app.phone" /></th>
<th><bean:message key="app.email" /></th>
<th><bean:message key="app.department" /></th>
<th><bean:message key="app.role" /></th>
</tr>
<logic:iterate id="employee" name="employees" >
<tr align="left">
<td><bean:write name="employee" property="username" /></td>
<td><bean:write name="employee" property="name" /></td>
<td><bean:write name="employee" property="phone" /></td>
<td><bean:write name="employee" property="email" /></td>
<td><bean:write name="employee" property="department" /></td>
<td><bean:write name="employee" property="rolename" /></td>
<td><a href="Edit.do?username=<bean:write name="employee" property="username" />" >Edit</a>
<a href="Delete.do?username=<bean:write name="employee" property="username" />" >Delete</a>
</td>
</tr>
</logic:iterate>
<tr>
<td colspan="7"> <hr></td>
</tr>
</table>
<font size="-1" face="arial"><a href="addemployee.jsp">Add New Employee</a></font>
</body>
</html>
---------------web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"
<web-app>
<!-- Standard Action Servlet Configuration (with debugging) -->
<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>debug</param-name>
<param-value>5</param-value>
</init-param>
<!--Bundle resource-->
<init-param>
<param-name>application</param-name>
<param-value>resources.ApplicationResources</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
</web-app>
I am new in struts. I am using tomcat 5.5 and struts 1.1.
However, there is an error--"Expecting "jsparam" standard
action with "name" and "value" attributes" when I browse it.
Could anybody tell me why I have the error?
Thank you in advance.
BearPalm!
-------------Error Trace(localhost.log)
Nov 4, 2005 3:47:05 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index.jsp(3,0) Expecting "jsparam" standard action with "name" and "value" attributes
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
at org.apache.jasper.compiler.Parser.parseParam(Parser.java:861)
at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1813)
at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1069)
at org.apache.jasper.compiler.Parser.parseForward(Parser.java:911)
at org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1222)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1572)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:831)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:652)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)
at java.lang.Thread.run(Unknown Source)
--------------JSP(employeelist.jsp)
<%@ taglib uri="WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
<html>
<head>
<title><bean:message key="app.title" /></title>
</head>
<body>
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="7"> </td>
</tr>
<tr>
<td height="68" width="48%">
<div align="left">
<img src="images/helloween.gif">
</div>
</td>
</tr>
<tr>
<td colspan="7"> </td>
</tr>
</table>
<html:errors />
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr align="left">
<th><bean:message key="app.username" /></th>
<th><bean:message key="app.name" /></th>
<th><bean:message key="app.phone" /></th>
<th><bean:message key="app.email" /></th>
<th><bean:message key="app.department" /></th>
<th><bean:message key="app.role" /></th>
</tr>
<logic:iterate id="employee" name="employees" >
<tr align="left">
<td><bean:write name="employee" property="username" /></td>
<td><bean:write name="employee" property="name" /></td>
<td><bean:write name="employee" property="phone" /></td>
<td><bean:write name="employee" property="email" /></td>
<td><bean:write name="employee" property="department" /></td>
<td><bean:write name="employee" property="rolename" /></td>
<td><a href="Edit.do?username=<bean:write name="employee" property="username" />" >Edit</a>
<a href="Delete.do?username=<bean:write name="employee" property="username" />" >Delete</a>
</td>
</tr>
</logic:iterate>
<tr>
<td colspan="7"> <hr></td>
</tr>
</table>
<font size="-1" face="arial"><a href="addemployee.jsp">Add New Employee</a></font>
</body>
</html>
---------------web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"
<web-app>
<!-- Standard Action Servlet Configuration (with debugging) -->
<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>debug</param-name>
<param-value>5</param-value>
</init-param>
<!--Bundle resource-->
<init-param>
<param-name>application</param-name>
<param-value>resources.ApplicationResources</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
</web-app>