RE: Internal Server Error:Cannot find a matching 2-argument function

2009-12-08 Thread Dr. Praveen Bhatia
Hello Brian,
   There is xalan-2.7.0.jar in the WEB-INF/lib of the war file already.
However, I also copied $FORREST's xalan 2.7.0 to $TOMCAT/common/lib but the
same error appears.
   Xalan website informs http://xalan.apache.org/ that it only supports xslt
and xpath 1.0 version, and I could not locate the format(...,...) function
in xslt/xpath 1.0 version. Is the format(...,...) part of xalan 2.7.0? Or
Could it be another .jar file ?

  Thanks
Bhatia

-Original Message-
From: Brian M Dube [mailto:bd...@apache.org] 
Sent: Tuesday, December 08, 2009 4:38 PM
To: user@forrest.apache.org
Subject: Re: Internal Server Error:Cannot find a matching 2-argument
function

On Tue, Dec 08, 2009 at 03:44:30PM +0900, Dr. Praveen Bhatia wrote:
 Hello,
Further information that I could gather on this error is as follows:
The file:
 skins/common/xslt/html/site-to-xhtml.xsl has the following on line 381
 xsl:variable name=year select=java:format($formatter, $date)/
 
 The java: namespace has earlier been defined in the same stylesheet as
 below:
 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:java=http://xml.apache.org/xslt/java;
 exclude-result-prefixes=java
 
 So the reported error seems to be that the classes for the
 java:format($formatter, $date) are not locatable/ not included.
 
 Which classes/jar file in forrest/cocoon has these function
 extensions?

XSLT extensions are handled by the XSLT processor, Xalan, which is in
lib/endorsed/xalan-x.y.z.jar. I think there is an issue about the war
target not copying all the necessary libraries. If I recall correctly,
the workaround is to copy Xalan from $FORREST/lib/endorsed to
$TOMCAT/shared/lib. I can test this later, but I don't have Tomcat
configured at the moment.

Brian

 Bhatia



RE: UTF-8 setting for Japanese characters

2009-12-14 Thread Dr. Praveen Bhatia
Hello,
   Further information that I could garner on this. I wrote a program to
read the Response header from the server and this is the result:
Message = GET http://www.sumpurn.com/com.sumpurn.web/index.html HTTP/1.0
HTTP/1.1 200 OK
Date: Mon, 14 Dec 2009 10:30:06 GMT
Server: Apache/2.0.63 (CentOS)
X-Cocoon-Version: 2.2.0-dev
Set-Cookie: JSESSIONID=07213F0EE92415A0E5B8B4D3BCDA0107;
Path=/com.sumpurn.web
Content-Length: 9665
Connection: close
Content-Type: text/html; charset=ISO-8859-1

Clearly, the charset is not getting set to UTF-8 in spite of settings that I
did in forrest.properties, web.xml forrest.xconf, sitemap.xmap (xml
serializer and html serializer).

  What settings I could be missing?

Best wishes
Praveen


-Original Message-
From: Dr. Praveen Bhatia [mailto:praveen.bha...@sumpurn.com] 
Sent: Monday, December 14, 2009 5:59 PM
To: user@forrest.apache.org
Subject: UTF-8 setting for Japanese characters

Hello,
   On my forrest 0.8 based website, I have done settings for UTF-8 to make a
Japanese website.
   On local tomcat and jetty, it works fine showing the Japanese characters
correctly. (My machines is Japanese Vista m/c)

   The problem is when it is uploaded on to the shared server (linux with
tomcat apache), the browser is not seeing them as UTF-8 encoded for display.
The correct UTF-8 Japanese characters can however be seen if the browser
encoding is chosen for EACH page to UTF-8 again and again. (The html file
generated is also having a meta data as follows:
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
 So generation seems to be ok till here. 

   This behavior is observable on my forrest website www.sumpurn.com  (or
www.sumpurn.com/com.sumpurn.web/index.html) where we will first get garbled
data, but it would become OK if for EACH page the browser encoding is set to
UTF-8 (The characters are entirely in Japanese UTF-8 )

   I followed all the instructions given in forrest for UTF-8 and the
instructions given in cocoon website
http://cocoon.apache.org/2.2/1366_1_1.html#theory for UTF-8. However, I am
yet unable to make it work. My gut feeling is that apache server's http
header is sending non-UTF encoding to the browser, and that needs to be set
via forrest/cocoon/apache tomcat.

  Could someone please guide me as to what other settings are required to be
done?

Thanks
Best wishes
Praveen





RE: Usage Scenario

2010-03-15 Thread Dr. Praveen Bhatia
Hi Nitin,

   Yes you could do it in forrest/cocoon. Uploading modified xml content
files, would change the contents being displayed. There is a sitemap.xmap
facility which could be used to map your contents, combined with
presentation code, to display new content.

   However, to use JSPs, you will need to make JSPs work with forrest/cocoon
or use XSPs which cocoon has built in its software.

Praveen 

 

From: Nitin Gupta [mailto:nitin.gu...@srishtitechnet.com] 
Sent: Monday, March 15, 2010 10:52 PM
To: user@forrest.apache.org
Subject: Usage Scenario

 

Hi All,

 

I am developing a web application using Spring/Hibernate frameworks. My
application is going to be a public facing application. The pages on this
application can be divided into categories. Pre-login  Post login.

 

Pre-Login pages: These are mainly going to be marketing/user education
pages. These are HTMLs/Jsps with el tags.

 

Post-Login pages: These are main application pages which are pure JSPs with
EL tags.

 

Since app has been launched, marketing team puts pressure on us to change
the content on the pre-login pages on almost daily basis. Currently, we are
handling this by sending the static files to the remote static server.

 

I want to streamline this process. The above one is tedious for changing the
content as presentation is mixed with content. Often this results in errors
 reworks.

 

Can I make use of Foresst/Cocoon or some other XML based approach to address
this issue? I want, at least for static pages, to keep the presentation code
on static pages separate from content. This can enable the marketing team to
write content in simple text files, which eventually can be uploaded to the
server.

 

Please suggest what I can do here. I wish for following: A simple text file
upload and then on the basis of EL tags on the JSPs, content gets reflected
on the pages of the running application.

 

Rgds
nitin



RE: Usage Scenario

2010-03-15 Thread Dr. Praveen Bhatia
Nitin,

  What I do is this:

  For JSPs, I use iframes, and run JSPs in it. For others I pass
it to the cocoon servlet.

  For XSP, cocoon servlet directly can interpret the same.

Both are easy to use, but as I am separating the JSP into iframe, I cant
always use full power of cocoon in it.

For XSP you will need to learn that language from cocoon documents given at:
http://wiki.apache.org/cocoon/XSP

 

Both methods should work for you for the site that you build, but could
involve customization.

 

Praveen

 

 

From: Nitin Gupta [mailto:nitingupta...@gmail.com] 
Sent: Tuesday, March 16, 2010 2:12 PM
To: user@forrest.apache.org
Subject: RE: Usage Scenario

 

Thanks Praveen,

 

Which option out of following will be easier to manage in your opinion?

 

-  Make JSPs work with Cocoon/forrest

-  XSP

 

More or less our static pages would be like http://evite.com 's. We will
also need the RSS content reader feature of Cocoon/forrest.

 

If possible, can you please point me to some reference work/links/docs which
is close to my use case.

 

Thanks

Nitin

 

 

 

From: Dr. Praveen Bhatia [mailto:praveen.bha...@sumpurn.com] 
Sent: Tuesday, March 16, 2010 5:15 AM
To: user@forrest.apache.org
Subject: RE: Usage Scenario

 

Hi Nitin,

   Yes you could do it in forrest/cocoon. Uploading modified xml content
files, would change the contents being displayed. There is a sitemap.xmap
facility which could be used to map your contents, combined with
presentation code, to display new content.

   However, to use JSPs, you will need to make JSPs work with forrest/cocoon
or use XSPs which cocoon has built in its software.

Praveen 

 

From: Nitin Gupta [mailto:nitin.gu...@srishtitechnet.com] 
Sent: Monday, March 15, 2010 10:52 PM
To: user@forrest.apache.org
Subject: Usage Scenario

 

Hi All,

 

I am developing a web application using Spring/Hibernate frameworks. My
application is going to be a public facing application. The pages on this
application can be divided into categories. Pre-login  Post login.

 

Pre-Login pages: These are mainly going to be marketing/user education
pages. These are HTMLs/Jsps with el tags.

 

Post-Login pages: These are main application pages which are pure JSPs with
EL tags.

 

Since app has been launched, marketing team puts pressure on us to change
the content on the pre-login pages on almost daily basis. Currently, we are
handling this by sending the static files to the remote static server.

 

I want to streamline this process. The above one is tedious for changing the
content as presentation is mixed with content. Often this results in errors
 reworks.

 

Can I make use of Foresst/Cocoon or some other XML based approach to address
this issue? I want, at least for static pages, to keep the presentation code
on static pages separate from content. This can enable the marketing team to
write content in simple text files, which eventually can be uploaded to the
server.

 

Please suggest what I can do here. I wish for following: A simple text file
upload and then on the basis of EL tags on the JSPs, content gets reflected
on the pages of the running application.

 

Rgds
nitin