This week's book giveaway is in the Java in General forum.
We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line!
See this thread for details.
Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Ron McLeod

Saloon Keeper
+ Follow
since Feb 12, 2013
Ron likes ...
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
Forum Moderator
Richmond, BC, Canada
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ron McLeod

kevin Abel wrote:I type
Java -version from CMD.
It says
java version "1.80_161
with more lines of information.

The more lines might be significant.  Do you have a 32bit or 64 bit version of the JRE/JDK?Are you trying to install a 32bit or 64bit version of Eclipse?
13 hours ago
I ran your code using Netcat to simulate the printer side and it completed (15MB) with no errors.  However if I closed the Netcat part-way through the transfer, I get the same exception that you reported:You can use a packet sniffer like Wireshark or tcpdump view the network traffic and help determined what happened.  In my case, you can see that the printer-side ( closed the connection (TCP FIN):
I merged your stuff with the following thread. I hope that is okay by you.
3 days ago
Well .. if isCancelled() evaluates to true, then the code block for the while will not be executed any more and you will not see the message in the log.  Try printing outside of the code block.
3 days ago
I ran your code and I saw dopost printed at the console.  I'm guessing that your web server is running an older version of your code which called the doGet method and didn't print the doPost message:

Try adding something like this to your servlet to print the method before it is handled by doGet or doPost:
3 days ago
I want use a deployment plan to be able to change the locations of the log files to something other than what is configured in the log4j2.xml file.

I've started with just trying to change the filename for the application-log appender, but it doesn't have effect when I deploy on a WebLogic server, and I find that log4j still uses the specification in the xml config file.  I have not worked with deployment plans before, so I'm sure I'm doing something wrong.  These are the bits of the Plan.xml file which I am expecting to change the location where the application-log file is written:
I wasn't too sure on what to use as the <root-element>, so I used the root element of the log4j config file.

Any suggestions on what I might be missing?

Internal Structure of xcma.war
Application Root Structure
5 days ago
Where is employee declared?  I don't see it anywhere in the code that you posted.
5 days ago
With your code, you are only checking if it was cancelled after there was data to read.  Why not include checking isCancelled() as part of the logic in the while statement's expression?

Also, it would be useful to write a message to your log that a cancel was actually detected.

5 days ago

tangara goh wrote:I had declared a private Static Statement statement....

Ok - but where is it initialized?
5 days ago

tangara goh wrote:Here it is but here is no cause of reason being mentioned...

Where is statement being initialized?
5 days ago

Tony fig wrote:yes i you know what im doing doing wrong?

Are you trying to call cancel(true) on the class or the instance?  Which one?
6 days ago
Are you trying to call cancel(true) on the class or the instance?
6 days ago