View RSS Feed

My Java Tips

  1. Using Struts2 Tags

    by , 11-18-2011 at 04:59 PM (My Java Tips)
    Struts provides HTML tag library for easy creation of user interfaces. In this lesson I will show you what all Struts HTML Tags are available to the JSP for the development of user interfaces.



    To use the Struts HTML Tags we have to include the following line in our JSP file:
    Java Code:
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    above code makes available the tag to the jsp.

    Java Code:
    <html:message key="thekey"/>
    ...
    Categories
    Struts
  2. Using tags in Struts

    by , 11-15-2011 at 06:26 PM (My Java Tips)
    Web applications differ from conventional websites in that web applications can create a dynamic response. To make it easier to reference dynamic data from a page, the Struts framework offers a set of tags. Some of the tags mimic standard HTML tag while providing added value. Other tags create non-standard, but useful controls. While HTML provides a simple a tag for creating hyperlinks, the HTML tag often requires us to include redundant information. Also the HTML tag cannot easily access dynamic ...
    Categories
    Struts
  3. Struts”Hello World”

    by , 11-15-2011 at 06:15 PM (My Java Tips)
    Lets make a HelloWorld example using Struts.


    Suppose you want to create a simple "Hello World" example that displays a welcome message. To create a "Hello World" example, you need to do three things:

    1. Create a server page HelloWorld.jsp to present the messages

    Java Code:
    &lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;
    <h2><s:property value="message"></s:property></h2>
    ...

    Updated 11-15-2011 at 06:21 PM by Java Tip

    Categories
    Struts