Bruce Jin

Ranch Hand
+ Follow
since Sep 20, 2001
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

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?
8 years ago
Thanks Craig.
The example on Spring site works . A little more detail would be nice.
Regards.
Bruce.
9 years ago
Hi Craig,

Does your book cover Spring Security SAML Extension?

Thanks.

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

Looks like I forgot the basics of Java!

Thanks.

Bruce
12 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
12 years ago
This is the Control class:
Thanks.

13 years ago
For now I use a ResourceBundle.Control to solve to problem.
Thanks.
13 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!
13 years ago
How to Make sure everyone is talking UTF-8?
Thanks!
13 years ago
Thanks Bear.

How to Make sure everyone is talking UTF-8?

I know the property file is encoded UTF-8.

Thanks.
13 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
13 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
13 years ago