Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 60308 invoked by uid 500); 23 Apr 2002 19:38:01 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 60294 invoked from network); 23 Apr 2002 19:38:01 -0000 From: "Volker Schneider" To: Subject: RE: Iteration inside xsp Date: Tue, 23 Apr 2002 21:38:02 +0200 Message-ID: <000b01c1eafe$6233f6d0$f2966586@Pachelbel> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 In-Reply-To: <85063BBE668FD411944400D0B744267AE98E5C@AUSMAIL> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Harry, thank you for your reply. It tried the "request" variable. I tried to get the session from the request but it didn't work. org.apache.cocoon.environment.Request org.apache.cocoon.environment.Session //---- get the request request.getSession(); The error message was: org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling ShowRoute_xsp: Line 70, column 22: expected Line 70, column 12: cannot access class getSession; file request\getSession.class not found Line 0, column 0: 2 errors Do you have an idea, what could be the reason for this? Thank you, best regards - Volker - -----Original Message----- From: Lai, Harry [mailto:HLai@coremetrics.com] Sent: Dienstag, 23. April 2002 21:17 To: 'cocoon-users@xml.apache.org' Subject: RE: Iteration inside xsp Hi Volker, In an XSP doc (or logicsheet), there are a set of "built-in" variables that you can use to access servlet objects (taken from the comments in the java file derived from an XSP doc): /* Built-in parameters available for use */ // context - ServletContext // request - org.apache.cocoon.environment.Request // response - org.apache.cocoon.environment.Response // parameters - parameters defined in the sitemap Here's an example that accesses the request: String name = request.getParameter("name"); if (name != null) {

Hello, name!

}
Anyway, I think that's what you were asking about, but if it wasn't, let me know, and I'll take another shot. =) Harry PS If you don't want to access the servlet objects directly, Cocoon also provides some logicsheets that you can use (xsp-request, xsp-response, xsp-session, xsp-cookie). -----Original Message----- From: Volker Schneider [mailto:volker.schneider@danet.de] Sent: Tuesday, April 23, 2002 1:51 PM To: cocoon-users@xml.apache.org Subject: RE: Iteration inside xsp Hi Harry, thank you, this helps. But there is another question coming up, maybe you know the answer as well: How can I access the session or request object whithin the xsp logic sheet(). Inside the I can access it using the session-namespace. But inside the logic sheet I have no ObjectModel. Thank you, best regards - Volker - -----Original Message----- From: Lai, Harry [mailto:HLai@coremetrics.com] Sent: Dienstag, 23. April 2002 20:46 To: 'cocoon-users@xml.apache.org' Subject: RE: Iteration inside xsp Hi Volker, I'm sure there are better tutorials, but this article comparing JSP and XSP actually has a decent table of XSP tags on page 3. http://www.onjava.com/pub/a/onjava/2001/02/22/jsp_servlets.html Also, with regards to your question, there's an example on page 2 of this article that iterates through an array and outputs each element within its own xhtml element. Here's the example: for (int i = 0; i < items.length; i++) { }
items[i].getName()
Anyway, hope that helps! Harry -----Original Message----- From: Volker Schneider [mailto:volker.schneider@danet.de] Sent: Tuesday, April 23, 2002 1:15 PM To: cocoon-users@xml.apache.org Subject: Iteration inside xsp Dear colleagues, I want to use xsp to retrieve data from the session. The only problem is, that I cannot put list content out to the xsp page. If I want to write out a list of names which are stored in a vector, how can I produce an xsp-page like this: ... Volker Peter Betty ... an so on. Sure I can iterate in java, but then there must be a chance to select what data should be put out. Where can I find a more detailed xsp-tutorial, where every xsp-tag is declared. The things I found mostly were incomplete. Best regards - Volker - --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: