I suspect this is caused by accessing the JSP directly, without going
through Struts. If you haven't already, try setting up an action mapping
that forwards to the JSP (i.e. add <action path='...'
forward='/path/to/jsp'/> to your action-mappings in struts-config.xml)
and requesting the page through that.
L.
kokro wrote:
Hi all,
I'm developing a test application using Struts 1.3.8 and Java 1.5.0_12 and I
have this problem: when I try to get the value linked to the key
"login.title" I get this error:
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:6
3: <html>
4: <head>
5: <title>
6: <bean:message key="label.title"/>
7: </title>
8: </head>
9: <body>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:467)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NullPointerException: Module 'null' not found.
org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)
org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735)
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1098)
org.apache.struts.taglib.TagUtils.message(TagUtils.java:956)
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:224)
org.apache.jsp.index_jsp._jspx_meth_bean_005fmessage_005f0(index_jsp.java:104)
org.apache.jsp.index_jsp._jspService(index_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
If I have understood well it should mean that the properties file is
unreachable.
Below I post code fragments:
index.jsp
<%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html>
<head>
<title>
<bean:message key="label.title"/>
</title>
</head>
<body>
<br/>
<bean:message key="label.insertNewSong"/>
<br/>
<html:link forward="searchSong">
<bean:message key="label.searchSong"/>
</html:link>
<br/>
</body>
</html>
web.xml
.........
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
.............
struts-config.xml
.............
<!-- Message Resources Configuration -->
<message-resources
parameter="it.francesco.tutorial.utils.ApplicationResources"/>
...................
where ApplicationResources is the .properties file name.
Considering that I've already checked that each .tld and .xml file are in
the right place, what could be the problem? (If I dont use bean:message and
html:link but write values and use a href the page is displayed)?
Thanks a lot
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]