1 / 4

XFP

XFP. XML Framework Page. Current technologies. Java Servlets: Java files that generate character streams JSP: character streams with embedded Java XSP: XML files with embedded Java. import java.io.*; import javax.servlet.*; import javax.servlet.http.*;

berit
Download Presentation

XFP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XFP XML Framework Page

  2. Current technologies • Java Servlets: Java files that generate character streams • JSP: character streams with embedded Java • XSP: XML files with embedded Java

  3. import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorldServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter out = res.getWriter(); out.println("Hello, world."); out.close(); } } A basic servlet

  4. res.setContentType("text/html; charset=utf-8"); PrintWriter out = res.getWriter(); out.println("<html>"); out.println(" <head>"); out.println(" <title>HTML example</title>"); out.println(" </head>"); out.println(" <body>"); out.println(" <h1>HTML example</h1>"); out.println(" <p>This is an example of"); out.println(" <a href=\"http://www.w3.org/TR/xhtml1/\">HTML</a>."); out.println(" </body>"); out.println("</html>"); … Slightly more unwieldy example

More Related