Showing posts with label JSP. Show all posts
Showing posts with label JSP. Show all posts

Read XML Taglib and JSTL in JSP


samle.xml

 <?xml version="1.0" encoding="ISO-8859-1"?>
 <weather ver="2.0">
   <loc id="INXX0096">
     <dnam>New Delhi, India </dnam>
     <tm>3:30 PM </tm>
   </loc>
   <cc>
     <tmp>75 </tmp>
     <bar>
       <r>29.94 </r>
       <d>steady </d>
     </bar>
   </cc>
 </weather>

--------------------------------
xml_read.jsp

<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<c:import url="http://localhost:8080/XML/samle.xml" var="xml"/>
<x:parse xml="${xml}" varDom="dom"/>
<html>
<head>
<title>Read XML through taglib JSTL</title>
</head>

<body>
      <x:forEach select="$dom/weather/cc/tmp" var="tmp">
        <x:out select="$tmp" />
    </x:forEach>

    <br>

    <x:forEach select="$dom/weather/cc/bar/d" var="d">
        <x:out select="$d" />
    </x:forEach>
</body>
</html>
READ MORE - Read XML Taglib and JSTL in JSP

How to pass parameters on URL query string


READ MORE - How to pass parameters on URL query string

what is servlet context,page context and application context


READ MORE - what is servlet context,page context and application context

Error in JSP page for displaying elements of an array list


READ MORE - Error in JSP page for displaying elements of an array list

Check if user has clicked on submit button based on client/server side


READ MORE - Check if user has clicked on submit button based on client/server side

File uploading using JSP and Servlet


READ MORE - File uploading using JSP and Servlet

Filtering Responses


READ MORE - Filtering Responses

Sending value from one jsp page to another jsp page


READ MORE - Sending value from one jsp page to another jsp page

default size of a JSP?


READ MORE - default size of a JSP?

Process Simple Text Files As JSP


READ MORE - Process Simple Text Files As JSP

How to invoke a URL from a JSP page


READ MORE - How to invoke a URL from a JSP page

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|