Re: I18N Problem with Chinese Character

2002-03-15 Thread nsg
you should turn your resource file to UTF-8 encoding using native2ascii
command.
that command locates in your-jdk-home\bin directory.
detail command line is listed below:

native2ascii ApplicationResources_zh.properties
ApplicationResources_zh.propertiesX

the first parameter is source file,second is destination file. Use the
destination file as your resource file.

Many articles introduce that the encodeing parameter should be specified
like following:

native2ascii -encoding UTF-8 ApplicationResources_zh.properties
ApplicationResources_zh.propertiesX
.
but if so, an exception would be thrown.I dont know what reason causes the
exception?

of course,you use first command and should be OK.


hope helps for you.


Laker




- Original Message -
From: "Struts Newsgroup" @[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 15, 2002 9:40 PM
Subject: I18N Problem with Chinese Character


 Subject: I18N Problem with Chinese Character
 From: "Liu Yan" [EMAIL PROTECTED]
  ===
 hi List,

 I am using struts-1.0.2 with WebLogic 6.1-sp2. For an I18N project, I
 followed the steps:

 1) I created ApplicationResources.properties and
 ApplicationResources_zh.properties files to store strings.
 2) The whole project is using UTF-8 encoding.
 3) On the beginning of each JSP page, add:
%@ page contentType="text/html; charset=UTF-8" %

 For static Chinese character in JSP page, this setting goes well. But when
I
 tried to use:

 bean:message key="prompt.username"/

 to get some strings from ApplicationResources_zh.properties file, the
output
 is corrupted.

 I am suspecting this is the bean:message taglib's problem, but decided
to
 drop a letter here for a quick answer. Am I doing something wrong or I
have
 to wait for the upcoming 1.1 beta release?

 Regards!
 Liu Yan




 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Field cannot disply normally!

2002-03-14 Thread nsg
Hi,

I am developping one Japanese project.
The Japanese data retrieved from database,i put them into one Hashtable.
check Hashtable,Japanese data  have  been stored correctly.
but  while i display the data in jsp page using the following code:

logic:iterate id="jsp_user" name="users" property="users"
  tr
tdbean:write name="jsp_user" property="userid"
filter="true"/nbsp;/td
tdbean:write name="jsp_user" property="userName"
filter="true"/nbsp;/td
tdbean:write name="jsp_user" property="shikaku"
filter="true"/nbsp;/td
tdbean:write name="jsp_user" property="email"
filter="true"/nbsp;/td
   tdbean:write name="jsp_user" property="memo"
filter="true"/nbsp;/td
/tr
 /logic:iterate

the data containing Japanese cannot display correctly,display as
"???".
anybody can tell me what reason causes the problem?

Thanks in advance

Laker


Cannot submit the form using button

2002-03-14 Thread nsg
When i changed form's action in JavaScript, and then useed a
button(html:button.) to submit the form.
in browser,[File not found] error 404 occured.Tomcat console reported that
[cannot find file path..]

if I change the button type from button to submit,it will be OK.

Anybody can tell me why?


Thanks in advance,

Laker


Re: Problem in HTML:ERROR tag

2002-03-13 Thread nsg

I had met the problem.
you append the errors.head=abcd,errors.footer=efgh two lines in your
resource file.
it will be OK.

hope helps

Laker
- Original Message -
From: subhendukumar mohanty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 14, 2002 10:07 AM
Subject: Problem in HTML:ERROR tag


Hi
I am setting the action error in my action class. Then when the error
displays in the screen it appends null in front and end of the message.
For example if the error message is Error occurred, it shows as null
Error Occurred null. I am using struts with visualage 4.0.

I am using struts 1.0.1 and modified the form tag to work for websphere test
environment.

Any Help??
Thanks,
Subhendu


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Where and when do struts call the method named toString()?

2002-03-13 Thread nsg
Hi all,
in struts-example, Subscription.java file contains the following method:

/**
 * Return a String representation of this object.
 */
public String toString() {

StringBuffer sb = new StringBuffer("Subscription[username=");
sb.append(username);
if (host != null) {
sb.append(", host=");
sb.append(host);
}
if (user != null) {
sb.append(", user=");
sb.append(user.getUsername());
}
sb.append(", autoConnect=");
sb.append(autoConnect);
sb.append("]");
return (sb.toString());

}

I  can understand the method,but where and when does struts use it?


Thanks in advance

Laker 


How to process multiple lines data in one page?

2002-03-11 Thread nsg
Now, i want to use that display style-multiple lines in one page.
for example,i hava one page to display user's basic information.

UserIDNameGender...
0001Tommale
0002Linda  female



in Action class I executed one query,and  got data of all users.but what's
the right way to process the data and display them in one page?


Thanks in advance.


best regards,

Laker


Cannot find ActionMappings or ActionFormBeans collection

2002-03-10 Thread nsg
Hi all,

Now,I am developing a web application based struts1.20 + Tomcat3.24.
while I run the application.one excexption occured. error message is listed
below:

javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection

what reason causes the problem?


Thanks in advance.


regards,
Laker