How do I use a tag within a tag?

I have a tag that takes a variable input that is produced from another tag. But I can't figure out how to use the output of one, as the input for another. I'm using the value produced as a value for a form. ex
<input type="text" value="<x:tag var="<x:tag2/>"/>"/> is there a certain way to do this?

You can't use JSP custom tags as attributes for other JSP custom tags.
You can only use runtime expressions like <%= expr %> or in JSP2.0 ${expr}
The snippet you have given looks ok, as the <input type="text"> is just HTML template text, and not a JSP custom tag.
Your <x:tag> looks a little confused, as you have an opening and closing, and the quotes don't seem to match up with 'var="
<input type="text" value="<c:out value="${username}"/>">

Similar Messages

  • How do you use image tags

    How do you use Image tags. Thank you

    Hi John,
    Have you seen this video? It describes how to apply default image tags to your pictures, and then describes how to create new, custom tags. Is there something more specific that you're wondering about? I'd love to help!
    Cheers,
    Michael

  • How can i use connection pool within the sqlj?

    hello
    i am a beginner to sqlj,i find all of the sample code from the oracle DON'T use connectionpool,they only write the database url to "connection.properties" file,but i think in the production environment we should use the connectionpool to optimise the querying,i usually use the weblogic connection pool.
    how can i use the connection pool within the sqlj?
    thank you very much!

    Im not sure if I understand. :)
    English is not my best language...
    Looking up the connection again? Do you mean I have to create new DataSource object and bind it again to ServletContext?

  • How to implement use bean tag in servlet technology

    hello,
    i want to use application scope for variables in application . i know about use bean tag but i want to use servelet technology. how could this be done

    The application scope corresponds to the servlet context. From your servlet, use getServletContext().getAttribute() and getServletContext().setAttribute().

  • How do I use a variable within a sql statement

    I am trying to use a local variable within an open SQL step but I keep getting an error.
    My sql command looks like this "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  locals.CurrentSerialNo
    If I replace the locals.CurrentSerialNo with an actual value such as below the statement works fine.
    "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  " 'ABC001' " 
    Can someone tell me how to correctly format the statement to use a variable?

    Hi,
    Thanks for the reply. I have changed the required variable to a string, but with no success. I have reattached my updated sequence file and an image of the error.
    When looking at the Data operation step I see that the sql statement is missing everything after the last quotation mark.
    Thanks again,
    Stuart
    Attachments:
    Database Test Sequence.seq ‏10 KB
    TestStand error.JPG ‏37 KB

  • How do I use a button within a movieclip to go to the root?

    Hi there, I am new to flash and AS3 and need some help
    getting my buttons to work.
    I made a script for the file that i am working with that has
    buttons located within 2 movieclips. I want that button to load and
    image into a UILoader (problemLoader_mc) that I placed on the stage
    on the main timeline (the timeline that contains WeekBar_mc). The
    problem is that I don't know how to get to the root of the file to
    start a new directory to tell my function to load the image i want.
    I have tried multiple approaches including:
    MovieClip(root).problemLoader_mc.source = problemArray[0]
    MovieClip(parent).problemLoader_mc.source = problemArray[0]
    root.problemLoader_mc.source = problemArray[0]
    parent.problemLoader_mc.source = problemArray[0]
    (root as MovieClip).problemLoader_mc.source = problemArray[0]
    If anyone can help me out with this, I would greatly
    appreciate it, I am banging my head against a wall at the moment.
    (Also, please excuse my vague descriptions, I am still learning the
    official terms.)
    Here is the code that I have written that pertains to this
    problem:

    I have a mental block for reasoning things out as far as
    assigning the listener to an object two mc's away from the main
    timeline while having the function in the main timeline, so I may
    play with that on my own for awhile. One thing you didn't do
    though, was to pay the same attention to the problemArray[0]
    assignment in that function, which I assume also lives in the root.
    But here's what I'd do for the moment.
    Take all that code except the array and plant it in the
    timeline where WEEK1btn lives, modifying it as follows....
    WEEK1_btn.addEventListener(MouseEvent.CLICK, pload1);
    function pload1(event:Event)
    MovieClip(this.parent.parent).problemLoader_mc.source =
    MovieClip(this.parent.parent).problemArray[0];
    I haven't utlized root myself yet, so I am not comfortable
    offering you a solution that attempts it.

  • How do I use Typekit fonts within Edge Animate

    I have applied a 'Pragmatica' Typekit font to a website.  I'm using Edge animate to construct some pages and within these pages want to add Type; however, Edge Fonts does not include the Typekit font 'Pragmatica' and the instruction for the page to use Typekit seems not to filter through into the Edge animate section .... is there a way round this?

    Hi, Trimmertop-
    When you open up the Web Fonts viewer, you will see Edge Web Fonts by default.  However, there is a tab next to it that says "Custom."  You can stick in your kit code in that location.
    -Elaine

  • How can I use data merge, within a master, within a book?

    Hi all,
    I am producing an 84pp catalogue for multiple brands.
    I have it set up as:
    1x .indd document per spread
    Master styles within one .indd document for black text, white text etc.
    Book setup to contain all of the .indd files to make up the 84pp book
    Now, my problem is I have to change the footer text and references depending on the brand, so I can have the footers saying 'Call Brand A on 123 4567' or 'Call Brand B on 567 1234' and have various in-text references change from Brand A to Brand B and vice versa.
    I have a data merge on each of the masters in my .indd style source looking at a simple .csv of:
    Brand Name
    URL
    Phone Number
    Brand A
    www.branda.com
    0800 123 4567
    Brand B
    www.brandb.com
    0800 567 1234
    This works fine on the masters within the source .indd.
    But, when I close this master style source and go into another .indd document within the book (after synchronising) I see the <<Brand Name>> container but, when I export the documents it does not populate the book with the data - it keeps the containers.
    Obviously with a normal in-document Data Merge you'd click 'Create Merged Document' but I don't want to export each page, and I have PDF print presets / .joboptions file with settings for the book.
    Any advice on how to get this to work?
    Thanks!
    Andy

    I'm not really following the workflow here, but this seems like it might be better suited to Conditional Text than to Data Merge.

  • How we can use jsf tags in included jsp enclosed in subview tags

    Hello everybody,
    I am developing web app by using jsf. I am including a jsp page "header.jsp" into another jsp page "main.jsp". The header.jsp page is enclosed in jsf subview tag on main.jsp page. The header.jsp contains some static html code and some jsf tags like "outputText". When i added tag library url in header.jsp then my app was not even not initiating and i was getting following exception
    ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
    16:22:16,890 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
    ....Now i removed jsf tag library url from included jsp "header.jsp" so now my app is running but only static html data is being displayed but the value in the jsf tag "outputText" is not being printed in the browser
    kindly help me. i would be very thankful....

    Your question has nothing to do with Sun Java System Directory Server.
    Please use the right forum(s).
    Thanks

  • How do I use a variable within paragraphFormat?

    I would like to insert the firstname of a client within paragrapgFormat(). ie: paragraphFormat(Hi #firstname#, your info......) When I output this the firstname just shows as #firstname#. Is there a way to get his to work?

    The first instance of 'FirstName' is a variable name. Whereas the last instance is a substring within the string defined by getInfo.message. I am assuming that the message you have saved in the database is:
    "Hi"  & FirstName & ",
      We are writing to you to inform you that we received your request to schedule the...
    You could modify the code as follows. Give the queries separate names, say, getUser and getMessage. Omit the columns userID and messID from the respective queries. This is because the where-clauses already specify the values.
    What you could then do is replace the substring "  & FirstName & " in getMessage.message with the variable getUser.FName. The result would be something like
    <!--- grabbing firstname --->
    <CFQUERY Name="getUser" datasource="#application.dsn#">
    SELECT fNname, lName, email, company, phone
    FROM users
    where userID = 1
    </CFQUERY>
    <cfset firstNameString = " " & trim(getUser.fName) & " ">
    <!--- grabbing message --->
    <cfquery name="getMessage" datasource="#application.dsn#">
    select name, message
    from messages
    where messID = 1
    </cfquery>
    <table width="300" cellpadding="0" cellspacing="0" border="1">
    <tr><td>
    <cfoutput query="getMessage">
    <cfset msg = replaceNoCase(message, '"  & FirstName & "', firstNameString)>
    #paragraphFormat(msg)#
    </cfoutput>
    </td></tr>
    </table>
    Having said that, there are still 2 things I fail to understand. Firstly, why loop across the query when there is just one row? Secondly, why do you save a static message in the database when you could just save it in the CFML code as a string variable?

  • How can I use MS Word within java programming

    Hi everyone!
    I am developing a Java program that will take data
    from an Access 2000 database, and manipulate it,
    display the results graphically and in tables. The
    challenge for me is that I want the program insert the
    graphics and tables into the MS Word template and then
    prompt me to save it as a word * .doc. Do you know
    of any articles or sources of sample code on how to do
    this. The Java environment is Java2, JDK 1.3,
    JBuilder4. The OS environment is XP.
    Regards,
    Farad

    Hi, I also need that package. my e-mail is [email protected] Plese send me that. Thanks in advance
    I have a package that will do this for you. I just
    need to get your email to send an attachment and
    examples.

  • How to use HTML tags inside JSF pages

    I am creating a Menu using dataTable and outputLink in a JSF page.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <h:column>
    <li>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
    </h:outputLink>
    <li>
    </h:column>
    </h:dataTable>
    </ol>
    </div>
    </div>
    I want to use <li> HTML tag as shown in code above before and after every <tr> tag formed, but when i run it and see view source, this is how it shows:
    NOTE: you can see it has thrown out of <table> tag itself.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <li>
    </li>
    <table>
    <tbody>
    <tr>
    <td><a id="_id0:0:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=-1"><span id="_id0:0:crumpName" style="width: 165px;">Home</span></a></td>
    </tr>
    <tr>
    <td><a id="_id0:1:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=3~-1"><span id="_id0:1:crumpName" style="width: 165px;">HIM Admin</span></a></td>
    </tr>
    </tbody>
    </table>
    </ol>
    </div>
    </div>
    Can some one help me, how do i use HTML tags inside <h:dataTable>.
    Or is their any other way i should form my Menus, to fully utilize to HTML tags.
    Thanks
    Ravi

    Hello,
    You can embed the verbatim elements in your datatable, ie,
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
      <h:column>
        <f:verbatim><li></f:verbatim>
        <h:outputLink id="crumbID" value="#{bread.menuLink}">
          <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
        </h:outputLink>
        <f:verbatim></li></f:verbatim>
      </h:column>
    </h:dataTable>

  • I want to display BLOB image in JSP Using  html tags IMG src=

    GoodAfternoon Sir/Madom
    I Have got the image from oracle database but want to display BLOB image using <IMG src="" > Html tags in JSP page . If it is possible than please give some ideas or
    Send me sample codes for display image.
    This code is ok and working no problem here Please send me code How to display using html tag from oracle in JSP page.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.swing.ImageIcon;" %>
          <%
            out.print("hiiiiiii") ;
                // declare a connection by using Connection interface
                Connection connection = null;
                /* Create string of connection url within specified format with machine
                   name, port number and database name. Here machine name id localhost
                   and database name is student. */
                String connectionURL = "jdbc:oracle:thin:@localhost:1521:orcl";
                /*declare a resultSet that works as a table resulted by execute a specified
                   sql query. */
                ResultSet rs = null;
                // Declare statement.
                PreparedStatement psmnt = null;
                  // declare InputStream object to store binary stream of given image.
                   InputStream sImage;
                try {
                    // Load JDBC driver "com.mysql.jdbc.Driver"
                    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                        /* Create a connection by using getConnection() method that takes
                        parameters of string type connection url, user name and password to
                        connect to database. */
                    connection = DriverManager.getConnection(connectionURL, "scott", "root");
                        /* prepareStatement() is used for create statement object that is
                    used for sending sql statements to the specified database. */
                    psmnt = connection.prepareStatement("SELECT image FROM img WHERE id = ?");
                    psmnt.setString(1, "10");
                    rs = psmnt.executeQuery();
                    if(rs.next()) {
                          byte[] bytearray = new byte[1048576];
                          int size=0;
                          sImage = rs.getBinaryStream(1);
                        //response.reset();
                          response.setContentType("image/jpeg");
                          while((size=sImage.read(bytearray))!= -1 ){
                response.getOutputStream().write(bytearray,0,size);
                catch(Exception ex){
                        out.println("error :"+ex);
               finally {
                    // close all the connections.
                    rs.close();
                    psmnt.close();
                    connection.close();
         %>
         Thanks

    I have done exactly that in one of my applications.
    I have extracted the image from the database as a byte array, and displayed it using a servlet.
    Here is the method in the servlet which does the displaying:
    (since I'm writing one byte at a time, it's probably not terribly efficient but it works)
         private void sendImage(byte[] bytes, HttpServletRequest request, HttpServletResponse response) throws IOException {
              ServletOutputStream sout = response.getOutputStream();
              for(int n = 0; n < bytes.length; n++) {
                   sout.write(bytes[n]);
              sout.flush();
              sout.close();
         }Then in my JSP, I use this:
    <img src="/path-to-servlet/image.jpg"/>
    The name of the image to display is in the URL as well as the path to the servlet. The servlet will therefore need to extract the image name from the url and call the database.

  • Is it possible use jsf tags in a desktop client?

    How can I use the tags for jsf for example <h:view .../> in a desktop client?

    You probably could if you try hard enough. For starters, use Facelets instead of JSP; that drops the need for a Java compiler and other things. Then you will need to supply the equivalent of the FacesServlet. Any underlying technology usually supplied by the container would need to be supplied by you. You will also need a first rate browser embedded in your application, with JavaScript support.

  • USE jsp TAG

    How do I use JSP tag with Weblogic?
              Where should I put my tld file, and where should I put the Java class file?
              I put the Java files under
              C:\bea\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WE
              B-INF\lib and it was not successful.
              Thank you
              

    something like this...
              OuterTag qParent = null;
              try {
                        Tag myParent = getParent();
                        while (myParent != null ) {
                          // loop up through tags until you find the one you want
                             if (myParent instanceof OuterTag) {
                                  qParent = (OuterTag) myParent;
                                  data = qParent.getSomeData();
                             } else {
                                  myParent = myParent.getParent();
                   }

Maybe you are looking for

  • Storing Word, Excel, Image files in Oracle 8i database

    How do I insert MS Word, MS Excel, and image files in Oracle 8i db. Do I need to use Developer Forms for using this functionality. If I am trying to insert data in Oracle through Java Servlets, what SQL should I use for inserting BLOB/LOB in Oracle d

  • How to dowload photos from my ipad in facebook?

    Just new in ipad world. Would like to dowload photos from my ipad to facebook. How do I do that?

  • Hi Experts, some terms in adobe form? thanks in advance!

    Hi Experts, I am learning adobe form, and I am familiar with smartform, but when I read the document about adobe form, I can make comparison between adobe form and smartform, so could anyone please tell me the differences and same places of adobe for

  • Viewing the Ipods menu through your TV

    I have an older 20gig Ipod without the Video option. I was wondering with the new ipods when you hookup your ipod to the TV, do you see the same display that is on the Ipods screen (mirrored). So if people are going through songs will they see that o

  • My Mail 6.6 Won't Apply Bold or Italic to text

    My Mail 6.6 Won't Apply Bold or Italic to text – even if I switch from Rich to Plain Text in the Format menu. What is causing this? It used to work just fine- I'm running OSX 10.8.5, on an iMac 3.4 GHz Intel Core i7. Thanks for any solutions!