Using Struts/JSP template from within a class/batch process

2007-08-23 Thread Crawford, Preston
We have a need to generate a run of HTML files, like a letter or print
batch. We also need to be able to (in real time), generate said
reports/letters. Our infrastructure is Struts, so my lean is to create a
struts page with a JSP template for the on-demand letters and reports. The
question is what to do about the batch, then? I can picture ways to do this
such as doing an HTTP request and hitting the action, retrieving the HTML
and sending that to the printwriter. I was wondering, though, if anyone had
done something similar and had come up with a more elegant solution. The
coder that came before me actually started this part of the project by
generating HTML from a Java class. Now I'm taking over for his work and
being told to do the on-demand side. I would like to get the generated HTML
out of this monster class with a giant stringbuffer and have one JSP
template handle the formatting. I just can't come up with the proper way for
the batch process/java class to make use of said template.
 
Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.


RE: [S1] The proper way to define taglibs in a jsp file

2007-04-23 Thread Crawford, Preston
Nevermind. I figured it out. It's a WAS problem. You have to use the full
URI in the Web.xml if you want to use it on the JSP page in the taglib
declaration. So like this.


http://struts.apache.org/tags-bean
/WEB-INF/struts-bean.tld


Preston 

-Original Message-
From: Crawford, Preston [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 23, 2007 10:33 AM
To: 'Struts Users Mailing List'
Subject: RE: [S1] The proper way to define taglibs in a jsp file

This is really strange. So it works if I reference the taglibs as defined in
the web.xml (i.e. define /bean in the web.xml and then declare the taglib in
the JSP referring to that uri).

So now this works...

<%@ taglib uri="/bean" prefix="bean" %>

But this doesn't work...

<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>

And for an error in WebSphere 6.1 I get the following error.

JSPG0047E: Unable to locate tag library for uri
http://struts.apache.org/tags-bean

Any ideas?

Preston

-Original Message-
From: Crawford, Preston [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 19, 2007 7:31 PM
To: 'Struts Users Mailing List'
Subject: RE: [S1] The proper way to define taglibs in a jsp file

I did. It's expecting the one you listed. I just get a "Not Found" error if
I go there.

I tried declaring it inside the web.xml instead (newly converted to 2.4) and
that doesn't work either.

Preston 

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] CONFIDENTIALITY
NOTICE: This e-mail message, including any attachments, is for the sole use
of the intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-23 Thread Crawford, Preston
This is really strange. So it works if I reference the taglibs as defined in
the web.xml (i.e. define /bean in the web.xml and then declare the taglib in
the JSP referring to that uri).

So now this works...

<%@ taglib uri="/bean" prefix="bean" %>

But this doesn't work...

<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>

And for an error in WebSphere 6.1 I get the following error.

JSPG0047E: Unable to locate tag library for uri
http://struts.apache.org/tags-bean

Any ideas?

Preston

-Original Message-
From: Crawford, Preston [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 7:31 PM
To: 'Struts Users Mailing List'
Subject: RE: [S1] The proper way to define taglibs in a jsp file

I did. It's expecting the one you listed. I just get a "Not Found" error if
I go there.

I tried declaring it inside the web.xml instead (newly converted to 2.4) and
that doesn't work either.

Preston 

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] Is JSTL 1.1 compatible with Struts 1.2.9?

2007-04-23 Thread Crawford, Preston
Thanks! That helped.

Preston 

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 20, 2007 12:24 PM
To: Struts Users Mailing List
Subject: Re: [S1] Is JSTL 1.1 compatible with Struts 1.2.9?

On 4/19/07, Crawford, Preston <[EMAIL PROTECTED]> wrote:

> Anyone know? I know Struts 1.2 comes with JSTL 1.0. I read somewhere 
> that you have to use JSTL 1.1 with a 2.4 container, which is what we 
> have. I just need to figure out what version of JSTL we can/should run.

The combinations are described here:

http://wiki.apache.org/struts/StrutsAndJSTL

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] Is JSTL 1.1 compatible with Struts 1.2.9?

2007-04-20 Thread Crawford, Preston
Anyone know?

Preston 

-Original Message-
From: Crawford, Preston [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 6:39 PM
To: 'Struts Users Mailing List'
Subject: [S1] Is JSTL 1.1 compatible with Struts 1.2.9?

Anyone know? I know Struts 1.2 comes with JSTL 1.0. I read somewhere that
you have to use JSTL 1.1 with a 2.4 container, which is what we have. I just
need to figure out what version of JSTL we can/should run.
 
Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-20 Thread Crawford, Preston
Just thought I'd see if I got any kind of response since earlier the server
itself through a URI couldn't be reached exception, or something to that
effect.

I'm thinking this problem may be different, though, as it can't even locate
local TLDs currently.

Preston 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 20, 2007 2:01 AM
To: Struts Users Mailing List
Subject: RE: [S1] The proper way to define taglibs in a jsp file

--- "Crawford, Preston" wrote:
> I did. It's expecting the one you listed. I just get a "Not Found" 
> error if I go there.

Why are you trying to go there? It's not a URL.

You're saying your server/IDE is trying to hit that address? Something is
set up funny if it is.

d.


__
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]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
I did. It's expecting the one you listed. I just get a "Not Found" error if
I go there.

I tried declaring it inside the web.xml instead (newly converted to 2.4) and
that doesn't work either.

Preston 

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
Wow. Except this URI can't be found. Umm Hmmm..

Preston 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 3:42 PM
To: Struts Users Mailing List
Subject: RE: [S1] The proper way to define taglibs in a jsp file

--- "Crawford, Preston" wrote:
> Yeah, actually I was the guy (way back when) who helped define those 
> TLDs in the web.xml. Now I'm
back
> on contract and want to clean up my work. 

That'll teach ya' ;)

> I would like to just refer to the dtd in the URI and

> forgo having the TLDs located in the build process. 

DTD?

Just use the taglib directive w/ the right URI and everything will be fine;
I already forgot which version of S1, but for 1.3-ish see, for example:

http://struts.apache.org/1.3.8/struts-taglib/tlddoc/bean/tld-summary.html

where the URI is:

<%@ taglib prefix="bean"
uri="http://struts.apache.org/tags-bean"; %>

Hmm, now that I see that out loud I think it might be that for 1.2.9, too.

d.


__
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]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



[S1] Is JSTL 1.1 compatible with Struts 1.2.9?

2007-04-19 Thread Crawford, Preston
Anyone know? I know Struts 1.2 comes with JSTL 1.0. I read somewhere that
you have to use JSTL 1.1 with a 2.4 container, which is what we have. I just
need to figure out what version of JSTL we can/should run.
 
Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.


RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
Ah, thank you very much. I have never had to use those. I went straight from
Struts 1.1 to other frameworks, now I'm back on Struts, so I must have
missed that phase or else wasn't doing configuration at the time. I suppose
that means I don't need anything in the struts-el directory, then. Including
jstl.jar as it would be natively part of the container. I'll have to try
that out.

Preston 

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 4:41 PM
To: Struts Users Mailing List
Subject: Re: [S1] The proper way to define taglibs in a jsp file

Struts EL is for Servlet 2.3 containers only (provided to give people the
opportunity to start using EL before it was included in the standard for
containers) - you can't use it in Servlet 2.2 and you don't need it in
Servlet 2.4 (its part of Servlet 2.4/JSP 2.0 Spec).

Niall

On 4/20/07, Crawford, Preston <[EMAIL PROTECTED]> wrote:
> Although I can't remember if I need struts-el if all I want is jstl + 
> the new version of Struts. Dang, I've had my head in Struts 2, Spring, 
> JSF for too long.
>
> Preston
>
> -Original Message-
> From: Crawford, Preston [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 19, 2007 4:26 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [S1] The proper way to define taglibs in a jsp file
>
> Nevermind, I think the answer is both if I remember correctly.
>
> Preston
> CONFIDENTIALITY NOTICE: This e-mail message, including any 
> attachments, is for the sole use of the intended recipient(s) and may 
> contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not 
> the intended recipient, please contact the sender by reply e-mail and 
> destroy all copies of the original message.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] 
> CONFIDENTIALITY NOTICE: This e-mail message, including any 
> attachments, is for the sole use of the intended recipient(s) and may 
> contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not 
> the intended recipient, please contact the sender by reply e-mail and 
> destroy all copies of the 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]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
Although I can't remember if I need struts-el if all I want is jstl + the
new version of Struts. Dang, I've had my head in Struts 2, Spring, JSF for
too long.

Preston 

-Original Message-----
From: Crawford, Preston [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 4:26 PM
To: 'Struts Users Mailing List'
Subject: RE: [S1] The proper way to define taglibs in a jsp file

Nevermind, I think the answer is both if I remember correctly.

Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
Nevermind, I think the answer is both if I remember correctly.

Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
One last question. Do I use strut-el.jar or struts.jar?

Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
That's my impression, the part about not being able to find it locally. Part
of what I was thinking of doing is not having the tld's locally available.
But it occurs to me that then it might spin out to the Interwebs whenever it
compiles a JSP page.

Trying to find a reference on this to get a definitive answer. I'm trying to
make it cleaner this time.

Preston 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 3:44 PM
To: Struts Users Mailing List
Subject: RE: [S1] The proper way to define taglibs in a jsp file

--- "Crawford, Preston" wrote:
> Oh, I just remembered something. There might be overhead/risk to jsps 
> hitting the dtd on the
Internet
> vs. the local tld, no?

I'm not sure that that's what the URI really does; they *look* like URLs but
I think they're just look-up values to find the corresponding TLD.

(This has always been a somewhat murky area for me, because I've never
really cared, but I think the only time it spins out to the 'net is if it
can't find the TLD locally... it might depend on the IDE and/or server,
though.)

d.


__
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]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
Oh, I just remembered something. There might be overhead/risk to jsps
hitting the dtd on the Internet vs. the local tld, no?

Preston 

-Original Message-
From: Crawford, Preston [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 3:27 PM
To: 'Struts Users Mailing List'
Subject: RE: [S1] The proper way to define taglibs in a jsp file

Yeah, actually I was the guy (way back when) who helped define those TLDs in
the web.xml. Now I'm back on contract and want to clean up my work. I would
like to just refer to the dtd in the URI and forgo having the TLDs located
in the build process. We use WebSphere 6.1, so this should be fine. 

Preston 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Benedict
Sent: Thursday, April 19, 2007 3:20 PM
To: Struts Users Mailing List
Subject: Re: [S1] The proper way to define taglibs in a jsp file

On 4/19/07, Crawford, Preston <[EMAIL PROTECTED]> wrote:
>
> So I'm helping my company clean up some JSP files, things like that 
> and I'm seeing declarations like this.
>
> <%@ taglib uri="/bean" prefix="bean" %> <%@ taglib uri="/html" 
> prefix="html" %>
>
>
The ability to automatically find TLD files is a feature of the web
container, not of Struts. If you're using a 2.3  container, the tag
libraries will be found under the URI that's specified in their DTDs.

While I may be wrong, I think between Struts 1.2.9 and 1.3.5, Struts
switched from jakarta.apache.org to struts.apache.org and thus you find
different URIs between versions. As for the URIs you see above, those are
from developers defining the location of the TLD explicitly in their web.xml

Paul
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: [S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
Yeah, actually I was the guy (way back when) who helped define those TLDs in
the web.xml. Now I'm back on contract and want to clean up my work. I would
like to just refer to the dtd in the URI and forgo having the TLDs located
in the build process. We use WebSphere 6.1, so this should be fine. 

Preston 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Benedict
Sent: Thursday, April 19, 2007 3:20 PM
To: Struts Users Mailing List
Subject: Re: [S1] The proper way to define taglibs in a jsp file

On 4/19/07, Crawford, Preston <[EMAIL PROTECTED]> wrote:
>
> So I'm helping my company clean up some JSP files, things like that 
> and I'm seeing declarations like this.
>
> <%@ taglib uri="/bean" prefix="bean" %> <%@ taglib uri="/html" 
> prefix="html" %>
>
>
The ability to automatically find TLD files is a feature of the web
container, not of Struts. If you're using a 2.3  container, the tag
libraries will be found under the URI that's specified in their DTDs.

While I may be wrong, I think between Struts 1.2.9 and 1.3.5, Struts
switched from jakarta.apache.org to struts.apache.org and thus you find
different URIs between versions. As for the URIs you see above, those are
from developers defining the location of the TLD explicitly in their web.xml

Paul
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



[S1] The proper way to define taglibs in a jsp file

2007-04-19 Thread Crawford, Preston
So I'm helping my company clean up some JSP files, things like that and I'm
seeing declarations like this.
 
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html" %>

Now I know there is a way to do these same declarations (we're on struts
1.2.9) without actually having to install the TLDs into our build process.
I've been Googling to figure out the "right" way, but I'm finding different
URLs. So I thought I'd ask if someone knew what the proper way to declare
these ways or point me in the direction of a site for 1.2.9 so that perhaps
I could make these declarations without having to declare the URI in
web.xml, etc.
 
Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.


RE: Does struts 1.2.x or 1.3.x support the attribute "autocomplet e" f or forms?

2007-04-06 Thread Crawford, Preston
Thanks for the information. I think I will stick with Struts 1.1 for now,
then. We have the opportunity at some point on a later project to perhaps do
a Struts 2 migration. I think it's probably wiser to implement the
Javascript way of handling this for now and save the Struts migration
(sometimes you only get one shot at these every X amount of years) for
giving Struts 2 a look if it fits our needs.

Preston 

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 06, 2007 11:01 AM
To: Struts Users Mailing List
Subject: Re: Does struts 1.2.x or 1.3.x support the attribute "autocomplete"
f or forms?

On 4/6/07, Crawford, Preston <[EMAIL PROTECTED]> wrote:
> I'm sure many of you know about this. The originally IE specific 
> attribute "autocomplete", that when set to "off" would prevent the 
> browser from saving the data in the form for autocompletion later.
>
> I'm working on a project that uses Struts 1.1.  So I have a few questions.
>
> #1 - Is autocomplete supported in later version of Struts 1?

No its not supported in any version - Struts only supports attributes that
are in the HTML 4 spec and has a policy of not adding non standard
attributes.

> #2 - If so, which version?

The tags were refactored in Struts 1.2.7 to make creating custom
implementations and adding additional attributes easier. So if you are going
to upgrade then this would be your only option. If you want to do this in
the form tag then something like the following:

public MyFormTag extends FormTag {
protected void renderOtherAttributes(StringBuffer results) {
renderAttribute(results, "autocomplete", "off");
}
}

In the other form "input" tags the equivalent method is
prepareOtherAttributes()

For  notes on upgrading and the issues you'll face then there are upgrade
notes on the wiki:

http://wiki.apache.org/struts/StrutsUpgrade

Niall

> I know there are ways to do this with JavaScript. Trapping the enter 
> keydown, etc. and doing a submit. I'm doing that currently. The 
> problem is that I'm trying to avoid attaching the onkeydown event to 
> the body, as many examples have you do, because doing this means that 
> even if you're not inside the form you can just hit enter and submit 
> the form. So you have to attach the onkeydown event to every form 
> field or else somehow check to see if the event was fired by a form
element.
>
> I'm just trying to support this functionality (enter key submits the 
> form while in the form, but doesn't save any of the fields' data) with 
> minimal headache. It's starting to look like going to autocomplete=off 
> might be better, thus my question.
>
> Preston

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



RE: Does struts 1.2.x or 1.3.x support the attribute "autocomplet e" f or forms?

2007-04-06 Thread Crawford, Preston
Oh, and the other question is if there are issues upgrading from 1.1 to
1.2.x or 1.3.x? Any reason this would be a difficult upgrade, assuming this
is the answer to my problem.

Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.

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



Does struts 1.2.x or 1.3.x support the attribute "autocomplete" f or forms?

2007-04-06 Thread Crawford, Preston
I'm sure many of you know about this. The originally IE specific attribute
"autocomplete", that when set to "off" would prevent the browser from saving
the data in the form for autocompletion later.
 
I'm working on a project that uses Struts 1.1.  So I have a few questions.
 
#1 - Is autocomplete supported in later version of Struts 1? 
 
#2 - If so, which version?
 
I know there are ways to do this with JavaScript. Trapping the enter
keydown, etc. and doing a submit. I'm doing that currently. The problem is
that I'm trying to avoid attaching the onkeydown event to the body, as many
examples have you do, because doing this means that even if you're not
inside the form you can just hit enter and submit the form. So you have to
attach the onkeydown event to every form field or else somehow check to see
if the event was fired by a form element. 
 
I'm just trying to support this functionality (enter key submits the form
while in the form, but doesn't save any of the fields' data) with minimal
headache. It's starting to look like going to autocomplete=off might be
better, thus my question.
 
Preston
 
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.