tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Nagle" <s...@planet12.net>
Subject RE: Can Tomcat be used as a servlet container for non-http servlets?
Date Sat, 17 Nov 2007 00:20:05 GMT
Johnny,

The answers to most of your questions are still up in the air. There are
several ways that I could go about the project. The CNC machines that I have
experience with rely on an operator (human) to point it (the machine) at a
file that contains the instructions and say 'GO'.

Along these lines, I was thinking one approach would be to have the CNC
programmer write what would essentially be a JSP that has instructions in G
code and any logic in java. Next the programmer would request this page from
Tomcat and the response would only have the G code instructions and this
file could be saved to the filesystem. Then the CNC operator would then
point the machine at this file. That is the 'manual version'.

Another version of the system could have the CNC machine make the request
for a page from the server. This seems like the slicker, cooler version. My
servlet would be very similar to JSP but instead of responding with HTML, it
would respond with a text file containing the G code instructions.

I have to look into the machines communication protocols. I am fairly
certain that they are using TCP/IP to find files on a file system.

-----Original Message-----
From: Johnny Kewl [mailto:john@kewlstuff.co.za]
Sent: Friday, November 16, 2007 11:57 AM
To: Tomcat Users List
Subject: Re: Can Tomcat be used as a servlet container for non-http
servlets?



---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message -----
From: "Sean Nagle" <sean@planet12.net>
To: "apache users" <users@tomcat.apache.org>
Sent: Friday, November 16, 2007 6:28 PM
Subject: Can Tomcat be used as a servlet container for non-http servlets?


> Where can I get more information about the design and use of Tomcat in
> regards to non-http servlet applications? I tried searching in the mailing
> list archives for "non http" and found this thread:
>
>
http://mail-archives.apache.org/mod_mbox/tomcat-dev/200004.mbox/%3c38F4C980.
> CE17E8BA@eng.sun.com%3e
>
> This thread was from April 2000 and Tomcat 3.x and the developers were
> still
> trying to figure out the architecture of generic vs. http servlets.
>
> I am interested in writing a servlet that would derive from GenericServlet
> and I am wondering if I will be able to use Tomcat as the servlet
> container.
> My application would doesn't have anything to do with email or ftp or the
> like. What I would like to do is something similar to JSP but instead of
> the
> response being html it would be instructions to run a CNC machine

Magic! Nice project...
I think the only question is whether the CNC machine can make TCP/IP
requests.
If so, yes why not? Its just a raw request with no protocol in it, ie no
HTTP headers and all the other things that browsers need, so you just have
to study what the machine wants to see.

//Machine will call into this
public void service(ServletRequest req, ServletResponse res){
    //Tell than machine what it needs to hear ;)
}

The CNC machine maybe the server though... in which case you will have to
use a socket to talk to it.
What protocol does the machine support?
Is it a Client or Server?

>
> Other google searches have not turned up much information about how to use
> Tomcat in this way.
>
> If it is not currently designed for such a purpose, would it be possible
> to
> modify or extend Tomcat so that it would be able to?
>
> Thanks in advance for any help
>
> Sean Nagle
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message