File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:message key and bean:write not working

 
erika chua
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this string in my .java file.

String str = "<a href =\"" + url + "\"><bean:message key=\"label.search\"/></a>";

that turns out like this below, which is (i suppose) correct.

<a href = "searchUser.do?action=search"><bean:message key="label.search"/></a>

and it follows this

request.setAttribute("header", str);

In my .jsp file

<bean:write name="header" scope="request" filter="false"/>

In my properties file

label.search = Search

I dont understand why this does not work. but of course if i change <bean:message key="label.search"/> to a text like ABC, it works perfectly fine.
I also tried label.search in other .jsp files, it works fine too
 
olivier dutranoit
Ranch Hand
Posts: 81
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

You cannot write in your servlet


and next, using this string in your jsp, and expecting the syntax to be evaluated.

the
<bean:message key=\"label.search\"/>
can only be evaluated inside a jsp. Not trough your servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic