You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ricky Lee <Ri...@hotmail.com> on 2003/11/25 13:36:36 UTC

bug of struts bean taglib?

hi,i get a problem in my program. when i copy the struts-excercise-taglib
example file (bean-write.jsp, just some fragment below) to a new web
application(with strut1.1 under tomcat 4.1.29) and test it, it can't work
and showed me the errors below, but i test the bean-write.jsp under
struts-excercise-taglib folder, it can work smoothly , after that, i found a
problem, if i add the code below into web.xml of my new web application ,the
bean-write i created before can work smoothly, when i remove that, i can't
work:

my bean-write.jsp
---------------
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%
pageContext.setAttribute("test1.int", new Integer(123));
pageContext.setAttribute("test1.string", "This is a string");
%>

<bean:write name="test1.int"/>

//-- but when i remove this line above, leave string type alone , it can
work also.

<bean:write name="test1.string"/> //leave this alone , can work
----------------

if i add this configuation

-------------
......
<init-param>
<param-name>application</param-name>
<param-value></param-value>
</init-param>
---------------------------

to web.xml after <servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
....
... it can work
when i remove the configuation above , it can't work and show below:

could some one help me? is it a bug of write bean? or i must add the
configuration into web.xml, even then i didn't set any value of the
application property of servlet?



HTTP Status 500 -

----------------------------------------------------------------------------
----

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256

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