• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating a table in a JSP

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
I'm trying to learn JSp and servlets...need your help for that ...
I have an XML and i'm parsing that XML to get the value of some tags,I need to display the value of these tags in a JSP page,in a form of a table.
i have already written a java class which parses he XML .I'm stuck in intergrating that piece of code in JSP.
Any help appreciated.
Thanks in Advance.





 
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please share the XML data format which may lead to help you in detail.
 
Gary Dwivdi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The XML data comes as a String ...
Say XML has a tag<name>XYZ</name>
So i'm parsing the XML and getting the value as:String name=XYZ,Now this XYZ value. i need to display in JSP ..How do i do that ???
 
Marshal
Posts: 79151
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you seen our JSP FAQ? Have you tried Googling for something like JSP tutorial?
 
Gary Dwivdi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried both of these Links and gone through some of the tutorials but i could not figure out how do i integrate my class file to the JSP .
I know its quite Dumb of me to ask such basic questions,But could not help it as i have just started to learn JSP's and all.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I always recommend that novices to JSP read the following articles:
  • The Secret Life of JSPs
  • The Front Man

  • The combination addresses the concepts you need to address your issue.
     
    Bear Bibeault
    Sheriff
    Posts: 67746
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    And be sure that any tutorials or other learning materials that you use are modern and up-to-date, focusing on the use of the JSTL and EL and not Java scriptlets (which have been discredited for almost a decade now).
     
    Gary Dwivdi
    Greenhorn
    Posts: 9
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi All,
    Thanks a ton for your valuable suggestions.I finally succeeded in making the JSP and servlets.and now I'm trying a hands on on JSTL.
    Can any one please share some pointers to a descriptive documentation of the same or help me figuring out how to get the size of a data list using JSTL.
    My code looks something like:
    <c:forEach var="data" items="${requestScope.dataList}" >
    <tr>
    <td><c:out value="${data.date}" /></td>
    <td><c:out value="${data.mobileNumber}" /></td>
    <td><c:out value="${data.msg}" /></td>

    </tr>
    </c:forEach>

    and I tried using <c:if test="${empty myObject.dataList}"> but I'm not able to get any output after putting this line of code.
    Can any one please let me know where am I going wrong?
     
    Bear Bibeault
    Sheriff
    Posts: 67746
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    We'll need more info that n you are giving us. For example, what are the values of the scoped variables?

    Also, please be sure to disable smilies when posting JSP code.
     
    Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic