RE: Jsp 2.0 taglib conversion problem

2004-07-05 Thread Martin van Dijken
Hey Bruce,

Not entirely certain, but isn't it WS 6.0 that supports JSP 2.0? I was under
the impression that WS 5.x only supports version 1.2 of JSP, which still
works with a doctype and a dtd.

Grtz,

Martin

-Original Message-
From: Bruce Dempsey [mailto:[EMAIL PROTECTED] 
Sent: maandag 5 juli 2004 13:58
To: [EMAIL PROTECTED]
Subject: Jsp 2.0 taglib conversion problem

Our Websphere server was upgraded to 5.1.3 and we are now using JDK
1.4 and JSP 2. Our taglibraries have stopped working.

I am tryin to upgrade the libraries to use the SimpleTagSupport classes, etc
but am having a problem with our tld descriptor

Is this the proper way to declare the V2.0 of the taglibrary? 

The error I am getting is:
Error JspTranslate: : XML parsing error on file /WEB-INF/tagLib.tld:
(line 3, col 117): Document root element taglib, must match DOCTYPE root
null.. e_accountSignup.jsp ZSERIES_HCCFIA/WebContent line 8

Any ideas are greatly appreciated??


?xml version=1.0 encoding=UTF-8?

taglib
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xs
d
version=2.0


tlib-version1.0/tlib-version

short-nameHCCFIA Tag Library/short-name

tag
nameisElements/name
tag-classtaglib.IsElementsHandler/tag-class
body-contentJSP/body-content
attribute
namelistName/name
requiredtrue/required
/attribute
/tag


tag
namegetMessage/name
tag-classtaglib.getMessageHandler/tag-class
body-contentempty/body-content
/tag

tag
namegetReqParam/name
tag-classtaglib.getReqParamHandler/tag-class
body-contentempty/body-content
attribute
namename/name
requiredtrue/required
/attribute
/tag

tag
namegetParam/name
tag-classtaglib.getParamHandler/tag-class
body-contentempty/body-content
attribute
namefield/name
requiredtrue/required
/attribute
attribute
nameobject/name
requiredtrue/required
/attribute
/tag

tag
nameinitializeList/name
tag-classtaglib.InitializeListHandler/tag-class
body-contentempty/body-content
attribute
namelistName/name
requiredtrue/required
/attribute
attribute
nametype/name
requiredfalse/required
/attribute
/tag

tag
nameisChecked/name
tag-classtaglib.IsCheckedHandler/tag-class
body-contentempty/body-content
attribute
namelistName/name
requiredtrue/required
/attribute
attribute
nametype/name
requiredfalse/required
/attribute
/tag

tag
nameisSelected/name
tag-classtaglib.IsSelectedHandler/tag-class
body-contentempty/body-content
attribute
namelistName/name
requiredtrue/required
/attribute
attribute
nametype/name
requiredfalse/required
/attribute
/tag

tag
nameiterateOverObjects/name
tag-classtaglib.IterateOverObjectsHandler/tag-class
body-contentJSP/body-content
attribute
namelistName/name
requiredtrue/required
/attribute
attribute
namesplitList/name
requiredfalse/required
/attribute
/tag

tag
namegetObjectMessage/name
tag-classtaglib.getObjectMessageHandler/tag-class
body-contentempty/body-content
attribute
namelistName/name
requiredtrue/required
/attribute
attribute
namefieldName/name
requiredtrue/required
/attribute
attribute
nametype/name
requiredfalse/required
/attribute
/tag
tag
nameisNew/name
tag-classtaglib.IsNewHandler/tag-class
body-contentJSP/body-content
attribute
namedoctype/name
requiredtrue/required
/attribute
/tag
tag
namealternateColors/name
tag-classtaglib.alternateColorsHandler/tag-class
body-contentempty/body-content
/tag
tag
nameisLoggedIn/name
tag-classtaglib.IsLoggedInHandler/tag-class
body-contentJSP/body-content
attribute
namecurrentPage/name
requiredtrue/required
/attribute
attribute
namecheckStatus/name
requiredfalse/required
/attribute
/tag
tag
nameisRoleEnabled/name
tag-classtaglib.IsRoleEnabledHandler/tag-class
body-contentJSP/body-content

attribute
nameroleName/name
requiredtrue/required
/attribute/tag
tag
nameHideSearchArrow/name
tag-classtaglib.HideSearchArrowHandler/tag-class
body-contentJSP/body-content
attribute
namearrowType/name
requiredtrue/required
/attribute
attribute
namelistName/name
requiredtrue/required
/attribute
/tag
tag
namegetSpecial/name
tag-classtaglib.getSpecialHandler/tag-class
body-contentJSP/body-content
attribute
namelistName/name
requiredtrue/required
/attribute
attribute
namefieldName/name
requiredtrue/required
/attribute
/tag

/taglibFax (613) 957-1574


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



Re: passing JSTL to custom tag attribute

2004-05-15 Thread Martin van Dijken
Hey Paul,

There are essentially two ways:

1: Use the jakarta framework that the Jakarta JSTL implementation uses
itself. There are several classes there that allow you to evaluate EL.
2: Upgrade to a JSP 2.0 container. Tomcat 5 is such a container. This
container will automatically parse EL before passing it on to your tag.

1 has as plus that it works in older servers, but as downside that it
requires the Jakarta JSTL implementation.

Grtz,

Martin

 Hi,
  I wish to call a custom tag, passing a dynamic value for its
 attribute. I retrieve the value thus:

 c:set var=userid value=${param.userid}/

 and I wish to call my custom tag passing 'userid' as an attribute.
 Curently I have:

 my:execute userid=${userid}

 but the literal string ${userid} is passed into the handler. To
 acheive the desired results I could of course use:

 my:execute userid=%= request.getParameter(userid) %

 but that would mean embedding JSP, when I wish to encompass all logic in
 tags. Does anyone have any suggestions how I might pass the JSTL value,
 dynamically to the attribute of my custom tag please?

 Thanks

 Paul.





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



RE: formatDate - changes Japanese to ???

2004-03-31 Thread Martin van Dijken
Hey Roy,

I think you might want to read up on how the JSTL handles different
languages etc. What I'm seeing is that you use formatDate with a pattern
while you're saying that you've got Japanese and English mixed. Check out
how to use Locales in JSTL. If you set a Locale using a servlet,
fmt:setLocale or some other way, the date is formatted according to the
Locale you set (e.g. American English or Japanese).

Now on to your problem, are you saying that the c:out
value=rows.COMPANY/ is outputting normally without any fmt: tags in the
page? If so, there's probably something going on with the fmt tags setting
the charset of the response. Normally this isn't always necessary, so there
will be no charset set and then the browser will simply assume a charset by
looking at the content of your page. I'm not 100% certain but there were
some issues with setting the charset of the response. Check the list
archives to see if you can come up with something.

Martin

-Oorspronkelijk bericht-
Van: Roy Benjamin [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 1 april 2004 3:51
Aan: Tag Libraries Users List
Onderwerp: fmt:formatDate - changes Japanese to ???


Perviously I wrote about using date fmt.

I started using this construct to format results
comming back from Oracle.

fmt:parseDate var=date value=${rows.STARTDATE}
pattern=y-MM-dd kk:mm:ss.SSS/
fmt:formatDate value=${date} pattern=MMM d, /

I have Japanese in parts of this page.  It displays
fine if I do not use JSTL fmt:formatDate  .../

Otherwise it prints only as .

Looking at the page source, it looks like the
c:out value=rows.COMPANY/  is outputing .

Has anyone else seen this?

Thanks

Roy


-
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: redirect to a frame???

2004-03-31 Thread Martin van Dijken
Hey John,

No, but it's a hard no because you've got several things mixed up. What
you're saying is you want to submit a form inside a frame. However, once
this form is submit, the client is asking the server for a page in frame1.
Then whatever the server can come up with is put in frame1. This is how HTML
and HTTP work together.

What you really want, is to have the form be in frame1, yet let it send it's
data through frame2. This is very simply accomplished through setting
target=frame2 on the form tag. frame2 in this case would be the name you
gave the frame in the frameset. To clarify I've added three small files.
Open set.html for a demo.

Good luck!

Martin

-Oorspronkelijk bericht-
Van: John MccLain [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 1 april 2004 0:54
Aan: taglibs user list
Onderwerp: redirect to a frame???


Is it possible to target a frame in a jstl call.
For example, frame 1 has a button that submits a servlet request.
The servlet redirects to another jsp page but you want the jsp page it
redirects
to to be in frame 2. Can this be done without re-rendering the entire page,
and only re-render frame 2???


-
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: Formatted date not returning

2004-03-30 Thread Martin van Dijken
Hey Keith,

I still have to guess this has indeed something to do with JSTL not
understanding the .dob . Haven't been around SQL much of late so I can't
answer that one. Why not simplify this problem and use a fmt:formatDate tag
instead of doing the formatting in SQL?

Martin

-Oorspronkelijk bericht-
Van: Keith [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 31 maart 2004 3:27
Aan: Tag Libraries Users List
Onderwerp: Re: Formatted date not returning


Nope, that didn't work. I don't see the identifiers being used anywhere in
the Oracle
book I have. It didn't throw an error or anything, just did the same thing.
Thanks for
the suggestion, though!
I did notice that I do have formated dates returning in another document,
but the
forEach is using the rowsByIndex instead. The below outputs the TO_CHAR()
formatted date
exactly as I want it. Anyone know why the Indexed list returns the formated
date, but
not the SortedMap?

c:forEach items=${complete_list.rowsByIndex} var=row
tr
c:forEach items=${row} var=column
td
c:if test=${empty column}nbsp;/c:if
${column}
/td
/c:forEach
/tr
/c:forEach

Keith

-- Original Message ---
From: Hassan Schroeder [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Tue, 30 Mar 2004 13:57:17 -0800
Subject: Re: Formatted date not returning

 Keith wrote:
  I'm trying to return a formatted date from an Oracle database. I format
the date in
the
  query itself using the TO_CHAR() funtion. The problem is, when I use the
TO_CHAR()
  function, JSP is acting like nothing is returned. If I take the function
out and
just
  select the column as normal, it outputs but with the full TimeStamp
(which I don't
want).

 I don't know Oracle, but if this was MySQL I'd say you need to
 assign an identifier to your returned result, something like

  sql:query var=resource_list
  SELECT
   TO_CHAR(dob, 'DD-MON-')
   TO_CHAR(dob, 'DD-MON-YYY') AS thisDOB
  FROM ccevs_resource_registry
  /sql:query

 ..and then call it as

c:forEach items=${resource_list.rows} var=resource_row
  c:out value=${resource_row.dob} /
  c:out value=${resource_row.thisDOB} /

 Untested, but FWIW!
 --
 Hassan Schroeder - [EMAIL PROTECTED]
 Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

dream.  code.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
--- End of Original Message ---


-
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: More SQL Date problems

2004-03-30 Thread Martin van Dijken
Hmm Keith,

Can you specify the url you're using to connect to the database? * out the
uid and psw of course... Also can you post a stack trace? I did a few
Googles on your exception and heard some people shouting the oracle thin
driver should work best. It's what I have used in the past and I've not had
any headaches with it.

Martin

-Oorspronkelijk bericht-
Van: Keith [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 31 maart 2004 5:55
Aan: Tag Libraries Users List
Onderwerp: Re: More SQL Date problems


Yeah, I'd read about not using that bridge driver. I'm using Oracle 9i
Release 2, J2SE
v1.4.2, and the JDBC Oracle Driver for JDK 1.4.

Keith

-- Original Message ---
From: Hans Bergsten [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Tue, 30 Mar 2004 20:40:41 -0800
Subject: Re: More SQL Date problems

 Keith wrote:
  Ahhh, ok. I assumed it was the JSTL stuff throwing the error. I've not
done much
  programming in actual Java, which is why I'm using the JSTL library.
 
  The field is set to accept a NULL value in the database. There's already
data in the
  database, and there's many DOB's missing for some people. I can do
inserts to the
  database from SQL*Plus fine and leave the date fields blank. It's just
when I'm
trying
  to do it via JSP. I'm trying to design an new interface to the database
and this has
  been my roadblock for the week.

 Okay. Which JDBC driver are you using? If it's the JDBC-ODBC bridge, I
 suggest you try with a real Oracle JDBC type 3 or 4 driver instead. The
 bridge driver is buggy and not intended for production use.

 Hans

  -- Original Message ---
  From: Hans Bergsten [EMAIL PROTECTED]
  To: Tag Libraries Users List [EMAIL PROTECTED]
  Sent: Tue, 30 Mar 2004 19:30:44 -0800
  Subject: Re: More SQL Date problems
 
 
 Keith wrote:
 
 Now I'm thorougly confused. I could've sworn this was working before
(as I claimed
 
  in my
 
 first email to the group.
 
 
 fmt:parseDate value=${param.dob} var=parsed_dob
pattern=dd-MM- /
 
 sql:transaction
 
 sql:update
INSERT INTO resource_registry ( dob )
 VALUES (? sql:dateParam value=${parsed_dob} type=date/ )
 /sql:update
 
 /sql:transaction
 
 
 This works perfectly fine when I put a date in the format specified in
the
parseDate
 action. The JSP book I got (O'Reilly 3rd Ed) says the sql:dateParam
action is
 
  supposed
 
 to set the value to an SQL NULL when a null value is provided to it. I
keep getting
 
  an
 
 Invalid Column Type SQL exception (not an Oracle error) back whenever I
leave the
 
  date
 
 field blank. Anyone know what's wrong? Thanks!
 
 It looks to me as if the Invalid Column Type SQL exception indeed
 comes from the database (or the JDBC driver), because nothing in JSTL
 can issue such an error message (JSTL doesn't have enough info; it
 just relays the error issued by the JDBC driver).
 
 JSTL sets the parameter in the SQL statement to SQL NULL if the
 sql:dateParam value is null (according to the spec; bugs in an
 implementation is a different story). One possible reason for the
 error you get is that the column isn't declared to accept a NULL
 value. Check the database table constraints.
 
 Hans

 --
 Hans Bergsten[EMAIL PROTECTED]
 Gefion Software   http://www.gefionsoftware.com/
 Author of O'Reilly's JavaServer Pages, covering JSP 2.0 and JSTL 1.1
 Details athttp://TheJSPBook.com/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
--- End of Original Message ---


-
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: creating body content

2004-03-30 Thread Martin van Dijken
Hey Dean,

A simple answer, it's not possible to do this. A tag is only allowed to
create Template text which is output directly to the client. So your HTML
etc would go fine, but your bean:message tag would be sent to the client
unparsed as well. There might be something you can do in JSP 2.0 using tag
files, but I haven't looked into it. If JSP 2.0 is an option for you, check
out the chapter on Tag Files in the JSP 2.0 specification.

Personally if you're already as far as creating your own tags, I'd search
through the Struts javadocs to see if you can't find the message yourself.
Check out the org.apache.struts.util and org.apache.struts.config packages.

Martin

-Oorspronkelijk bericht-
Van: Dean A. Hoover [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 31 maart 2004 2:00
Aan: [EMAIL PROTECTED]
Onderwerp: creating body content


I have been experimenting with creating
custom tags for a few days now and have
created some simple but useful tags for
my application. None of the tags I've
written so far use any body content. Now
I want to create a tag that does not have
a body but will insert JSP code that needs
to be evaluated. I am using struts and want
to use a struts tag in the generated JSP and
then have it evaluated. An example of the
tag I am creating would look like this:

els:formlabel key=logon.password/

And it would insert the following:

table cellpadding=0 cellspacing=0 width=150trtdbean:message
key=logon.password//td/tr/table

How would I go about doing this. I've been bouncing
around in the documentation trying to understand the
various return codes, such as EVAL_BODY_AGAIN,
and the BodyContent class, but I'm having trouble
understanding how to do this. Can someone
point me in the right direction?

Dean Hoover


-
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: Further processing results of c:forEach

2004-03-23 Thread Martin van Dijken
Hey Wolfgang,

How do you represent an IP address as a long? Do you make 192.168.0.12
19216812? In that case, if you don't mind the zeroes, you could still
use formatNumber and use . as the grouping operator. I admit it's ugly, but
you'd get 192.168.000.012. As said, ugly. There is an alternative and that
is creating your own custom tag. This kind of logic is very definitely
presentational logic and personally I think it doesn't really belong in a
servlet. Here's what you might do:

[EMAIL PROTECTED] prefix=wolf uri=http://DOMAIN/taglibs/wolf%

c:forEach var=myVar ..
wolf:ip value=${myVar} /
/c:forEach

The wolf:ip tag would be created:

*** LongToIPTag.java: ***
import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

public class LongToIPTag extends TagSupport
{
private String unformatted;

public void setValue(String string)
{
unformatted = string;
}
public void release()
{
unformatted = null;
}
public int doStartTag() throws JspException
{
//Do your formatting on the unformatted var here
try
{
pageContext.getOut().print(The formatted string);
} catch(IOException e)
{
throw new JspException(e);
}
return SKIP_BODY;
}
}
*** / LongToIPTag.java ***
*** WEB-INF/tld/wolf.tld ***
?xml version=1.0 encoding=UTF-8?
!DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library
1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd;
taglib
tlibversion1.0/tlibversion
jspversion1.1/jspversion
shortnamewolf/shortname
urihttp://DOMAIN/taglibs/wolf/uri
tag
nameip/name
tagclassLongToIPTag/tagclass
bodycontentempty/bodycontent
attribute
namevalue/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
/tag
/taglib
*** / WEB-INF/tld/wolf.tld ***
*** WEB-INF/web.xml ***
?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;web-app
taglib
taglib-urihttp://DOMAIN/taglibs/wolf/taglib-uri
taglib-location/WEB-INF/tld/wolf.tld/taglib-location
/taglib
/web-app
*** / WEB-INF/web.xml ***


Good luck!

Martin


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



RE: Using ExpressionEvaluatorManager in a Struts Action execute()

2004-03-17 Thread Martin van Dijken
Hey Denis,

- first of all, this is really the list for non-struts taglibraries, for
struts issues please refer to [EMAIL PROTECTED]
- second, I'm not that sure what you mean, but can't you use the struts-el
taglibraries to create the param at the time the link is created? I think
the el-taglibs are in the struts 1.1 distribution.

Grtz,

Martin

-Oorspronkelijk bericht-
Van: f. [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 17 maart 2004 10:00
Aan: [EMAIL PROTECTED]
Onderwerp: Using ExpressionEvaluatorManager in a Struts Action execute()


Hi,

The idea is an hyperlink on HTML Page calling a Struts Action
and with an URI ending with like
myAction.do?elexpression=sessionScope['mylist'][param.row]

So I need the ELanguage power in my Action.execute( ) method.
I tryed to get a PageContext( ) from JSPFactory.DefaultFactory( ) (using
current request, response,etc )
but now my container (Jetty) send JSP source instead of JSP processing
result.

--
public class DetailHandlerAction extends Action {

public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

PageContext pc =
JspFactory.getDefaultFactory().getPageContext(this.getServlet(),request,
response, null, true, 4096 , false );
evaluatedDetailRef = ExpressionEvaluatorManager.evaluate(null,
detailRef, Object.class, pc);
javax.servlet.jsp.JspFactory.getDefaultFactory().releasePageContext(pc);


Any idea ?
Thanks for your help.
Denis.



-
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: Using ExpressionEvaluatorManager in a Struts Action execute()

2004-03-17 Thread Martin van Dijken
Clearer,

I hope you're aware that the approach you're on ties your programming to the
jakarta api for JSTL which might not be a good idea in the first place. I'm
thinking there might be some better way to do what you need, but can't
evaluate that fully until you describe what it is you're trying to
accomplish. What you describe is a technical way to solve some problem, but
there might be other solutions to the same problem...

Martin

-Oorspronkelijk bericht-
Van: f. [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 17 maart 2004 10:53
Aan: Tag Libraries Users List
Onderwerp: Re: Using ExpressionEvaluatorManager in a Struts Action
execute()


Martin,

First thanks for your reactivity.
I sent message to struts-user list before I post here .

The evaluation of the expression can not be done during jsp processing
because
1- custom tags are processed defining a datatable
2- table is then sent to browser
3- click each cell in the same column will request an URI with the same
EL expression (specific to a column)
4- elExpression is supposed to be evaluated by the controller

I can not evaluate each EL Expression for each cell, since only one cell
will be clicked.
I hope my problem is more clear, now.
Any Idea ?



Martin van Dijken wrote:

Hey Denis,

- first of all, this is really the list for non-struts taglibraries, for
struts issues please refer to [EMAIL PROTECTED]
- second, I'm not that sure what you mean, but can't you use the struts-el
taglibraries to create the param at the time the link is created? I think
the el-taglibs are in the struts 1.1 distribution.

Grtz,

Martin

-Oorspronkelijk bericht-
Van: f. [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 17 maart 2004 10:00
Aan: [EMAIL PROTECTED]
Onderwerp: Using ExpressionEvaluatorManager in a Struts Action execute()


Hi,

The idea is an hyperlink on HTML Page calling a Struts Action
and with an URI ending with like
myAction.do?elexpression=sessionScope['mylist'][param.row]

So I need the ELanguage power in my Action.execute( ) method.
I tryed to get a PageContext( ) from JSPFactory.DefaultFactory( ) (using
current request, response,etc )
but now my container (Jetty) send JSP source instead of JSP processing
result.

--
public class DetailHandlerAction extends Action {

public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

PageContext pc =
JspFactory.getDefaultFactory().getPageContext(this.getServlet(),request,
response, null, true, 4096 , false );
evaluatedDetailRef = ExpressionEvaluatorManager.evaluate(null,
detailRef, Object.class, pc);

javax.servlet.jsp.JspFactory.getDefaultFactory().releasePageContext(pc);


Any idea ?
Thanks for your help.
Denis.



-
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]



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



RE: How to access Resource bundle from filter?

2004-03-14 Thread Martin van Dijken
Hey Keith,

I think you've got it. You might want to check section 8.3 of the JSTL
specification on how JSTL does it's full Locale lookup, it might be that the
page author specified the preferred locale through the request attributes
and then you're thrown off-balance. There are some other exceptions to your
solution. Unfortunately the only way the logic from JSTL to determine the
Locale is available is when you've got a PageContext Object. Then you might
call LocaleSupport.getLocalizedMessage and be done with it.

As said, that method is unfortunately not available in a servlet or filter

Martin

-Oorspronkelijk bericht-
Van: Keith Hyland [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 12 maart 2004 19:56
Aan: Tag Libraries Users List
Onderwerp: Re: How to access Resource bundle from filter?


  ResourceBundle myResources =
 ResourceBundle.getBundle(foo, locale);
 

Thanks, I didn't actually know that which is a bit embarrasing, but ...

I want to get the resource used by the fmt:message tag lib. The one
specified in web.xml as

context-param
param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
param-valueresources.application/param-value
/context-param

At the moment it looks like I have to jump through a few hoops to do this.

String rb =
session.getServletContext().getInitParameter(javax.servlet.jsp.jstl.fmt.loc
alizationContext);
Locale locale = (Locale)session.getAttribute(Config.FMT_LOCALE);
ResourseBundle.getBundle(rb, locale).getString(key);

Is this right?, or is some of the logic of the fmt:message tag
accessible outside of a jsp context?

Cheers,
Keith



-
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: How to populate a FORM List object in template text for N results

2004-03-12 Thread Martin van Dijken
Hey Thomas,

What exactly is the problem with using forEach? It simply loops an iterator,
map, array or collection and displays it's body content while it has results
left.

c:forEach items=${clientResult} var=row
option value=c:out value=${row.value}/c:out
value=${row.text}//option
/c:forEach

Replace row.value and row.text with the access method for the variable in
the row you're trying to dump.

Martin

-Oorspronkelijk bericht-
Van: Thomas Forrester [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 12 maart 2004 12:45
Aan: [EMAIL PROTECTED]
Onderwerp: How to populate a FORM List object in template text for N
results




How do I write out template HTML to populate a FORM LIST object, from a
SQL query result set.

For example:

sql:query var=clientResult scope=page
select CLIENT_NAME from CLIENT
/sql:query

// Now given that I don't know how many rows I will get back, I can't
write out N number of option value=... Lines, and if I use a forEach
loop they will just get overwritten.
form name=form1 method=post action=
  select name=select
option value=firstValuefirstLabel/option
option value=secondLable selectedsecondLabel/option
option value=thiredValuethirdLabel/option
  /select
/form

Now given that I don't know how many rows I will get back, I can't write
out N number of option value=... Lines, and if I use a forEach loop
they will just get overwritten.

What is the technique to use here, or is there a special tag that will
do this?



-
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: Iterator : Newbie

2004-03-12 Thread Martin van Dijken
Hey Gaurav,

Whay you indicate seems as simple as:

c:forEach var=item
items=${some-variable-set-by-request-setattribute}
c:if test=${item.selected}
c:out value=${item}/
/c:if
/c:forEach

What you might want to do is read the Sun JSTL Specification. It provides an
excellent reference to how the tags work and is very readable. Check it out
at:

http://java.sun.com/products/jsp/jstl/

Grtz,

Martin

-Oorspronkelijk bericht-
Van: Gaurav Vaish [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 12 maart 2004 15:44
Aan: Tag Libraries Users List
Onderwerp: Re: Iterator : Newbie


Hi Martin,
Thanks...

But probably this is not what I am looking for. Or may be I got you
wrong.

Snippets will make it once-for-all includes. But the include is dynamic.
It is known only at runtime.

So, I would like to have something like the following:

tag:selector var=item items=somevar
tag:if var=$item.selected
tag:render item=$item/
/tag
/tag:selector

One way would be to use JSP-snippet:

%
for(int i = 0; i  somevar.size(); i++)
{
MyItem item = somevar.get(i);
if(item.isSelected())
{
item.render(whatever, parameter, list, required, like,
context, request, response, servlet, etc);
}
}
%

Can you provide in more details of what you meant by HTML Snippets?


Cheers,
Gaurav



- Original Message -
From: Martin van Dijken [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Friday, March 12, 2004 12:34
Subject: RE: Iterator : Newbie


 Hey Gaurav,

 Please explore a bit further.

 - Your components are HTML snippets?
 - The configuration on whether to display them, can be read how?

 Martin

 -Oorspronkelijk bericht-
 Van: Gaurav Vaish [mailto:[EMAIL PROTECTED]
 Verzonden: donderdag 11 maart 2004 20:31
 Aan: [EMAIL PROTECTED]
 Onderwerp: Iterator : Newbie


 Hi,

 I have just started with TagLibs - and uff! what a hot + fun time I
had.

 Coming to point... I have the following scenario:

 - A set of components that I want to display.
 - Their display (visible or not, and order) is given by a
configuration
 which is user dependent.
 - So, I want to use an interator.

 * The iterator will contain the list of components to be displayed.

 Problem how to tackle this. Simple, ain't? ;-)

 = I think having these components also as TagLib will help, or am I
 wrong?
 = But still, how do I display them?
 = One way is to use iframes. Separate JSP for each! But that will
make
 it really huge. And adding one component means adding one JSP also. I
don't
 like this approach.

 Or is there any better approach altogether? Using some advanced
features
 of JSF? (I must admit, I know, probably, only J of JSF.)

 btw, has anybody seen the implementation of IBuySpy on .Net? I really
 like the 'Controls' thing. You can add them as modules. Is it possible to
do
 it this way in Java? All the components are gathered using configuration
 files... and then displayed as needed.


 Cheers,
 Gaurav


 -
 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]



RE: Can't use JSTL 1.1 EL functions without errors

2004-03-11 Thread Martin van Dijken
Hey Thomas,

 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
Shouldn't this also be :
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %

Furthermore, Check whether in the c.tld file, at the set tag, the
rtexpr-value property is set to true. In the past the JSTL 1.1 distribution
included a c-rt.tld and a c.tld, if they are both still present, you need
the c-rt.tld for JSP 2.0/Servlet 2.4 handling of the EL-functions

Grtz,

Martin


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



RE: setdatasource problem

2004-03-11 Thread Martin van Dijken
Hey John,

Can you show me the code snippets you use yourself to setup a connection and
do a query in the servlet? Both the standard and the domain example please.
As always ;) no uid/passwd necessary...

Martin

-Oorspronkelijk bericht-
Van: John MccLain [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 11 maart 2004 23:07
Aan: taglibs user list
Onderwerp: setdatasource problem


Heres the scenario -
I have a servlet
it sets up a JDBC connection to sql server via a URL with user name and
password
I am using standard SQL server authentication
I execute a query and get the results back and put them in a session
variable
I then take the URL I used for the connection and the database driver  and
format a string:

jdbc:jtds:sqlserver://ZION/wisdomtest;user=wisdom;password=wisdom,net.source
forge.jtds.jdbc.Driver,,
This string is a parameter to Config.set(Config.SQL_DATA_SOURCE, above
string)
I then forward to a jsp page that performs a query - BUT since I already
have the data source set in my
session (from Config.set(...)), I don't use the setDataSource tag - the DS
isa already available
IT WORKS - my JSP page displays my result set I set in my session
originally, and it also performs the
  query against the DS I set in the session and displays that result set
as well- WHEW!

Now I set it up to do the same thing BUT my JDBC url is

jdbc:jtds:sqlserver://ZION/wisdomtest;user=john;password=5223;domain=TRINITY
I do this because my driver does NT authentication when you specify a
domain.
The JDBC connection works and I get my result set back from the first query
using a standard
JDBC connection using domain authentication. HOWEVER, when my JSP page uses
the DS with
  domain authentication, it fails. Here is the message

javax.servlet.ServletException: Unable to get connection, DataSource
invalid: java.sql.SQLException: Logon failed.  Msg 18452, Severity 14,
State 1, Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection., Server , Procedure , Line 0

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:867)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:800)
org.apache.jsp.provider_jsp._jspService(provider_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
11)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
test.testJDBC.doGet(testJDBC.java:67)
test.testJDBC.doPost(testJDBC.java:39)
.
.
.

WHY does the jstl datasource not like domain authentication, but is fine
with standard authentication - th
only difference is the URL I passed into Config.SQL_DATA_SOURCE, and the
only error is when using
that data source 


-
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: xalan extensions?

2004-02-26 Thread Martin van Dijken
Hey Sohil,

Why don't you do it the other way around and use JSTL as the front-end
and use the JSTL x tags to transform XML with XSL?

Martin

 -Original Message-
 From: MARU, SOHIL (SBCSI) [mailto:[EMAIL PROTECTED] 
 Sent: woensdag 25 februari 2004 17:17
 To: 'Tag Libraries Users List'
 Subject: xalan extensions?
 
 
 I am trying to use JSTL tag libraries within xsl as I am 
 using XSL as my front end in the struts architecture. However 
 I guess I need xalan extensions to interpret these tags in my 
 XSL because right now XSL doesn't interpret them and spews 
 them out as is. Does anyone know of xalan extensions for html 
 JSTL tagilb and other tablibs or would I need to write my 
 own? Thanks, Sohil
 
 -
 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: JSTL fmt:formatDate bug ???

2004-02-25 Thread Martin van Dijken
Hey Riaan,

Try fiddling around with setting the locale in JSTL. In your example
code you create a SimpleDateFormat with a pattern as argument. JSTL uses
the constructor with a Locale as additional parameter.

Grtz,

Martin

 -Original Message-
 From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] 
 Sent: woensdag 25 februari 2004 8:18
 To: Tag Libraries Users List
 Subject: RE: JSTL fmt:formatDate bug ???
 
 
  Could you post the code to manually format the date?
  I can easily compare that to what is being done by
  the JSTL implementation and give you some feedback 
  on that.
 
 Something to the extend of:
 
 static 
 {
 SimpleDateFormatter sdf = new
 SimpleDateFormatter(-MM-dd HH:mm); 
 sdf.setTimeZone(TimeZone.getTimeZone(Europe/London);
 }
 
 user inputs time in above format in jsp, then I do:
 
 sdf.parseDate(inputtedDate) and do a getTime and then
 create a java.sql.Timestamp with the long value and
 put that in the DB. Mysql displays is as one hour
 later, the Dutch time, which is expected.
 
 When displaying it manually, I use the same sdf above
 and do something like:
 
 sdf.formatDate(new Date(resultSet.getTimestamp(time).getTime())).
 
 Not 100% sure, as I do not have the code with me, but
 somthing to this extend. The sdf is a static in a
 singleton utility class.
 
 And, as I said, it only gets messed up after DST kicks
 in. Maybe Europe/London is somehow (wrongly)
 interpreted as GMT?
 
  PS Thanks for hosting your application in our fine
  little country:)
 
 I live here, but I'm not Dutch.  :)
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want. 
http://antispam.yahoo.com/tools

-
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: JSTL fmt:formatDate bug ???

2004-02-25 Thread Martin van Dijken
Try:

fmt:setLocale value=nl_NL/
fmt:formatDate value=${obj} timeZone=Europe/London type=time/

Or:

fmt:setLocale value=en_GB/
fmt:formatDate value=${obj} timeZone=Europe/London type=time/

It might be that this actually changes something. Personally I've found
the whole Locale business very confusing and illogical to work with, but
that's just my personal frustration.

Martin

 -Original Message-
 From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] 
 Sent: woensdag 25 februari 2004 10:48
 To: Tag Libraries Users List
 Subject: RE: JSTL fmt:formatDate bug ???
 
 
 I'm a bit lost here can you give me an example of
 what I should give to jstl to print the time as
 Europe/London ?
 
 Thanks
 
 Charl
 
 
 --- Martin van Dijken [EMAIL PROTECTED] wrote:
  Hey Riaan,
  
  Try fiddling around with setting the locale in JSTL.
  In your example
  code you create a SimpleDateFormat with a pattern as argument. JSTL 
  uses the constructor with a Locale as additional
  parameter.
  
  Grtz,
  
  Martin
  
   -Original Message-
   From: Riaan Oberholzer
  [mailto:[EMAIL PROTECTED]
   Sent: woensdag 25 februari 2004 8:18
   To: Tag Libraries Users List
   Subject: RE: JSTL fmt:formatDate bug ???
   
   
Could you post the code to manually format the
  date?
I can easily compare that to what is being done
  by
the JSTL implementation and give you some
  feedback
on that.
   
   Something to the extend of:
   
   static
   {
   SimpleDateFormatter sdf = new
   SimpleDateFormatter(-MM-dd HH:mm); 
  
 
 sdf.setTimeZone(TimeZone.getTimeZone(Europe/London);
   }
   
   user inputs time in above format in jsp, then I
  do:
   
   sdf.parseDate(inputtedDate) and do a getTime and
  then
   create a java.sql.Timestamp with the long value
  and
   put that in the DB. Mysql displays is as one hour
   later, the Dutch time, which is expected.
   
   When displaying it manually, I use the same sdf
  above
   and do something like:
   
   sdf.formatDate(new
  Date(resultSet.getTimestamp(time).getTime())).
   
   Not 100% sure, as I do not have the code with me,
  but
   somthing to this extend. The sdf is a static in a
   singleton utility class.
   
   And, as I said, it only gets messed up after DST
  kicks
   in. Maybe Europe/London is somehow (wrongly)
   interpreted as GMT?
   
PS Thanks for hosting your application in our
  fine
little country:)
   
   I live here, but I'm not Dutch.  :)
   
   
   
   __
   Do you Yahoo!?
   Yahoo! Mail SpamGuard - Read only the mail you
  want.
  http://antispam.yahoo.com/tools
  
 
 -
  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]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want. 
http://antispam.yahoo.com/tools

-
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: JSTL fmt:formatDate bug ???

2004-02-25 Thread Martin van Dijken
I'd suggest to try it first in order to see if this accomplishes
anything at all toward fixing the time. I'll try to help you sort out
the other business if necessary later...

Martin

 -Original Message-
 From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] 
 Sent: woensdag 25 februari 2004 12:17
 To: Tag Libraries Users List
 Subject: RE: JSTL fmt:formatDate bug ???
 
 
  fmt:setLocale value=nl_NL/
  fmt:formatDate value=${obj}
  timeZone=Europe/London type=time/
 
 I want to keep the language english... possible? IE,
 say that we are in The Netherlands, but work in
 English ... otherwise it will try to locate Dutch
 resource bundles which ain't there.
 
 And should the locale indicate the country where the
 server is situated (NL), or the country from where the 
 application is operated (UK)?
  
  Personally I've found the whole Locale business very
 
  confusing and illogical to work with, but
  that's just my personal frustration.
 
 You're not alone - I feel the same. The TimeZone class
 in JDK is much clearer and easier to use. Throwing in
 the language issue when you work in plain English apps
 is confusing.
 
 
  
  Martin
  
   -Original Message-
   From: Riaan Oberholzer
  [mailto:[EMAIL PROTECTED]
   Sent: woensdag 25 februari 2004 10:48
   To: Tag Libraries Users List
   Subject: RE: JSTL fmt:formatDate bug ???
   
   
   I'm a bit lost here can you give me an example
  of
   what I should give to jstl to print the time as Europe/London ?
   
   Thanks
   
   Charl
   
   
   --- Martin van Dijken [EMAIL PROTECTED]
  wrote:
Hey Riaan,

Try fiddling around with setting the locale in
  JSTL.
In your example
code you create a SimpleDateFormat with a
  pattern as argument. JSTL
uses the constructor with a Locale as additional parameter.

Grtz,

Martin

 -Original Message-
 From: Riaan Oberholzer
[mailto:[EMAIL PROTECTED]
 Sent: woensdag 25 februari 2004 8:18
 To: Tag Libraries Users List
 Subject: RE: JSTL fmt:formatDate bug ???
 
 
  Could you post the code to manually format
  the
date?
  I can easily compare that to what is being
  done
by
  the JSTL implementation and give you some
feedback
  on that.
 
 Something to the extend of:
 
 static
 {
 SimpleDateFormatter sdf = new SimpleDateFormatter(-MM-dd 
 HH:mm);

   
  
 
 sdf.setTimeZone(TimeZone.getTimeZone(Europe/London);
 }
 
 user inputs time in above format in jsp, then
  I
do:
 
 sdf.parseDate(inputtedDate) and do a getTime
  and
then
 create a java.sql.Timestamp with the long
  value
and
 put that in the DB. Mysql displays is as one
  hour
 later, the Dutch time, which is expected.
 
 When displaying it manually, I use the same
  sdf
above
 and do something like:
 
 sdf.formatDate(new
Date(resultSet.getTimestamp(time).getTime())).
 
 Not 100% sure, as I do not have the code with
  me,
but
 somthing to this extend. The sdf is a static
  in a
 singleton utility class.
 
 And, as I said, it only gets messed up after
  DST
kicks
 in. Maybe Europe/London is somehow (wrongly) interpreted as 
 GMT?
 
  PS Thanks for hosting your application in
  our
fine
  little country:)
 
 I live here, but I'm not Dutch.  :)
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you
want.
http://antispam.yahoo.com/tools

   
  
 
 -
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]

   
   
   __
   Do you Yahoo!?
   Yahoo! Mail SpamGuard - Read only the mail you
  want.
  http://antispam.yahoo.com/tools
  
 
 -
  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]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want. 
http://antispam.yahoo.com/tools

-
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: mail mysteriously not sent by mailer taglib

2004-02-25 Thread Martin van Dijken
Hey Derek and Jurjan-Paul,

It is true that there are SMTP servers which deny mail forwarding based
on invalid emails. What is however more likely is that the from-address
is being accepted by your SMTP server. When your SMTP server tries to
forward it to the recipient, one of the SMTP servers in the line to the
recipient denies the mail-address. At this point I have to start
guessing, but I think it is returned to the SMTP server that you used to
forward your mail. Your SMTP server however can't send the from-person
an email that processing failed, because the from-address was a dud. 

What I always do, is use a definitely valid emailaddress as the from,
and set the reply-to header to the address that was entered on the
website.

Good luck!

Martin van Dijken

 -Original Message-
 From: Derek Haidle [mailto:[EMAIL PROTECTED] 
 Sent: woensdag 25 februari 2004 15:22
 To: Tag Libraries Users List
 Subject: Re: mail mysteriously not sent by mailer taglib 
 
 
 Since you mentioned that the from address might be the 
 problem, I've found that you shouldn't list more than one 
 address in the from line (it happens quite a bit) and you 
 should make sure the from email address actually does exist.
  
 The other thing that might be stopping your email from being 
 delivered is spam filters.  It's amazing sometimes how much 
 legitimate email is trapped by spam filters, although they 
 are getting better.
  
 I'm interested to see if anyone else has better logging 
 techniques as I have had little luck in tracking down errors 
 that might be occuring in the delivery of email.
  
 Thanks!
 Derek
 
 
 Jurjan-Paul Medema [EMAIL PROTECTED] wrote:
 Hello list,
 
 I am using the mailer taglib, mainly to be able to generate 
 the message 
 body from a jsp.
 
 However, I find that in a number of cases my mails are simply 
 not sent 
 and I don't receive any notification of that (neither by mail, in web 
 output, nor in the logs). So, I guess that counts as 2 problems.
 
 I am hoping somebody can help me pinpoint what is going 
 wrong. (Preferred solution: increasing a log4j log level.)
 
 I am using the tag inside the tag, but no error is 
 detected here.
 I also have mail.smtp.dsn.notify turned on for 
 SUCCESS,FAILURE,DELAY, but I only receive notification in case the 
 message was sent/delivered successfully, so that doesn't help a lot.
 
 From a number of attempts, I expect the reason that some of 
 my messages 
 are not sent has to do with the 'from' address I give them. 
 Still, if the SMTP server rejects the 'from' address, I would like to 
 have some Exception thrown that I can at least log...
 
 (Unfortunately, I don't have access to the SMTP logs... yet)
 
 Am I missing something?
 
 Thanks, Yours,
 Jurjan-Paul
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want.
 


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



RE: Indexed properties struts 1.0

2004-02-24 Thread Martin van Dijken
Hey Niall,

Please direct your question to the Struts-user list. This list is for
discussions of the non-struts taglibraries.

Grtz,

Martin

 -Original Message-
 From: Niall Lynch [mailto:[EMAIL PROTECTED] 
 Sent: dinsdag 24 februari 2004 13:29
 To: [EMAIL PROTECTED]
 Subject: Indexed properties struts 1.0
 
 
 Hi All,
 
 I am restricted to using struts 1.0 at the moment and have 
 run into a problem with indexed properties. 
 
 I have an ActionForm with a member variable of an array of 
 userProducts. I am having trouble updating the properties of 
 each user product that is in the page.
 
 What type of setter/getter do i need for the array in the 
 form. The dynaForm of 1.1 seems to deal with this transparently.
 
 In my JSP I have 
 
 logic:iterate name=userProductsForm property=userProducts 
 indexId=i  type=userprofile.presentation.UserProducts
  tr
td
input type=text  name=userProductsForm 
 property='%=userProductsAt[+i+].name % /
/td
  /tr
.
.
.
  /logic:iterate
 
 This generates the followiung html for that element:
 
 input type=text name=userProductsForm 
 property=userProductsAt[0].name /
 
 
 
 In the UserProductsForm I have a method that returns the 
 userProducts for a particular index
 
 public UserProduct getUserProductsAt(int index)
 {
 retrun this.userProducts[index];
 }
 
 When I submit the form the array in the form is not being 
 updated, I presume it's because there is no setter on the 
 form for the userProducts array that corresponds to the 
 format used in the jsp page.  Have you any ideas on how to do 
 this.  I'm not allowed to move to struts 1.1, as our 
 application server does not support it.
 
 
 Best Regards,
 
 Niall Lynch.
 
 
 
 Now a low fare airline. Low Fares. Way Better.
 Visit http://www.aerlingus.com
 **
 *
 This email and any files transmitted with it are confidential 
 and intended solely for the use of the individual or entity 
 to whom they are addressed.  Any review, dissemination or 
 other use of, or taking of any action in reliance upon, this 
 information by persons or entities other than the intended 
 recipient is prohibited.If you have received this email in 
 error please notify the sender immediately and delete the material.
 **
 *
 
 
 -
 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: jstl editor

2004-02-24 Thread Martin van Dijken
Hey Lorenzo,

Check out Lomboz or MyEclipse for JSP Eclipse plugins. Lomboz is open
source and therefore free, but I've found it to be slightly buggy.
MyEclipse (www.myeclipseide.org) costs $30 and is far more stable. There
are other options, check them at www.eclipse-plugins.info

Good luck,

Martin

 -Original Message-
 From: Lorenzo Sicilia [mailto:[EMAIL PROTECTED] 
 Sent: dinsdag 24 februari 2004 15:06
 To: Tag Libraries Users List
 Subject: jstl editor
 
 
 Hi to the list,
 
 Does exist a jstl editor?
 In dw mx there is a small support, just code hint.
 An ecplipse plug-in it would be a good point :)
 
 Regard Lorenzo Sicilia
 
 
 -
 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: jstl editor

2004-02-24 Thread Martin van Dijken
In Myeclipse version 2.7 there is code completion support for taglibs in
general. If you include the JSTL taglibrary in your project and use a
%@ taglib referring to it, all tags that follow it are syntax colored
according to the tld. Also, when you use the key to start code
completion, it lists the available tags or the available attributes of
the current tag. Excellent stuff

Martin

 -Original Message-
 From: Lorenzo Sicilia [mailto:[EMAIL PROTECTED] 
 Sent: dinsdag 24 februari 2004 15:30
 To: Tag Libraries Users List
 Subject: Re: jstl editor
 
 
 Martin van Dijken wrote:
 
  Hey Lorenzo,
  
  Check out Lomboz or MyEclipse for JSP Eclipse plugins. 
 Lomboz is open 
  source and therefore free, but I've found it to be slightly buggy. 
  MyEclipse (www.myeclipseide.org) costs $30 and is far more stable. 
  There are other options, check them at www.eclipse-plugins.info
 
 I have tried both but there isn't support for the jstl.Are 
 there recent 
 change?
 Now, I try your link
 
 Regards Lorenzo
 
 -
 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: JSTL fmt:formatDate bug ???

2004-02-24 Thread Martin van Dijken
Hey Riaan,

Could you post the code to manually format the date? I can easily
compare that to what is being done by the JSTL implementation and give
you some feedback on that.

Grtz,

Martin

PS Thanks for hosting your application in our fine little country:)

 -Original Message-
 From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] 
 Sent: dinsdag 24 februari 2004 22:18
 To: [EMAIL PROTECTED]
 Subject: JSTL fmt:formatDate bug ???
 
 
 I have an application that runs in The Netherlands,
 but is operated from England. Date/times are thus
 stored and converted with a dateformatter set with the
 Timezone Europe/London. It looks fine. Ie, I enter a
 time as 15:00 (UK time) and in the database it shows
 16:00 (Dutch time) which is expected. Reading and
 displaying it back also works, EXCEPT when I use JSTL
 and 
 
 fmt:formatDate timeZone=Europe/London ...
 
 When daylight savings kick in (start of April I
 think), the times are showed 1 our behind when
 displaying it with JSTL. When formatting it manually
 with my dateformmater, it is correct again. Ie, I
 enter a time as 15:00, it shows in the DB as
 16:00, but JSTL shows it as 14:00. Formatting
 'manually' shows the correct 15:00 time.
 
 Is this a bug? Or is there something else I need to do
 to get this right?
 
 Thanks
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want. 
http://antispam.yahoo.com/tools

-
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: problem with premature end of file

2004-02-23 Thread Martin van Dijken
Hey Jason,

I'm a little confused on what you're trying to accomplish. You have an
XML document that you wish to post to a certain location? Could you
describe in more detail the exact steps you are trying to perform in a
logical order? Let me take a guess.

What it looks like is that you obtain an XML document somewhere. This
XML document you post to a location using io:http. This location parses
the XML and then returns something else. Do you get the below exception
in the file that parses the XML? 

If so, keep in mind that when doing a io:http, this actually triggers
another HTTP Request to your server. The variable you have set before
that called $jobdom is not going to be available, since you've put that
into the pagecontext. When your xml parser starts running it gets a
whole new set of pageContext, request and response.

Grtz,

Martin

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: maandag 23 februari 2004 19:41
 To: [EMAIL PROTECTED]
 Subject: RE: problem with premature end of file
 
 
 I was able to get this stack trace from one of the pages
 that fails. In the calling page I get the result
 using c:set var=jobdom value=${requestScope.ereplydom}/
 
 It like the c:out makes it real when used and sets this to 
 null when not. Just a guess.
 
 [Fatal Error] :-1:-1: Premature end of file.
 Variable Unresolvable :$jobdom
 org.apache.taglibs.standard.tag.common.xml.UnresolvableExcepti
 on: $jobdom
   at 
 org.apache.taglibs.standard.tag.common.xml.XPathUtil$JstlVaria
 bleContext.not
 Null(Unknown Source)
   at 
 org.apache.taglibs.standard.tag.common.xml.XPathUtil$JstlVaria
 bleContext.get
 VariableValue(Unknown Source)
   at 
 org.apache.taglibs.standard.tag.common.xml.XPathUtil.adaptPara
 msForXalan(Unk
 nown Source)
   at 
 org.apache.taglibs.standard.tag.common.xml.XPathUtil.valueOf(U
 nknown Source)
   at 
 org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStart
 Tag(Unknown
 Source)
   at 
 org.apache.jsp.WEB_002dINF.pages.jobsearch.jobdetailview_jsp._
jspx_meth_x_ou
 t_0(jobdetailview_jsp.java:580)
   at 
 org.apache.jsp.WEB_002dINF.pages.jobsearch.jobdetailview_jsp._
jspx_meth_c_ca
 tch_0(jobdetailview_jsp.java:342)
   at 
 org.apache.jsp.WEB_002dINF.pages.jobsearch.jobdetailview_jsp._
jspService(job
 detailview_jsp.java:120)
   at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:3
 11)
   at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:301)
   at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(Application
 FilterChain.java:284)
   at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterCh
 ain.java:204)
   at 
 org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
 ionDispatcher.
 java:748)
   at 
 org.apache.catalina.core.ApplicationDispatcher.doInclude(Appli
 cationDispatch
 er.java:634)
   at 
 org.apache.catalina.core.ApplicationDispatcher.include(Applica
 tionDispatcher
 .java:544)
   at 
 org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntime
 Library.java:1
 002)
   at
 org.apache.jasper.runtime.PageContextImpl.include(PageContextI
 mpl.java:626)
   at
 org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.
 java:137)
   at 
 org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
   at
 org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
   at 
 org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTa
 g(InsertTag.ja
 va:881)
   at
 org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
   at 
 org.apache.jsp.WEB_002dINF.pages.layout.layout_jsp._jspx_meth_
tiles_insert_2
 (layout_jsp.java:215)
   at 
 org.apache.jsp.WEB_002dINF.pages.layout.layout_jsp._jspService
 (layout_jsp.ja
 va:108)
   at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:3
 11)
   at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:301)
   at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(Application
 FilterChain.java:284)
   at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterCh
 ain.java:204)
   at 
 org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
 ionDispatcher.
 java:748)
 

RE: where is jstl download link

2004-02-23 Thread Martin van Dijken
Hey Lorenzo,

The Jakarta taglib can be found when you navigate on the jakarta site to
the section Downloads - Binaries. In the section release builds here
you can click on Taglibs - Library Releases. This shows a directory
listing of a mirror of apache. In this directory you should find a
directory named standard ( which is JSTL 1.1 ) and standard-1.0 ( which
is JSTL 1.0 ).

Greetz,

Martin

 -Original Message-
 From: Lorenzo Sicilia [mailto:[EMAIL PROTECTED] 
 Sent: maandag 23 februari 2004 20:31
 To: Tag Libraries Users List
 Subject: where is jstl download link
 
 
 I search a stable versione of jstl 1.1
 In jakarta website I had found nightly  version.
 I don't understan if jstl 1.1 is stable or under 
 construction. I can use 
 it in a production project?
 
 Regard Lorenzo Sicilia
 
 
 
 -
 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: stored procedures and database pooling

2004-02-11 Thread Martin van Dijken
 Not exactly sure what you mean by database pooling, but:

I'd have to think you probably mean connection pooling. In most cases I
would use a datasource for obtaining a connection in the first place and
then leave the connection pooling up to the Container. Tomcat does this
through DBCP and although I noticed some bugs in the past, things seem
to be working pretty good with Tomcat 5.0.

 http://www.google.com/search?q=stored+procedure*+taglib
 
 I'm pretty sure Jakarta's DBTags taglib does not support 
 stored procedures. DB taglibs may also be provided by your DB 
 supplier. Sorry, I don't have any specific recommendations. 
 Of course, there are plenty of folks who will want to stone 
 you for even *thinking* about accessing a stored procedure 
 from a taglib...and they may be right ;-).

I'd definitely be one to doubt that way of codng, but still... If JSTl
has support for SQL updates, then there must be some people who agree
that it is useful to do this kind of thing from JSP/taglibs. Anyway, I
looked into it, because I was curious myself. Neither JSTL nor DBTags
references CallableStatement anywhere, which is ?? the only way to call
a stored procedure from java??

What I think is possible however, is the usage of views, since these can
be queried as if they were regular tables. Does that solve your problem?

Martin


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



RE: Problems with c:forEach and c:redirect

2004-02-11 Thread Martin van Dijken
Hey Stephen,

When using tags, you always keep spacing between the tags. The body of a
c:forEach is often used for displaying output, so it has to output
everything between it's tags. In your case that's only whitespace and
newlines, but they still get output. What you might want to try is set
the page buffer size a bit larger, so that your computation can always
complete without flushing the buffer.

Try:

%@ page buffer=sizekb% 

According to spec, size normally reads 8 making the buffer 8kb. Try a
larger size and see if that fixes the problem.

Grtz,

Martin

PS Put that statement at the top of your page...

 -Original Message-
 From: Stephen Letschin [mailto:[EMAIL PROTECTED] 
 Sent: donderdag 12 februari 2004 6:30
 To: Tag Libraries Users List
 Subject: RE: Problems with c:forEach and c:redirect
 
 
 You are correct that the code is only doing computation (or 
 at least that is all I want it to be doing). What I don't get 
 is if that is the case, why are there any newlines being 
 generated at all and shouldn't any that are be buffered and 
 not committing a response?
 
 On Wed, 11 Feb 2004, Karr, David wrote:
 
  So the code above the redirect is only doing computation, 
 and is not 
  intentionally generating output, correct?  You might have 
 to make your 
  code look ugly to prevent emitting newlines.  As the number 
 of items 
  you have to iterate through gets larger, the computation-only loop 
  will be generating more newlines.
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 11, 2004 11:27 AM
  To: [EMAIL PROTECTED]
  Subject: Problems with c:forEach and c:redirect
 
 
  I am having a strange problem with the c:forEach tag in conjuction 
  with c:redirect. I am using the Standard 1.0.4 taglib on a WebLogic 
  7.0SP2 container.
 
  The problematic code is below (sorry if it formats strangely in 
  email). I save the various roles into a session-scoped variable 
  named userRoles. It is a string and always starts with a 
 comma. If I 
  have more than 21 roles in this string, any c:redirect I have below 
  the code below refuses to work and I get a message in my logs about 
  the response already being committed.
 
  Anyone have any ideas?
 
  --- Code Below 
 
  c:forEach var=userRole items=${userRoles}
  c:choose
  c:when test=${userRole == 'DEVELOPER'}
  c:set var=accessDevGranted value=TRUE /
  /c:when
  c:when test=${userRole == 'SECRETARIAT'}
  c:set var=accessSecGranted value=TRUE /
  /c:when
  c:when test=${GroupAbbrevs.rowCount  0}
  c:forEach
  var=row
  items=${GroupAbbrevs.rows}
  varStatus=rowStatus
  c:set var=fgl value=FGL_${row.abbrev} /
  c:set var=fgsl value=FGSL_${row.abbrev} /
  c:if test=${userRole == fgl || userRole == fgsl}
  c:set var=accessFGGranted value=TRUE /
  c:set var=lead_count 
 value=${lead_count + 1} /
  c:set
  var=lead_list
  value=${lead_list},${row.abbrev} /
  /c:if
  /c:forEach
  /c:when
  /c:choose
  /c:forEach
 
  --- End of code ---
 
  Stephen Letschin
  [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]
 
 
 --
 --
 Stephen Letschin   Life is hard -- Bring 
 your brain.
 [EMAIL PROTECTED]
  -- Jim Peak
 
 
 -
 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: Does anyone know of a good file manager...

2004-02-09 Thread Martin van Dijken
Hey Jim,

There's nothing exactly like this at Apache. I know of two taglib that
might be capable of what you want:

http://www.xephyrus.com/taglibs/
http://www.windgazer.nl/projects/FileTagLib/

In my opinion the windgazer taglib is more suited to your needs, since
Xephyrus' taglib is intended mainly at modifying files. Contact the
author of the windgazer taglibs for a download.

Good luck,

Martin

 -Original Message-
 From: Jim Kennedy [mailto:[EMAIL PROTECTED] 
 Sent: maandag 9 februari 2004 4:15
 To: 'Tag Libraries Users List'
 Subject: Does anyone know of a good file manager...
 
 
 JSP tag lib? 
 
 I want to display a list of files to the end user much like 
 MS explorer. The files will be located in a directory on the 
 server.  The user will only be able to read and download the 
 files.  They will not be able to navigate, delete or edit.
 
 Thanks
 
 
 -
 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: escapeXml() optimizations

2004-02-09 Thread Martin van Dijken
 The simplest optimization would be to create the 'sb' buffer 
 at least as big as the 'input' string.  After all, even if 
 there were no actual substitutions, the 'sb' would be as big, 
 and this would avoid StringBuffer doing a lot of 
 reallocations, especially if 'input' is more than the 16 
 characters, the default capacity of a StringBuffer.  This 
 could be accomplished with just something like:

Smart, and doesn't require much effort. Does this save a lot of time?

 A more sophisticated optimization would require two loops.  
 The first would look very much like the existing loop, but no 
 'sb' StringBuffer would be created until one of the special 
 characters was found.  The gamble is that the string 
 contains no characters to be escaped, no extra objects would 
 be created.  It would look something like:
 
 public static String escapeXml(String input) {
 StringBuffer sb = null;
 int length = input.length();
 int currentPos;
 for (int currentPos = 0; currentPos  length; currentPos++) {
 char c = input.charAt(currentPos);
 if (c == '') {
 sb = new StringBuffer(length+4);
 sb.append(input.substring(0,currentPos)); // 
 copy over the string up until we found this char
 sb.append(amp;);
 break;
 }
 else if (c == '') {
 
 sb = new StringBuffer(length+3);
 sb.append(input.substring(0,currentPos)); // 
 copy over the string up until we found this char
 sb.append(lt;);
 
 break;
 }
 else if (c == '') {
 
 sb = new StringBuffer(length+3);
 sb.append(input.substring(0,currentPos)); // 
 copy over the string up until we found this char
 sb.append(gt;);
 
 break;
 }
 else if (c == '') {
 
 sb = new StringBuffer(length+5);
 sb.append(input.substring(0,currentPos)); // 
 copy over the string up until we found this char
 sb.append(#034;);
 
 break;
 }
 else if (c == '\'') {
 
 sb = new StringBuffer(length+5);
 sb.append(input.substring(0,currentPos)); // 
 copy over the string up until we found this char
 sb.append(#039;);
 
 break;
 }
 
 }
 
 // If we didn't create a new buffer, then the input 
 string didn't need any escaping so we win big time
 // and we can just return the same string they gave 
 us (no object creation, no copying).
 if ( sb == null )
  return input;
 
 // Oh well, we did have some escaping to do, so let's 
 check the rest to see if there are any more to do.
 for ( ++currentPos; currentPos  length; ++currentPos) {
 char c = input.charAt(currentPos);
 if (c == '')
 sb.append(amp;);
 else if (c == '')
 sb.append(lt;);
 else if (c == '')
 sb.append(gt;);
 else if (c == '')
 sb.append(#034;);
 else if (c == '\'')
 sb.append(#039;);
 else
 sb.append(c);
 }
 return sb.toString();
 }

Try it simpler:

public static String escapeXml(String input) {
StringBuffer sb = null;
int length = input.length();
int currentPos;

//Check if there are any special characters to escape
for (currentPos = 0; currentPos  length; currentPos++) {
char c = input.charAt(currentPos);
if (c == '' || c == '' || c == '' || c == '' || c ==
'\'') {
sb = new StringBuffer(length);
sb.append(input.substring(0,currentPos)); // copy over
the string up until we found this char
break;
}
}

// If we didn't create a new buffer, then the input string
didn't need any escaping so we win big time
// and we can just return the same string they gave us (no
object creation, no copying).
if ( sb == null )
 return input;

// Oh well, we did have some escaping to do, so let's check the
rest to see if there are any more to do.
for (; currentPos  length;++currentPos) {
char c = input.charAt(currentPos);
if (c == '')
sb.append(amp;);
else if (c == '')
sb.append(lt;);
else if (c == '')
sb.append(gt;);
else if (c == '')
sb.append(#034;);
else if (c == '\'')
sb.append(#039;);
else
sb.append(c);
}
return sb.toString();
}

Martin


-
To unsubscribe, e-mail: [EMAIL 

RE: formatDate with session

2004-01-28 Thread Martin van Dijken
Hey zsolt,

Yes it can. Try:

fmt:formatDate pattern=${session_variable_name}/

Where you replace session_variable_name by the attributename in the
session under which you placed the pattern.

Grtz,

Martin

 -Original Message-
 From: Zsolt Koppany [mailto:[EMAIL PROTECTED] 
 Sent: woensdag 28 januari 2004 9:28
 To: Tag Libraries Users List
 Subject: fmt:formatDate with session
 
 
 Hi,
 
 can fmt:formatDate take the pattern from a session variable? 
 In the case I could make it user dependent.
 
 Zsolt
 
 
 
 
 
 -
 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: Tag to Unescape an HTML String?

2004-01-26 Thread Martin van Dijken
Hey Jim and Dan,

The URLDecoder.decode method decodes a URLEncoding. This is the encoding
browsers do when you type for instance a spacechar in the location bar,
the browser replaces it with %20. This is definitely not the same thing
as HTML encoding in which you would replace the char  by amp;.
URLDecoding is definitely not a solution for your current issue. I've
never found a generic solution, but that is not to say there isn't one.

Concerning your page layout issues, I'd definitely advise you to take a
look at Tiles. It works very well with struts as a plugin, but as I
understand it can function standalone as well. 

http://jakarta.apache.org/struts/userGuide/dev_tiles.html

Good luck!

Martin van Dijken

 -Original Message-
 From: James Watkin [mailto:[EMAIL PROTECTED] 
 Sent: zaterdag 24 januari 2004 2:01
 To: Tag Libraries Users List
 Subject: RE: Tag to Unescape an HTML String?
 
 
 A little while ago I tried the Apache Jakarta String TagLib 
 str:decodeUrl. It gave me the following error: URLDecoder: 
 Illegal hex 
 characters in escape (%) pattern - For input string: a. As 
 you suggest, 
 maybe the length of my body HTML String was too long to be 
 passed as a param.
 
 - Jim
 
 At 04:45 PM 1/23/2004 -0800, you wrote:
 java.net.URLDecoder.decode() will decode such a string.
 You could create a simple tag that called the method
 if you want.  Be aware that some servers are unhappy with really big 
 URLs.
 - Dan
 
   -Original Message-
   From: James Watkin [mailto:[EMAIL PROTECTED]
   Sent: Friday, January 23, 2004 2:47 PM
   To: [EMAIL PROTECTED]
   Subject: Tag to Unescape an HTML String?
  
  
   I have a question regarding the following problem and proposed 
   solution: Within a JSP, what would be the most efficient way to
   unescape an HTML
   string? The Regexp tag library? I've managed to avoid 
 writing regular
   expressions for a long time.
  
   Problem:
   I'm creating some reusable JSP templates that are chained 
 together 
   with c:import. I'm trying to solve the well known problem of
   having to create
   two new JSPs for every new page -- one for the new page body,
   the other to
   import the master page layout and pass the URL of the new
   page body JSP.
  
   Proposed Solution:
   Rather than pass the master page layout a URL for the body JSP, I 
   can eliminate the body JSP by passing in the body as a 
 String. If my 
   master page layout is within the same container, then I can use
   c:set and not
   have to worry about unescaping the body String. However, I'd
   prefer (I
   think) to have the master page layout live outside the container,
   especially since the JSTL spec notes that foreign context
   access within the
   same container might not be supported by all containers. If
   the master page
   layout JSP is outside the container of the importing JSP,
   then the body
   HTML String has to be passed with c:param, which escapes
   the string. So
   I'll need to unescape it be I can use it.
  
   - Jim
  
   __
   James Watkin
   ACIS Software Development
   The Anderson School at UCLA
   [EMAIL PROTECTED]
   Voice: 1-310-825-5030
  Fax: 1-310-825-4835
   __
  
  
   
 
   -
   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]
 
 __
 James Watkin
 ACIS Software Development
 The Anderson School at UCLA
 [EMAIL PROTECTED]
 Voice: 1-310-825-5030
Fax: 1-310-825-4835
 __ 
 
 
 -
 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: xtags, xsl, xml, jsp

2003-12-10 Thread Martin van Dijken
Hey Tridev,

Try using the standard taglib instead of the xtags taglib. Standard is 
just that, the JSTL standard and I'm not 100% certain xtags is still 
being maintained.

Grtz,

Martin

Tridev Kodamasingh wrote:

Hi,

I am trying to apply xslt  to a xml document through xtags inside a jsp
page.
I am using the foolwing tag for the purpose.
	xtags:style xml=/xml/workorder.xml  xsl=/xml/workorder.xsl  / 

For this to work, as per the documentation in
http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html,
I  have downloaded xalan.jar, crimson.jar and jaxp-api.jar ( which comes
with java web services pack 1.3).
But all the time, get the following  error.
	org.apache.jasper.JasperException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException: stylesheet requires 	attribute:
version 
If I add a semicolon at the end of 
	xmlns:xsl='http://www.w3.org/TR/WD-xsl'
 then it gives other error tellin that whitespace is required before
attribute.

1. Is there any dependencies between particular versions of xtag, xalan ,
crimpson and jaxp ??
2. Am I doing something wrong here ?? (hopefully not.. :))
Would appreciate a lot , if any clue can be given to me on this ..
my style sheet starts with this . note that xsl is not complete by anymeans.
workorder.xsl
?xml version='1.0'?
   xsl:stylesheet  xmlns:xsl='http://www.w3.org/TR/WD-xsl'  version='2.0'
   xsl:script LANGUAGE=JavaScript![CDATA[
   var oldtimeslotid = 0;
   function IsUniqueTimeslot(node) {
   var newtimeslotid;
   newtimeslotid = node.getAttribute(ID);
   if (newtimeslotid != oldtimeslotid){
   oldtimeslotid = newtimeslotid;
   return true;
   }
  else{
  return false;
  }
 }
]]/xsl:script

  xsl:template match=/

	HTML

SCRIPT LANGUAGE=JavaScript
xsl:comment
![CDATA[
var g_flag = 0;
function Down() {
}
  ]]
/xsl:comment
/SCRIPT
STYLE
TD {font-size:10pt}
/STYLE
	   TITLEWorkorder Information/TITLE

   BODY BACKGROUND=/dimension/images/backgrnd.gif
onMouseDown=clearrightclick() onMouseOut=window.status='NOTHING';
TABLE  BORDER=0 CELLPADDING=3 CELLSPACING=0
TH  bgcolor=#77AADD color=#FFFONT
SIZE=4 COLOR=WHITE FACE=arialDetails/FONT/TH
/TABLE
BR /
xsl:apply-templates/
   /BODY
/HTML
  /xsl:template

Thanks
Tridev






-
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: xtags, xsl, xml, jsp

2003-12-10 Thread Martin van Dijken
No Problem, I'll put a post in the devlist on whether or not xtags is 
still being maintained. Let you know if something comes out.

Martin

Tridev Kodamasingh wrote:

Thanks a lot Martin.
But xtags provides a lot of features over jstl tags, which was the reason
for me to look at xtags.
yes, I don't see much usage of xtags over net.
Anyway.. thanks a lot for ur time.
-Original Message-
From: Martin van Dijken [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 9:28 AM
To: Tag Libraries Users List
Subject: Re: xtags, xsl, xml, jsp
Hey Tridev,

Try using the standard taglib instead of the xtags taglib. Standard is 
just that, the JSTL standard and I'm not 100% certain xtags is still 
being maintained.

Grtz,

Martin

Tridev Kodamasingh wrote:


Hi,

I am trying to apply xslt  to a xml document through xtags inside a jsp
page.
I am using the foolwing tag for the purpose.
	xtags:style xml=/xml/workorder.xml  xsl=/xml/workorder.xsl  / 

For this to work, as per the documentation in
http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html,
I  have downloaded xalan.jar, crimson.jar and jaxp-api.jar ( which comes
with java web services pack 1.3).
But all the time, get the following  error.
org.apache.jasper.JasperException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException: stylesheet requires
attribute:

version 
If I add a semicolon at the end of 
	xmlns:xsl='http://www.w3.org/TR/WD-xsl'
then it gives other error tellin that whitespace is required before
attribute.

1. Is there any dependencies between particular versions of xtag, xalan ,
crimpson and jaxp ??
2. Am I doing something wrong here ?? (hopefully not.. :))
Would appreciate a lot , if any clue can be given to me on this ..
my style sheet starts with this . note that xsl is not complete by
anymeans.

workorder.xsl
?xml version='1.0'?
  xsl:stylesheet  xmlns:xsl='http://www.w3.org/TR/WD-xsl'
version='2.0'

  xsl:script LANGUAGE=JavaScript![CDATA[
  var oldtimeslotid = 0;
   function IsUniqueTimeslot(node) {
   var newtimeslotid;
  newtimeslotid = node.getAttribute(ID);
   if (newtimeslotid != oldtimeslotid){
   oldtimeslotid = newtimeslotid;
   return true;
  }
  else{
  return false;
 }
 }
]]/xsl:script

 xsl:template match=/

	HTML

SCRIPT LANGUAGE=JavaScript
   xsl:comment
   ![CDATA[
var g_flag = 0;
function Down() {
}
 ]]
   /xsl:comment
   /SCRIPT
STYLE
TD {font-size:10pt}
/STYLE
	   TITLEWorkorder Information/TITLE

   BODY BACKGROUND=/dimension/images/backgrnd.gif
onMouseDown=clearrightclick() onMouseOut=window.status='NOTHING';
TABLE  BORDER=0 CELLPADDING=3 CELLSPACING=0
TH  bgcolor=#77AADD color=#FFFONT
SIZE=4 COLOR=WHITE FACE=arialDetails/FONT/TH
/TABLE
BR /
xsl:apply-templates/
   /BODY
/HTML
 /xsl:template

Thanks
Tridev






-
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]
_
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning
Services - powered by MessageLabs. For further information visit
http://www.mci.com
-
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: jstl transform question

2003-12-08 Thread Martin van Dijken
Never tried that, but if I'm not mistaken XSL has a mechanism built-in
to retrieve parameters passed from anywhere when the stylesheet is
loaded. Check out the http://www.w3schools.com xsl tutorial and
reference for more info.

Martin

  wrote:

 when i write the code below:
 x:transform xml=${xml} xslt=${xslt}
 x:param name=gg value=0/
 /x:transform
 
 my question is what the param useage here,how can i
 get the param in xsl file?
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 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:out and default - question on code.

2003-12-08 Thread Martin van Dijken
Hey Antony,

Create a Tag class and make sure it has a method setDefault(String 
default) Then make sure you add the attribute default to your tag's tld 
description.

Martin

Antony Paul wrote:

Hi,
I tried to write a tag handler class which have an attribute default.
But javac wont compile it. Then how the c:out default works. How I could do
the same ?
rgds
Antony Paul
-
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: Indexing variables

2003-12-05 Thread Martin van Dijken
Hey Nic,

First of all if you have some concrete code, please supply it. Helps a 
lot in understanding exactly what you mean...

   I have an outlet table in my database, and each outlet has a color.
Typically, an outlet has three colors, meaning three entries with the
same outlet name, different info and different color.
I am creating an 'Update/Edit' page that has a forTokens loop to edit all
three colors on the same page
c:forTokens items=B,O,G delims=, var=color

that queries the database for that color and displays the information
about it
Problem:
I want to pass over this to another page that will take the
information and for the correct color, do an SQL update ie:
 update outlet set blah where outlet='###' and color='RESPECTIVE COLOR'

- Since the 'select' tags all have the same name, I thought about using a
paramValues loop and iterate through each one, but I would need a seperate
array for colors and have it iterate each time, how do I do that in JSTL?
What 'select' tags?

- I also thought about throwing the color into the select tag:

input type=text name=c:out value =${color}/switch value=c:out
value=${result.rows[0].switchip}/
and doing the same on the other end, which did not work:

sql:param value=${param.c:out value=${color}/switch}/
This is a simple one. Using c:out in a html statement will work. On 
the server, the c:out is parsed and the web browser just sees the 
value it created. In the sql:param however, this cannot work. The JSP 
parser has to parse both the c:out and the sql:param. So you cannot 
nest tags within tags. What might work would be:

sql:param value=${param.color}switch/

Or is there some way that I'm too frazzled to see?
Think the above way will work nicely, but you could also put the color 
you're currently editing in the session using c:set/ and then retrieve 
it using c:out or something.

G'Luck!

Martin

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


Re: JSTL XML Parsing

2003-12-05 Thread Martin van Dijken
Hey Vinela,

Please post the relevant part of your JSP and XML. I'm not 100% sure, 
but it looks like there's no XML parser in your web application. Or that 
it has some errors. Tomcat 4.1 definitely bundles it along, but it might 
be that that wasn't the case yet with 4.0. Either try 4.1 or put the jar 
files that come with the JSTL distribution in your WEB-INF/lib directory.

Hope that helps,

Martin

Vinela pothineni wrote:

I am trying to parse an xml file in my JSP using the
JSTL xml tags . I am getting the following exception.
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal
Server Errortype Exception reportmessage Internal
Server Errordescription The server encountered an
internal error (Internal Server Error) that prevented
it from fulfilling this request.exception
javax.servlet.ServletException:
org/jaxen/NamespaceContext
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
 at
org.apache.jsp.jsp1$jsp._jspService(jsp1$jsp.java:151)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
 at java.lang.Thread.run(Thread.java:536)
root cause java.lang.NoClassDefFoundError:
org/jaxen/NamespaceContext
 at
org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(ExprSupport.java:101)
 at
org.apache.taglibs.standard.tag.el.xml.ExprTag.doStartTag(ExprTag.java:103)
 at
org.apache.jsp.jsp1$jsp._jspService(jsp1$jsp.java:102)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at

Re: JSTL XML Parsing

2003-12-05 Thread Martin van Dijken
Hey Vinela,

Little rusty on my XPath, so except for the $a//c I'm certain your JSP 
is correct. Try downloading and installing Tomcat standalone and 
deploying your web application to that. This might be a JBuilder issue.

Martin

Vinela pothineni wrote:

Hi,

I am using JBuilder9 and I just included the JSTL tag
library.This is the JSP I am using
%@ taglib prefix=x
uri=http://java.sun.com/jstl/xml; %
html
head
  titleJSTL: XML Support -- Parse / Out/title
/head
body bgcolor=#FF
h3Parse / Out/h3
x:parse var=a
  a
   b
c
 foo
/c
   /b
   d
 bar
   /d
  /a
/x:parse
x:out select=$a//c/
x:out select=$a/a/d/
hr /

/body
/html
If I try to use tomcat 4.1 I am getting the following
error
StandardWrapper[:invoker]: Loading container servlet
invoker
Dec 5, 2003 3:17:32 AM
org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080

Compile failed; see the compiler error output for
details.
at
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
at
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
	at java.lang.Thread.run(Thread.java:536)

-Vinela



--- Martin van Dijken [EMAIL PROTECTED] wrote:

Hey Vinela,

Please post the relevant part of your JSP and XML.
I'm not 100% sure, 
but it looks like there's no XML parser in your web
application. Or that 
it has some errors. Tomcat 4.1 definitely bundles it
along, but it might 
be that that wasn't the case yet with 4.0. Either
try 4.1 or put the jar 
files that come with the JSTL distribution in your
WEB-INF/lib directory.

Hope that helps,

Martin

Vinela pothineni wrote:


I am trying to parse an xml file in my JSP using
the

JSTL xml tags . I am getting

Re: Calling a bean method in c:out/

2003-12-05 Thread Martin van Dijken
Hey Antony,

Try using the c:forEach tag. It loops each item of lists, arrays etc.

Martin

Antony Paul wrote:
Hi all,
How to call a method of a bean which returns an Object from c:out/
tag. I have JSTL Standard 1.0 in a Tomcat 4.1.27. I am using commons
beanutils class RowSetDynaClass to display data in JSP pages.
In servlet
List list = rsdc.getRows();
request.setAttribute(list,list);
In JSP I have to code like this
List list = (List) request.getAttribute(list);
Iterator it = list.iterator();
while(it.hasNext()){
   DynaBean bean = (DynaBean) it.next();
out.print(bean.get(empno));
}
How to do it using JSTL Standard 1.0.

rgds

Antony Paul

-
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: Calling a bean method in c:out/

2003-12-05 Thread Martin van Dijken
Hey Antony,

It is correct that that gives an error. You see it is impossible to call 
 methods in the Expression Language of JSTL. If your bean-class 
implements java.util.Map however, it is possible to get the item you 
want by using:

c:forEach var=i items=${list}
 c:out value=${i[empno]}/br
/c:forEach
Grtz,

Martin

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


Re: Calling a bean method in c:out/

2003-12-05 Thread Martin van Dijken
Hey Antony,

You've got it wrong there. The solution for your simple example is this:

%@ page import=java.util.*%
%@ taglib uri=/WEB-INF/c.tld prefix=c%
Sample using JSTL Core tagsbr
%
 Map map = new HashMap();
 map.put(name,Anto Paul);
 map.put(Place,Ollur);
 map.put(Job,Programmer);
 request.setAttribute(list,map);
%
c:forEach var=i items=${list}
  c:out value=${i.key}:${i.value}/br
/c:forEach
This will print a name:AntoPaulbrPlace:Ollurbr etc. To get back to 
your original question, this might be solved if your DynaBeans are 
instances of Map in the following way:

Servlet:
List list = rsdc.getRows();
request.setAttribute(list,list);
JSP:
c:forEach var=i items=${list}
  c:out value='${i[empno]}'/
/c:forEach
Lucky I had a few minutes to spare;) I usually just scream read the spec:)

Martin

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


Re: XML Doc type problem

2003-11-27 Thread Martin van Dijken
[EMAIL PROTECTED] wrote:
I found the following post but there was no answer. Does anyone know?

I have created a JSP page that use the xml tag library, specifically using
xpath. Everything works perfectly fine as long as I don't have a doctype
definition like the following in my XML instance:
!DOCTYPE datasheet PUBLIC -//Innovtech//DTD datasheet//EN
c:/dtds/innovtech/datasheet.dtd
If I remove it, life is great, but if I don't, I get a java error like 
this:

Hey David,

please post your error. Anyway, PUBLIC datatypes are intended so one use 
the same XML at a number of locations with one dtd at a central 
location. Placing your dtd locally at least sounds strange. You might 
wanna try

!DOCTYPE datasheet SYSTEM c:/dtds/innovtech/datasheet.dtd

I'm confident that will at least work...

Martin

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


Re: Random Taglib crashes every fourth time?

2003-11-18 Thread Martin van Dijken
Hey Eric,

Sounds like something is not reset after use. Can you post your code and 
in particular the usage of Random?

Martin

[EMAIL PROTECTED] wrote:

Hi

I just downloaded the Random taglib, and when I try the example application,
it crashes exactly every fourth time when I hit the browser's refresh
button. Here's the stack trace:
java.lang.ArrayIndexOutOfBoundsException: 30
at
org.apache.taglibs.random.RandomStrgTag.setCharset(RandomStrgTag.java:336)
at
org.apache.jsp.random_jsp._jspx_meth_rand_string_5(random_jsp.java:302)
at org.apache.jsp.random_jsp._jspService(random_jsp.java:187)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)
Best regards,
Eric
P.S. I use Tomcat 4.1.24

-
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: is this link correct?

2003-10-21 Thread Martin van Dijken
Hey Wallace,

I can't figure out your message entirely, it's a bit cryptic. Do you mean you're 
looking for ${param[VariableName]}  ??

Martin

 -Original Message-
 From: Wallace [mailto:[EMAIL PROTECTED]
 Sent: maandag 20 oktober 2003 20:13
 To: 'Tag Libraries Users List'
 Subject: RE: is this link correct?
 
 
 I've got almost the same problem, my tomcat is 4.0.3 so therefore it
 would be for JSP 1.2, but my script uses ${param.var} for EL and I use
 c:choosec:when test=${param.var eq 'whatever'}do
 whatever/c:when/c:choose
 
 I want to use ${param.var} as the way I would for core_rt in 
 tomcat 5. I
 tested in tomcat 5, but the server I am uploading only uses tomcat
 4.0.3, would you guys know a work around for this?
 
 
 -Original Message-
 From: Mark R. Diggory [mailto:[EMAIL PROTECTED] 
 Sent: Monday, October 20, 2003 12:40 PM
 To: Tag Libraries Users List
 Subject: Re: is this link correct?
 
 Doh, My bad, your correct.
 
 Kris Schneider wrote:
 
  You shouldn't need anything in web.xml
  
  JSP 1.2 / JSTL 1.0:
  http://java.sun.com/jstl/core
  
  JSP 2.0 / JSTL 1.1:
  http://java.sun.com/jsp/jstl/core
  
  And make sure the necessary JAR files are in WEB-INF/lib...
  
  Quoting Mark R. Diggory [EMAIL PROTECTED]:
  
  
 Are you adding the taglib mapping to your web.xml?
 
 for example
 
taglib
  taglib-urihttp://java.sun.com/jstl/core/taglib-uri
  taglib-location/WEB-INF/tld/c.tld/taglib-location
/taglib
 
 
 David Liles wrote:
 
 
 I am trying to use jstl and when I include the following line in my
 JSP I
 
 get an error indicating it can not find the uri
 
  
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 
 Is this link even valid?
 
 -- 
 Mark Diggory
 Software Developer
 Harvard MIT Data Center
 http://www.hmdc.harvard.edu
  
  
 
 -- 
 Mark Diggory
 Software Developer
 Harvard MIT Data Center
 http://www.hmdc.harvard.edu
 
 
 -
 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]



RE: Calling HTTPS URL with IO

2003-10-10 Thread Martin van Dijken
Hey Hassan,

I was aware of the fact taht there were several extra steps necessary to get an HTTPS 
connection, but not that it required this much code in the page. This makes the use of 
IO very impractical for this use case. Now it would seem to be a very good idea to put 
this code in the tag itself, but I wonder if that is possible at all. I see a lot of 
Sun in the code you wrote, is that code that is dependant on a Sun JVM?

Grtz,

Martin

 -Original Message-
 From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
 Sent: donderdag 9 oktober 2003 18:23
 To: Tag Libraries Users List
 Subject: Re: Calling HTTPS URL with IO
 
 
 Benedetto Dell'Ariccia wrote:
 
  I'm still trying to call a HTTPS URL with the IO TAGLIB, 
 
 Sorry, missed this earlier.
 
 The IO taglib works, but you need to prep your environment first;
 here's a sample that should get you started...
 
 %@ page
  import = javax.servlet.http.*,
  java.io.*,
  javax.net.ssl.*,
  java.security.cert.X509Certificate,
  java.security.cert.*,
  java.security.KeyStore,
  java.security.Provider,
  java.util.*
  errorPage = oops.jsp
 %
 %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; 
 prefix=io %
 %
  try
  {
  KeyStore ks = KeyStore.getInstance(JKS,SUN);
  ks.load(new 
 FileInputStream(/path/to/cacerts), null);
  TrustManagerFactory myFactory;
  myFactory = 
 TrustManagerFactory.getInstance(SunX509);
  myFactory.init(ks);
 
  SSLContext ctx;
  ctx = SSLContext.getInstance(SSL);
  ctx.init(null, myFactory.getTrustManagers(), null);
  
 HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
 
  }
  catch (Exception noSSLConnectionAvailable)
  {
  
 System.out.println(noSSLConnectionAvailable.getMessage());
  /* noSSLConnectionAvailable needs to divert 
 to an error page,
   * since we can't process the transaction this way.
   */
  }
 %
 
 
 io:http url=https://secure.example.com/program;
   action=POST input=true output=true
 
 
 ... and Bob's y'r uncle  :-)
 
 HTH!
 -- 
 Hassan Schroeder - [EMAIL PROTECTED]
 Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
 
dream.  code.
 
 
 
 
 -
 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: Calling HTTPS URL with IO

2003-10-10 Thread Martin van Dijken
Ah Benny!

Now you tell us the exact Exception ;) I've noticed before that a lot of older scripts 
still assume that the - character is not allowed in domain names. We had an email 
checker that barfed on it. This is probably the case here as well. Can anybody from 
dev confirm this? And possibly fix it?:)

Martin

 -Original Message-
 From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED]
 Sent: vrijdag 10 oktober 2003 9:41
 To: Tag Libraries Users List
 Subject: Re: Calling HTTPS URL with IO
 
 
 Hi Hassan,
 tnx for the help but, I show you this code, in this code 
 there are 3 calls
 with the IO taglib to 3 different HTTPS servers, the first 
 one is the one
 that does not work,
 I had to put xxx and , the others works correctly without 
 any other
 codeyou can try.is this correct?
 
 The error message for the first call is:
  org.apache.jasper.JasperException: HTTPS hostname wrong:  should be
 
 
 Tnx a lot!
 Benny
 
 
 -CODE
 %@ page import=java.net.* ,java.io.* %
 %@ taglib uri=http://jakarta.apache.org/taglibs/xtags-1.0; 
 prefix=xtags
 %
 %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; 
 prefix=io %
 htmlbody
 
 
  io:http url=https://add-on-as1.tb.tiscali.it:443/xxx/y;
 action=GET/
 
 
  io:http url=https://www.payonline.it/ext; action=POST 
 input=true
 output=true/
  io:http url=https://www.playsecureserver1.com:443; /
 
 
 /body/html
 END CODE
 
 
 
 
 
 
 
 
 
 
 - Original Message - 
 From: Hassan Schroeder [EMAIL PROTECTED]
 To: Tag Libraries Users List [EMAIL PROTECTED]
 Sent: Thursday, October 09, 2003 6:22 PM
 Subject: Re: Calling HTTPS URL with IO
 
 
  Benedetto Dell'Ariccia wrote:
 
   I'm still trying to call a HTTPS URL with the IO TAGLIB,
 
  Sorry, missed this earlier.
 
  The IO taglib works, but you need to prep your environment first;
  here's a sample that should get you started...
 
  %@ page
   import = javax.servlet.http.*,
   java.io.*,
   javax.net.ssl.*,
   java.security.cert.X509Certificate,
   java.security.cert.*,
   java.security.KeyStore,
   java.security.Provider,
   java.util.*
   errorPage = oops.jsp
  %
  %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; 
 prefix=io %
  %
   try
   {
   KeyStore ks = KeyStore.getInstance(JKS,SUN);
   ks.load(new 
 FileInputStream(/path/to/cacerts), null);
   TrustManagerFactory myFactory;
   myFactory = 
 TrustManagerFactory.getInstance(SunX509);
   myFactory.init(ks);
 
   SSLContext ctx;
   ctx = SSLContext.getInstance(SSL);
   ctx.init(null, myFactory.getTrustManagers(), null);
 
  
 HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
 
   }
   catch (Exception noSSLConnectionAvailable)
   {
 
 System.out.println(noSSLConnectionAvailable.getMessage());
   /* noSSLConnectionAvailable needs to 
 divert to an error
 page,
* since we can't process the transaction this way.
*/
   }
  %
 
 
  io:http url=https://secure.example.com/program;
  action=POST input=true output=true
 
 
  ... and Bob's y'r uncle  :-)
 
  HTH!
  -- 
  Hassan Schroeder - [EMAIL PROTECTED]
  Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
 
 dream.  code.
 
 
 
 
  
 -
  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]



RE: Calling HTTPS URL with IO

2003-10-09 Thread Martin van Dijken
Well, when reading the tags documentation I notice the output= attribute for the 
http tag. If that is not set to true, the output is ignored.

Cheers,

Martin

 -Original Message-
 From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED]
 Sent: donderdag 9 oktober 2003 11:49
 To: Tag Libraries Users List
 Subject: Re: Calling HTTPS URL with IO
 
 
 I'm trying somethnig like this, i have to call https servlet 
 that should
 response with an xml that i have to parse!
 I'm sorry but this is just my third post in this ML! :)
 Tnx!
 
 
 %@ taglib uri=http://jakarta.apache.org/taglibs/xtags-1.0; 
 prefix=xtags
 %
 %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; 
 prefix=io %
 htmlbody
 
  xtags:parse id=docByURL3
 
  io:http url=https://myurl; action=POST
 
  io:param name=brand value=epg/
  io:param . /
  io:param . /
  io:param . /
  io:param . /
  io:param . /
 
  /io:http
 
  /xtags:parse
  xtags:variable id=normalizedxml3 select=EPAY/
 
 
 /body/html
 - Original Message - 
 From: Martin van Dijken [EMAIL PROTECTED]
 To: Tag Libraries Users List [EMAIL PROTECTED]
 Sent: Thursday, October 09, 2003 11:44 AM
 Subject: RE: Calling HTTPS URL with IO
 
 
 Hey Benedetto,
 
 If you don't get an answer then nobody on the list has a clear concise
 answer for you. I'll try to help you though, could you post 
 the code that is
 causing trouble?
 
 What you can try is put a portlistener on the https port to see if the
 request actually gets there.
 
 Martin
 
  -Original Message-
  From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED]
  Sent: donderdag 9 oktober 2003 11:38
  To: [EMAIL PROTECTED]
  Subject: Calling HTTPS URL with IO
 
 
  I'm still trying to call a HTTPS URL with the IO TAGLIB, no
  logs errors, the browser still waiting untill.
 
  Can someone help me?
 
  Benny
 
 
 -
 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]



RE: Calling HTTPS URL with IO

2003-10-09 Thread Martin van Dijken
Does it output anything at all if you don't put it between xtags?

 -Original Message-
 From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED]
 Sent: donderdag 9 oktober 2003 12:12
 To: Tag Libraries Users List
 Subject: Re: Calling HTTPS URL with IO
 
 
 I'm tring this way but it doesn't seems to work, anyway I've 
 just used this
 script with HTTP (NO HTTPS) URL and it works correctly!
 
 io:http url=https://www.fineco.it/fineco/PortaleLogin; action=POST
 input=true output=true/
 
 Tnx a lot.
 
 - Original Message - 
 From: Martin van Dijken [EMAIL PROTECTED]
 To: Tag Libraries Users List [EMAIL PROTECTED]
 Sent: Thursday, October 09, 2003 11:56 AM
 Subject: RE: Calling HTTPS URL with IO
 
 
 Well, when reading the tags documentation I notice the 
 output= attribute
 for the http tag. If that is not set to true, the output is ignored.
 
 Cheers,
 
 Martin
 
  -Original Message-
  From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED]
  Sent: donderdag 9 oktober 2003 11:49
  To: Tag Libraries Users List
  Subject: Re: Calling HTTPS URL with IO
 
 
  I'm trying somethnig like this, i have to call https servlet
  that should
  response with an xml that i have to parse!
  I'm sorry but this is just my third post in this ML! :)
  Tnx!
 
 
  %@ taglib uri=http://jakarta.apache.org/taglibs/xtags-1.0;
  prefix=xtags
  %
  %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0;
  prefix=io %
  htmlbody
 
   xtags:parse id=docByURL3
 
   io:http url=https://myurl; action=POST
 
   io:param name=brand value=epg/
   io:param . /
   io:param . /
   io:param . /
   io:param . /
   io:param . /
 
   /io:http
 
   /xtags:parse
   xtags:variable id=normalizedxml3 select=EPAY/
 
 
  /body/html
  - Original Message - 
  From: Martin van Dijken [EMAIL PROTECTED]
  To: Tag Libraries Users List [EMAIL PROTECTED]
  Sent: Thursday, October 09, 2003 11:44 AM
  Subject: RE: Calling HTTPS URL with IO
 
 
  Hey Benedetto,
 
  If you don't get an answer then nobody on the list has a 
 clear concise
  answer for you. I'll try to help you though, could you post
  the code that is
  causing trouble?
 
  What you can try is put a portlistener on the https port to 
 see if the
  request actually gets there.
 
  Martin
 
   -Original Message-
   From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED]
   Sent: donderdag 9 oktober 2003 11:38
   To: [EMAIL PROTECTED]
   Subject: Calling HTTPS URL with IO
  
  
   I'm still trying to call a HTTPS URL with the IO TAGLIB, no
   logs errors, the browser still waiting untill.
  
   Can someone help me?
  
   Benny
  
 
  
 -
  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]
 
 
 
 
 -
 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: Calling HTTPS URL with IO

2003-10-09 Thread Martin van Dijken
Weird,

Anyway, thanks for trying your hunches. If the problem you had is still reproducable, 
it might be worth the time to investigate it further. Personally, I couldn't care 
less. If the problem is solved for you, it's fine by me:)

Martin

 -Original Message-
 From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED]
 Sent: donderdag 9 oktober 2003 15:35
 To: Tag Libraries Users List
 Subject: Re: Calling HTTPS URL with IO
 
 
 Hi Martin,
 I don't know write the code you said if you have a short 
 example I'll be
 grateful,
 anyway teh problem could be the kind of file that I'm 
 calling, I'm calling a
 Servlet,
 
 I tried with other 3 dots URL  and the taglib works correctly!
 
 Benny
 
 - Original Message - 
 From: Martin van Dijken [EMAIL PROTECTED]
 To: Tag Libraries Users List [EMAIL PROTECTED]
 Sent: Thursday, October 09, 2003 1:11 PM
 Subject: RE: Calling HTTPS URL with IO
 
 
 Benny,
 
  Hi Martin, I think the problem is with URL with 3 dots like
  https://www.xxx.yyy.zz
  but I have not others URLs like this to try, do you know
  others URLs like
  this?
 
 Pfew no, try amazon and some other sites that have a login 
 service which
 might go through https.
 
  How can I know if there is a  bug in the taglib?
 
 Well, If you can create a servlet yourself, in it create a
 java.net.HttpUrlConnection. Then call connect, getContent and 
 disconnect. If
 this succeeds with your 3-dotted URL, something might be wrong in the
 taglib. Otherwise, there is another error, possibly the JDK.
 
 Martin
 
 -
 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]



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]



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: TagExtraInfo on getVariableInfo() - can't get parent information?

2003-10-06 Thread Martin van Dijken
  1. Define the TEI within the inner-loop
  2. Have the scripting variables set to null by the TEI
  3. In the startTag() method of inner-loop look up the 
 variables using
 findAncestorWithClass()
  4. Set the TEI variables to their new values
 
 This would be perfect, except on number 1 the inner TEI 
 wouldn't have access
 to the pageContext, or the parent tag's attributes.  
 Therefore, they can't
 define the variable(s) without a desired name.

Why not define all possible variables? You have to define which can be present in your 
tld, so you have to know which you can possibly encounter.

Martin

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



RE: TagExtraInfo on getVariableInfo() - can't get parent information?

2003-10-03 Thread Martin van Dijken
Hey Lukas,

I'm not entirely certain what you're asking. Do you want to know how to pass info from 
the tag to the inner-loop? If you're programming the inner-loop tag yourself, you can 
simply do a findAncestorWithClass(this, MyTag.class) in the innerloop class. This 
presents you with the instance of the parent whom you can query for the information 
that was given to it.

If not, please clarify your problem a little further.

Grtz,

Martin

 -Original Message-
 From: Lukas Bradley [mailto:[EMAIL PROTECTED]
 Sent: vrijdag 3 oktober 2003 16:43
 To: [EMAIL PROTECTED]
 Subject: TagExtraInfo on getVariableInfo() - can't get parent
 information?
 
 
 Hi all, I want to do this:
 
 my:tag array=myArray var=myName type=mycompany.MyObjectType
my:header
   ...
/my:header
 
my:inner-loop %-- LOOP PERFORMED HERE --%
   ...
/my:inner-loop
 /my:tag
 
 Where the object, a translation-time variable name, and 
 object type are
 defined in a parent tag, and the actual loop is performed 
 within a child
 tag.   In the example above, my:tag references the array and the
 translation-time information.  The my:inner-loop tag will 
 iterate over the
 array after certain header information is displayed.
 
 I'm sure some of you are asking, why not do this?
 
 my:tag
my:header
   ...
/my:header
 
my:inner-loop array=myArray var=myName
 type=mycompany.MyObjectType
/my:inner-loop
 /my:tag
 
 Please assume there are other things going on within these 
 tags, and it
 helps with readability if the array is declared within the parent.
 
 So-- the TagExtraInfo class, its getVariableInfo() method, 
 and the TagData
 object are all ignorant to the parent information.  Is there 
 a way around
 this?  I'm presently using J2EE 1.3.1, but the 1.4b2 API offers no new
 features.
 
 Thanks for any and all help.
 
 Lukas
 
 
 
 
 -
 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: Is there a tag to create an absolute URL from a relative one?

2003-10-02 Thread Martin van Dijken
Hey KC,

Just checked the 1.0 spec and it doesn't look like it. Also, the other jakarta taglibs 
don't seem to support this. It is of course possible to do this yourself using the 
c:out tag. What you described can be rewritten to:

c: out 
value=${request.scheme+request.serverName+request.serverPort+request.contextPath}/c:url
 value=/main.jsp/

Granted it isn't a very elegant solution, but if you have some experience in writing 
tags yourself you could of course write a tag like this yourself. If you stick to the 
design regulations for jakarta taglibs and post it to the taglibs dev list, they'll 
probably accept your help with a lot of gratitude:)

Grtz,

Martin

 -Original Message-
 From: K.C. Baltz [mailto:[EMAIL PROTECTED]
 Sent: woensdag 1 oktober 2003 6:30
 To: Tag Libraries Users List
 Subject: Is there a tag to create an absolute URL from a relative one?
 
 
 Is there anyway to make the c:url tag generate an absolute 
 URL, given 
 a relative URI?  Or perhaps another tag? 
 
 For example, if I had a file main.jsp in the root of my 
 webapp, I'd like 
 the following mock tag:
 
 c:url value=/main.jsp absolute=true /
 
 to produce the following result
 
 http://myserver:port/servletContext/main.jsp
 
 I can do this by hand using 
 request.get[Scheme|ServerName|ServerPort|ContextPath](), so it seems 
 like a tag should be able to do it.
 
 K.C.
 
 
 -
 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: Need Help Getting Taglibs Working

2003-10-02 Thread Martin van Dijken
Hey Deepak,

Looks like you have a taglibrary in there somewhere that has an incorrect or missing 
!DOCTYPE declaration in it's tld file. The DOCTYPE is required to be correct by the 
XML parser so it can check if you have the syntax of your XML-file(in your case 
tld-file) correct.

Grtz,

Martin


 -Original Message-
 From: deepaksawdekar [mailto:[EMAIL PROTECTED]
 Sent: donderdag 2 oktober 2003 10:48
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Need Help Getting Taglibs Working
 
 
 Hello,
 I am facing a problem while starting tomcat with struts and 
 JSTL. I read all the mail for reply to your mail in the 
 taglibs-user list. But was more confused. Can you please help 
 me to recetify the problem.
 
 I am getting the same error which you got. 
 org.xml.sax.SAXParseException: Document root element 
 taglib, must match DOCTYPE root null.
 
 I am using tomcat 4.1.12 
 my dir structure is as follows.
 
 web-inf /
   /c-1_0.tld
   /display.tld
   /struts-bean.tld
   /struts-html.tld
   /struts-html-el.tld
   /struts-logic.tld
   /struts-nested.tld
   /struts-template.tld
   /struts-tiles.tld
 
 web-inf/lib/
   /struts.jar
   /standard.jar
   /arm-3.0.jar
   /blf-client.jar
   /commons-beanutils.jar
   /commons-collections.jar
   /commond-dbcp.jar
   /commons-digester.jar
   /commons-lang.jar
   /commons-logging.jar
   /commons-pool.jar
   /commons-services.jar
   /commons-validator.jar
   /jcs.jar
   /jmxri.jar
   /jmxtools.jar
   /jstl.jar
   /struts-el.jar
 
 
 And I had a following taglib entry in web.xml
 
   !-- Struts Tag Library Descriptors --
   taglib
 taglib-uri/tags/struts-bean/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/tags/struts-html/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib
   
   taglib
   taglib-uri/tags/struts-html-el/taglib-uri
   taglib-location/WEB-INF/struts-html-el.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/tags/struts-logic/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/tags/struts-nested/taglib-uri
 taglib-location/WEB-INF/struts-nested.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/tags/struts-template/taglib-uri
 taglib-location/WEB-INF/struts-template.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/tags/struts-tiles/taglib-uri
 taglib-location/WEB-INF/struts-tiles.tld/taglib-location
   /taglib
 
   
   taglib
 taglib-uri/tags/c/taglib-uri
 taglib-location/WEB-INF/c-1_0.tld/taglib-location
   /taglib
   
   !-- Pagination Tag Library Descriptors --
   taglib
 taglib-uri/tags/display/taglib-uri
 taglib-location/WEB-INF/display.tld/taglib-location
   /taglib
 /web-app
 
 
 
 
 
 
 -
 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: JSTL / fmt locale question

2003-10-01 Thread Martin van Dijken
Hey Dima,

Could you post a little more source of your JSP page? This looks OK to me, so I'd need 
a little more information to check what's going wrong.

Grtz,

Martin

 -Original Message-
 From: Dima Gutzeit [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 30 september 2003 21:40
 To: [EMAIL PROTECTED]
 Subject: JSTL / fmt locale question
 
 
 Hi everybody ,
 
 Recently I've encountered a very annoying behavior of fmt 
 taglib (JSTL).
 
 I am using some bundle ,called audioLabels to localize some 
 messages in my JSP/VXML application. The problem is that I 
 CAN not change the locale it uses, no matter what I do with 
 the fmt:setLocale tag. It uses the default file 
 audioLablels.properties file or the default system language 
 file audioLablels_us.properties file. The application seems 
 to ignore my statements such this :
 
 fmt:setLocale value=${settingsQuery.rows[0].AudioLanguage} 
 scope=session/
 
 Where the settingsQuery.rows[0].AudioLanguage == ru , for example.
 
 Does anybody know why can this happen ? I've tried to 
 download the latest taglibs release and nothing helped
 

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



RE: XML ResourceBundles

2003-10-01 Thread Martin van Dijken
Hey Keyur,

I'm not certain since I don't have a test setup, but try the following:

Have your XMLResourceBundle class print out super.getLocale() in the handleGetObject() 
method. What you need to know is whether super.getLocale() returns the desired Locale 
(fr) or the default Locale since it couldn't find the fr class nor the fr properties. 
If the getLocale() call returns the desired Locale(in your example fr), then you've 
got something to go by. 

I'm not 100% certain, but I'm afraid things won't work this way and then I think it 
simply is impossible to create what you describe. The framework is quite clear and 
rather simple and has no public or protected methods to indicate anything can be done.

Greetz,

Martin

 -Original Message-
 From: Keyur Shah [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 30 september 2003 1:35
 To: '[EMAIL PROTECTED]'
 Subject: XML ResourceBundles
 
 
 I want to localize my messages using XML files. Now, I want 
 to have only one
 MyXMLResourceBundle (which extends ResourceBundle) as such:
 
 
 
 
 public class MyXMLResourceBundle extends ResourceBundle {
 
 
private Locale locale;
 
 
public MyXMLResourceBundle(Locale locale) {
 
 
   this.locale = locale;
 
 
   //load resources from an XML file based on the locale
 
 
}
 
 
//override ResourceBundle.getLocale()
 
 
public Locale getLocale() { return this.locale; }
 
 
//other methods
 
 
 }
 
 
 I will be using a combo of JSTL and JSF tags in my 
 application to output
 texts. As per my understanding, both of these taglibs call
 ResourceBundle.getBundle(baseName, locale) to get the 
 appropriate bundle.
 Now, the problem is this:
 
 Say, the locale is french - fr. The getBundle() method tries to find
 MyXMLResourceBundle_fr.class first and then it attempts to find
 MyXMLResourceBundle.properties. Now, I have none of these 
 files in my app.
 (What I have are MyXMLResourceBundle.class and 
 MyXMLResourceBundle_fr.xml
 files.) Since it cannot find the mentioned files; what ends 
 up happening is
 that the getBundle() method always ends up using the same
 MyXMLResourceBundle instance with the default locale.
 
 What I want to see happen is this: for every different locale 
 it should
 create a new instance of MyXMLResourceBundle and use the appropriate
 localized XML file i.e. the ResourceBundle.getBundle() method 
 should call
 the MyXMLResourceBundle(locale) constructor with the 
 appropriate locale.
 
 Now, since I don't have any control over the ResourceBundle 
 methods(!), I'd
 like to know if there is any other way for me to use XML 
 resource bundles
 and make them work with the existing JSTL / JSF tags all the same.
 
 Thanks.
 
 

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



RE: JSTL / fmt locale question

2003-10-01 Thread Martin van Dijken
Hey Dima,

set your Locale first then open your bundle.

Martin

 -Original Message-
 From: Dima Gutzeit [mailto:[EMAIL PROTECTED]
 Sent: woensdag 1 oktober 2003 11:01
 To: Tag Libraries Users List
 Subject: Re: JSTL / fmt locale question
 
 
 Here is a code snippet of bundle declaration in the main JSP 
 file of the
 application :
 
 %-- Creating audio files bundle --%
 fmt:setBundle basename=audioLabels var=audioLabels
 scope=session/
 fmt:setLocale value=${settingsQuery.rows[0].AudioLanguage}
 scope=session/
 
 And here is an example of the usage , another JSP file of the same
 application:
 (Declaration of some VXML variable ...)
 
 var name=message expr='fmt:message bundle=${audioLabels}
 key=message.new.mail/'/
 
 
 Thanks.
 
 - Original Message - 
 From: Martin van Dijken [EMAIL PROTECTED]
 To: Tag Libraries Users List [EMAIL PROTECTED]
 Sent: Wednesday, October 01, 2003 9:46 AM
 Subject: RE: JSTL / fmt locale question
 
 
 Hey Dima,
 
 Could you post a little more source of your JSP page? This 
 looks OK to me,
 so I'd need a little more information to check what's going wrong.
 
 Grtz,
 
 Martin
 
  -Original Message-
  From: Dima Gutzeit [mailto:[EMAIL PROTECTED]
  Sent: dinsdag 30 september 2003 21:40
  To: [EMAIL PROTECTED]
  Subject: JSTL / fmt locale question
 
 
  Hi everybody ,
 
  Recently I've encountered a very annoying behavior of fmt
  taglib (JSTL).
 
  I am using some bundle ,called audioLabels to localize some
  messages in my JSP/VXML application. The problem is that I
  CAN not change the locale it uses, no matter what I do with
  the fmt:setLocale tag. It uses the default file
  audioLablels.properties file or the default system language
  file audioLablels_us.properties file. The application seems
  to ignore my statements such this :
 
  fmt:setLocale value=${settingsQuery.rows[0].AudioLanguage}
  scope=session/
 
  Where the settingsQuery.rows[0].AudioLanguage == ru , for example.
 
  Does anybody know why can this happen ? I've tried to
  download the latest taglibs release and nothing helped
 
 
 -
 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]



RE: html:img swapping image problem

2003-10-01 Thread Martin van Dijken
Hey Koen,

From the 2 questions you've asked I deduce you're working with struts. No offense 
meant here, but this is a mailing list for the Jakarta Taglibs and their 
implementation of JSTL. The taglibs Struts features are a whole different world. You 
might wanna try asking your questions in the Struts mailing list.

Greetz,

Martin

 -Original Message-
 From: koen boutsen [mailto:[EMAIL PROTECTED]
 Sent: woensdag 1 oktober 2003 15:37
 To: Tag Libraries Users List
 Subject: html:img swapping image problem
 
 
 Hi
 
 I use 
 html:img bundle=imageBundle pageKey=img.salesrep.delete /
 and get the image out of a resource file.
 If the cursor moves over the image, I want to switch the 
 image via the onMouseOver event.  
 Does anyone know how I can do this.  The new image has to 
 come out of the resource file.
 
 I searched the archive, but could not find an answer.
 
 Thank you
 
 Koen
   
 
 
 
 Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
 http://login.mail.lycos.com/r/referral?aid=27005
 
 -
 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: LabelTag for Marking Required Fields

2003-09-29 Thread Martin van Dijken
Hey Sheri,

I've been searching the web and can only find this project 
http://www.ehatchersolutions.com/JavaDevWithAnt/ which refers to a LabelTag. Hope that 
helps, but I don't think it particularly has anything to do with the jakarta taglibs.

Martin

 -Original Message-
 From: Gorham, Sheri D [mailto:[EMAIL PROTECTED]
 Sent: zaterdag 27 september 2003 21:26
 To: [EMAIL PROTECTED]
 Subject: LabelTag for Marking Required Fields
 
 
 Hi All,
 
 I was wondering if anyone knew if there exist an example of 
 the LabelTag being used to mark required fields or if anyone 
 knew where I can more information about the LabelTag.
 
 Thanks in Advance
 Sheri
 
 -
 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: JSTL character encoding

2003-09-29 Thread Martin van Dijken
Hey Adam,

The behaviour you describe seems to be according to specifications. I've inlined 
section 8.4 of the spec below. This describes that you cannot use tags that establish 
a Localization context if you want to prevent setLocale being called. I'm guessing 
that's not altogether a big help to you since it seems the taglib becomes a pain in 
the ass more than a convenience, but you can't blame me for that;) 

I'm not 100% certain how well they still work but you might want to give the jakarta 
I18N taglib a shot. I don't think they're in active development any more, but they 
might be just what you need.

Grtz,

Martin

8.4:

Any i18n action that establishes a localization context is responsible for setting the
response's locale of its page, unless the localization context that was established
does not have any locale. This is done by calling method
ServletResponse.setLocale() with the locale of the localization context.
This assumes that the response is buffered with a big enough buffer size, since
ServletResponse.setLocale() and ServletResponse.setContentType()
must be called before ServletResponse.getWriter() in order for the specified
locale or charset to affect the construction of the writer.

It also assumes that the JSP container doesn't call getWriter() until it's about to 
flush the buffer. An errata
has been published for the JSP 1.2 specification to clarify this.

More specifically, the response's setLocale() method is always called by the
fmt:setLocale action (see Section 8.5). In addition, it is called by the following
actions:
Any fmt:bundle (see Section 8.6) and fmt:setBundle (see Section 8.7) 
action.
Any fmt:message action that establishes an i18n localization context
Any formatting action that establishes a formatting locale on its own (see
Section 9.3).

After an action has called ServletResponse.setLocale(), and sessions are
enabled, it must determine the character encoding associated with the response
locale (by calling ServletResponse.getCharacterEncoding()) and store it in
the scoped variable javax.servlet.jsp.jstl.fmt.request.charset in
session scope. This attribute may be used by the fmt:requestEncoding action (see
Section 8.10) in a page invoked by a form included in the response to set the request
charset to the same as the response charset. This makes it possible for the container
to decode the form parameter values properly, since browsers typically encode form
field values using the response's charset.

 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED]
 Sent: zondag 28 september 2003 23:21
 To: Adam Hardy
 Cc: Tag Libraries Users List
 Subject: JSTL  character encoding
 
 
 In  fmt:message key=../ the class 
 ...tag.common.fmt.SetLocaleSupport's method setResponseLocale() is 
 called after fetching the localizationContext and before getting the 
 bundle.
 
 In setResponseLocale(), the response's locale is set via 
 response.setLocale(). This method according to the API also:
 
 Sets the locale of the response, setting the headers (including the 
 Content-Type's charset) as appropriate
 
 thus overwriting what I set with my JSP page contentType= directive.
 
 Would this a bug in Sun's implementation, a bug in 
 MessageTag, or not a 
 bug at all?
 
 I see it as a problem because I cannot control what 
 ServletResponse.setLocale() does to the http headers. A locale is 
 ignorant of the character encoding, so it seems strange taht calling 
 this method should affect the http character encoding header.
 
 I see there's an entry in bugzilla already from a couple of weeks ago:
 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23125
 
 
 
 
 
 On 09/28/2003 05:54 PM Adam Hardy wrote:
  I'm trying to set my pages to UTF-8. I am setting my page 
 directive with:
  
  % page contentType=text/html; charset=UTF-8 %
  
  and so long as I don't use the JSTL fmt taglibs, it works. 
 When I put in 
  something like fmt:message key=general.browserTitle / 
 then UTF-8 is 
  overridden and response content type is set to ISO-8859-1.
  
  On digging around I can't really see obviously in the 
 source when the 
  response.setContentType is called, but I can see that the 
 sessions are 
  getting this attribute set:
  
  javax.servlet.jsp.jstl.fmt.request.charset==ISO-8859-1
  
  although it doesn't seem to be the cause, just another 
 symptom. I have 
  tried fmt:requestEncoding value=UTF-8 / with no success.
  
  I am using a filter in tomcat to set the request encoding 
 anyway, and 
  this is always UTF-8.
  
  I'd appreciate any help on this, I've must have spent about 6 hours 
  trying to nail this glitch.
  
  Thanks
  Adam
  
 
 -- 
 struts 1.1 + tomcat 4.1.27 + java 1.4.2
 Linux 2.4.20 RH9
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


RE: fmt:param not working as expected...

2003-09-26 Thread Martin van Dijken
Hey Billy,

I've got your example working with one little difference, though it may not be 
significant. I've got the value within the param tags instead of as value.

Grtz,

Martin

 -Original Message-
 From: Billy Bacon [mailto:[EMAIL PROTECTED]
 Sent: donderdag 25 september 2003 19:56
 To: Tag Libraries Users List
 Subject: fmt:param not working as expected...
 
 
 I searched the archives and didn't see any issues like this 
 listed. Can
 anyone help me out here?
 
 I original had all struts tags and in my messages.properties 
 file where all
 my localized content is stored I had the following entry...
 
 md.tree.label.feedback1=Can't find the {0}? Mail
 
 Notice the {0} which is a place holder for an argument/parameter...
 
 This was working fine with Struts but the following is not 
 working in JSTL..
 
 fmt:message key=md.tree.label.feedback1
 fmt:param value=xyz/
 /fmt:message
 
 For some reason it's printing out Can't find the {0}? Mail and not
 replacing {0} with 'xyz'...
 
 
 -
 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: xml stysheet probelm -is xtags working ?

2003-09-25 Thread Martin van Dijken
Oh yeah,

Forgot something in my original mail. I noticed that several of the jakarta taglibs 
that have a counterpart in JSTL have been deprecated. I'm not 100% certain this is the 
case with xtags since it seems to have some extra functionality. However, it can never 
hurt to see if you can get by using the standard, which in this case is JSTL.

Martin

 -Original Message-
 From: kpitalrisk [mailto:[EMAIL PROTECTED]
 Sent: woensdag 24 september 2003 21:18
 To: [EMAIL PROTECTED]
 Subject: xml stysheet probelm -is xtags working ?
 Importance: High
 
 
 hi,
 
 i'm trying to use xtags to parse a document. But 
 xtags:applyTemplates /
 doesn't seem to work.
 Any ideas ?
 
 my xml :
 
 ?xml version=1.0 encoding=ISO-8859-1?
 xmldescriptor
 element
 toto200603/toto
 /element
 /xmldescriptor
 
 my stylesheet :
 
 
 xtags:parse id=doc uri=%=request.getParameter(\filename\)%/
 
 xtags:stylesheet 
 
 xtags:template match=element 
 icixtags:applyTemplates / /ici
 
 /xtags:template
 
 xtags:template match=toto 
 working ??
 
 /xtags:template
 
 /xtags:stylesheet
 
 
 The result is :
 
 ici200603 /ici
 
 it should be
 
 iciworking?? /ici
 
 
 Can someone test this ? maybe it's parser version problem.. 
 Or maybe i don't
 use it properly..
 
 Or maybe some have an idea on how to apply a jsp stylesheet ?
 i want to execute JSP taglibs in xsl templates..
 
 any help will be greatly appreciated, i'm spending nights on 
 this problem..
 
 thx
 
 rhapsody
 
 
 -
 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:url generates incorrect encoding?

2003-09-22 Thread Martin van Dijken
Hey Andreas,

I can't verify right now that the c taglib actually does what you say, for lack of 
time. I can confirm however that  signs should at all times be escaped in HTML, also 
when used in a href's. I've run into a similar problem with our product and had to 
look into it myself.

If nobody responds to this, post to the dev-list or directly place a bug in bugzilla.

Grtz,

Martin

 -Original Message-
 From: Andreas Schildbach [mailto:[EMAIL PROTECTED]
 Sent: vrijdag 19 september 2003 11:57
 To: [EMAIL PROTECTED]
 Subject: c:url generates incorrect encoding?
 
 
 Hello everybody,
 
 please have a look at the following JSP/JSTL snippet:
 
 a href=c:url value=action.jsp
  c:param name=param1 value=value1/
  c:param name=param2 value=value2/
 /c:urlaction/a
 
 When requested by an HTTP client, the following response is returned:
 
 a href=action.jsp?param1=value1param2=value2action/a
 
 Is this correct? I think the ampersand between the two 
 parameters should 
 be escaped, for example by using amp;
 
 To be sure, I created a test under 
 http://schildbach.de/test-jstl-c-out.jsp
 
 Please use the W3C validator (http://validator.w3.org/) and enter my 
 test URL, and you will get the 6 errors I attached below.
 
 Am I doing something wrong? Or is it an error of the JSTL 
 implementation?
 
 I am using Tomcat 4.1.27, JDK 1.4.2 and JSTL 1.03
 
 Regards,
 
 Andreas Schildbach
 
 ---
 
 # Line 13, column 81:  cannot generate system identifier for general 
 entity param2
 
...E16EDEC5EAFDA47DCBBB44?param1=value1param2=value2action/a
^
 
 # Line 13, column 81: general entity param2 not defined and 
 no default 
 entity (explain...).
 
...E16EDEC5EAFDA47DCBBB44?param1=value1param2=value2action/a
^
 
 # Line 13, column 87: reference not terminated by REFC delimiter
 
...C5EAFDA47DCBBB44?param1=value1param2=value2action/a
^
 
 # Line 13, column 87: reference to external entity in attribute value
 
...C5EAFDA47DCBBB44?param1=value1param2=value2action/a
^
 
 # Line 13, column 87: reference to entity param2 for which 
 no system 
 identifier could be generated
 
...C5EAFDA47DCBBB44?param1=value1param2=value2action/a
^
 
 # Line 13, column 80: entity was defined here
 
...2E16EDEC5EAFDA47DCBBB44?param1=value1param2=value2action/a
 
 
 
 -
 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: Error in tld

2003-09-22 Thread Martin van Dijken
Try putting the DOCTYPE on one line. The white-space might confuse the xmlparser.

Martin

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: vrijdag 19 september 2003 14:32
 To: Tag Libraries Users List
 Subject: Error in tld
 
 
 
 Now Iam getting this error
 
 The processing instruction must begin with the name of the target
  
 
 Ananth R
 Project Associate
 Electronic Enterprise Laboratory
 Computer Science and Automation
 Indian Institute Of Science
 Bangalore
 
 -
 Phone:(off) 2932368-111
   (cdma)9844140340 
 
 e-mail:[EMAIL PROTECTED]
[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]



Internationalization

2003-09-17 Thread Martin van Dijken
Hey gang,

I've been busy doing I18N for our site using the JSTL internationalisation features. 
What I miss there and could really use is a tag-alternative for the ChoiceFormat 
java-class. If need be I could of course create one of my own, but if there is one 
already I'd really rather use it. Does anybody know of something like that?

Also, are the non-standard I18N taglibs deprecated or something? They're very similar 
to the standard ones, but have different attribs etc.

Greetings,

Martin van Dijken

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



RE: How to get the size of a java.util.List object in EL?

2003-09-17 Thread Martin van Dijken
Hey guys,


I think this can be accomplished although not directly. I must admit it's a terrible 
hack, so decide for yourself if you want to use this. I don't exactly have a test 
situation, so I can't really test this, but try:

c:forEach items=${browseForm.map.colInfoList} begin=0 end=0 varStatus=status
c:out value=${status.count}/
/c:forEach

This only shows the count if there is at least one item in your list, but I think you 
can check for yourself whether something was printed.

Greetz,

Martin

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: woensdag 17 september 2003 13:53
 To: [EMAIL PROTECTED]
 Subject: RE: How to get the size of a java.util.List object in EL?
 
 
 Hi guys
 
 I think this has been discussed in this list about 3.7 
 million times, so
 check out the archives...
 The short answer is: You can't.
 
 Best regards,
 Eric
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED]
 Sent: Mittwoch, 17. September 2003 13:39
 To: Tag Libraries Users List
 Subject: Re: How to get the size of a java.util.List object in EL?
 
 
 Hi Billy,
 
 I don't know about this one. Maybe someone more guru-like 
 will step up 
 with an answer 8-)
 
 I'm not quite sure why EL doesn't like this but I think it's 
 because the 
 List class is not a javabean - presumably EL looks for 
 getSize() rather 
 than the actual size(), but that doesn't explain why it's complaining 
 about an integer.
 
 
 Adam
 
 
 On 09/17/2003 02:19 AM Billy Bacon wrote:
  I need to get the size (as an int) of a java.util.List I have. The
 following
  doesn't work
  
  c:out value=Size = ${browseForm.map.colInfoList.size}/
  
  It gives me the following exception...
  
  ServletException in:/jsp/browseQueueBody.jsp] An error 
 occurred while
  evaluating custom action attribute value with value Size =
  ${browseForm.map.colInfoList.size}: The . operator was 
 supplied with an
  index value of type java.lang.String to be applied to a 
 List or array,
 but
  that value cannot be converted to an integer. (null)'
  
  Does anyone know how I could get the size of the List?
  
  - Billy -
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
 
 -- 
 struts 1.1 + tomcat 4.1.27 + java 1.4.2
 Linux 2.4.20 RH9
 
 
 -
 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]



RE: How to get the size of a java.util.List object in EL?

2003-09-17 Thread Martin van Dijken
Oops,

Guess I spoke a little too fast there. The count does not, like I thought, expose the 
list size, but the count of how many iterations have passed.

Sorry, no go,

Martin

 -Original Message-
 From: Martin van Dijken 
 Sent: woensdag 17 september 2003 14:02
 To: Tag Libraries Users List
 Subject: RE: How to get the size of a java.util.List object in EL?
 
 
 Hey guys,
 
 
 I think this can be accomplished although not directly. I 
 must admit it's a terrible hack, so decide for yourself if 
 you want to use this. I don't exactly have a test situation, 
 so I can't really test this, but try:
 
 c:forEach items=${browseForm.map.colInfoList} begin=0 
 end=0 varStatus=status
   c:out value=${status.count}/
 /c:forEach
 
 This only shows the count if there is at least one item in 
 your list, but I think you can check for yourself whether 
 something was printed.
 
 Greetz,
 
 Martin
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: woensdag 17 september 2003 13:53
  To: [EMAIL PROTECTED]
  Subject: RE: How to get the size of a java.util.List object in EL?
  
  
  Hi guys
  
  I think this has been discussed in this list about 3.7 
  million times, so
  check out the archives...
  The short answer is: You can't.
  
  Best regards,
  Eric
  
  -Original Message-
  From: Adam Hardy [mailto:[EMAIL PROTECTED]
  Sent: Mittwoch, 17. September 2003 13:39
  To: Tag Libraries Users List
  Subject: Re: How to get the size of a java.util.List object in EL?
  
  
  Hi Billy,
  
  I don't know about this one. Maybe someone more guru-like 
  will step up 
  with an answer 8-)
  
  I'm not quite sure why EL doesn't like this but I think it's 
  because the 
  List class is not a javabean - presumably EL looks for 
  getSize() rather 
  than the actual size(), but that doesn't explain why it's 
 complaining 
  about an integer.
  
  
  Adam
  
  
  On 09/17/2003 02:19 AM Billy Bacon wrote:
   I need to get the size (as an int) of a java.util.List I have. The
  following
   doesn't work
   
   c:out value=Size = ${browseForm.map.colInfoList.size}/
   
   It gives me the following exception...
   
   ServletException in:/jsp/browseQueueBody.jsp] An error 
  occurred while
   evaluating custom action attribute value with value Size =
   ${browseForm.map.colInfoList.size}: The . operator was 
  supplied with an
   index value of type java.lang.String to be applied to a 
  List or array,
  but
   that value cannot be converted to an integer. (null)'
   
   Does anyone know how I could get the size of the List?
   
   - Billy -
   
   
   
  
 -
   To unsubscribe, e-mail: 
 [EMAIL PROTECTED]
   For additional commands, e-mail: 
  [EMAIL PROTECTED]
   
   
  
  -- 
  struts 1.1 + tomcat 4.1.27 + java 1.4.2
  Linux 2.4.20 RH9
  
  
  
 -
  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]
 
 

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



RE: dbtags and tomcat 4.1 -- sql:resultset

2003-09-05 Thread Martin van Dijken
Hey Lukasz,

Thanks a lot for the tip, changing my work to c:foreach was easy using JSTL's Result 
and ResultSupport class. Also, the sql:tags look promising.

In the bug I created I put a deprecation request for the dbtags taglib. I think it's 
too stupid the documentation doesn't clrealy report this.

Martin

 -Original Message-
 From: PAZDZIOREK,LUKASZ (HP-Poland,ex1) 
 [mailto:[EMAIL PROTECTED]
 Sent: donderdag 4 september 2003 16:45
 To: Tag Libraries Users List
 Subject: RE: dbtags and tomcat 4.1 -- sql:resultset
 
 
 Hi Martin,
 
 I was using the DBTags and Tomcat 4.1.24 and I encountered 
 the same problem,
 you described, I have also ancountered some other problems 
 with null values.
 
 Please see the answer I received from Morgan Delagrange
 ([EMAIL PROTECTED]):
 
 If you are using a recent implementation of the
 Servlet specification, you should use Apache's
 implementation of the JSTL, not DBTags.  DBTags has
 been inactive since development on JSTL began, and it
 should be considered deprecated for Servlet 2.3 or 2.4
 containers.
 
 - Morgan Delagrange
 
 
 regards,
 Lukasz
 
  -Original Message-
  From: Martin van Dijken [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, September 04, 2003 2:33 PM
  To: Tag Libraries Users List
  Subject: RE: dbtags and tomcat 4.1 -- sql:resultset
  
  
  Glenn,
  
  Are you saying that the dbtags are old tags and therefore 
  do not play nice with JspTag Pooling? 
  
  Martin
  
   -Original Message-
   From: Glenn Nielsen [mailto:[EMAIL PROTECTED]
   Sent: donderdag 4 september 2003 14:34
   To: Tag Libraries Users List
   Subject: Re: dbtags and tomcat 4.1 -- sql:resultset
   
   
   Tomcat 4.1 introduced JSP custom tag pooling in the JSP engine.
   JSP custom tag pooling can improve performance of JSP a great deal
   but the downside is that it can break older JSP tag 
 libraries which
   may have bugs when used this way.  This may be what you are seeing
   with DbTags.
   
   You can disable JSP custom tag pooling by setting the JspSservlet
   init parameter enablePooling to false in your tomcat conf/web.xml.
   
   Regards,
   
   Glenn
   
   
   Mickael Cappozzo wrote:
Hello Martin,

I read your problem, we experienced this behaviour also 
  during the 
testing to understand if I was doing something wrong or not...

We checked also the taglibs sources and we didn't find any 
   answers :-(

However, we used the same dbtags before under tomcat 4.0 
   and it worked, 
but with tomcat 4.1 it doesn't, this is also strange...

Greetings,

Mickal.

Martin van Dijken wrote:

Hey Mickael,
   
I just noticed the exact same thing under totally different 
circumstances. I posted about it and haven't heard from 
   anybody. Has 
nobody else had this?
   
I checked the Jakarta-taglibs cvs and it seems the 
   sql:resultset tag 
is doing everything correctly, although we both know it's not.
   
I've created a new bug in bugzilla and put yours and my 
   message there.
   
check:
http://issues.apache.org/bugzilla/show_bug.cgi?id=22927
   
Greetings,
   
Martin van Dijken
   
 
   
-Original Message-
From: Mickael Cappozzo [mailto:[EMAIL PROTECTED]
Sent: donderdag 4 september 2003 10:50
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: dbtags and tomcat 4.1
   
   
Hello,
   
We wanted to migrate from tomcat 4.0 to tomcat 4.1.24, but we 
encoutered the following problem:
When a query return nothing, the query's body is 
   displayed on the JSP 
page if the page contains another query returning something.
   
example:
In the table Users,  we don't have user with username 
   toto and with 
have a user with username test if we write the 
   following in a jsp 
page:
   
sql:statement id=getUserTest conn=myConn
  %-- THIS QUERY RETURNS THE UserID --%
 sql:query
   SELECT UserID
 FROM Users
 WHERE username = 'test'
 /sql:query
 sql:resultSet id=getUserIDTest
   sql:getNumber position=1 to=userIDTest/
 /sql:resultSet
/sql:statement
   
sql:statement id=getUserToto conn=myConn
  %-- THIS QUERY IS EMPTY --%
 sql:query
   SELECT UserID
 FROM Users
 WHERE username = 'toto'
 /sql:query
 sql:resultSet id=getUserIDToto
   sql:getNumber position=1 to=userIDToto/
 /sql:resultSet
/sql:statement
   
On the page we saw:
   SELECT UserID FROM Users WHERE username = 'toto'
   
We noticed the following: if we add an attribute: loop, 
  scope or 
another existing attribute in the resultSet tag in the 
   empty query, 
the query is not displayed on the JSP page. However if we 
   add this 
attribute to each resultSet tag, the query is displayed...
   
Any idea???
   
-- 
Mickal Cappozzo
[EMAIL PROTECTED

RE: dbtags and tomcat 4.1 -- sql:resultset

2003-09-04 Thread Martin van Dijken
Hey Mickael,

I just noticed the exact same thing under totally different circumstances. I posted 
about it and haven't heard from anybody. Has nobody else had this?

I checked the Jakarta-taglibs cvs and it seems the sql:resultset tag is doing 
everything correctly, although we both know it's not.

I've created a new bug in bugzilla and put yours and my message there.

check:
http://issues.apache.org/bugzilla/show_bug.cgi?id=22927

Greetings,

Martin van Dijken

 -Original Message-
 From: Mickael Cappozzo [mailto:[EMAIL PROTECTED]
 Sent: donderdag 4 september 2003 10:50
 To: 'Tomcat Users List'; [EMAIL PROTECTED]
 Subject: dbtags and tomcat 4.1
 
 
 Hello,
 
 We wanted to migrate from tomcat 4.0 to tomcat 4.1.24, but we 
 encoutered 
 the following problem:
 When a query return nothing, the query's body is displayed on the JSP 
 page if the page contains another query returning something.
 
 example:
 In the table Users,  we don't have user with username toto and with 
 have a user with username test if we write the following in 
 a jsp page:
 
 sql:statement id=getUserTest conn=myConn
%-- THIS QUERY RETURNS THE UserID --%
   sql:query
 SELECT UserID
   FROM Users
   WHERE username = 'test'
   /sql:query
   sql:resultSet id=getUserIDTest
 sql:getNumber position=1 to=userIDTest/
   /sql:resultSet
 /sql:statement
 
 sql:statement id=getUserToto conn=myConn
%-- THIS QUERY IS EMPTY --%
   sql:query
 SELECT UserID
   FROM Users
   WHERE username = 'toto'
   /sql:query
   sql:resultSet id=getUserIDToto
 sql:getNumber position=1 to=userIDToto/
   /sql:resultSet
 /sql:statement
 
 On the page we saw:
 SELECT UserID FROM Users WHERE username = 'toto'
 
 We noticed the following: if we add an attribute: loop, scope 
 or another 
 existing attribute in the resultSet tag in the empty query, 
 the query is 
 not displayed on the JSP page. However if we add this 
 attribute to each 
 resultSet tag, the query is displayed...
 
 Any idea???
 
 -- 
 Mickaël Cappozzo
 [EMAIL PROTECTED]
  
 ---
 NetUnion SARL
 Avenue de Villamont, 19
 1005 Lausanne
 SWITZERLAND
 Phone: (+41) 21 351 53 66
 http://www.netunion.com
 ---
 
 
 
 -
 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: dbtags and tomcat 4.1 -- sql:resultset

2003-09-04 Thread Martin van Dijken
Glenn,

Are you saying that the dbtags are old tags and therefore do not play nice with 
JspTag Pooling? 

Martin

 -Original Message-
 From: Glenn Nielsen [mailto:[EMAIL PROTECTED]
 Sent: donderdag 4 september 2003 14:34
 To: Tag Libraries Users List
 Subject: Re: dbtags and tomcat 4.1 -- sql:resultset
 
 
 Tomcat 4.1 introduced JSP custom tag pooling in the JSP engine.
 JSP custom tag pooling can improve performance of JSP a great deal
 but the downside is that it can break older JSP tag libraries which
 may have bugs when used this way.  This may be what you are seeing
 with DbTags.
 
 You can disable JSP custom tag pooling by setting the JspSservlet
 init parameter enablePooling to false in your tomcat conf/web.xml.
 
 Regards,
 
 Glenn
 
 
 Mickael Cappozzo wrote:
  Hello Martin,
  
  I read your problem, we experienced this behaviour also during the 
  testing to understand if I was doing something wrong or not...
  
  We checked also the taglibs sources and we didn't find any 
 answers :-(
  
  However, we used the same dbtags before under tomcat 4.0 
 and it worked, 
  but with tomcat 4.1 it doesn't, this is also strange...
  
  Greetings,
  
  Mickaël.
  
  Martin van Dijken wrote:
  
  Hey Mickael,
 
  I just noticed the exact same thing under totally different 
  circumstances. I posted about it and haven't heard from 
 anybody. Has 
  nobody else had this?
 
  I checked the Jakarta-taglibs cvs and it seems the 
 sql:resultset tag 
  is doing everything correctly, although we both know it's not.
 
  I've created a new bug in bugzilla and put yours and my 
 message there.
 
  check:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=22927
 
  Greetings,
 
  Martin van Dijken
 
   
 
  -Original Message-
  From: Mickael Cappozzo [mailto:[EMAIL PROTECTED]
  Sent: donderdag 4 september 2003 10:50
  To: 'Tomcat Users List'; [EMAIL PROTECTED]
  Subject: dbtags and tomcat 4.1
 
 
  Hello,
 
  We wanted to migrate from tomcat 4.0 to tomcat 4.1.24, but we 
  encoutered the following problem:
  When a query return nothing, the query's body is 
 displayed on the JSP 
  page if the page contains another query returning something.
 
  example:
  In the table Users,  we don't have user with username 
 toto and with 
  have a user with username test if we write the 
 following in a jsp 
  page:
 
  sql:statement id=getUserTest conn=myConn
%-- THIS QUERY RETURNS THE UserID --%
   sql:query
 SELECT UserID
   FROM Users
   WHERE username = 'test'
   /sql:query
   sql:resultSet id=getUserIDTest
 sql:getNumber position=1 to=userIDTest/
   /sql:resultSet
  /sql:statement
 
  sql:statement id=getUserToto conn=myConn
%-- THIS QUERY IS EMPTY --%
   sql:query
 SELECT UserID
   FROM Users
   WHERE username = 'toto'
   /sql:query
   sql:resultSet id=getUserIDToto
 sql:getNumber position=1 to=userIDToto/
   /sql:resultSet
  /sql:statement
 
  On the page we saw:
 SELECT UserID FROM Users WHERE username = 'toto'
 
  We noticed the following: if we add an attribute: loop, scope or 
  another existing attribute in the resultSet tag in the 
 empty query, 
  the query is not displayed on the JSP page. However if we 
 add this 
  attribute to each resultSet tag, the query is displayed...
 
  Any idea???
 
  -- 
  Mickaël Cappozzo
  [EMAIL PROTECTED]
 
  ---
  NetUnion SARL
  Avenue de Villamont, 19
  1005 Lausanne
  SWITZERLAND
  Phone: (+41) 21 351 53 66
  http://www.netunion.com
  ---
 
 
 
  
 -
  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]
  
  
 
 
 
 -
 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]



sql:resultset behaves strangely

2003-09-02 Thread Martin van Dijken
Hey gang,

I've got something really strange going on. I've got a servlet that creates a 
resultset and then puts this resultset in the request attributes under results. In 
the page I've got these tags:

sql:resultSet name=results id=rslts
p
   sql:getColumn colName=app_title/br
/p
/sql:resultSet
sql:wasEmptypNo results found/p/sql:wasEmpty

I figure this should loop the content of the resultset if anything can be found and if 
the resultset was null, then the sql:wasEmpty should be displayed. 

Over to the problem. The jsp behaves exactly as expected when the server has just been 
reboot. However, after the first time someone has found any results at all, things go 
haywire when no results can be found. When no results can be found, the sql:resultset 
displays some random blurb. Sometimes this will be the body of the previous 
sql:resultset. At other times the body of fmt:bundle is displayed. It looks as if the 
body of the last succesfully processed tag is displayed again somehow.

I can't really figure out whether this is a bug of the sql tag, an error in the 
BodyTagSupport class or of course something I'm doing wrong. Any help is greatly 
appreciated.

Martin van Dijken

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



RE: forEach = Exception javax/servlet/jsp/jstl/core/LoopTagSupport

2003-08-28 Thread Martin van Dijken
Further examination of the exception does indeed seem to show you have a jar-file 
problem. This kind of servlet exception usually means Tomcat can't find the indicated 
resource, in your case LoopTagSupport.

Greetz,

Martin

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



RE: SQL INSERT

2003-08-25 Thread Martin van Dijken
Hey Lukasz,

This is generally speaking an issue of SQL databases. Not all databases have a 
mechanism for creating keys this way and therefore also not for retrieveing the keys 
inserted this way. AFAIK there is no SQL standard addressing this issue and therefore 
there probably won't be any method of doing this in a JDBC standards compliant way. 
There are I think some ways of doing this in a database-specific manner, so what 
database are you using?


Greetings,

Martin van Dijken

PS You might want to look into excellent techniques such as JDO or EJB's (I'd 
recommend JDO) but they are for the more experienced programmer

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: maandag 25 augustus 2003 13:52
To: [EMAIL PROTECTED]
Subject: SQL INSERT


Dear Taglibs users,

I am erforming SQL insert statement using  JSTL tgalib:

   sql:transaction dataSource=${test}
  sql:update var=InsertDriver
INSERT INTO REQUEST_OFFER (RO_FK_CUST_PHONENO, RO_TYPE
   VALUES (?,?)
sql:param value=${Customer.phone_no}/
sql:param value=SINGLE/
  /sql:update
/sql:transaction
 
The REQUEST_OFFER table has an ID field which is autincrement unique key.
Is it possible to obtain the value of this filed just after insert using JSTL?
Something like getGeneratedKeys() java methd.
Or if it is impossible to do using JSTL how to do it using java scriptlet?

thank you very much for help,

regards,
lukasz




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



RE: Editor

2003-08-14 Thread Martin van Dijken
I've found that the editor we use (www.editplus.com) works largely identical to 
ultraedit, syntax files will probably be exchangeable, so if you need an alternative 
which works similar

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: maandag 11 augustus 2003 14:54
 To: [EMAIL PROTECTED]
 Subject: RE: Editor
 
 
 Hi Lukas
 
 Here, we use Dreamweaver MX, where you can import Tag Library 
 Definitions
 (like c.tld). That's kind of buggy, though...
 
 Personally, I use UltraEdit (http://www.ultraedit.com). If you're
 interested, I can then send you a syntax highlighting 
 definition for JSTL.
 
 Best regards,
 Eric
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Montag, 11. August 2003 14:42
 To: [EMAIL PROTECTED]
 Subject: Editor
 
 
 Hi,
 
 Can you recomend me some editor which reckognize jstl tags?
 
 thanks,
 lukas
 
 
 -
 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: Exception var - how to get using JSTL

2003-07-16 Thread Martin van Dijken
Hey Jeff,

The exception is available as a parameter in the request attributes under 
javax.servlet.error.exception.

Martin

 -Original Message-
 From: Jeff Born [mailto:[EMAIL PROTECTED]
 Sent: woensdag 16 juli 2003 16:08
 To: Tag Libraries Users List
 Subject: RE: Exception var - how to get using JSTL
 
 
 I would like to have an error page that handles exceptions 
 that flows the
 site I'm developing.  In order to do this I would like to 
 replace the Tomcat
 generated page with a jsp:
 
  
 
 error-page
 
 exception-typejava.lang.Throwable/exception-type
 
 location/jsp/error.jsp/location
 
 /error-page
 
  
 
 Then in the error.jsp have a line like : 
 
  
 
 c:out value=${pageContext.exception.stacktrace} /
 
  
 
 However nothing prints.  If I modify the jsp containing the 
 preceding c:out
 to contain an error, then the Tomcat Error page takes over and shows a
 stacktrace.  So I know one is available, I just need to know 
 how to access
 it!  Anyone know what Im doing wrong?
 
  
 
 Thanks,
 
  
 
 jb
 
 -Original Message- 
 From: Michael Duffy [mailto:[EMAIL PROTECTED] 
 Sent: Wed 6/18/2003 7:47 AM 
 To: Tag Libraries Users List; Jim Kennedy 
 Cc: 
 Subject: Re: Exception var - how to get using JSTL
 
 
 
 
   Yes, 'javax.servlet.jsp.jspException' is the parameter 
   name that's used when the exception value is set. 
   It's important to know, because if you do MVC-2 with 
   your own front controller servlet you've got to set 
   that parameter inside the servlet whenever an 
   exception is thrown.  If you don't, the JSP error page 
   won't find it. 
 
   Buy Shawn Bayern's JSTL In Action book by Manning. 
   What you wanted was right there on page 267.  Lots of 
   other good stuff, too. 
 
   Anytime I'm faced with a new technology I like to have 
   a good book at my elbow.  When I started with JSTL, 
   this was the only book I bought. 
 
   --- Jim Kennedy [EMAIL PROTECTED] wrote: 
This also works: 
c:set var=error 

   value=${requestScope['javax.servlet.jsp.jspException']} 
/ (for Tomcat) 

but I wanted to avoid the javax.servlet.jsp... 
stuff. 

Your method is what I was looking for.  I have not 
read anything that lead 
me to exception being the name of that property. 
Is there a table that 
shows all available pageContext properties.  It's 
definitely logical though 
since exception is an implicit variable for JSP 
pages.  However, that 
pattern breaks down for: 

pageContext.servletConfig  which is config in JSP 
pages 

and 

pageContext.servletContext which is application in 
JSP pages. 

Can you tell me how you came by this info for 
exception. 



thanks 


Jim Kennedy 
IT Consultant 
Mobile Phone: 813-503-1484 

   - 



- Original Message - 
From: Michael Duffy [EMAIL PROTECTED] 
To: Tag Libraries Users List 
[EMAIL PROTECTED]; Jim 
Kennedy [EMAIL PROTECTED] 
Sent: Tuesday, June 17, 2003 4:39 PM 
Subject: Re: Exception var - how to get using JSTL 


 
 Wouldn't you use 
 
 c:out value=${pageContext.exception.message}/? 
 
 That's just straight JSTL, so it should be okay. - 
MOD 
 
 
 
 --- Jim Kennedy [EMAIL PROTECTED] wrote: 
  Can someone help me with the technique to grap 
the 
  exception (implicit) 
  variable that exists when isErrorPage=true.  I 
know 
  it will be part of the 
  pageScope JSTL variable, but I need a technique 
NOT 
  specific to a container. 
  
  I don't want to use % % at all.  I need an 
only 
  tag technique. 
  
  Currently there is not ${exception} guy. 
  
  Thanks 
  
  
  
 

   
 -
To unsubscribe, e-mail: 
  [EMAIL PROTECTED] 
  For additional commands, e-mail: 
  [EMAIL PROTECTED] 
  
 
 
 __ 
 Do you Yahoo!? 
 SBC Yahoo! DSL - Now only $29.95 per month! 
 http://sbc.yahoo.com 
 
 

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



   
 

RE: Stored procedure (RFI proposal)

2003-07-15 Thread Martin van Dijken
Heh,

Always nice to see a discussion like this, instead of having it turn into a stupid 
flamewar. I have to agree with James Mitchell that it is very true that not everybody 
has the opportunity nor the time to really LEARN j2ee programming. In that aspect the 
sql-tags do indeed make for a lower Java threshold. Also, some of you seem to be aware 
of the risks of this kind of programming (it's not altogether that extensible, 
etc.etc.). I have to agree with you that if you're aware that there is another more 
longterm solution it is sometimes still needed to listen to your manager/whatever and 
do your work in less time. 

Although I might have spoken a bit too hastily, I still have to conclude that I don't 
like the sql-taglibs. Although I definitely understand some of the reasoning behind 
it, you always have to keep telling those that are not familiar with Java programming 
that there is a better solution. This might in the end take more time than not having 
the taglib in the first place...

Martin

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



RE: Stored procedure (RFI proposal)

2003-07-14 Thread Martin van Dijken
Agreed,

I think it a horrific thing to do data manipulation in a JSP tag in the first place. 
Personally I think the whole SQL-taglib is something that never should have been 
invented in the first place.

Martin

 -Original Message-
 From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
 Sent: zaterdag 12 juli 2003 1:21
 To: [EMAIL PROTECTED]
 Subject: Re: Stored procedure (RFI proposal)
 
 
 Of course... data access in a presentation view is bad practice, much 
 better to unit test a bean (with DAO, such as iBatis.com) in 
 an MVC way.
 Then you can reuse you bean for Soap, etc., not just JSP and 
 keep your 
 JSP code clean.
 
 
 Michael Duffy wrote:
 
 Do you mean you want to batch commands, the way the
 java.sql.Statement.addBatch allows you to?  That would
 be useful to lots of people, I'll bet.  I think that
 would require tag changes, too.  
 
 I can see a sql:batch tag that could have multiple
 sql:update children.  Do they do such a thing in
 Jakarta's DBTags taglib? - MOD
 
 --- James Smith [EMAIL PROTECTED] wrote:
   
 
 I was actually dealing with a similar problem
 yesterday; I wanted to write a
 tag that called not a stored procedure, but several
 SQL statements in a row,
 using a dataSource, just like I would use for
 sql: tags.  After
 looking through the source code, I noticed that the
 abstract classes
 
 
 
 org.apache.taglibs.standard.tag.common.sql.QueryTagSupport
   
 
 and
 
 
 
 org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport
   
 
 both used the
 exact same code to access a data source.  So, I was
 wondering if in future
 versions of the tag library, we could have an
 abstract tag that extended
 BodyTagSupport and did all the work of getting the
 dataSource and database
 connection, and then QueryTagSupport and
 UpdateTagSupport (I didn't look at
 TransactionTagSupport that closely, but I'm assuming
 it does something
 similar) could inherit from that class, as could any
 other tags that would,
 say, call multiple SQL statements or call a stored
 proc using a JSTL
 dataSource.  Since I haven't looked at the source
 code for the standard
 taglibs under Tomcat 5-alpha, I don't know if this
 idea would still be
 compatible with the newer code, but if it is, I
 think it would be useful.
 Just an idea!  Thanks,
 
 James Smith
 Application Systems Analyst, Treistman Center
 College of Fine Arts, University of Arizona
 
 - Original Message - 
 From: Michael Duffy [EMAIL PROTECTED]
 To: Tag Libraries Users List
 [EMAIL PROTECTED]
 Sent: Wednesday, July 02, 2003 4:40 AM
 Subject: Re: Stored procedure
 
 
 
 
 Not if the underlying implementation isn't using
 CallableStatement.  Stored procs can have in, out,
   
 
 and
 
 
 inout parameters.  They can also return multiple
 ResultSets.
 
 When I look at the java.sql.CallableStatement
 javadocs, it seems clear to me that it's a very
 different animal from Statement and
   
 
 PreparedStatement.
 
 
  The taglibs that support it will look very
   
 
 different
 
 
 from the JSTL sql taglib.  JMHO - MOD
 
 --- Daniel Montero [EMAIL PROTECTED] wrote:
   
 
 I believe you can just do something like
 sql:query datasource=jdbc/myds sql=exec
 
 
 my_proc
 
 
 /
 
 just like any other sql statement.
 
 
 
 - Original Message - 
 From: Kevin Passey [EMAIL PROTECTED]
 To: Taglibs (E-mail)
 [EMAIL PROTECTED]
 Sent: Tuesday, July 01, 2003 9:40 AM
 Subject: Stored procedure
 
 
 
 
 Hi,
 
 Are there any taglibs which I can use to call
   
 
 a
 
 
 stored procedure.
 
 
 Thanks
 
 Kevin
 
   
 
 
 
 -
   
 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 
   
 
 -
   
 
 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]
 
 
 
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
   
 
 
 -- 
 Vic Cekvenich,
 Struts Instructor,
 1-800-917-JAVA
 
 Advanced a href =baseBeans.comStruts Training/a and 
 project recovery in North East.
 Open Source a href =baseBeans.comContent Management/a  
 basicPortal sofware
 Best practicea href =baseBeans.comStruts Support/a 
 v.1.1 helper ScafflodingXPress
 
 

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



RE: How to create a general resource bundle for JSTL?

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

Back to the original problem. As said I'm working in the same direction as you are so 
I've solved the problem for my own needs as well. 

Setting the bundle can be done using:

ResourceBundle bundle = ResourceBundle.getBundle(Test,new Locale(nl,NL));
LocalizationContext ctx = new LocalizationContext(bundle);

and then:

Config.set(request,Config.FMT_LOCALIZATION_CONTEXT,ctx);

 OR

request.setAttribute(javax.servlet.jsp.jstl.fmt.localizationContext.request,ctx);

As some of these guys will tell you, the latter solution is rather bad as it depends 
on the inner workings of the Config object. I had to get all the way that far however 
to understand how it works. I found the JSTL documentation a little vague on the 
subject.

Martin van Dijken


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 8 juli 2003 16:29
 To: [EMAIL PROTECTED]
 Subject: RE: How to create a general resource bundle for JSTL?
 
 
 Hi Martin
 
 Thanks for the answer. However, your solution relies on JSTL 
 alone, and this
 works for me without any problems (see my code).
 What doesn't work is setting a resource bundle with my Java 
 class, without
 having to set the bundle in the JSP.
 
 Best regards,
 Eric
 
 -Original Message-
 From: Martin van Dijken [mailto:[EMAIL PROTECTED]
 Sent: Montag, 7. Juli 2003 15:58
 To: Tag Libraries Users List
 Subject: RE: How to create a general resource bundle for JSTL?
 
 
 Hey Eric,
 
 Let me give you an educated yet untested guess. I'm not very 
 experienced
 with JSTL, but noticed you weren't getting any response so 
 let me try. 
 
 Have you tried setting the Locale of the ServletResponse 
 object? I'm not
 100% certain, but it seems to me JSTL *SHOULD* check this 
 when using their
 I18N tags. Furthermore if you want to use a resource bundle 
 for a bunch of
 tags it might do you some good to put the other I18N tags 
 below them as
 nested tags:
 
 fmt:setBundle basename=vulgarInsults/
 
 !-- Notice how the bundle tag surrounds the others... --
 fmt:bundle basename=org.apache.bookies
   fmt:message key=threat 
 fmt:param value=${address}/
 fmt:param value=${numberOfChildren}/
 fmt:param value=${nameOfSpouse}/
   /fmt:message
 /fmt:bundle
 
 Greetings,
 
 Martin van Dijken
 Madocke Interactive Media
 
 
  Hi all
  
  Till now, all JSP pages in our application had to have the 
  following header
  for internationalization:
  %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
  fmt:setLocale value=${currentLocale}/
  fmt:setBundle basename=ch.xobix.i18n.translations.X2Resources
  var=bundle scope=page/
  
  Then a message would be output like this:
  fmt:message key=longWeekday_0 bundle=${bundle}/
  
  Note that currentLocale is set by the controller, and
  ch.xobix...X2Resources is a class that loads the messages 
  from a database
  table.
  This works well, however I think it's tedious for the web 
  designer to do
  this manually all the time.
  
  My goal is to have the following:
  %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
  
  And the message output like this:
  fmt:message key=longWeekday_0/
  
  So I tried to set it in the controller, as described in JSTL 
  in Action. I
  managed to set the Locale right, but I don't know how to do 
  the same with
  the resources. First I tried according to the book to create a
  ResourceBundle and a Locale and set JSTL's 
  FMT_LOCALIZATIONCONTEXT (does
  anyone know why this is written like this?). Didn't work...
  
  Now I've seen that I can change the web.xml to read
  web-app
 ...
 context-param
   
  param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
  ram-name

  param-valuech.xobix.i18n.translations.X2Resources/param-value
 /context-param
 ...
  /web-app
  
  Now, in the controller, I set the Locale with
  Config.set(this.getRequest(), Config.FMT_LOCALE, the 
  language code );
  
  and I see it in Tomcat's output:
  DEBUG  - Request: javax.servlet.jsp.jstl.fmt.locale = it   
  (when changing to
  Italian)
  
  BUT the message itself doesn't change!
  
  What am I doing wrong? Or how should I do it right?
  
  Also, has anyone of you succeeded in dynamically changing 
  resources? Right
  now, when someone enters a new key in the database, we have 
 to restart
  Tomcat.
  
  
  Thanks for any help!
  Eric
  
  
  
 -
  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]
 
 

-
To unsubscribe, e-mail: [EMAIL

RE: removing those blank lines from the output

2003-07-09 Thread Martin van Dijken
Hi,

Maybe I'm the wacky programmer here, but I don't just program Java/JSP I also do quite 
a lot of Javascript and stylesheet programming. Specifically when debugging javascript 
applications, it's very annoying if the line numbers that get reported by the browser 
don't match the line number in my source file.

just my 2 cents

Martin van Dijken

 -Original Message-
 From: Neil Zanella [mailto:[EMAIL PROTECTED]
 Sent: woensdag 9 juli 2003 8:00
 To: Tag Libraries Users List
 Subject: RE: removing those blank lines from the output
 
 
 
 Despite the solutions presented here I think JSPs should do stuff
 like PHP does it (much easier than having to install filters, seems
 kind of silly to install a filter just to remove whitespace). Right
 now I am doing the following, which is not great either:
 
 p%--
   --%c:out value=foo1 /%--
   --%c:out value=bar1 /%--
   --%c:out value=foo2 /%--
   --%c:out value=bar2 /
 /p
 
 But at least it's a little cleaner than cramming all tags 
 together. (?)
 
 Regards,
 
 Neil
 
 On Tue, 8 Jul 2003, Michael Duffy wrote:
 
  
  Hi Eric,
  
  Thanks for the links to these.  I wasn't aware of
  either.
  
  Marty Hall's More Servlets and JSPs has a nice
  chapter on filters.  I went through that to get the
  source that I'm running.  It was a fine learning
  experience for me.  
  
  But perhaps the stuff you're citing is more
  bulletproof.  Thanks for the links. - MOD
  
  
  --- [EMAIL PROTECTED] wrote:
   I was going to program some Servlet filters when I
   saw the following:
   http://www.servletsuite.com/servlets/trimflt.htm
   http://www.servletsuite.com/servlets/gzipflt.htm
   
   This might do all you ever wished for :-)
   
   I'll install it here and keep you posted...
   
   Best regards,
   Eric
   
   -Original Message-
   From: Michael Duffy [mailto:[EMAIL PROTECTED]
   Sent: Montag, 7. Juli 2003 21:15
   To: Tag Libraries Users List
   Subject: Re: removing those blank lines from the
   output
   
   
   I guess you can do that, but I prefer something
   else.
   
   I use a GZIP compression filter on my control
   servlet
   that gets rid of all that extraneous whitespace and
   more when I sent responses back to clients that can
   accept compressed output.  
   
   That's what eBay does routinely.  
   
   I'm seeing good compression in the response.   I log
   before  after stream size, just to check.  Fewer
   bytes on the wire means faster response, as long as
   the compression and decompression times are small
   compared to transmission time.  My subjective
   measure
   tells me that response is pretty fast, but I have to
   admit that I don't have hard before and after
   numbers.
   
   I agree with your aim, but I disagree with the way
   you
   achieve it.  Respectfully yours, MOD
   
   --- Yann Cébron [EMAIL PROTECTED] wrote:

Michael Duffy [EMAIL PROTECTED] schrieb im
Newsbeitrag
   
  
  news:[EMAIL PROTECTED]

 Sorry, but I thought the question had to do with
 getting rid of whitespace from JSPs generated at
 runtime.  Perhaps I lost the thread. - MOD


Actually, since all your JSP-tags and HTML-tags
   will
be side by side in your
JSP-source you'll save a lot of whitespace,
especially when using
c:forEach or similar constructs. At least it
   saved
me about 50-80% of the
resulting HTML, depending on the original JSP.

Try it out for yourself to see if it does the job
for you...

Cheers,
Yann

 --- Yann Cébron [EMAIL PROTECTED] wrote:
  Hi,
 
  here's a snippet I use in my build.xml after
copying
  the JSPs and HTML files
  to the build dir:
 
   replaceregexp match=gt;\s*lt;
  replace=gt;lt; flags=g
  byline=false
fileset dir=${build.home}
  includes=**/*.html,**/*.htm,**/*.jsp/
   /replaceregexp
 
  This is not a perfect solution, but it gets
   you
a
  *very* compact HTML output
  and it does not have any runtime-costs like
   e.g.
  Servlet-filters or other
  tags which strip the whitespace *after* the
response
  has been generated.
 
  HTH,
  Yann
 
  Neil Zanella [EMAIL PROTECTED] schrieb im
  Newsbeitrag
 

   
  
  news:[EMAIL PROTECTED]
  
   Hello,
  
   Is there really no NEAT way of removing
   those
  blank lines left over from
   JSP tags in the output??? I'm shocked!!!
   :-()
  
   Thanks! :-)
  
   Neil




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

   
   
   __
   Do you Yahoo!?
   SBC Yahoo! DSL - Now only $29.95 per month!
   http://sbc.yahoo.com

RE: How to create a general resource bundle for JSTL?

2003-07-09 Thread Martin van Dijken
Hey Eric,

I've got to start working heavily with I18N currently and am investigating some of the 
same paths you go along. You did notice that the FMT_LOCALIZATIONCONTEXT is not the 
correct naming, but that FMT_LOCALIZATION_CONTEXT is? I guess you must have because 
stuff probably doesn't compile otherwise, but I thought I should point it out.

Martin

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 8 juli 2003 16:29
 To: [EMAIL PROTECTED]
 Subject: RE: How to create a general resource bundle for JSTL?
 
 
 Hi Martin
 
 Thanks for the answer. However, your solution relies on JSTL 
 alone, and this
 works for me without any problems (see my code).
 What doesn't work is setting a resource bundle with my Java 
 class, without
 having to set the bundle in the JSP.
 
 Best regards,
 Eric
 
 -Original Message-
 From: Martin van Dijken [mailto:[EMAIL PROTECTED]
 Sent: Montag, 7. Juli 2003 15:58
 To: Tag Libraries Users List
 Subject: RE: How to create a general resource bundle for JSTL?
 
 
 Hey Eric,
 
 Let me give you an educated yet untested guess. I'm not very 
 experienced
 with JSTL, but noticed you weren't getting any response so 
 let me try. 
 
 Have you tried setting the Locale of the ServletResponse 
 object? I'm not
 100% certain, but it seems to me JSTL *SHOULD* check this 
 when using their
 I18N tags. Furthermore if you want to use a resource bundle 
 for a bunch of
 tags it might do you some good to put the other I18N tags 
 below them as
 nested tags:
 
 fmt:setBundle basename=vulgarInsults/
 
 !-- Notice how the bundle tag surrounds the others... --
 fmt:bundle basename=org.apache.bookies
   fmt:message key=threat 
 fmt:param value=${address}/
 fmt:param value=${numberOfChildren}/
 fmt:param value=${nameOfSpouse}/
   /fmt:message
 /fmt:bundle
 
 Greetings,
 
 Martin van Dijken
 Madocke Interactive Media
 
 
  Hi all
  
  Till now, all JSP pages in our application had to have the 
  following header
  for internationalization:
  %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
  fmt:setLocale value=${currentLocale}/
  fmt:setBundle basename=ch.xobix.i18n.translations.X2Resources
  var=bundle scope=page/
  
  Then a message would be output like this:
  fmt:message key=longWeekday_0 bundle=${bundle}/
  
  Note that currentLocale is set by the controller, and
  ch.xobix...X2Resources is a class that loads the messages 
  from a database
  table.
  This works well, however I think it's tedious for the web 
  designer to do
  this manually all the time.
  
  My goal is to have the following:
  %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
  
  And the message output like this:
  fmt:message key=longWeekday_0/
  
  So I tried to set it in the controller, as described in JSTL 
  in Action. I
  managed to set the Locale right, but I don't know how to do 
  the same with
  the resources. First I tried according to the book to create a
  ResourceBundle and a Locale and set JSTL's 
  FMT_LOCALIZATIONCONTEXT (does
  anyone know why this is written like this?). Didn't work...
  
  Now I've seen that I can change the web.xml to read
  web-app
 ...
 context-param
   
  param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
  ram-name

  param-valuech.xobix.i18n.translations.X2Resources/param-value
 /context-param
 ...
  /web-app
  
  Now, in the controller, I set the Locale with
  Config.set(this.getRequest(), Config.FMT_LOCALE, the 
  language code );
  
  and I see it in Tomcat's output:
  DEBUG  - Request: javax.servlet.jsp.jstl.fmt.locale = it   
  (when changing to
  Italian)
  
  BUT the message itself doesn't change!
  
  What am I doing wrong? Or how should I do it right?
  
  Also, has anyone of you succeeded in dynamically changing 
  resources? Right
  now, when someone enters a new key in the database, we have 
 to restart
  Tomcat.
  
  
  Thanks for any help!
  Eric
  
  
  
 -
  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]
 
 

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



RE: How to create a general resource bundle for JSTL?

2003-07-09 Thread Martin van Dijken
Now you're confusing me;)

The spec clearly states that the Config class has a:

public static final String FMT_LOCALIZATION_CONTEXT;

Therefore this IS the correct spelling...

Martin

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: woensdag 9 juli 2003 17:53
 To: [EMAIL PROTECTED]
 Subject: RE: How to create a general resource bundle for JSTL?
 
 
 Hi Martin
 
 Yup, I noticed it and told Shawn Bayern, because in JSTL in 
 Action it's
 written as FMT_LOCALIZATION_CONTEXT (which would be the right 
 way to spell
 it IMHO).
 
 Best regards,
 Eric
 
 P.S. Good luck with the path!
 
 -Original Message-
 From: Martin van Dijken [mailto:[EMAIL PROTECTED]
 Sent: Mittwoch, 9. Juli 2003 17:33
 To: Tag Libraries Users List
 Subject: RE: How to create a general resource bundle for JSTL?
 
 
 Hey Eric,
 
 I've got to start working heavily with I18N currently and am 
 investigating
 some of the same paths you go along. You did notice that the
 FMT_LOCALIZATIONCONTEXT is not the correct naming, but that
 FMT_LOCALIZATION_CONTEXT is? I guess you must have because 
 stuff probably
 doesn't compile otherwise, but I thought I should point it out.
 
 Martin
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: dinsdag 8 juli 2003 16:29
  To: [EMAIL PROTECTED]
  Subject: RE: How to create a general resource bundle for JSTL?
  
  
  Hi Martin
  
  Thanks for the answer. However, your solution relies on JSTL 
  alone, and this
  works for me without any problems (see my code).
  What doesn't work is setting a resource bundle with my Java 
  class, without
  having to set the bundle in the JSP.
  
  Best regards,
  Eric
  
  -Original Message-
  From: Martin van Dijken [mailto:[EMAIL PROTECTED]
  Sent: Montag, 7. Juli 2003 15:58
  To: Tag Libraries Users List
  Subject: RE: How to create a general resource bundle for JSTL?
  
  
  Hey Eric,
  
  Let me give you an educated yet untested guess. I'm not very 
  experienced
  with JSTL, but noticed you weren't getting any response so 
  let me try. 
  
  Have you tried setting the Locale of the ServletResponse 
  object? I'm not
  100% certain, but it seems to me JSTL *SHOULD* check this 
  when using their
  I18N tags. Furthermore if you want to use a resource bundle 
  for a bunch of
  tags it might do you some good to put the other I18N tags 
  below them as
  nested tags:
  
  fmt:setBundle basename=vulgarInsults/
  
  !-- Notice how the bundle tag surrounds the others... --
  fmt:bundle basename=org.apache.bookies
fmt:message key=threat 
  fmt:param value=${address}/
  fmt:param value=${numberOfChildren}/
  fmt:param value=${nameOfSpouse}/
/fmt:message
  /fmt:bundle
  
  Greetings,
  
  Martin van Dijken
  Madocke Interactive Media
  
  
   Hi all
   
   Till now, all JSP pages in our application had to have the 
   following header
   for internationalization:
   %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
   fmt:setLocale value=${currentLocale}/
   fmt:setBundle basename=ch.xobix.i18n.translations.X2Resources
   var=bundle scope=page/
   
   Then a message would be output like this:
   fmt:message key=longWeekday_0 bundle=${bundle}/
   
   Note that currentLocale is set by the controller, and
   ch.xobix...X2Resources is a class that loads the messages 
   from a database
   table.
   This works well, however I think it's tedious for the web 
   designer to do
   this manually all the time.
   
   My goal is to have the following:
   %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
   
   And the message output like this:
   fmt:message key=longWeekday_0/
   
   So I tried to set it in the controller, as described in JSTL 
   in Action. I
   managed to set the Locale right, but I don't know how to do 
   the same with
   the resources. First I tried according to the book to create a
   ResourceBundle and a Locale and set JSTL's 
   FMT_LOCALIZATIONCONTEXT (does
   anyone know why this is written like this?). Didn't work...
   
   Now I've seen that I can change the web.xml to read
   web-app
  ...
  context-param

   param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
   ram-name
 
   param-valuech.xobix.i18n.translations.X2Resources/param-value
  /context-param
  ...
   /web-app
   
   Now, in the controller, I set the Locale with
   Config.set(this.getRequest(), Config.FMT_LOCALE, the 
   language code );
   
   and I see it in Tomcat's output:
   DEBUG  - Request: javax.servlet.jsp.jstl.fmt.locale = it   
   (when changing to
   Italian)
   
   BUT the message itself doesn't change!
   
   What am I doing wrong? Or how should I do it right?
   
   Also, has anyone of you succeeded in dynamically changing 
   resources? Right
   now, when someone enters a new key in the database, we have 
  to restart
   Tomcat.
   
   
   Thanks for any help!
   Eric

RE: How to create a general resource bundle for JSTL?

2003-07-07 Thread Martin van Dijken
Hey Eric,

Let me give you an educated yet untested guess. I'm not very experienced with JSTL, 
but noticed you weren't getting any response so let me try. 

Have you tried setting the Locale of the ServletResponse object? I'm not 100% certain, 
but it seems to me JSTL *SHOULD* check this when using their I18N tags. Furthermore if 
you want to use a resource bundle for a bunch of tags it might do you some good to put 
the other I18N tags below them as nested tags:

fmt:setBundle basename=vulgarInsults/

!-- Notice how the bundle tag surrounds the others... --
fmt:bundle basename=org.apache.bookies
  fmt:message key=threat 
fmt:param value=${address}/
fmt:param value=${numberOfChildren}/
fmt:param value=${nameOfSpouse}/
  /fmt:message
/fmt:bundle

Greetings,

Martin van Dijken
Madocke Interactive Media


 Hi all
 
 Till now, all JSP pages in our application had to have the 
 following header
 for internationalization:
 %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
 fmt:setLocale value=${currentLocale}/
 fmt:setBundle basename=ch.xobix.i18n.translations.X2Resources
 var=bundle scope=page/
 
 Then a message would be output like this:
 fmt:message key=longWeekday_0 bundle=${bundle}/
 
 Note that currentLocale is set by the controller, and
 ch.xobix...X2Resources is a class that loads the messages 
 from a database
 table.
 This works well, however I think it's tedious for the web 
 designer to do
 this manually all the time.
 
 My goal is to have the following:
 %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
 
 And the message output like this:
 fmt:message key=longWeekday_0/
 
 So I tried to set it in the controller, as described in JSTL 
 in Action. I
 managed to set the Locale right, but I don't know how to do 
 the same with
 the resources. First I tried according to the book to create a
 ResourceBundle and a Locale and set JSTL's 
 FMT_LOCALIZATIONCONTEXT (does
 anyone know why this is written like this?). Didn't work...
 
 Now I've seen that I can change the web.xml to read
 web-app
...
context-param
  
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
 ram-name
   
 param-valuech.xobix.i18n.translations.X2Resources/param-value
/context-param
...
 /web-app
 
 Now, in the controller, I set the Locale with
 Config.set(this.getRequest(), Config.FMT_LOCALE, the 
 language code );
 
 and I see it in Tomcat's output:
 DEBUG  - Request: javax.servlet.jsp.jstl.fmt.locale = it   
 (when changing to
 Italian)
 
 BUT the message itself doesn't change!
 
 What am I doing wrong? Or how should I do it right?
 
 Also, has anyone of you succeeded in dynamically changing 
 resources? Right
 now, when someone enters a new key in the database, we have to restart
 Tomcat.
 
 
 Thanks for any help!
 Eric
 
 
 -
 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]