Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6374943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:33:05+00:00 2026-05-25T01:33:05+00:00

i am trying to include a java code into the value of the inputText

  • 0

i am trying to include a java code into the value of the inputText in my jsf page but an error occur

according to tld or attribute directive in tag file attribute value
does not accept any expressions

Here is my jsf page.

<%@ page contentType="text/html" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="core" %>
<%@ page language="java" %>
    <core:view>
    <html:form>
        <html:outputLabel value="Informations " style="FONT-SIZE: xx-large;"/>
        <br />&nbsp;
        <br />

        <%
final String property=System.getProperty("jboss.server.home.dir");
 %>
    <html:outputLabel value="Répertoire de configuration:  " />&nbsp;&nbsp;
<html:inputText value='<%=property%>'/>

    </html:form>
    </core:view>

Doesn ‘ t work either with double quote or nothing
How to resolve this problem please ?
Thank you very much

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:33:05+00:00Added an answer on May 25, 2026 at 1:33 am

    The problem is with this line of code:

    <html:inputText value='<%=property%>'/>
    

    JSF uses Expression Language to populate/read values to/from a JavaBean. You will have to create a POJO action (called ManagedBean) with a variable property and link it there.

    E.g.

    public class ConfigurationAction {
    
        private String property = System.getProperty("jboss.server.home.dir");
    
        /**NOTE: MUST create a getter and setter. **/
        public String getProperty() {
            return property;
        }
    
        public void setProperty(String property) {
            this.property = property;
        }
    }
    

    Don’t forget to map the ManagedBean. In JBoss Seam, you will just add an @Name annotation above the class like, @Name("configurationAction").

    Finally, render this in JSF with Expression Language (EL)

    <html:inputText value="#{configurationAction.property}"/>
    

    Where configurationAction is the name of your ManagedBean, and property is the instance of the ManagedBean.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to include a maven java project into my android project. the maven
I am trying to include a value from a database table within the value
I am trying to include a .js file into a php file. My folder
I'm trying to code an application which runs un different java platforms like J2SE,
I am beginner to java and was trying out this code puzzle from the
I am trying to run the eBaySDK (Java) on Windows, but I kept on
I have been trying with limited success to code a JSF application. In one
I'm trying to process some JSON into a Java object using some beans and
This question is related to calling scala code from java code. When I include
I'm trying to figure out how to include common pieces of code in multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.