View RSS Feed

Recent Blogs Posts

  1. How to send HTTP request to a URL

    by , 12-09-2011 at 07:28 AM
    Sometimes an application needs to communicate to a web server to send/receive data through HTTP. For example, connecting to a financial service to get stock price, posting user data to server to save in database, or checking for a new version of an application if available.

    This article will guide you to write a generic utility method that can connect to a specified URL with either HTTP’s GET/POST method, and attaching parameters to the request. The method will return server’s response ...
    Tags: http, java, post, request, url Add / Edit Tags
    Categories
    HTTP , URL
  2. How to Debug Servlets

    by , 11-28-2011 at 06:07 PM
    Servlets can be difficult to debug because it is not possible to execute them directly. Instead, you trigger their execution by means of an HTTP request, and they are executed by the Web server. For remote execution, inserting break points or reading debugging messages and the stack traces becomes extremely difficult. Here I will outline some strategies to servlet debugging:
    1. Check the HTML source. If it doesn’t look correct, use the “View Source” command in order to check the HTML. If
    ...
    Categories
    Tutorial , HTTP