• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vaibhav Dahake
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this "include" code working?, I mean, are you sure this page gets included and the problem with only the bean tags ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic