JSP Web Services Example - XML, XSLT in JSP - XML Web Services in Java
Published by: San (9/19/2007)
I am trying to code a web service for remote server to write out little information. Can you help me in finding an example of jsp web services? I am trying to use the xml response as the requesting server is going to parse the information and publish it the user. Please help me in finding a jsp web services using xml.
Web services are way better than writing a separate application or connecting a remote database to get some information. Parsing the information in the form of xml is the most standard way maintained in the web world. This article describes to code a web service using jsp pages.
<% response.setContentType("text/xml"); %>
<% response.setCharacterEncoding("UTF-8"); %>
<% // variable declared and initiated for this web service application
String WebServices = "xml";
This is an example of jsp web service for <%=WebServices%> data.
Here you can add or ![CDATA[, by adding this tag you can make sure the data is being transmitted even it is not in xml format. On needed the xml data is being parsed to get the optimal result.
This code is debugged and works fine, if you find any problem or error on running this script then post your comment here.
Most Popular Articles
- Sending Email from JSP Pages Using smtp.gmail.com
- How to Configure 404 Error or Page not Found on Tomcat
- JSP Web Services Example - XML, XSLT in JSP - XML Web Services in Java
- How to Email from JSP Page?
- How to Change the Image onMouseOver