HTML link in a Java?

Hya,
How can create a HTML link in Java GUI, for example in a JLabel?
thanks inadvance

I'm not quite sure but i think if you add addHyperlinkListener to the jlable it will be seen as a link.
Have a look at this code example:
try {
        String url = "http://www.google.com";
        JEditorPane editorPane = new JEditorPane(url);
        editorPane.setEditable(false);
        editorPane.addHyperlinkListener(new MyHyperlinkListener());
    } catch (IOException e) {
    class MyHyperlinkListener implements HyperlinkListener {
        public void hyperlinkUpdate(HyperlinkEvent evt) {
            if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                JEditorPane pane = (JEditorPane)evt.getSource();
                try {
                    // Show the new page in the editor pane.
                    pane.setPage(evt.getURL());
                } catch (IOException e) {
    }

Similar Messages

  • Html and email link in a java application

    Hi all
    How do you put a email or HTML link into a Java application.
    I want to put my web site address and email address into a about dialog.
    I would like to be able to open the default email application and web site from this dialog box.
    Thanks to all
    Craig

    Try just making a label, and formatting it to look like a generic link. Then add a listener that performs the desired action when you click on it. The "desired action" would probably involve starting the user's default browser/mail-program and loading something in it. I have no idea how to do that, but the above should at least get you a "link" that responds when you click it, and that's a start.

  • How to generate all the links of the java api methods

    Hi all,
    I noticed from my docs that the JAVA API methods are not linked. They are just static text. How can i link all the java api methods to a root url examble: java.sun.com/j2se/docs/javax/JFrame#pack()
    java.sun.com/j2se/docs/javax/JFrame#setVisible()
    java.sun.com/j2se/docs/java/sql/ResultSet#executeQuery()
    and so on.
    Thank you in advance.

    It sounds like you'd like to link to our docs on java.sun.com.
    You can do this using -link or -linkoffline
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html#link
    Start by reading the section "Choosing between -linkoffline and -link"
    Basically, try this option first:
    -link http://java.sun.com/j2se/1.4/docs/api
    If this fails (because your shell cannot access java.sun.com),
    then copy package-list from java.sun.com to your current directory,
    then use this option:
    -linkoffline http://java.sun.com/j2se/1.4/docs/api .
    Notice that the second argument is a dot "." to indicate
    that package-list is in the current directory.
    -Doug Kramer
    Javadoc team

  • How to use the html:link with a arraylist

    Hi everyone:
    I want to display the data using struts html:link.
    I query the database and place all the data to javabean,later place all the javabean to ArrayList.In Action,I use the "request.setAttribute("lovetable",articlelist) to set request to jsp page.
    I want to pass a parameter "id" use the hyperlink so I can get the parameter when I click the hyperlink.
    But how to use html:link to display it?
    I use <html:link action="viewtopic.do" paramId="id" paramName="lovetable" paramProperty="id"/>,it can't work and Tomcat report error :
    org.apache.jasper.JasperException: No getter method for property id of bean lovetable
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    The lovetable is a ArrayList and it don't have a getter or setter method.
    How to use it pass parameter? :( Thks

    Thank you.
    I use the bean:define successful.And display all the data to jsp.My jsp code is:
    <logic:iterate id="love" name="lovetable">
    <bean:define id="idbean" name="love"/>
    <tr bgcolor="<%=color%>">
    <td><bean:write name="love" property="id"/></td>
    <td><html:link forward="viewtopic" paramId="id" paramName="idbean" paramProperty="id"><bean:write name="love" property="title"/></html:link></td>
    <td><bean:write name="love" property="name"/></td>
    <td><bean:write name="love" property="time"/></td>
    </tr>
    </logic:iterate>
    In Action : request.setAttribute("lovetable",articlelist)
    ResutlSet rs=.............
    List articlelist=new ArrayList();
    while(rs.next()){
    articlebean bean=new articlebean();
    bean.setName(rs.getString("name"));
    bean.setTitle(rs.getString("title"));
    articlelist.add(bean);
    The above code will work property.
    The Tag "html:link" need bean to work other than arraylist so I iterate all the bean out.
    The Tag "logic:iterate" need collection to work so I make Action return a List.
    right?
    Any idea? :)

  • Having problems passing more than one parameter with html:link tag

    Hi guys,
    for my web application I�m using Struts. I�ve got a database with user details. I would like to get users list and link to the details of each user. I wrote the code and everything is working fine only the users list is repeating as many times as users in the list.
    For ex: I have in the database User1, User2 and User3. I would like to have a result like:
    User1
    User2
    User3
    Instead of it I have the result like:
    User1
    User2
    User3
    User1
    User2
    User3
    User1
    User2
    User3
    What I�m doing wrong? Could somebody help me please?
    Thank you in advance
    There is a snippet of the code, which I�m using in jsp:
    <code>
    <logic:iterate id="root" name="user">               
                   <%
                        java.util.HashMap users = new java.util.HashMap();
                        params.put("user",root);
                        pageContext.setAttribute("usersName", users);
                   %>
                   <html:link name=" usersName " scope="page" page="/name.do">
                        <logic:iterate id="folder" name="user">
                             <bean:write name="folder" /><br>
                        </logic:iterate>
                   </html:link><br>
                   </logic:iterate>
    </code>

    Suggestion: next time you post code use the "CODE" button to put code tags around it. It formats much nicer that way :-)
    You have a nested loop structure here.
    <logic:iterate id="root" name="user">
      <%
        java.util.HashMap users = new java.util.HashMap();
        params.put("user",root);
        pageContext.setAttribute("usersName", users);
      %>
      <html:link name=" usersName " scope="page" page="/name.do">
        <logic:iterate id="folder" name="user">
          <bean:write name="folder" /><br>
        </logic:iterate>
      </html:link><br>
    </logic:iterate>Both loops iterate over your "user".
    Your first loop loops over each user.
    Then your second loop also loops over each user - hence you get number of users * number of users = 3 groups of 3.
    If you have 4 users, you would have 4 groups of 4.
    I only see you setting one parameter: "usersName" What other parameters do you need to pass?
    At a guess, the inner loop is unnecessary, and you want to write the users name as the text for the link, and also use it as a link parameter.
    <logic:iterate id="root" name="user">
      <%
        java.util.HashMap users = new java.util.HashMap();
        params.put("user",root);
        pageContext.setAttribute("usersName", users);
      %>
      <html:link name="usersName" scope="page" page="/name.do">
          <bean:write name="user" /><br>
      </html:link><br>
    </logic:iterate>

  • Passing values to action form in struts using html:link tag in struts

    hi
    As we can post values to action form bean in struts using a <html:text> tag in side a form.
    Can the same be achieved by using a html:link attribute.
    If not then how can this be achieved (i.e. posting a form on click of a link and populating action form bean property for the same).
    thanx in advance.

    Crosspost:
    http://forum.java.sun.com/thread.jspa?threadID=5244035&tstart=0

  • Open a JspDynPage from a html link

    I would like to link a jps to the JspDynPage. I think that it would be able to do it through the "pcd". For example:
    - I have the SAP customer login screen (original) and i want to add a "link" (Forgotten PIN) to link with the JspDynPage (Java controller).
    Is it possible to do it? Does anyone know how? Do i go in right way?
    Thanks in advance.

    The code was lightsout.class, not #.class...
    I just want an HTML link to open a JAVA JFrame. Would a button work instead of an HTML link? Here's the beginning/initialization of my JFrame:
    public lightsout() {
              frame = new JFrame("LightsOut");
              frame.setSize(new Dimension(700, 700));
              frame.setTitle("Lights Out!");
              frame.setLocation(50, 50);
              frame.setResizable(false);
              japplet.setFocusable(false);
              frame.setAlwaysOnTop(true);
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              int height = screenSize.height;
              int width = screenSize.width;
              frame.setLocationRelativeTo(null);
              frame.setLayout(new BorderLayout());
              centerPanel = new JPanel(new GridLayout(5, 5));

  • Html link to a servlet

    Hello,
    I am new to Java Servlet programming and I need some help with calling a servlet via a HTML link.
    I have a class which generates a html page:
    package HccMembers;
    public class HccMemberServlet
    public StringBuffer buffer;
    public HccMemberServlet(String sHccId, String sHcId)
    buffer = new StringBuffer(4096);
    this.buffer.append("<HTML>\n ");
    this.buffer.append("<HEAD>\n ");
    this.buffer.append("<TITLE>Members</TITLE>\n");
    this.buffer.append("</HEAD> \n");
    this.buffer.append("<BODY> \n");
    this.buffer.append("<p><ahref='http://localhost:8080/transport/HccMembers/servlet/JCSJobOrderServlet'>New Job Order</a></p>");
    this.buffer.append("</BODY></HTML>");
    Basically, when the user clicks the link a servlet should be invoked. (Below)
    package HccMembers;
    //import java Servlet classes
    import javax.servlet.*;
    import javax.servlet.http.*;
    //import java classes
    import java.io.IOException;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    public class JCSJobOrderServlet extends HttpServlet
    public void init(ServletConfig config) throws ServletException
    System.out.println("hello");
    public void service(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    System.out.println("Hey");           
    The problem is that, when I click the link I get a 404 page not found error. Any ideas?
    I really appreciate any help.

    You need to add couples of lines to the configuration file of your application (web.xml) : first you must say that the class CSJobOrderServlet is a servlet that you want to use, second you must map the servlet to a specific url, then you can use this url whenever you like.
    As an advice, don't use absolute URLs on your application, use only URLs relative to your application root.
    Example for web.xml:
        <servlet>
            <servlet-name> MyFirstServlet</servlet-name>
            <servlet-class>JCSJobOrderServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>MyFirstServlet</servlet-name>
            <url-pattern>/custom_url</url-pattern>
        </servlet-mapping>Now, about the servlet implementation: if you are using System.out.println("Hey") you will see the message on the standard output of the server, and not on the browser as you expected.
    here is a small example:
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response)
          throws IOException, ServletException {
            response.setContentType("text/html");
            PrintWriter writer = response.getWriter();
            writer.println("<html>");
            writer.println("<head><title>Hello response</title></head>");
            writer.println("<body>Hello !</body></html>");
       }For more information see the documentation for servlets and / or a book.
    Iulian

  • html:link action="/...." not working

    hi eve,
    i am trying to add this line <html:link action="/prepareSimple"> then the following error is comming
    org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 39
    36:
    39:           <html:link action="/prepareSimple">
    40:           <img src="images/execute.gif" alt="" hspace="4" border="0" align="top" class="inline" />
    41:           </html:link>
    42:           <html:link action="/prepareSimple">Execute</html:link>
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:518)
         javax.servlet.ServletException: java.lang.NoClassDefFoundError
    ava.lang.NoClassDefFoundError
    my struts-config.xml is
    <action path="/processSimple"
                        type="examples.simple.ProcessSimpleAction"
                        name="simpleForm"
                        scope="request"
                        input="/jsp/simple/Simple.jsp"
                        validate="true">
                   <forward name="success" path="/jsp/simple/SimpleResults.jsp"/>
              </action>
    can someone help me where i am wrong????????????

    Try to add a type.
    See http://en.wikipedia.org/wiki/Favicon

  • html:link .... Struts

    I want a Link as action
    MyJsp.jsp
    <html:link action="/MyAction?myParam=true">MyText</html:link>
    MyAction.java
    in der Methode execute (...........)
    String Str = request.getParameter("MyParam");
    the pProblem I becom the Str null whay ????
    thanks

    You can't map the action directly to an Action class.
    You have to map it via the struts-config.xml with an action like:
    <action path="/myAction" type="MyAction"/>
    And call this action from the jsp by f.ex.
    <% pageContext.setAttribute("MyParam", "Hello"); %>  <!--just adding a parameter -->
    <html:link action="/myAction" name="MyParam"/>The name attribute specifies the query string parameter(s).
    You should be able to access the parameter now in MyAction with your original execute method.

  • Html:link submit and passing parameters

    I need to submit the form when the <html:link ..... > is clicked/pressed and also need to pass parameters.
    <jsp:useBean id="mapParams" class="java.util.HashMap"/>
    <c:set target="${mapParams}" property="theKey" value="${theValue}"/>
    <c:set target="${mapParams}" property="theKey1" value="${theValue1}"/>
    <html:link href="javascript:document.myform.submit()" name="mapParams" >
    <c:out value="${custItr.empName}"/>
    </html:link>
    When i click on the link getting javascript error which says "syntax error". when I remove the "name" attribute in <html:link> there is no error but I need to have the name attribute to pass the parameters.
    How to do both the submit and passing of parameters using <html:link>? Your help is appreciated.
    Thanks.

    Parameters can only be passed like that to an actual URL. eg http://localhost:8080/myApp/showEmployee?id=123&dept=Sales
    In this case, you are using the link tag to invoke javascript - not a url. URL Parameters don't apply to this string
    If you are indeed submitting a form, I would suggest that you instead go with putting hidden fields on the form to submit the value.
    Use <html:hidden>

  • Html:link action html:link on results page null

    I am sure that this is something simple and small but I have been banging my head against this problem for a while now.
    I am using the <html:link> tag on my index.jsp page activates an action, retrieves a result and forwards to the homePage.jsp. The home page has a tiles layout and the results are actually in homePage_lowerLeftLevel.jsp within the homePage.jsp. Below the results I have an <html:link> tag which is identical to the tag in the index.jsp but now instead of seeing the link there is [ServletException in:/pages/homePage_leftLowerLevel.jsp] null' and if I go back to the index.jsp I get the following error�
    java.lang.NullPointerException
         at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:313)
         at index.jspService(index.jsp:29)
         [SRC:/index.jsp]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    If this <html:link> tag is not on the results page the results display perfectly. Here is my code:
    ********index.jsp**************
    <%@ page language="java" %>
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <h2 class="lowerColumnHeader">Statistics</h2>
    <table class="statisticsTable">
    <tr>
    <td>
    ICF Published Parcels:
    </td>
    <td class="results">
    <bean:write name="homePageForm" property="result" />
    </td>
    </tr>
    </table>
    <html:link page="/homePage.do?areaId=bcId">Click Me </html:link>
    *********homePage_lowerLeftLevel.jsp*************
    <%@ page language="java" %>
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <h2 class="lowerColumnHeader">Statistics</h2>
    <table class="statisticsTable">
    <tr>
    <td>
    ICF Published Parcels:
    </td>
    <td class="results">
    <bean:write name="homePageForm" property="result" />
    </td>
    </tr>
    </table>
    <html:link page="/homePage.do?areaId=bcId">Click Me </html:link>
    *****************struts_config.xml**********************
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    under the License.
    -->
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
    "http://struts.apache.org/dtds/struts-config_1_3.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="homePageForm"
    type="ca.bc.gov.srm.app.pip.HomePageForm" />
    </form-beans>
    <global-exceptions>
    <!-- sample exception handler
    <exception
    key="expired.password"
    type="app.ExpiredPasswordException"
    path="/changePassword.jsp"/>
    end sample -->
    </global-exceptions>
    <global-forwards>
    <forward
    name="homepage"
    path="/homePage.do"/>
    </global-forwards>
    <action
    path="/homePage"
    name="homePageForm"
    type="ca.bc.gov.srm.app.pip.action.HomePageAction"
    scope="request"
    validate="false"
    input="/pages/homePage.jsp"/>
    </action-mappings>
    <message-resources parameter="MessageResources" />
    <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <set-property property="definitions-config"
    value="/WEB-INF/tiles-defs.xml" />
    <set-property property="moduleAware" value="true" />
    </plug-in>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property
    property="pathnames"
    value="/org/apache/struts/validator/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    Thank you very much for your help

    It should be used something like this!!!
    <html:link action="myStrutsAction" paramId="user" paramName="userName"/>if the userName attribute had the value "Bob" that would produce:
    http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-html.html#link

  • Problem in html:link   tag

    i have written one small programme in Struts application please solve this problem
    code is
    ======
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <html:html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title><bean:message key="app.title" /></title>
    </head>
    <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
    <h2 align="center"><b><i><font size="6" face="Comic Sans MS" color="#FF0000">Welcome
    page</font></i></b></h2>
    <p> </p>
    <html:errors/>
    <html:form action="login.do" >
    <p align="center"><font face="Arial Black" size="4"><bean:message key="app.username" /> :<html:text property="username" /></font></p>
    <p align="center"><font face="Arial Black" size="4"><bean:message key="app.password" />:<html:password property="password"/></font></p>
    <p align="center"><font face="Arial Black" size="4"><html:submit property="login"/><html:reset property="Clear" /></font></p>
    <p align="center"><font face="Arial Black" size="4"><bean:message key="app.newuser"/>:
    </html:form>
    <html:link href="registration_form.jsp">Register</html:link></font></p>
    </body>
    </html:html>
    In this above programe i have used two ActionForm class one for LoginForm and another is RegisterForm..
    in this welcome page it requires
    username
    password
    if a new user he wants to fill register form
    so the problem in the above code when iam pressing REGISTER link it will shown the follwing errors
    javax.servlet.jsp.JspException: Cannot find bean null in any scope
    at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
    at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:274)
    at jsp_servlet.__registration_form._jspService(__registration_form.java:164)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:445)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5412)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:744)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3086)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    >
    please solve it
    thanks adavance

    i have writen ACtionForm classes for welcome.jsp and registration_form.jsp..
    can u give good idea how can use to links from page to diffent pages..
    i mean here my aim is if it is new user he wants to enter registration_form.jsp and if it existing user directly he has login and username in welcome.jsp only and he has to enter into Inbox..please give some guidelines on this one
    thanking u

  • How to use html:link in Ajax

    Hi frnds,
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@page import="java.sql.*" %>
    <html>
    <head>
    <script type="text/javascript">
    var xmlhttp;
    function loadXMLDoc()
    xmlhttp=null;
    alert(document.getElementById('country').value);
    alert(document.getElementById('url').value);
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    url=document.getElementById('url').value+"action=search&q="+document.getElementById('country').value+"&scope=tracker";
    xmlhttp.onreadystatechange=onResponse;
    xmlhttp.open("POST",url,true,"platts","platts1234");
    xmlhttp.send("");
    function onResponse()
    if(xmlhttp.readyState!=4) return;
    if(xmlhttp.status!=200)
    alert("Problem retrieving XML data: "+xmlhttp.statusText);
    return;
    y=xmlhttp.responseXML.documentElement.getElementsByTagName("response");
    alert(y.value);
    //alert(xmlhttp.statusText);
    txt="<div style='overflow:auto;height:400px;width=1200px' align='top'>";
    txt=txt+"<table border='1' style='border-collapse: collapse' bordercolor='#111111' width='100%'>";
    txt=txt+"<tr bgcolor='#D3D3D3'>";
    txt=txt+"<th width='5%'> </th>";
    txt=txt+"<th width='10%'>UID</th>";
    txt=txt+"<th width='7%'>PUBLICATION</th>";
    txt=txt+"<th width='10%'>INFRASTRUCTURE</th>";
    txt=txt+"<th width='10%'>PROJECT</th>";
    txt=txt+"<th width='10%'>STATUS</th>";
    txt=txt+"<th width='10%'>CAPACITY</th>";
    txt=txt+"<th width='10%'>STARTUP</th>";
    txt=txt+"<th width='28%'>NOTES</th>";
    txt=txt+"</tr>";
    x=xmlhttp.responseXML.documentElement.getElementsByTagName("tracked-item");
    for (i=0;i<x.length;i++)
    txt=txt + "<tr bgcolor='white'>";
    txt=txt+ '<td width="5%"><html:link action="Unpub" name="lng" property="uri"><img src="./images/Unpub.png" height="16" width="16" border="0" title="UnPublished Icon">';
    xx=x.getElementsByTagName("uri");
    document.getElementById('uri').value=xx[0].firstChild.nodeValue;
    try
    txt=txt + "<td width='10%'><input type='text' name='uri' value="+ xx[0].firstChild.nodeValue +">" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    txt=txt+'</html:link>';
    xx=x[i].getElementsByTagName("Publication");
    try
    txt=txt + "<td width='7%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='7%'> </td>";
    xx=x[i].getElementsByTagName("infraStructure");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("project");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("status");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("capacity");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("startup");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("notes");
    try
    txt=txt + "<td width='28%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='28%'> </td>";
    txt=txt + "</tr>";
    txt=txt+ "</table>";
    txt=txt+ "</div>";
    document.getElementById('tab').innerHTML=txt;
    </script>
    </head>
    <body onload="loadXMLDoc()" bgcolor="#D8D8BF" >
    <html:form action="Unpub" styleId="searchForm">
    <%@ include file="header.jsp" %>
    <img src="./images/Unpub.png" height="16" width="16"/> --> Unpublished Data
    <br><br><br><br>
    <html:hidden property="country" name="lng"/>
    <html:hidden property="uri" name="lng"/>
    <html:text property="uri" name="lng"/>
    <input type="hidden" id="url" value='<%=application.getInitParameter("url")%>'>
    <div style="overflow:auto;height:400px" align="top">
    <div id="tab"></div>
    </div>
    </html:form>
    </body>
    </html>
    Here is my code.... my intension is ... when i click the <html:link> which is there in the script i want to get the corresponding rows 'uri'. and that uri i need to pass to the bean.
    Here in this case my problem is which ever icon i press i'm able to get the last uri
    for ex:- if there are 10 records displayed in tabular format. if i press any icon i'm getting only the 10th uri....
    So, kindly please help me to sort out this problem.

    Hi Gobinath,
    Please check the below similar links
    How to display a HTML Page in Webdynpro (without IFrame)?
    can i embed an html page in the webdynpro
    HTML Editor in WebDynpro
    How to connect to a html using webdynpro
    Hope that helps
    regards
    Anil
    Message was edited by:
            Armin Reichert

  • Adding a html link to JLabel

    Hi...
    So, what I want is a JLabel or maybe a JOptionPane to have a HTML link on it to a website and if the user clicks on said link I would like their default browser to fire up and hit that page. Thus in the below code I have a JLabel with "Java" showing and underlined like it is a link...now, how do I get this event processed?
    JLabel linkLabel =
    new JLabel("<html><a href="+"http://www.java.sun.com"+">Java</html>");
    TIA
    tfm

    search is your friend:
    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=%2Bforum%3A31&qt=hyperlink+label

Maybe you are looking for

  • Cursor in another cursor. how?

    i have a program like this DECLARE V_VARIABLE1 VARCHAR2(10); CURSOR_ABC IS select...............; BEGIN OPEN CURSOR_ABC; LOOP FETCH CURSOR_ABC INTO V_VARIABLE1; EXIT WHEN CURSOR_ABC%NOTFOUND; WHAT IF I WANT TO INSERT ANOTHER SAME KINDA CURSOR LOOP HE

  • Write/Read Database with "Jeffrey"-VIs

    Hello, i want to write/read a sql-database without-the NI-Toolkit. I found while searching here the Tools from Jeffrey which are available here: http://jeffreytravis.com/lost/index.html Now i unocked the files and wanted to try t he example "Example

  • Downloading pictures from camera

    I am trying to transfer new pictures from camera (they come up in a search so I know they are in the computer)...BUT I am unable to transfer them to the place where all my other photos are ('My {Pictures'). When the search results are on the screen t

  • Role and Privileges for OLAP metadata

    Hi, Is there any document which specifies what all roles and privileges are required for creating any OLAP meta data ( Dimension, Cube, Measure and Catalog etc)? I think these are impt roles:- SELECT_CATALOG_ROLE EXECUTE_CATALOG_ROLE DELETE_CATALOG_R

  • No Photo Info in Photos app?

    iPhoto had the ability to show information about a photo - camera used, GPS info etc etc - is there anywhere in Photos app that has the same functionality?