This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Tim Moores

Saloon Keeper
+ Follow
since Sep 21, 2011
Tim likes ...
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
UK / DE
Cows and Likes
Cows
Total received
146
In last 30 days
0
Total given
12
Likes
Total received
1101
Received in last 30 days
11
Total given
483
Given in last 30 days
7
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tim Moores

As the error message says, http-method is not allowed there (it is part of the security configuration, which you should not use at this point).
1 day ago


I am not sure whether the above code is correct or not. I just gave the package name in servlet class tag, and class name in servlet-name tag.


servlet-class is what its name suggests, so it's missing ".App".

servlet-name can be whatever you want it to be - it's used only in web.xml, and is just a logical (not actual) name.

Edit: late to the game, I see :-)
2 days ago
That seems not quite the right paradigm - one doesn't need to subscribe to anything in order to receive messages. For a group chat, yes - one needs to sign up to it, or be signed up by someone else who is allowed to do that.
2 days ago
Post the relevant code excerpt.
2 days ago
Indeed: the DataSource class you want is in javax.activation, not javax.sql
2 days ago
Post the import statements of your code. It seems the wrong DataSource class is being used.
2 days ago
Single quotes can be escaped by replacing them with two single quotes:

'Name=a''bcd and UserId = 11'

Or you can use a PreparedStatement which takes care of this for you.
I've seen them twice - it's a lot of fun, and their arrangements breath fresh life into even well-known songs. Such as Heroes
4 days ago
Java sockets operate at a fairly high level - you don't have control over a lot of the details one might be able to control on a lower level. It might be possible using native code, but the question remains: why do you think you need to do this?
Hands down the best version of Heroes I've heard or seen.

6 days ago
Probably because the site uses a framework that is mapped to all pages with the extension ".do" - most likely Apache Struts.
1 week ago
JSP
We don't have it, but I think it's a good idea. First-past-the-post systems (like used for parliamentary seats in the UK and the US) lead to large numbers of votes being discounted, and to legitimacy deficits when there are multiple parties like in the UK - it may be possible to win a seat with less than 30% of the votes. (Multiple parties are good in general, though.) With ranked choice, voters have the feeling that their votes actually count for something, even if they didn't vote for the candidate getting the most votes in the first round. Germany has a different way to ensure that seats in parliament are apportioned according to the parties' overall vote share, and not as the sum of individual seats being won (which leads to artifacts such as the above-mentioned legitimacy issue as well as gerrymandering).

As to that article, I would discount anything with a summary that is so highly biased that it drips with sarcasm.
1 week ago
While it's good to know what reflaction can do, and being able to use it in principle, that it's used here as an aptitude test is a red flag, IMO. There are many libraries that can be used in such circumstances (NeanUtils, which Tim mentioned, and possibly JXPath or Digester etc., depending on what the use case is) that coding it yourself seems a waste of time. A good developer should know that :-)
1 week ago

I have tried using ellipsized but I can't see any last three dots in my text .


How, exactly, did you do that? Show the code.

And how can I limit words in text view  from xml side?


You can't - there's no concept of words, only characters.
1 week ago
Check the API of PdfReader - it can read from a byte[] or an InputStream as well, so it doesn't matter where the data is coming from.
1 week ago