Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: TagSupport not print <fmt:message key="..." />

  1. #1
    Junior Member
    Join Date
    Aug 2022
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation TagSupport not print <fmt:message key="..." />

    Hi everyone I have this problem, when I look for this result, the jsp page where I insert the result prints it correctly, but the <fmt:message key="roleFood1" /> and <fmt:message key="roleFood2" /> tag remains empty. How can I solve the problem? Do you have any idea? thank you

    public class RoleTag extends TagSupport {

    public int doStartTag() throws JspException {
    try {

    JspWriter out = pageContext.getOut();

    String outPrint = "<div><span><fmt:message key='roleFood1' /></span><span><fmt:message key='roleFood2' /></span></div>";

    out.print(outPrint);
    } catch (java.io.IOException e) {
    throw new JspTagException(e.getMessage());
    }
    return SKIP_BODY;
    }

    }

    <fmt:message key ='....' /> It works fine as I use it in the jsp page.

  2. #2
    Member Helium c2's Avatar
    Join Date
    Nov 2023
    Location
    Kekaha, Kaua'i
    Posts
    117
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default Re: TagSupport not print <fmt:message key="..." />

    I'll be working on the JSP page soon. Apache Tomcat. CATALINA_HOME and CATALINA_BASE. Soon starting. Are you past this part already in your work on the Apache Tomcat? Sdk edition. I'm reading this off the instruction manual. 8 pages printout. From my chrome computer.
    Last edited by Helium c2; January 24th, 2024 at 03:58 AM.

Similar Threads

  1. Replies: 1
    Last Post: August 20th, 2019, 07:07 AM
  2. Replies: 4
    Last Post: July 18th, 2014, 02:04 AM
  3. Replies: 1
    Last Post: July 16th, 2014, 04:16 AM
  4. Replies: 2
    Last Post: May 22nd, 2014, 01:17 PM