cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hong Gia Dinh <hgd...@sdcgrp.com>
Subject RE: UTF-8 once more!!!
Date Thu, 26 Dec 2002 02:16:33 GMT
thanks again about your nice reply!
i wonder because i ran it in Tomcat alone, it can translate but when i
deploy them in JBoss with my war file, it work but can not translate???!!!
is there any difference between 2 environment??

here is my sitemap :

. . .
<map:resources>
	<map:resource name="admin-page">
		<map:generate type="serverpages"
src="admin/system/{target}.xsp"/>
		<map:transform type="i18n">
			<map:parameter name="locale" value="{../locale}"/>
		</map:transform>
		<map:transform src="admin/style/{target}.xsl">
			<map:parameter name="use-request-parameters"
value="true"/>
			<map:parameter name="css-stylesheet"
value="admin/admin.css"/>
			<map:parameter name="base-url" value="/saigoncoop"/>
			<map:parameter name="locale" value="{../locale}"/>
			<map:parameter name="page" value="{target}"/>
		</map:transform>
		<map:serialize/>
	</map:resource>
	
	<!-- =========================== Pipelines
========================== -->
	<map:pipelines>
		<map:pipeline>
			<map:act type="locale">
				<map:match
pattern="adminvalidate-create-policy">
					<map:act type="form-validator">
						<map:parameter
name="descriptor" value="admin/system/admin-system-descriptor.xml"/>
						<map:parameter
name="validate-set" value="admin-system-validate"/>
						<map:call
resource="admin-page">
							<map:parameter
name="target" value="create-policy"/>
						</map:call>
					</map:act>
					<map:call resource="admin-page">
						<map:parameter name="target"
value="create-policy-error"/>
					</map:call>
				</map:match>
			</map:act>

and my file structure :
webcontext
- translation (messages.xml, messagges_en.xml, . . .)
- Web-inf
- sitemap.xmap
- admin
	- system (xsp files, xml files)
	- style (css, xsl files)

have you ever met situation so? or do you know how to fix it? thanks again
very much.

GD





-----Original Message-----
From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
Sent: 26 December 2002 00:24
To: cocoon-users@xml.apache.org
Subject: Re: UTF-8 once more!!!


 > when i deployed it in JBoss , and choose to translate to other
 > language, it stands still and no change!!

Does it work without translation? If yes, how does the sitemap.xmap part 
for translation look like? Maybe it's the translation catalogue (in 
which way ever you translate), which is in the wrong encoding.

Joerg

Hong Gia Dinh wrote:
> Thank you, Joerg.
> i checked but i really dont know where the bug is!!!!?!! :(
> the sitemap.java at the error line are :
> 
>     try {
>    
>         if ((map = action_N101CB.act(redirector, environment, 
> objectModel, null, param)) != null) {
>           if (redirector.hasRedirected()) {
>              return true;
>           }
>           if (debug_enabled) getLogger().debug("Action form-validator");
>           listOfMaps.add (map);
>           this.dumpParameters(listOfMaps);
>          
>         map = new HashMap(1); // error shows
> 
> 
> and :
> 
>      if (!internalRequest) { // error shows
>         return pipeline.process(environment);
>       }
> 
> i guess that it cant retrieve the resources!!?? how to fix it?? i really 
> dont know?
> have you had any experience with it??can you show me how to fix this??
> my directory structure is :
> project
> - Web-inf
> - sitemap.xmap
> - translation (messages, messages_en . .. )
> - xsp
> - style
> 
> thanks very much for your help
> GD
> 
> 
> 
> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
> Sent: 25 December 2002 16:02
> To: cocoon-users@xml.apache.org
> Subject: Re: UTF-8 once more!!!
> 
> 
> Hello Gia Dinh,
> 
> I guess that the parser tries to read in file in UTF-8, which is not
> really in UTF-8. Maybe this file is still saved in ISO-8859-1 on the
> disk. If it is so, I guess it's a text file, because a XML file has a
> header with the correct encoding (and UTF-8 mostly as default).
> 
> Have a look into the generated sitemap.java specified in your log file.
> Look at the specified line numbers, maybe you can get more information
> from there, especially which files were tried to read.
> 
> Regards,
> 
> Joerg
> 
> Hong Gia Dinh wrote:
>  > Hi all
>  >
>  > I deployed my application in JBoss 3.0.4 , but it can not translate
>  > languages!!
>  > although it transllate very well in the Tomcat environment.
>  > i dont know if there is any difference between these two environmnet
>  >
>  > when i deployed it in JBoss , and choose to translate to other
language,
>  > it stands still and no change!! i check the log it informs error :
>  >
>  > java.io.UTFDataFormatException: invalid byte 3 of 3-byte UTF-8 sequence
>  > (0x3f)
>  >         at
>  > org.apache.xerces.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:678)
>  >         at 
> org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:416)
>  >         at
>  > 
>
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.
java:3177) 
> 
>  >
>  >         at
>  > 
>
org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanContent(XMLEntityM
anager.java:2293) 
> 
>  >
>  >         at
>  > 
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumen
tFragmentScannerImpl.java:830) 
> 
>  >
> 
> <snipped/>
> 
>  >         at
>  > 
>
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.resource_admin
_page(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localh
ost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop
\sitemap_xmap.java:1052)
> 
>  >
>  >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  >         at
>  > 
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
) 
> 
>  >
>  >         at
>  > 
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25) 
> 
>  >
>  >         at java.lang.reflect.Method.invoke(Method.java:324)
>  >         at
>  > 
>
org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.java:
423) 
> 
>  >
>  >         at
>  > 
>
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.matchN101BC(C:
\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saig
oncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap
_xmap.java:1470)
> 
>  >
>  >         at
>  > 
>
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\sof
ts\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigonco
op\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xma
p.java:1276)
> 
>  >
>  >         at
>  > 
>
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\sof
ts\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigonco
op\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xma
p.java:1209)
> 
>  >
>  >         at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
>  >         at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
> 
> <snipped/>
> 
>  >
>  > I checked in mail archives but cant fix the problem although i added in
>  > web.xml :
>  >
>  >
>  >                 <init-param>
>  >                         <param-name>container-encoding</param-name>
>  >                         <param-value>utf-8</param-value>
>  >                 </init-param>
>  >               
>  >                 <init-param>
>  >                         <param-name>form-encoding</param-name>
>  >                         <param-value>utf-8</param-value>
>  >                 </init-param>
>  >
>  > as well as all my xsp files indicated that using encoding UTF-8
>  >
>  > Can somebody tell me how to fix it??
>  > Thanks in advance and merry chrismast!!!!!!!!!
>  > GD
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>

Mime
View raw message