This document contains answers to frequently asked questions about
Tynamo™-SNAP.
Topics:
General
Building
Deploying
Servlets
-
How do I add my own 1-Wire servlet?
Well, there are two ways:
- You can include it via the example OneWireServlet.
- Alternatively, you could write your own servlet that has nothing
to do with the 1-Wire example, and map your own request path.
Please see the writing your own
servlets document.
-
How do I add support for more 1-Wire containers?
It may be the case that more or different 1-Wire containers are added
after the release of your current SNAP development kit. In this case,
simply add the appropriate classfiles or JAR libraries to your
classpath on the SNAP.
Execution
-
My logs say that my logfiles were mailed, but I don't receive
them. Why is this so?
There is a very strong possibility your mailhost isn't set. You can
accomplish this by setting it with the ipconfig command or
SNAP API.
Another possibility is that your mail server does not accept mail with
a "From" domain it does not recognize.
-
Why are there frequent
IOException s in the
log?
If the remote connection closes its connection before the server is
finished reading or sending information, then an IOException
will be thrown when attempting to read from or write to the socket
connection. This exception is not ignored by the server since there
may be other reasons for this type of error within your own servlet.
Now, while most errors within a servlet should be wrapped inside a
ServletException , this may not be the case, and so an
IOException may indicate a servlet problem not related
to the connection.
-
My server always responds with a "400 Bad Request" or "Invalid
host." message.
The solution is to comment out the
server.hostname
property in the server configuration
file.
All HTTP/1.1 requests must have a "Host:" header in the request. If
the value of this header does not match the
server.hostname
property, then this message will be returned. Unless you know for
sure that HTTP clients will be requesting this specific host, this
property should not be set.
-
How do I set the mailhost on SNAP?
Use the ipconfig command or SNAP API to set the address of
the mail server.
-
Why are new sessions created when it should be using a
previously created one?
Make sure to get the session before calling
getOutputStream() . The reason is that session IDs
are usually stored in the headers, and a call to
getOutputStream() does not allow any more headers to
be sent. This is what is meant by a "committed response".
|