views:

377

answers:

2

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!

A: 

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?

VonC
their is a setting in eclipse named "text file encoding".
MemoryLeak
A: 

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
MS950 -tranditionalbig5 -simplize
MemoryLeak
this is the issue,>>how can i make sure that all this things are in sync.<<make sure that both use the same text-encoding, when you deploy =]
Narayan
I have tried, but not work
MemoryLeak