-
ServletInputStream and Dynamo
I have writing a java package that will upoad a file, read, parse data and
update the data base.
This project works fine in JavaServer and Tomcat, but as soon I put in
Dynamo it stop working.
The code stop on the readLine and just hang in there, I'm receiving the file
from a VB HTTP comand line or Upload from a HTML page.
I'm also using it as a DynamoServlet and as a
public void service (DynamoHttpServletRequest req,
DynamoHttpServletResponse res)
throws ServletException, IOException
because the doPost does not get call under Dynamo.
I have called Dynamo has been 3 days and no one was able to help me. They
admited that there is a bug in Dynamo.
Please can some one help me.
My dead line is this coming friday.
Thanks
ServletInputStream in = req.getInputStream();
String readLine(in)
private String readLine(ServletInputStream in) throws IOException {
StringBuffer sbuf = new StringBuffer();
int result;
String line;
System.out.println("reading" );
do {
result = in.readLine(buf, 0, buf.length); // does +=
if (result != -1) {
sbuf.append(new String(buf, 0, result, "ISO-8859-1"));
}
} while (result == buf.length); // loop only if the buffer was filled
if (sbuf.length() == 0) {
return null; // nothing read, must be at the end of stream
}
sbuf.setLength(sbuf.length() - 2); // cut off the trailing \r\n
return sbuf.toString();
}
-
Re: ServletInputStream and Dynamo
Suggests to me that you should stop using this Dynamo product and start
using something else.
Marcia <isoint@msn.com> wrote in message news:3a7115a2$1@news.devx.com...
>
> I have writing a java package that will upoad a file, read, parse data and
> update the data base.
> This project works fine in JavaServer and Tomcat, but as soon I put in
> Dynamo it stop working.
> The code stop on the readLine and just hang in there, I'm receiving the
file
> from a VB HTTP comand line or Upload from a HTML page.
> I'm also using it as a DynamoServlet and as a
> public void service (DynamoHttpServletRequest req,
> DynamoHttpServletResponse res)
> throws ServletException, IOException
>
> because the doPost does not get call under Dynamo.
> I have called Dynamo has been 3 days and no one was able to help me. They
> admited that there is a bug in Dynamo.
> Please can some one help me.
> My dead line is this coming friday.
>
> Thanks
>
> ServletInputStream in = req.getInputStream();
>
> String readLine(in)
>
> private String readLine(ServletInputStream in) throws IOException {
> StringBuffer sbuf = new StringBuffer();
> int result;
> String line;
> System.out.println("reading" );
> do {
> result = in.readLine(buf, 0, buf.length); // does +=
> if (result != -1) {
> sbuf.append(new String(buf, 0, result, "ISO-8859-1"));
> }
> } while (result == buf.length); // loop only if the buffer was filled
>
> if (sbuf.length() == 0) {
> return null; // nothing read, must be at the end of stream
> }
>
> sbuf.setLength(sbuf.length() - 2); // cut off the trailing \r\n
> return sbuf.toString();
> }
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks