Thread: JSP
View Single Post
  #4   Spotlight this post!  
Unread 03-02-2011, 03:23
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: JSP

The software stack you want to use would be the wrong one for the job. Just sending the integers to some software would be easier and the best choice (think Dashboard of some kind, hint hint); if you insist on using a web-based interface you might be able to get something running with a keep-alive connection and Javascript (similar to how the Axis Camera updates the images it receives in the web viewer for the MJPG stream). Note you will have to implement basically everything.

As for performance, the cRIO will be able to max-out the router and computer information wise while still leaving reasonable time (at least this was true in my tests) for control code (don't think about image processing, though), so it would make sense it could compute a HTML page a send it repeatedly. As for actually making sure the page is sent on the cRIO, you'd have to implement (at least) the GET method as defined in the HTTP RFC.

Basically, look for the string "GET <path>", where <path> is "/index.html" or similar. Return the page with "200 OK\r\nContent-Length: <length in bytes>\r\n<content>". I think this is all you should need to get Firefox/similar to accept it in some sort of compatibility mode. Do some experimenting with some of the various Firefox/similar add-ons, or look at the RFC for some basic commands (like "GET" and "HEAD") and open a connection in Java and print out the results to see what a valid header looks like.
Reply With Quote