• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts2 decimal point or decimal comma

 
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

how can i get information about countries who uses decimal comma/point to mark the radix point (from action).

 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think we have to identify using ipaddress of the user. Take other inputs too.
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Mohana,

the problem with ip address is that you cannot identify the border regions between two countries, one country may have the others ip address.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi mallick,
one country may have the others ip address.? How this is possible can you give me one scenario?
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Mohana,

what if the user from border region uses private IP?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Countries? Whatever your question is, that isn't the right form of the question. Try this code to see what I mean:
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Pual, here the problem is how to identify customer country. one case it may fail if we were identifying by ip address if end user was using proxy ip address.
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohana Rao wrote:@Pual, here the problem is how to identify customer country. one case it may fail if we were identifying by ip address if end user was using proxy ip address.



Indeed you are. And my code asks why you are trying to solve that "problem". In case you didn't run it, it demonstrates that some parts of Canada (which you will find is a country) use decimal points and other parts use decimal commas. So why is that a "problem" worth considering at all?
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply Paul it's not my requirement i'm trying to help the guy who posted that question and my doubt clarified here.
https://coderanch.com/t/293684/JSP/java/client-IP-address-Domain-JAVA
And is it legal stealing client ipaddress?
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohana Rao wrote:Thanks for reply Paul it's not my requirement i'm trying to help the guy who posted that question...



Notice that I didn't address you specifically when I posted that comment. Which was intended to point out that the requirement is, um, not a very good one. Which means that continuing to go on about useless things like IP addresses isn't worth anybody's time.

Actually, rereading the thread I see that you were the one who posted the idea about IP addresses. Which it now appears wasn't a very good idea because people on the same street in Canada, with the same ISP, could be using English and French. So not only does the country of the client provide the desired information, neither does the IP address of the client.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul, What i thought was using client ip address we can identify the country where the request is coming from so that we can enable that language format. Here i'm not worrying about what are languages are known by the end user.
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic