1

I wrote a jsp application, and if I generate a war file with eclipse in windows XP, language: tradition Chinese. and deploy to weblogic, it will have such problem:

inputAdministrator.jsp:251:11: This type name is ambiguous because it matches more than one '*'-import, including 'java.io.*' and 'admin.iguard.businessObject.*'.
                                        DataInput d = (DataInput) dataInput;
                                                                                ^-------^
inputAdministrator.jsp:252:29: Type java.io.DataInput contains no methods named getDept1.
                                            String dept1 = d.getDept1();
                                                                                                         ^------^
inputAdministrator.jsp:253:26: No match was found for method trim() in type <error>.
                                            String emp2 = d.getEmp2().trim();
                                                                                                      ^----------------^
inputAdministrator.jsp:253:28: Type java.io.DataInput contains no methods named getEmp2.
                                            String emp2 = d.getEmp2().trim();
                                                                                                        ^-----^
inputAdministrator.jsp:254:29: Type java.io.DataInput contains no methods named getDept2.
                                            String dept2 = d.getDept2();
                                                                                                         ^------^
inputAdministrator.jsp:255:33: Type java.io.DataInput contains no methods named getDept_code.
                                            String dept_code = d.getDept_code();
                                                                                                             ^----------^
inputAdministrator.jsp:256:32: Type java.io.DataInput contains no methods named getStaff_no.
                                            String staff_no = d.getStaff_no();
                                                                                                            ^---------^
inputAdministrator.jsp:257:32: Type java.io.DataInput contains no methods named getEmp2_por.
                                            String emp2_por = d.getEmp2_por();
                                                                                                            ^---------^

if I generate the war file in windows xp, simplize Chinese, and deploy to weblogic, everything will be OK.

I don't know how the "text file encoding" setting will affect the generated war file, how can i make sure that all this things are in sync.

Any one have better solution?
Any suggestions will be appreciated.
Thanks in advance!

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
MemoryLeak
  • 7,322
  • 23
  • 90
  • 133
  • chk the workspace text encoding in eclipse IDE in both J2EE exports to make sure its indeed a Text encoding issue? It defaults to (cp1532) – Narayan Aug 24 '09 at 10:26
  • yeah, export the war in different environment will cause the error, through if i don't use import but hard code the whole class name in the jsp will solve the problem, but i really want to know the reason. – MemoryLeak Aug 24 '09 at 10:35

2 Answers2

0

May be the "text file encoding" triggers some kind of recompilation which makes that issue visible.

In any case, could you try first to disambiguate the DataInput usage, by:

  • adding for example "java.io."(in front of DataInput) everywhere in that source where it is actually a java.io case (leaving a simple DataInput for businessObject usages)
  • not using import java.io.* (but using CTRL+SHIFT+O for reorganizing the imports)

would that solve the problem, whatever the "text file encoding" is?

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

did you check it? does text encoding changes in both the j2ee exports as a WAR file?

windows-->preferences-->General-->workspace-->textfileencoding?

it defaults to cp1532

what is the value of textfileencoding variable set in simplize Chinese as compared to tradition Chinese ??

Narayan
  • 6,031
  • 3
  • 41
  • 45