Using of EL in href tag

i'm not able to use EL(expression language) in href tag of struts html.
can anybody help me out?

Use a 2.4 compliant container and web application
or
use a 2.4 compliant container and a 2.3 compliant web application and specify this in your jsp
<%@page isELIgnored="false"%>Also take a look the discussion in [url http://forum.java.sun.com/thread.jspa?threadID=756032] this thread
ram.

Similar Messages

  • How to get a value given to a button in HTML using a href tag

    Hi,
    In my application I have loaded  html  content  in WebView. In the HTML file i have used a Button to which i have given some value in href tag as
    <a href="ButtonClick//testing/mysample">
    <input type="button" value="Click me" />
    </a>
    When i click the button i want to get the string "ButtonClick//testing/mysample" in my app..  But i do not want to use InvokeScript() on my webview.. Could anyone please give me a solution for this?..
    Thank you.

    The only way to interact with HTML content from WebView is using JavaScript. You can do this by invoking such scripts from your C# code (using InvokeScript) or embedding the JavaScript method into the button you are working with.
    But you need to know that if you intend to get a return value from your JavaScript code, you would need to use the InvokeScript.
    Here's an example of printing the value from your hyperlink without InvokeScript. But note that it only prints the value and can't return the value to your C# code without InvokeScript.
    string htmlContent = @"
    <html>
    <head>
    <script type='text/javascript'>
    function myFunction()
    document.getElementById('myResult').innerHTML = document.getElementById('myLinkConent').href.substring(6); //remove 'about:' from href string
    </script>
    </head>
    <body>
    <a id='myLinkConent' href='ButtonClick//testing/mysample'>
    </a>
    <input type='button' value='Click me' onclick='myFunction()'/>
    <p id='myResult'></p>
    </body>
    </html>";
    Let me know if this helps.
    Abdulwahab Suleiman

  • How can I POST data within the same page if I have a A HREF -tag as input?

    How can I POST data within the same page if I have a <A HREF>-tag as input? I want the user to click on a line of text (from a database) and then some data should be posted.

    you can use like this or call javascript fuction and submit the form
    <form method=post action="/mypage">
    cnmsdesign.doc     
    </form>

  • Can we  have a href tags in jsf page

    hi all,
    I tried inserting a link in jsf page using <a href> tag but when I click it, it is appending the link to contextroot.
    For Example:
    <f:verbatim>
    click here
    </f:verbatim>
    and when I click on it, I see http://www.google.com is appended to my application url after context root like
    http://localhost:9080/Ma/view/India/http://www.google.com
    and I get 404 error. how do I do it without having my application url.
    Thanks
    Ma
    Edited by: niki007 on Jan 12, 2009 4:32 PM

    This problem can occur if you didn't specify any protocol (http:// or https:// or others) in the link. But your example looks fine. I think that you modified the real code to this example, without being aware that you solved the problem yourself.
    At any way, you can also just use h:outputLink to render <a> elements.

  • Xsl value in html a href="" tag

    Hi all,
    I am converting the xml data to html using xsl file.In this I need to give link (<a href=") in html from the value of xml element.
    I assigned the value to a variable in xsl as vId and I try to use it in the href attribute.
    example:
    </xsl:value-of>>hello!!
    But xsl is not allowing this action.
    How to assign the xsl variable value to href attribute?
    Help me to slove this problem.
    regards,
    Selva.

    hai,
    y dont u try writing this code where u require <a href="     <xsl:element name="a">
              <xsl:attribute name="href">
    <xsl:value-of select="$vId"/>
    </xsl:attribute>
         </xsl:element>
    by doing so u will generate the tag dynamically

  • DW is rendering a href tag when i drag image into code field

    When i drag an image file into the code view in DW it is
    creating an a href tag rather than an IMG SRC= tag. I am using a
    virtual dedicated server, for the first time, and i don't know if
    it has anything to do with the server settings or with the settings
    in DW.
    I am also having a second problem when trying to save a html
    file to the remote server. If i select "Save file to Remote Server"
    i can't link to the page in my browser unless i include ".html" at
    the end of the link in the <a href> tag. I should not have to
    add the .html at the end of my link in order to go to that page. I
    have never had this happen before, but i have never used a virtual
    dedicated server before either. Again, not sure if this is related
    to the server settings or DW.
    Can anyone help me with these 2 issues?
    Thanks Alan B

    > When i drag an image file into the code view in DW it is
    creating an a
    > href
    > tag rather than an IMG SRC= tag. I am using a virtual
    dedicated server,
    > for the
    > first time, and i don't know if it has anything to do
    with the server
    > settings
    > or with the settings in DW.
    Starting from a newly created page, please give me the exact
    steps to
    reproduce this.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "alan-emc" <[email protected]> wrote in
    message
    news:f1eoc2$39h$[email protected]..
    >
    >
    > When i drag an image file into the code view in DW it is
    creating an a
    > href
    > tag rather than an IMG SRC= tag. I am using a virtual
    dedicated server,
    > for the
    > first time, and i don't know if it has anything to do
    with the server
    > settings
    > or with the settings in DW.
    >
    > I am also having a second problem when trying to save a
    html file to the
    > remote server. If i select "Save file to Remote Server"
    i can't link to
    > the
    > page in my browser unless i include ".html" at the end
    of the link in the
    > <a
    > href> tag. I should not have to add the .html at the
    end of my link in
    > order to
    > go to that page. I have never had this happen before,
    but i have never
    > used a
    > virtual dedicated server before either. Again, not sure
    if this is related
    > to
    > the server settings or DW.
    >
    > Can anyone help me with these 2 issues?
    > Thanks Alan B
    >

  • Syntax for href tag in out.println

    Hi,
    In the jsp, the table displays document number from the for loop in it.
    I'm trying to put a hyperlink using href tag to the document number which is in the value "table.getString("VBELN")"
    out.println(var + table.getString("VBELN"));
    I do not know the correct syntax or any alternative to acheive the hyperlink for the document numbers displayed in the jsp. One that I tried is
    out.println(var + "<a href="">" + table.getString("VBELN") + "</a>");
    Appreciate your timely help.
    Thanks.

    Thanks Ashish.
    I too had the same problem and so couldn't post my question properly and completely.
    I've sent you an e-mail in reply.
    I need to pass parameter and open the URL with the parameter and no toolbars.
    Looking forward to your earliest possible reply. Thanks again.

  • Dynamic text box generation in jsp page by using net-ui jsp html tags

    Hi All,
    I Need to generate the "TextBoxes" Dynamically by using the "Net-UI HTML Tags".How can i do this ?
    I am using
    1. WebLogic portal server 8.1 sp4 (Workshop dev environment)
    2. JavaPageFlow Applications
    3. Net-UI tags html jsp
    I need to generate the textboxes dynamically and i have to
    get those values in the page flow .
    How it is possible by using the "Net-UI Tags".
    Thanks In Advance,
    KiranBabu.Karusala

    how we create dynemic text box in jsp based one value which we give at runtime

  • How to dynamically include jsp files using jsf el in include tag ?

    Hi,
    I'm trying to get the jsp file name from my backing bean to use it in an include tag but I can't make it work
    When using this piece of code I can get the generated path
             <h:outputText value="/_partial/#{myBean.jspName}.jsp"/>whereas in this code the jsf el is not replaced by this value.
            <%@ include file="/_partial/#{myBean.jspName}.jsp" %> Have you any idea of how to solve this ? I'm currently developing for J2EE 1.4 platform.     
    Thanks for your help,
    Regards.

    If you're using JSF 1.2 and JSTL 1.2 at a JSP 2.1 environment, then you can just use <jsp:include> with unified EL.
    If you're using JSF 1.1, then you may find this article useful [http://balusc.blogspot.com/2007/01/dynamic-jsf-subviews.html]

  • How to use Euro symbol in xml tags?

    How to use Euro symbol in xml tags?

    What do you mean by "in xml tags"? Can you post a three-line XML snippet showing what you hope to achieve?

  • Why would someone use the meta utf-8 tag inside the script tag?

    I have run into a number of sites that use the <meta utf-8> tag inside the <script> tag what is the use of it.
    How dose one write the utf-8 inside the script tag?

    csteinola wrote:
    > If I CFINCLUDE that cache file, the characters come out
    munged (non-utf-8
    > encoded).
    try prepending a <cfprocessingdirective
    pageencoding="utf-8"> to the file.

  • ZEN X-Fi 2 does not read in numbers if used as Artist name's tag?

    Dear Creative labs,
    I have got an artist named 3 so when I import his CD into my ZEN X-Fi 2 the artist name tag is not recognized and it falls under Unknown Artist. When I change the tag into the spelling Tre (Italian for 3) the name is correctly imported.
    May I conclude that the firmware does not recognize number if used as Artist name's tag? is there any way to fix it's
    regards
    Pasquale

    Hi,
    I tried it myself and I get the same result. I changed the Artist's name of a random album to "3" and it got listed as "Unknown Artist" in the player.
    Surprizingly it did work when I changed it to "33". It got listed on top of the Artist list as it should.
    I guess this is a firmware bug. I'm using version .2.08 so I hope this will be added to the to-fix list for the next firmware update. (I know the newest version is .20.08 but that version only adds support for the 64GB model.)
    Nice catch Pasquale !

  • Specified physical path folder opening using a href tag

    Hi
    I am working on some web application, i am trying to do open mentioned physical path folder in my html page.
    but its not opening, same thing if i do simple html out side the specified folder drive is opening.
    Follows code shows how i am doing in my html page.
    link
    so it should open D drive venkatesh folder. but its not opening if i deploy in tomcat server.
    but if i do out side simple html its opening.
    plz guide me.
    THnaks
    Venkatesh.

    Oh, a directory. That would require a different approach, yes.
    If you want to make use of appserver's default file browser and the appserver's directory index setting is turned on, then just add the following to server.xml:
    <Context docBase="c:/path/to/folder/you/want/to/publish" path="/pathyouwanttouseascontextrooturl" />This way you can start with directory browsing by http://example.com/pathyouwanttouseascontextrooturl

  • How to use "scope " attrubute in useBean tag

    Can anyone please tell me if I can use the same JavaBean Class to hold information form different pages? well, let me explain exactely what I want to do:
    I have a Java bean Class that holds a property 'Name':
    package ContactManager;
    public class Person {
    private String name="%";
    public String getName () {
    return this.name;
    public void setName (String my_name) {
    name = my_name + "%" ;
    I'm using this class to store temporarly the Criteria of search from a JSP/HTML page to send to a database for search and for UPDATE -> this of course is done in different HTML/JSP pages. The problem I have is that the first time I set the properties (when the user make a search) this value remains unchanged [-> the second time when the user asks for update, I try to use the same bean to keep the value => unfortuntly it returns me the old value]
    My question is: is the use of 'scope' attribute of the "jsp:useBean" tag can solve this problem? if yes how to use it? I've tryed to set the scope of the bean to page but that does not help :-(
    Pleaze help, I'm stuck.... Bellow is the 4 JSP pages for:
    - person_search.jsp / person_result.jsp
    - request_modify.jsp/ DoModify.jsp
    1 -person_search.jsp
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD><TITLE>Person Search</TITLE></HEAD>
    <BODY><CENTER>
    <form method="POST" action="person_result.jsp">
    Name <input type="text" name="name" size="47"></p>
    <input type="submit" value="Submit" name="B1">
    <input type="reset" value="Reset" name="B2"></p>
    </form></body>
    </html>
    2- person_result.jsp
    <%@ page import="java.sql.*" %>
    <HTML><BODY>
    <jsp:useBean id="theBean" class="ContactManager.Person"/>
    <jsp:setProperty name="theBean" property="*" />
    Name<BR>
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("JDBC driver loaded");
    catch (ClassNotFoundException e) {
    System.out.println(e.toString());
    %>
    <%
    try {
    Connection con = DriverManager.getConnection("jdbc:odbc:ContactManager");
    Statement s = con.createStatement();
    String sql = "SELECT Client.ClientID, Client.Name FROM Client where Client.Name like " + "'" + theBean.getName() + "'";
    ResultSet rs = s.executeQuery(sql);
    while (rs.next()) {
    String myId = rs.getString(1);
    %>
    <TR>
    <TD><%= myId %></TD>
    <TD><a href="person_detail.jsp?id=<%= myId %>"><%=rs.getString(2)%></a></TD>
    <TD><a href="delete_person.jsp?id=<%= myId %>">Delete</a></TD><BR>
    </TR>
    <%
    rs.close();
    s.close();
    con.close();
    catch (SQLException e) {
    System.out.println(e.toString());
    catch (Exception e) {
    System.out.println(e.toString());
    %>
    </BODY>
    </HTML>
    3- request_modify.jsp
    <%@ page import="java.sql.*" %>
    <html>
    <head><title>AddressBook: Modifying Person <%= request.getParameter ("id") %></title> </head>
    <body bgcolor="#ffffee">
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("JDBC driver loaded");
    catch (ClassNotFoundException e) {
    System.out.println(e.toString());
    %>
    <%
    int rowsAffected = 0;
    try {
    Connection con = DriverManager.getConnection("jdbc:odbc:ContactManager");
    Statement s = con.createStatement();
    String sql = "SELECT Client.ClientID, Client.Name FROM Client where ClientID ="+ request.getParameter("id");
    ResultSet rs = s.executeQuery(sql);
    if (rs.next()) {
    %>
    Client Name is <input type=text name=name value=<%= rs.getString(2) %>> <br>
    <TD><a href="person_do_modify.jsp?id=<%= rs.getString(1)%>">Confirm Modify</a></TD>
    <%
    rs.close();
    s.close();
    con.close();
    catch (SQLException e) {
    System.out.println(e.toString());
    catch (Exception e) {
    System.out.println(e.toString());
    %>
    </BODY> </HTML>
    4- do_modify.jsp
    <%@ page import="java.sql.*" %>
    <html>
    <head><title>AddressBook: Modifying Address <%= request.getParameter ("id") %></title></head>
    <body bgcolor="#ffffee">
    <jsp:useBean id="theBean" class="ContactManager.Person" scope="page"/>
    <jsp:setProperty name="theBean" property="name"/>
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("JDBC driver loaded");
    catch (ClassNotFoundException e) {
    System.out.println(e.toString());
    %>
    <%
    int rowsAffected = 0;
    try {
    Connection con = DriverManager.getConnection("jdbc:odbc:ContactManager");
    PreparedStatement preparedStatement = con.prepareStatement ("UPDATE Client SET Name=? WHERE ClientID =?");
    preparedStatement.setString (1, theBean.getName());
    preparedStatement.setString (2, request.getParameter("id"));
    rowsAffected = preparedStatement.executeUpdate ();
    preparedStatement.close ();
    if (rowsAffected == 1) {
    %>
    done
    <%
    else{
    %>
    Not Modified
    <%
    con.close();
    catch (SQLException e) {
    System.out.println(e.toString());
    catch (Exception e) {
    %>
    </BODY></HTML>
    Thank you for the help.
    Sammy

    While a quick search on the <jsp:useBean> tag and the scope attribute will probably yield more information than I can summarize in a few sentences, I'm pretty sure that using the scope="page" attribute on a bean will cause that bean to be instantiated every time the page is loaded. In order for a bean to persist longer than the existance of that page (whether you're loading a new page, or reloading the same one), you'd need to set the scope to session or application (you'd probably want session).

  • Problems using a variable with a tag of a webapp

    I have a webapp where I've built a field in the database for the item is active or not, depending if my client chooses if it's free or not.
    The name of the tag that I want to use as a variable is { tag_estado } and has two values:
    Gratis
    Pago
    When in jQuery I create a variable to store the value of this tag and created a conditional to activate the link and icon of the item, always the tag value prints it on "Pago", even though the webapp item has the value of "Gratis"
    I appreciate your time to help me resolve this issue.
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
              var linkleccionGratis = function() {
                        $(".linkLeccion").attr('href', '{tag_itemurl_withhost}?tab=video');
              var linkleccionPago = function() {
                        $(".linkLeccion").attr('href', '#dataaaaaaaa');
              var imagenGratis = function() {
                        $('.videoIcono').each(function(){
                              //Change the src of each img
                              $(this).attr('src', '/Comportamiento-Video/Iconos/1365805563_movie_studio-android-r_1.png');
              var imagenPago = function() {
                        $('.videoIcono').each(function(){
                              //Change the src of each img
                              $(this).attr('src', '/Comportamiento-Video/Iconos/1365805563_movie_studio-android-r_0.png');
        var EstadoLeccion = "{tag_estado}";
              if(EstadoLeccion == "Pago"){
                                  linkleccionPago();
                                  imagenPago();
              else if(EstadoLeccion == "Gratis"){
                                  linkleccionGratis();
                                  imagenGratis();
                        else{
                                  linkleccionPago();
    </script>
    <div style="width: 921px; margin-bottom: 10px;">
    <div class="FranjaSuperiorTituloLeccion">
    <div class="TituloContenedorLeccionWebApp">
    <div class="TituloLeccionWebApp">Lecci&oacute;n {tag_num_leccion}: {tag_titulo_leccion}</div> </div> <div class="ImagenesBotonesLeccionWebApp">
    <a class="linkLeccion" href="#data" id="inline"><img alt="Video" class="videoIcono" src="http://www.excelvirtual.org/Comportamiento-Video/Iconos/1365805563_movie_studio-android-r_ 0.png" style="margin-top: 6px; width: 31px; height: 31px;" />
    </a>
    </div>
    <div class="ImagenesBotonesLeccionWebApp">{tag_actividad url}</div>
    <div class="ImagenesBotonesLeccionWebApp">
    <a href="{tag_cuestionario}" target="_blank">
    <img alt="Cuestionario" src="http://www.excelvirtual.org/nuevodiseno/images/actividaddef2.png" style="width: 41px; height: 41px;" />
    </a>
    </div>
    </div>
    </div>

    It's tough to tell without seeing the page but it looks like your code may be defaulting to the else statement. You could delete the else and see if it does anything

Maybe you are looking for

  • Album art cover flaw

    well, if you have all songs in library on itunes, and on your ipod, no matter what it is, you don't have any problem. but if you backup few albums, delete from itunes, but you have still them in ipod. next time when you try to resync album art becaus

  • US Qwerty keyboards in Europe.

    Apple ships US qwerty (the only standard normal qwerty) on their MacBooks and iMac if you so please. What they don't ship however are the keyboards separately. One can only order the "International Qwerty". Now I really wonder if someone at Apple cou

  • Transfer Data from Palm OS to BlackBerry 10 Smartphones - US

    (I am Posting this a 2nd time because I'm not sure it went through the first time; got some kind of authenication error message.)  - 1. What is the best way to transfer my PIM Organizer Data from my Palm TX to a BlackBerry Z10? - 2. How do I obtain t

  • How to make row selection by checkbox in ADF table

    hello, using jdev11g TP4 , fusion web application when i drag my view object as ADF table into jsf page, i want to know how to make row selection by checkbox thanks greenApple Edited by: greenApple on Nov 10, 2008 11:33 AM

  • Whats wrong with this sql statement ??

    Hello all, I am trying to run the below query out of persheet(tanel poder) performance excel chart...but i get below error...db is on 9.2 what is wrong with this sql statement ? http://blog.tanelpoder.com/2008/12/28/performance-visualization-made-eas