File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Unable to access message resources through <bean:message> in included jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unable to access message resources through <bean:message> in included jsp" Watch "Unable to access message resources through <bean:message> in included jsp" New topic
Author

Unable to access message resources through <bean:message> in included jsp

Vaibhav Dahake
Greenhorn

Joined: Mar 25, 2009
Posts: 2
Hi all,

I am facing the problem with <bean:message> tag.

I have main.jsp in which i have included header.jsp.
<bean:message> works fine in main.jsp but gives no output in header.jsp.

Following is the snapshot of the code:

---- main.jsp --------

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Overview</title>
</head>
<body>
..
.
.

<jsp:include page="/header.jsp" flush="true"></jsp:include>



------- header.jsp ---------

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>


  • <bean:message key="label.firstname"/>

  • <bean:message key="label.lastname"/>




By no means i am able to figure out why i am not able to access message resources in included jsp.
Please help.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Is this "include" code working?, I mean, are you sure this page gets included and the problem with only the bean tags ?


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to access message resources through <bean:message> in included jsp
 
Similar Threads
question about struts
Legal to put a bean:write inside tiles-defs.xml?
Not able to use Struts Taglibs
Cannot find message resources ?
bean:message means what?