wood burning stoves 2.0*
The moose likes JSP and the fly likes how can receive post data from power meter( acts as in built  http server) to my jsp (tomcat server) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how can receive post data from power meter( acts as in built  http server) to my jsp (tomcat server)" Watch "how can receive post data from power meter( acts as in built  http server) to my jsp (tomcat server)" New topic
Author

how can receive post data from power meter( acts as in built http server) to my jsp (tomcat server)

krishan gopal gupta
Greenhorn

Joined: Dec 30, 2012
Posts: 8
I have power meter. that provide some data as a post data.
powermeter manual given following information .
-------------------------------------------------------------------------------------------
WattsUp.Net makes a TCP connection to a host (assumed
HTTP server) at default port 80, and uses HTTP POST
to send a parameter list in standard URL encoding,
as shown in the following example.
**EXAMPLE POST FORMAT**
POST /remote/netlog.php HTTP/1.0
Host: meters.wattsup.net
User-Agent: WattsUp.NET
Content-Length: 59
Content-Type: application/x-www-form-urlencoded
id=1&w=0&v=1199&a=381&wh=0&pcy=0&frq=599&va=458&rnc=0&sr=20
-----------------------------------------------------------------------------------------------
I am not getting How can i get that post information and display on JSP page.
How i can sure that http server on power meter is working .
IP address is assign to power meter.


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Create a servlet to receive the post. Once the data is gathered, it can be displayed on a JSP forwarded to by the servlet.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
krishan gopal gupta
Greenhorn

Joined: Dec 30, 2012
Posts: 8
Thank.but my problem is that it is not specify any attribute. so i could not do like

request.getattribute("xyz") in servlet.

is any way that i could connect to power meter through IP address and get post information ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Your description is confusing. Does the meter perform the post to a server, or does the meter serve as a server that you can send requests to? Big difference.
krishan gopal gupta
Greenhorn

Joined: Dec 30, 2012
Posts: 8
its manual says meter perform the post to a server.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

How does it know what URL to use?
 
wood burning stoves
 
subject: how can receive post data from power meter( acts as in built http server) to my jsp (tomcat server)
 
Similar Threads
sending xml over http - security issue
what is multipart request?
Another tough question
HttpClient - Cookies
ajax not working with jsp