Favicon

Upload widget in CForms

Hello,

I have a problem, which seems to be simple but I can't find the answer.

I work with Cocoon CForms.
I use dojo 0.4.3 to define widgets.

My CForm has a <fd:upload> widget to let the user upload a local file on the server.
It works fine.

I would need to get the path to the local file before being uploaded, i.e. the complete path of the directory containing the local file to upload.
The instructions 
widget.getValue().getUploadName() returns the name of the file
or
widget.getValue().getFile() return the path of the uploaded file, ie. a path on the server.

How can I retrieve the complete path of local file from the widget ?

Thank you for your help.

Patricia

Using I18NTransformer with Dynamic Locales


All,

I'd like to start using the I18NTransformer so I can localize the
output of my XSLTs. We have what I believe to be a somewhat unique
situation with regard to the actual source of the locale information.

Here goes:

We have Cocoon set up as a webapp all by itself, separate from our
"real" webapp. Our pipelines take incoming HTTP requests and
essentially forward them, with modifications of course, to our "real"
webapp that produces XML for consumption by Cocoon. The Cocoon webapp
does not maintain session state of any kind: it merely forwards
requested session ids from the incoming request through the outgoing
request to the "real" webapp.

The "real" webapp knows what the user's preferred Locale is, and can
provide that information back to Cocoon if necessary. We have lots of
options: HTTP response headers, something in the XML document
returned, etc.

Unfortunately, I'm not sure how to get any of those data when calling
the I18N transformer itself.

Can anyone offer any suggestions?

If I can't come up with anything else, I'll have to encode the locale
in each request's URL which, while doable, will likely be fragile and
a total PITA to actually accomplish.

Thanks,
-chris
FunkyDisco | 2 Dec 21:43
Picon
Favicon

Re: Cocoon - Tomcat - APEX for FOP PDF printing


Could you check that cocoon is correctly running on Tomcat 7.x (i.e. has a
correct picture)?
Rg,
Funky

Thorsten Scherler-4 wrote:
> 
> Please post to the mailing lists and not to me private.
> 
> On Thu, 2011-10-06 at 08:45 -0400, Reid McKinley wrote:
>> Thanks for your reply!  
>> I'm new to cocoon and tomcat and I'm a little confused.
>> 
>> I'm deploying cocoon as a war file (build.sh war) in
>> $CATALINA_HOME/webapps of the tomcat install.
>> 
>> Using this method of deploying cocoon with tomcat, will there be a
>> sitemap by default?  Do I need to do something else to configure the
>> sitemap with cocoon?
>> 
>> As you suggested, I started cocoon with cocoon.sh and it appeared to
>> start Jetty, but I wasn't able to connect to it on port 8888.  I must
>> need to do some more Jetty configuration.  
> 
> Hmm, seems you left out 
> http://cocoon.apache.org/2.1/introduction.html
> 
> "Cocoon uses XML as a core piece of its framework, but improves the
> model to give you the tools you need and is designed to be flexible
> enough to follow your current needs as well as paradigm shifts that may
> happen in the future"
> 
> To get started with developing refer to 
> http://cocoon.apache.org/2.1/tracks/first-steps-track.html
> 
> Cocoon is not like a driver that you plugin and it does the fop
> transformation magically, you need to tell cocoon what to do and that is
> done in the sitemap.
> 
> Please see http://cocoon.apache.org/2.1/howto/howto-explore-samples.html
> and run the example to find an example on how to generate pdf from fo.
> 
> Your issue is not tomcat, but your missing understanding of what cocoon
> is and can do for you.
> 
> salu2
>> 
>> Many thanks again for your help.
>> -Reid
>> 
>> On Thu, Oct 6, 2011 at 5:07 AM, Thorsten Scherler <scherler <at> gmail.com>
>> wrote:
>>         On Wed, 2011-10-05 at 11:02 -0700, reidster wrote:
>>         > I'm a cocoon newbie trying to setup Tomcat with Cocoon for
>>         the purpose of
>>         > enabling PDF printing with Oracle APEX using FOP.
>>         >
>>         > I'm using Linux 64bit, Tomcat 7.0.22, Cocoon 2.1.11, and JDK
>>         (build
>>         > 1.6.0_24-b07).
>>         >
>>         > Whenever, I attempt to hit the cocoon site
>>         (servername:8080/cocoon/), I
>>         > receive the following error:
>>         > "org.apache.cocoon.
>>         > ResourceNotFoundException: No pipeline matched request:
>>         index.html"
>>         >
>>         > When I go to the servername:8080, the tomcat page comes up
>>         OK.  I can also
>>         > see that the cocoon app is deployed and running from the
>>         Tomcat Manager App.
>>         >
>>         > This error is in the Tomcat log:
>>         >
>>         > "SEVERE: The web application [/cocoon] appears to have
>>         started a thread
>>         > named [HSQLDB Timer @6b033450] but has failed to stop it.
>>         This is very
>>         > likely to create a memory leak."
>>         >
>>         > Other than these errors, the Tomcat and Cocoon appear to be
>>         installed
>>         > properly and functioning properly.  However, I cannot get
>>         past these errors.
>>         >
>>         > Please provide any insights you may have about using Cocoon
>>         with Tomcat.
>>         > Or, what else I can check to see why Cocoon isn't working
>>         with Tomcat.
>>         >
>>         > Many Thanks, in advance, for your help
>>         >
>>         >
>>         > Below is the complete java error stack received when I go to
>>         > servername:8080/cocoon/
>>         >
>>         > org.apache.cocoon.ResourceNotFoundException: No pipeline
>>         matched request:
>>         > index.html
>>         >
>>         
>>         
>>         Well can you confirm that there is a pipeline matching
>>         index.html in
>>         your sitemap?
>>         
>>         Further did you try to start cocoon with ./cocoon.sh and
>>         therefore with
>>         jetty. If you see the same problem there then your not
>>         matching
>>         index.html but cocoon seems to start otherwise just fine the
>>         error is
>>         coming from cocoon.
>>         
>>         HTH
>>         
>>         salu2
>>         
>>         --
>>         Thorsten Scherler <thorsten.at.apache.org>
>>         codeBusters S.L. - web based systems
>>         <consulting, training and solutions>
>>         http://www.codebusters.es/
>>         
>>         
>>         
>>        
>> ---------------------------------------------------------------------
>>         To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
>>         For additional commands, e-mail: users-help <at> cocoon.apache.org
>>         
>>         
>> 
>> 
> 
> -- 
> Thorsten Scherler <thorsten.at.apache.org>
> codeBusters S.L. - web based systems
> <consulting, training and solutions>
> http://www.codebusters.es/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
> 
> 

--

-- 
View this message in context: http://old.nabble.com/Cocoon---Tomcat---APEX-for-FOP-PDF-printing-tp32596121p32904970.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
FunkyDisco | 2 Dec 21:43
Picon
Favicon

Re: Cocoon - Tomcat - APEX for FOP PDF printing


Could you check that cocoon is correctly running on Tomcat 7.x (i.e. has a
correct picture)?
Rg,
Funky

Thorsten Scherler-4 wrote:
> 
> Please post to the mailing lists and not to me private.
> 
> On Thu, 2011-10-06 at 08:45 -0400, Reid McKinley wrote:
>> Thanks for your reply!  
>> I'm new to cocoon and tomcat and I'm a little confused.
>> 
>> I'm deploying cocoon as a war file (build.sh war) in
>> $CATALINA_HOME/webapps of the tomcat install.
>> 
>> Using this method of deploying cocoon with tomcat, will there be a
>> sitemap by default?  Do I need to do something else to configure the
>> sitemap with cocoon?
>> 
>> As you suggested, I started cocoon with cocoon.sh and it appeared to
>> start Jetty, but I wasn't able to connect to it on port 8888.  I must
>> need to do some more Jetty configuration.  
> 
> Hmm, seems you left out 
> http://cocoon.apache.org/2.1/introduction.html
> 
> "Cocoon uses XML as a core piece of its framework, but improves the
> model to give you the tools you need and is designed to be flexible
> enough to follow your current needs as well as paradigm shifts that may
> happen in the future"
> 
> To get started with developing refer to 
> http://cocoon.apache.org/2.1/tracks/first-steps-track.html
> 
> Cocoon is not like a driver that you plugin and it does the fop
> transformation magically, you need to tell cocoon what to do and that is
> done in the sitemap.
> 
> Please see http://cocoon.apache.org/2.1/howto/howto-explore-samples.html
> and run the example to find an example on how to generate pdf from fo.
> 
> Your issue is not tomcat, but your missing understanding of what cocoon
> is and can do for you.
> 
> salu2
>> 
>> Many thanks again for your help.
>> -Reid
>> 
>> On Thu, Oct 6, 2011 at 5:07 AM, Thorsten Scherler <scherler <at> gmail.com>
>> wrote:
>>         On Wed, 2011-10-05 at 11:02 -0700, reidster wrote:
>>         > I'm a cocoon newbie trying to setup Tomcat with Cocoon for
>>         the purpose of
>>         > enabling PDF printing with Oracle APEX using FOP.
>>         >
>>         > I'm using Linux 64bit, Tomcat 7.0.22, Cocoon 2.1.11, and JDK
>>         (build
>>         > 1.6.0_24-b07).
>>         >
>>         > Whenever, I attempt to hit the cocoon site
>>         (servername:8080/cocoon/), I
>>         > receive the following error:
>>         > "org.apache.cocoon.
>>         > ResourceNotFoundException: No pipeline matched request:
>>         index.html"
>>         >
>>         > When I go to the servername:8080, the tomcat page comes up
>>         OK.  I can also
>>         > see that the cocoon app is deployed and running from the
>>         Tomcat Manager App.
>>         >
>>         > This error is in the Tomcat log:
>>         >
>>         > "SEVERE: The web application [/cocoon] appears to have
>>         started a thread
>>         > named [HSQLDB Timer @6b033450] but has failed to stop it.
>>         This is very
>>         > likely to create a memory leak."
>>         >
>>         > Other than these errors, the Tomcat and Cocoon appear to be
>>         installed
>>         > properly and functioning properly.  However, I cannot get
>>         past these errors.
>>         >
>>         > Please provide any insights you may have about using Cocoon
>>         with Tomcat.
>>         > Or, what else I can check to see why Cocoon isn't working
>>         with Tomcat.
>>         >
>>         > Many Thanks, in advance, for your help
>>         >
>>         >
>>         > Below is the complete java error stack received when I go to
>>         > servername:8080/cocoon/
>>         >
>>         > org.apache.cocoon.ResourceNotFoundException: No pipeline
>>         matched request:
>>         > index.html
>>         >
>>         
>>         
>>         Well can you confirm that there is a pipeline matching
>>         index.html in
>>         your sitemap?
>>         
>>         Further did you try to start cocoon with ./cocoon.sh and
>>         therefore with
>>         jetty. If you see the same problem there then your not
>>         matching
>>         index.html but cocoon seems to start otherwise just fine the
>>         error is
>>         coming from cocoon.
>>         
>>         HTH
>>         
>>         salu2
>>         
>>         --
>>         Thorsten Scherler <thorsten.at.apache.org>
>>         codeBusters S.L. - web based systems
>>         <consulting, training and solutions>
>>         http://www.codebusters.es/
>>         
>>         
>>         
>>        
>> ---------------------------------------------------------------------
>>         To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
>>         For additional commands, e-mail: users-help <at> cocoon.apache.org
>>         
>>         
>> 
>> 
> 
> -- 
> Thorsten Scherler <thorsten.at.apache.org>
> codeBusters S.L. - web based systems
> <consulting, training and solutions>
> http://www.codebusters.es/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
> 
> 

--

-- 
View this message in context: http://old.nabble.com/Cocoon---Tomcat---APEX-for-FOP-PDF-printing-tp32596121p32904971.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
Cédric Damioli | 2 Dec 22:04

Re: Using I18NTransformer with Dynamic Locales

Hi Christopher,

The locale of the I18nTransformer may be set a sitemap parameter :
<map:transform type="i18n>
<map:parameter name="locale" value="XXXX"/>
</map:transform>

In this cas, the actual locale value may be computed in a surrounding 
action :

<map:act type="proxy">
<map:generate/>
<map:transform type="i18n>
<map:parameter name="locale" value="{locale}"/>
</map:transform>
<map:serialize/>
</map:act>

where the "proxy" action actually proxy the request to your "real" 
webapp, get the responses header you mentionned and put it in the result 
map.

Regards,
Cédric

Le 01/12/2011 17:49, Christopher Schultz a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> All,
>
> I'd like to start using the I18NTransformer so I can localize the
> output of my XSLTs. We have what I believe to be a somewhat unique
> situation with regard to the actual source of the locale information.
>
> Here goes:
>
> We have Cocoon set up as a webapp all by itself, separate from our
> "real" webapp. Our pipelines take incoming HTTP requests and
> essentially forward them, with modifications of course, to our "real"
> webapp that produces XML for consumption by Cocoon. The Cocoon webapp
> does not maintain session state of any kind: it merely forwards
> requested session ids from the incoming request through the outgoing
> request to the "real" webapp.
>
> The "real" webapp knows what the user's preferred Locale is, and can
> provide that information back to Cocoon if necessary. We have lots of
> options: HTTP response headers, something in the XML document
> returned, etc.
>
> Unfortunately, I'm not sure how to get any of those data when calling
> the I18N transformer itself.
>
> Can anyone offer any suggestions?
>
> If I can't come up with anything else, I'll have to encode the locale
> in each request's URL which, while doable, will likely be fragile and
> a total PITA to actually accomplish.
>
> Thanks,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk7XsBIACgkQ9CaO5/Lv0PBAxwCdER3GqI5TLETkSIeRzstvFcYn
> nAkAoJ+5dPRr0zymd6dMez9pm4we4JJS
> =GlJl
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
>
FunkyDisco | 4 Dec 13:01
Picon
Favicon

XML-> PDF bad encoding


Appologize in front if this is somewhere explained, but as I'm not guru in
Cocoon, after 5 days of google search and testing all possible combinations,
haven't found a solution. So here is brief problem description 

When I test file generation from WEB URL, (source->output), : 
XML->XML correct (simple copy test to see if it read OK and write OK) 
XML->RTF correct 
XML-PDF problem (national characters has "#") 

I have read "http://xmlgraphics.apache.org/fop/faq.html#pdf-characters",
chapter 6.2 which shows exactly what I have but when I implement a feature
some national character (ĐđČčĆć in unicode notation) remain as "#" signs). 

Is this really a bug or there is a solution, so please once more apologize
for some dumb entries in this issue, but pretty lost in this case. 
Regards, 
Funky 
--

-- 
View this message in context: http://old.nabble.com/XML-%3E-PDF-bad-encoding-tp32911752p32911752.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
Nathaniel, Alfred | 4 Dec 13:24
Favicon

RE: XML-> PDF bad encoding

Does that apply to all non-ASCII characters, or only to those you mention (which are not part of Latin-1)?
Did you check that the font description to give to FOP have glyphs for these specific codes?

HTH, Alfred.

-----Original Message-----
From: FunkyDisco [mailto:funky_disco_freak <at> hotmail.com] 
Sent: Sonntag, 4. Dezember 2011 13:02
To: users <at> cocoon.apache.org
Subject: XML-> PDF bad encoding


Appologize in front if this is somewhere explained, but as I'm not guru in
Cocoon, after 5 days of google search and testing all possible combinations,
haven't found a solution. So here is brief problem description 

When I test file generation from WEB URL, (source->output), : 
XML->XML correct (simple copy test to see if it read OK and write OK) 
XML->RTF correct 
XML-PDF problem (national characters has "#") 

I have read "http://xmlgraphics.apache.org/fop/faq.html#pdf-characters",
chapter 6.2 which shows exactly what I have but when I implement a feature
some national character (ĐđČčĆć in unicode notation) remain as "#" signs). 

Is this really a bug or there is a solution, so please once more apologize
for some dumb entries in this issue, but pretty lost in this case. 
Regards, 
Funky 
-- 
View this message in context: http://old.nabble.com/XML-%3E-PDF-bad-encoding-tp32911752p32911752.html

Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


The content of this e-mail is intended only for the confidential use of the person addressed. 
If you are not the intended recipient, please notify the sender and delete this e-mail immediately.
Thank you.
Andy Stevens | 4 Dec 15:35

Re: XML-> PDF bad encoding

It might help if you could include the relevant pipeline code and component configuration that you're using. And which cocoon version it's for.

Andy.

On 4 Dec 2011 12:02, "FunkyDisco" <funky_disco_freak <at> hotmail.com> wrote:

Appologize in front if this is somewhere explained, but as I'm not guru in
Cocoon, after 5 days of google search and testing all possible combinations,
haven't found a solution. So here is brief problem description

When I test file generation from WEB URL, (source->output), :
XML->XML correct (simple copy test to see if it read OK and write OK)
XML->RTF correct
XML-PDF problem (national characters has "#")

I have read "http://xmlgraphics.apache.org/fop/faq.html#pdf-characters",
chapter 6.2 which shows exactly what I have but when I implement a feature
some national character (ĐđČčĆć in unicode notation) remain as "#" signs).

Is this really a bug or there is a solution, so please once more apologize
for some dumb entries in this issue, but pretty lost in this case.
Regards,
Funky
--
View this message in context: http://old.nabble.com/XML-%3E-PDF-bad-encoding-tp32911752p32911752.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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

FunkyDisco | 5 Dec 16:39
Picon
Favicon

RE: XML-> PDF bad encoding


Correct. This apply to many  non-ASCII characters but in Croatian most
important are those mentioned.
Font (mentioned in inline description) is "Arial Unicode MS" (tried frankly
many others) and they all have correct output from MS Word, MS Wordpad, or
any other app in Windows that I know. I'm not sure if this is the answer on
your question.
What I'd like to see is one XML with mentioned characters (ĐŠŽĆČđšžćč) which
can be correctly reproduced in PDF as output.
Rg,
Damir

Nathaniel, Alfred wrote:
> 
> Does that apply to all non-ASCII characters, or only to those you mention
> (which are not part of Latin-1)?
> Did you check that the font description to give to FOP have glyphs for
> these specific codes?
> 
> HTH, Alfred.
> 
> -----Original Message-----
> From: FunkyDisco [mailto:funky_disco_freak <at> hotmail.com] 
> Sent: Sonntag, 4. Dezember 2011 13:02
> To: users <at> cocoon.apache.org
> Subject: XML-> PDF bad encoding
> 
> 
> Appologize in front if this is somewhere explained, but as I'm not guru in
> Cocoon, after 5 days of google search and testing all possible
> combinations,
> haven't found a solution. So here is brief problem description 
> 
> When I test file generation from WEB URL, (source->output), : 
> XML->XML correct (simple copy test to see if it read OK and write OK) 
> XML->RTF correct 
> XML-PDF problem (national characters has "#") 
> 
> I have read "http://xmlgraphics.apache.org/fop/faq.html#pdf-characters",
> chapter 6.2 which shows exactly what I have but when I implement a feature
> some national character (ĐđČčĆć in unicode notation) remain as "#" signs). 
> 
> Is this really a bug or there is a solution, so please once more apologize
> for some dumb entries in this issue, but pretty lost in this case. 
> Regards, 
> Funky 
> -- 
> View this message in context:
> http://old.nabble.com/XML-%3E-PDF-bad-encoding-tp32911752p32911752.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
> 
> The content of this e-mail is intended only for the confidential use of
> the person addressed. 
> If you are not the intended recipient, please notify the sender and delete
> this e-mail immediately.
> Thank you.
> 
> 

--

-- 
View this message in context: http://old.nabble.com/XML-%3E-PDF-bad-encoding-tp32911752p32918069.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
FunkyDisco | 5 Dec 17:05
Picon
Favicon

Re: XML-> PDF bad encoding


Hi,
Maybe you haven't noticed or it was somehow missed, but in mine first post
it was written:
"Mine conf is Win 2008 R2 x64 (Windows XP SP3 x86) Win 1250 CP, Tomcat
6.0.33, Cocoon 2.1.11."
So this is mine conf.

To reproduce the problem just use original posting:
C:\Program
Files\Tomcat\webapps\cocoon\samples\blocks\fop\misc\minimal.fo.xml 
in which place:
đšžćčŠĐŽĆČ letters
and
C:\Program Files\Tomcat\webapps\cocoon\samples\blocks\fop\sitemap.xmap
which makes complete solution together.
Rg,
Damir

Andy Stevens-2 wrote:
> 
> It might help if you could include the relevant pipeline code and
> component
> configuration that you're using. And which cocoon version it's for.
> 
> Andy.
>  On 4 Dec 2011 12:02, "FunkyDisco" <funky_disco_freak <at> hotmail.com> wrote:
> 
>>
>> Appologize in front if this is somewhere explained, but as I'm not guru
>> in
>> Cocoon, after 5 days of google search and testing all possible
>> combinations,
>> haven't found a solution. So here is brief problem description
>>
>> When I test file generation from WEB URL, (source->output), :
>> XML->XML correct (simple copy test to see if it read OK and write OK)
>> XML->RTF correct
>> XML-PDF problem (national characters has "#")
>>
>> I have read "http://xmlgraphics.apache.org/fop/faq.html#pdf-characters",
>> chapter 6.2 which shows exactly what I have but when I implement a
>> feature
>> some national character (ĐđČčĆć in unicode notation) remain as "#"
>> signs).
>>
>> Is this really a bug or there is a solution, so please once more
>> apologize
>> for some dumb entries in this issue, but pretty lost in this case.
>> Regards,
>> Funky
>> --
>> View this message in context:
>> http://old.nabble.com/XML-%3E-PDF-bad-encoding-tp32911752p32911752.html
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
>> For additional commands, e-mail: users-help <at> cocoon.apache.org
>>
>>
> 
> 

--

-- 
View this message in context: http://old.nabble.com/XML-%3E-PDF-bad-encoding-tp32911752p32918279.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.

Gmane