Database driven links in STRUTS

Discussions

Web tier: servlets, JSP, Web frameworks: Database driven links in STRUTS

  1. Database driven links in STRUTS (1 messages)

    Hi. I'm wondering if anyone knows how to create dynamic, database driven links in STRUTS? Let's say you have a table with a field called "website" and a bean with get method "getWebSite()". In your action page, you've populated the bean. Now on the JSP page, I want to put the value of myBean.getWebSite() in the href of my link tag: <html:link href='value of myBean.getWebSite()'></html:link>.
    I have to problem dumping the value to the screen using the bean:write tag, but I want to put the value as an URL in the html:link tag.

    Does anyone know how to do this???
  2. Database driven links in STRUTS[ Go to top ]

    You can use Struts-EL (included in Struts 1.1 contrib-folder) for this:

    <html-el:link href="${myBean.webSite}">Link desc</html-el:link>