Unlock instant, AI-driven research and patent intelligence for your innovation.

Language loading method and device in J2EE system

A technology for loading devices and system languages, applied in the field of computer networks, can solve the problems of inability to use the J2EE system normally, unable to find the modified language, incomprehensible to foreign users, etc., to save memory, simplify the system language or language types, and increase the or reduce the simple effect

Active Publication Date: 2014-03-19
GCI SCI & TECH
View PDF7 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But this has a very bad point. For example, the system currently loads Chinese by default. When a foreign user who is not good at Chinese connects to the J2EE system for the first time, the foreign user will not understand or even find a place to modify the language. As a result, the J2EE system cannot be used normally; similarly, if the current default loading language is English, users with poor English cannot use the J2EE system normally.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Language loading method and device in J2EE system
  • Language loading method and device in J2EE system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0021] see figure 1 As shown, a language loading method in a J2EE system includes the following steps:

[0022] Step S101 , obtaining an IP (Internet Protocol, Internet Protocol) of a client, and obtaining address information of the client according to the IP.

[0023] There are many ways to obtain the IP of the client. In the embodiment of the present invention, the following code can be used to obtain the IP of the client:

[0024] public String getIpAddr(HttpServletRequestrequest){

[0025] String ip=request. getHeader("x-forwarded-for");

[0026] if(ip==null||ip.length()==0||"unknown".equalsIgnoreCase(ip)){

[0027] ip=request.getHeader("Proxy-Client-IP");

[0028]}

[0029] if(ip==null||ip.length()==0||"unknown".equalsIgnoreCase(ip)){

[0030] ip=request.getHeader("WL-Proxy-Client-IP");

[0031]}

[0032] i...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a language loading method and device in a J2EE system. The method includes the first step of obtaining an IP of a client-side and obtaining address information of the client-side according to the IP, the second step of obtaining a used language corresponding to the address information, the third step of reading a linguistic value which is stored in the cookie when the client-side is connected to a server last time, and judging whether the linguistic value is the same as that of the used language on the condition that the linguistic value is not null, and the fourth step of reading corresponding resource files and loading the resource files into the J2EE system according to the used language if the linguistic value is the same as that of the used language. Through the language loading method and device in the J2EE system, language loading efficiency is effectively improved, it is guaranteed that users can normally use the J2EE system, and the running memory of the system is saved, so the running speed of the system is higher, system languages or language types can be simpler and convenient to increase or decrease.

Description

technical field [0001] The invention relates to the field of computer networks, in particular to a language loading method in a J2EE system and a language loading device in the J2EE system. Background technique [0002] At present, most of the systems implemented by J2EE (Java2Platform, Enterprise Edition, Java2 Platform Enterprise Edition) are single-language systems, that is, the system language is only displayed in one language, and the language setting is in the system program file. Users can only choose The language that the developer defaults to. Such a system is unscientific and inconvenient, because the user population will be narrowed due to language limitations. [0003] As international cooperation becomes more and more common in recent years, there are more and more requirements for J2EE multilingual systems. In fact, whether it is a single-language system or a multi-language system, their common feature is that the system will load a language by default when i...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/445
Inventor 林世魁林尉铭刘元进
Owner GCI SCI & TECH