Bruce Jin

Ranch Hand
+ Follow
since Sep 20, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bruce Jin


I configed Tomcat 8 (server.xml) as follows:


<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" compression="on" compressionMinSize="2048" compressableMimeType="text/html,text/xml" />


However I do not see the response (about 8k in size) is compressed. In Chrome I can use F12 to view the content/size is still 8k/8k as opposed to something like 2k/8k.


Any ideas?
2 years ago
Thanks Craig.
The example on Spring site works . A little more detail would be nice.
Regards.
Bruce.
3 years ago
Hi Craig,

Does your book cover Spring Security SAML Extension?

Thanks.

Bruce
3 years ago
Thanks Craig.
I look forward your S2OAuth example.
Bruce
3 years ago
Thanks Bear.

Looks like I forgot the basics of Java!

Thanks.

Bruce
6 years ago
I send a string to browser as attachment. When I save the attachment to disk and open it, the string always ends with a CRLF (Catrige return, newline).
Does Tomcat do this or browser do this?



There are 3 lines in the saved file from browser: (You can see the CRLF when using notepad++ and turn on "view all charrachters")

1 abcd
2 CRLF
3
6 years ago
This is the Control class:
Thanks.

7 years ago
For now I use a ResourceBundle.Control to solve to problem.
Thanks.
7 years ago

Paul Clapham wrote:Looks to me like something is encoded in UTF-8 but actually read in some other encoding.



Yes. The question is how to actually read in UTF-8?

Thanks!
7 years ago
How to Make sure everyone is talking UTF-8?
Thanks!
7 years ago
Thanks Bear.

How to Make sure everyone is talking UTF-8?

I know the property file is encoded UTF-8.

Thanks.
7 years ago
I am working on a English language PC. I have a message_fr_FR.properties file and some franch entries:

user-is-disabled=utilisateur est désactivé

When I read it from Java code I get “utilisateur est désactivé”

The code looks like this:



Why?
Thanks
7 years ago
I try to use USER-AGENT in Java to detect if the requester of my servlet is smartphone (or Android or iPhone or iPad). Can someone with those devices run this URL and post the result here? I do not have a smartphone.

Thanks!

http://www.crazybikes.com:8011/mrcjava/servlet/detect

When I run it from PC the result is (correctly):

Is mobile: false
Is Android: false
Is smart phone:t false
Is iPhone:false
Is iPad: false
7 years ago