RE: Help needed...

2003-10-07 Thread Martin van Dijken
Hey Jacob,

What you want to do in my opinion is do a little reading to understand what JSTL 
actually is. The specification is a very good place to start since it is clearly and 
simply written. The specification can be found here:

http://jcp.org/aboutJava/communityprocess/final/jsr052/

Also, there are several really good books on JSTL. I personally never read them, but I 
hear good things about Shawn Bayern's book:

http://www.amazon.com/exec/obidos/tg/detail/-/1930110529/103-4305142-2848646

Grtz,

Martin van Dijken

 -Original Message-
 From: Jacob Wilson [mailto:[EMAIL PROTECTED]
 Sent: maandag 6 oktober 2003 20:25
 To: [EMAIL PROTECTED]
 Subject: Help needed...
 
 
 Hi...
  
 I am new to tag libraries... I need to do a iteration using 
 the iterator tag... If anyone of you can help that would be great...
  
 Here's my question...
  
 I have an arraylist something like this...
  
 ArrayList valueList = (ArrayList) session.getAttribute(aList);
  
 I generate a loop something like this...
  
 table border=1 bgcolor=#cc width=75% align=center   
  tr 
   tdHere are the values.../td 
  /tr
   %for (int i=0; ivalueList.size(); i++){%
tr 
 td%= valueList.get(i) %/td 
/tr   
   }%
 /table
  
 Now, I want to use the iterator tag and generate a table 
 without using the for loop...
  
 My usebean is 
 jsp:useBean id=first 
 class=com.xxx.xxx.business.FirstBean scope=session /
 
 If anybody out there could help me with this simple problem, 
 it would be great...
 
 Thanks in advance...
 
 
 
 -
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product search
 

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



Feature request in c:url?

2003-10-07 Thread Vianen, Jeroen van
To be able to write correct XHTML 's in the querystring need to be escaped.
To do so, I use the following code:

c:set var=a value=A/
c:set var=b value=B/
c:url var=theUrl value=whatever.jsp
c:param name=a value=${a}/
c:param name=b value=${b}/
/c:url
a href=c:out value=${theUrl} escapeXml=true/Link to whatever/a

This will return a correctly XML / XHTML escaped URL:

a href=whatever.jsp?a=Aamp;b=B.../a

Would it be possible in a future version of the JSTL to combine these two
tags as follows:

c:url value=whatever.jsp escapeXml=true
c:param name=a value=${a}/
c:param name=b value=${b}/
/c:url

What do you think?


Jeroen

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



RE: Feature request in c:url?

2003-10-07 Thread Martin van Dijken
Hey Jeroen,

Sounds sensible, considering the fact that it is even a requirement of standard HTML 
4.01. However, this is a modification of the spec I think. You might want to get in 
touch with them, or try the taglib-dev dept.

Grtz,

Martin van Dijken

 -Original Message-
 From: Vianen, Jeroen van [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 7 oktober 2003 11:25
 To: '[EMAIL PROTECTED]'
 Subject: Feature request in c:url?
 
 
 To be able to write correct XHTML 's in the querystring need 
 to be escaped.
 To do so, I use the following code:
 
 c:set var=a value=A/
 c:set var=b value=B/
 c:url var=theUrl value=whatever.jsp
   c:param name=a value=${a}/
   c:param name=b value=${b}/
 /c:url
 a href=c:out value=${theUrl} escapeXml=true/Link to 
 whatever/a
 
 This will return a correctly XML / XHTML escaped URL:
 
 a href=whatever.jsp?a=Aamp;b=B.../a
 
 Would it be possible in a future version of the JSTL to 
 combine these two
 tags as follows:
 
 c:url value=whatever.jsp escapeXml=true
   c:param name=a value=${a}/
   c:param name=b value=${b}/
 /c:url
 
 What do you think?
 
 
 Jeroen
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Help needed...

2003-10-07 Thread Jacob Wilson
Thanks much... This should be really useful...
 
-Jacob

Martin van Dijken [EMAIL PROTECTED] wrote:
Hey Jacob,

What you want to do in my opinion is do a little reading to understand what JSTL 
actually is. The specification is a very good place to start since it is clearly and 
simply written. The specification can be found here:

http://jcp.org/aboutJava/communityprocess/final/jsr052/

Also, there are several really good books on JSTL. I personally never read them, but I 
hear good things about Shawn Bayern's book:

http://www.amazon.com/exec/obidos/tg/detail/-/1930110529/103-4305142-2848646

Grtz,

Martin van Dijken

 -Original Message-
 From: Jacob Wilson [mailto:[EMAIL PROTECTED]
 Sent: maandag 6 oktober 2003 20:25
 To: [EMAIL PROTECTED]
 Subject: Help needed...
 
 
 Hi...
 
 I am new to tag libraries... I need to do a iteration using 
 the iterator tag... If anyone of you can help that would be great...
 
 Here's my question...
 
 I have an arraylist something like this...
 
 ArrayList valueList = (ArrayList) session.getAttribute(aList);
 
 I generate a loop something like this...
 
 
 
 Here are the values...
 
 
 
 
 
 }%
 
 
 Now, I want to use the iterator tag and generate a table 
 without using the for loop...
 
 My usebean is 
  class=com.xxx.xxx.business.FirstBean scope=session /
 
 If anybody out there could help me with this simple problem, 
 it would be great...
 
 Thanks in advance...
 
 
 
 -
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product search
 

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


-
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Re: Feature request in c:url?

2003-10-07 Thread Pierre Delisle
Jeroen,

This issue was first raised by Andreas in bug #23319.
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23319)
I've brought it up to the expert group and it will, as mentioned
by Martin, require a change to the spec. 

I've just added a comment to that bug stating that 
unfortunately the JSTL 1.1 Maintenance Release spec is now frozen,
and the fix will have to wait for the next release.

The change that the expert group has agreed on so far is to add
one new attribute, 'escapeAmp', to escape the ampersand character.
Default value will be false (to be backwards compatible).
HTH,

   -- Pierre

Martin van Dijken wrote:

Hey Jeroen,

Sounds sensible, considering the fact that it is even a requirement of standard HTML 4.01. However, this is a modification of the spec I think. You might want to get in touch with them, or try the taglib-dev dept.

Grtz,

Martin van Dijken


-Original Message-
From: Vianen, Jeroen van [mailto:[EMAIL PROTECTED]
Sent: dinsdag 7 oktober 2003 11:25
To: '[EMAIL PROTECTED]'
Subject: Feature request in c:url?
To be able to write correct XHTML 's in the querystring need 
to be escaped.
To do so, I use the following code:

c:set var=a value=A/
c:set var=b value=B/
c:url var=theUrl value=whatever.jsp
	c:param name=a value=${a}/
	c:param name=b value=${b}/
/c:url
a href=c:out value=${theUrl} escapeXml=true/Link to 
whatever/a

This will return a correctly XML / XHTML escaped URL:

a href=whatever.jsp?a=Aamp;b=B.../a

Would it be possible in a future version of the JSTL to 
combine these two
tags as follows:

c:url value=whatever.jsp escapeXml=true
c:param name=a value=${a}/
c:param name=b value=${b}/
/c:url
What do you think?

Jeroen

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



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



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


Help with JSTL...

2003-10-07 Thread Jacob Wilson
Hi.
 
I am developing a new application in Struts and just wanted to see how to implement 
JSTL in my jsps... I am trying to iterate a loop using a jstl tag... I am specifying a 
collection object in the items attribute of the iterator action. I get this following 
error...
 
org.apache.jasper.JasperException: An error occurred while evaluating custom action 
attribute value with value ${actual.name}: Unable to find a value for name in 
object of class java.lang.String using operator . (null)
 
My jsp goes something like this...
 
table align=center border=0 cellspacing=1 cellpadding=1 width=748 
 tr bgcolor=#99   
  th bgcolor=#cc class=blueLink align=center width=User Name/th
  th bgcolor=#cc class=blueLink align=center width=Password/th 
  
 /tr
 c:forEach var=actual items=${loginForm.clientCollection}
  tr bgcolor=#9EC6FF
   td class=content align=left
c:out value=${actual.name}/br
   /td
   td class=content align=left
c:out value=${actual.password}/br
   /td  
  /tr
 /c:forEach
/table 
 
where clientCollection is a collection from the form bean...
 
From the LoginAction, I am calling a method in businessBean which returns a arraylist 
that I had already set it in the formBean collection...
 
My LoginAction is something like this...
 
public class LoginAction extends Action {
 BusinessBean businessBean = null;
 String name = null;
 String password = null;
 
 public RegisterResourcesAction() {
  super();
 }  
 
 public ActionForward execute(
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
  throws Exception {
  ActionErrors errors = new ActionErrors();
  ActionForward forward = new ActionForward();
  LoginForm loginForm = (LoginForm) form;
HttpSession session = request.getSession(false);  
  
  name = loginForm.getClient().getName();
  password = loginForm.getClient().getPassword();
  businessBean = new BusinessBean();

  ArrayList aList = firstBean.exeQuery(name, password);
  loginForm.setClientCollection(aList);
   
  forward = mapping.findForward(success);
  return (forward);
   
  }   

}

If anybody out there could help, it would be great... Thanks in advance...
-Jacob


-
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

c:import: relative links inside WEB-INF don't work

2003-10-07 Thread Manolo Ramirez T.
Hi,

I have this problem with Tomcat 4.1.24 and taglibs-standard 1.0.3. When 
I try lo include a jsp inside WEB-INF I must to use an absolute url, 
this are my files:

###
# /WEB-INF/jsp/prueba.jsp #
###
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
c:import url=prueba2.jsp/ %-- doesn't work! --%

# /WEB-INF/jsp/prueba1.jsp #

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
c:import url=/WEB-INF/jsp/prueba2.jsp/ %-- works fine --%

# /WEB-INF/jsp/prueba2.jsp #

HELLO WORLD!
#/END

jsp:include works well with relative url's, What I'm missing? Is there 
any way to use c:import to do this?. Help please.

Thanks in advance.


Manolo Ramirez T.
PD: forgive my english!

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


Help with JSTL...

2003-10-07 Thread Jacob Wilson
Hi.
 
I am developing a new application in Struts and just wanted to see how to implement 
JSTL in my jsps... I am trying to iterate a loop using a jstl tag... I am specifying a 
collection object in the items attribute of the iterator action. I get this following 
error...
 
org.apache.jasper.JasperException: An error occurred while evaluating custom action 
attribute value with value ${actual.name}: Unable to find a value for name in 
object of class java.lang.String using operator . (null)
 
My jsp goes something like this...
 
table align=center border=0 cellspacing=1 cellpadding=1 width=748 
 tr bgcolor=#99   
  th bgcolor=#cc class=blueLink align=center width=User Name/th
  th bgcolor=#cc class=blueLink align=center width=Password/th 
  
 /tr
 c:forEach var=actual items=${loginForm.clientCollection}
  tr bgcolor=#9EC6FF
   td class=content align=left
c:out value=${actual.name}/br
   /td
   td class=content align=left
c:out value=${actual.password}/br
   /td  
  /tr
 /c:forEach
/table 
 
where clientCollection is a collection from the form bean...
 
From the LoginAction, I am calling a method in businessBean which returns a arraylist 
that I had already set it in the formBean collection...
 
My LoginAction is something like this...
 
public class LoginAction extends Action {
 BusinessBean businessBean = null;
 String name = null;
 String password = null;
 
 public RegisterResourcesAction() {
  super();
 }  
 
 public ActionForward execute(
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
  throws Exception {
  ActionErrors errors = new ActionErrors();
  ActionForward forward = new ActionForward();
  LoginForm loginForm = (LoginForm) form;
HttpSession session = request.getSession(false);  
  
  name = loginForm.getClient().getName();
  password = loginForm.getClient().getPassword();
  businessBean = new BusinessBean();

  ArrayList aList = firstBean.exeQuery(name, password);
  loginForm.setClientCollection(aList);
   
  forward = mapping.findForward(success);
  return (forward);
   
  }   

}

If anybody out there could help, it would be great... Thanks in advance...
-Jacob




-
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Re: c:import: relative links inside WEB-INF don't work

2003-10-07 Thread Serge Knystautas
You shouldn't be able to execute JSPs within your WEB-INF, so all 3 of 
your examples should be forbidden.

I think you might want to submit a bug report to whatever servlet engine 
you're using.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
Manolo Ramirez T. wrote:
Hi,

I have this problem with Tomcat 4.1.24 and taglibs-standard 1.0.3. When 
I try lo include a jsp inside WEB-INF I must to use an absolute url, 
this are my files:

###
# /WEB-INF/jsp/prueba.jsp #
###
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
c:import url=prueba2.jsp/ %-- doesn't work! --%

# /WEB-INF/jsp/prueba1.jsp #

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
c:import url=/WEB-INF/jsp/prueba2.jsp/ %-- works fine --%

# /WEB-INF/jsp/prueba2.jsp #

HELLO WORLD!
#/END

jsp:include works well with relative url's, What I'm missing? Is there 
any way to use c:import to do this?. Help please.

Thanks in advance.


Manolo Ramirez T.
PD: forgive my english!

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




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


Re: c:import: relative links inside WEB-INF don't work

2003-10-07 Thread Manolo Ramirez T.
Hi,

I'm using jsp's outside WEB-INF to include prueba and prueba1, I forget 
to say that.

_
Manolo Ramirez T.
Serge Knystautas wrote:
You shouldn't be able to execute JSPs within your WEB-INF, so all 3 of 
your examples should be forbidden.

I think you might want to submit a bug report to whatever servlet engine 
you're using.



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


Re: c:import: relative links inside WEB-INF don't work

2003-10-07 Thread Pierre Delisle
Manolo Ramirez T. wrote:

Hi,

I'm using jsp's outside WEB-INF to include prueba and prueba1, I forget 
to say that.
In that case, you'd want the following:

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
c:import url=WEB-INF/prueba2.jsp/ 

   -- Pierre


_
Manolo Ramirez T.
Serge Knystautas wrote:

You shouldn't be able to execute JSPs within your WEB-INF, so all 3 of 
your examples should be forbidden.

I think you might want to submit a bug report to whatever servlet 
engine you're using.



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



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


RE: Help with JSTL...

2003-10-07 Thread Karr, David
 -Original Message-
 From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
 
 I am developing a new application in Struts and just wanted 
 to see how to implement JSTL in my jsps... I am trying to 
 iterate a loop using a jstl tag... I am specifying a 
 collection object in the items attribute of the iterator 
 action. I get this following error...
  
 org.apache.jasper.JasperException: An error occurred while 
 evaluating custom action attribute value with value 
 ${actual.name}: Unable to find a value for name in object 
 of class java.lang.String using operator . (null)
  
 My jsp goes something like this...
  
 table align=center border=0 cellspacing=1 
 cellpadding=1 width=748 
  tr bgcolor=#99   
   th bgcolor=#cc class=blueLink align=center 
 width=User Name/th
   th bgcolor=#cc class=blueLink align=center 
 width=Password/th   
  /tr
  c:forEach var=actual items=${loginForm.clientCollection}
   tr bgcolor=#9EC6FF
td class=content align=left
 c:out value=${actual.name}/br

The collection in the clientCollection property has to be a collection
of JavaBeans, each of which has a name property (and others)
referenced by standard JavaBean accessors.

From your error message, I'm guessing that clientCollection is a
collection of java.lang.String objects.

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



Re: Having trouble with Multiple namespaces reading XML source

2003-10-07 Thread Pierre Delisle
Gavin,

I cannot talk for the xtags taglib, but for the xml tags of the standard taglib (implementation of JSTL), you have to make sure you access properly a specific node by referring to its namespace using the name() and namespace-uri() functions in XPath.

You may want to check that thread in the archive:
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]msgNo=4049
The deferred section of the JSTL 1.1 change log (http://java.sun.com/jstl), says the following:

Deferred Changes

Provide adequate XML Namespace support for the XML actions

JSTL 1.0 does not currently provide adequate support for XML namespaces in XPath expressions. Collaboration between the JSP, JAXP, and JSTL specs is necessary to come up with the proper solution. This will therefore be addressed in the next major revision of JSTL.

HTH,

   -- Pierre

Mach, Gavin wrote:

Hello everybody,
I am new to this group but have been developing a JSP page which reads in an
xml source file. I am also using Xtags taglib for XML parsing and
processing. A snippet of the xml source looks like below:...
INPUT.XML
?xml version=1.0 ?
Task SchemaVersion=2.0 Type=ResponseTask
xmlns=http://www.lexign.com/schemas/flow;
ApplicationData
DataItemString ID=4100 Name=EMPLOYEENAME Access=Write
Description=Employees nameJoe Bloggs
/DataItemString
DataItemString ID=4200 Name=ISIDINITIATOR
Access=Write Description=ISID1031
/DataItemString
/ApplicationData
/Task
The problem I am having is the xml file is only successfully read when the
xmlns attribute of the Task element is removed however the application that
creates this xml file cannot allow this so the xmlns attribute has to stay.
The JSP file that reads it has the following structure in the head ...(very
typical)
XMLReaderApp.jsp
?xml version=1.0 encoding=UTF-8?
html
%@ taglib uri=http://jakarta.apache.org/taglibs/xtags-1.0; prefix=xtags
%
head
%
String TXNfile = INPUT.XML;
%
xtags:parse uri=TXNfile/
..etc..
  I am aware this has to do with a namespace clash and have looked into
various resources but to no avail. Could someone please shed some light on
this issue. Thanks a bundle in advance. 

Gavin.



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



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