Re: html:form complains of bean missing

2005-03-01 Thread Curtis Taylor
Hi Scott,
If you choose to use the Struts html:form tag, you must declare the 
corresponding definition in the form:beans section of the struts-config 
file. That's the way the framework behaves as I've used it.

HTH,
-- Curtis
Scott Purcell wrote:
First off, as I am learning Struts I just wanted to thank those, for bearing with my learning curve and helping out so far.
 
Here is the issue:
I want to pass all my forms, even forms without params to the com.skp.action.LoginAction action class, because this class handles the "isLoggedIn" issue through a subclass of Action.
 
Anyway, I have a jsp page that has no params, so I have no bean to collect user data, so I configured my action like so:

type="com.skp.action.LoginAction" >
 
  
 
Anyway, I just want to always use the LoginAction as a "Front Controller" to my web app, and catch the status of "logged-in" etc.
This works well, but I have to use conventional  code and not the html:form tag:
 
works:

does not work:

 
When I use the above I get this error in the browser:
javax.servlet.ServletException: Cannot retrieve definition for form bean null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495)
at org.apache.jsp.main_jsp._jspService(main_jsp.java:175)

 
But I have no reason to have  a bean for this action.
How does one handle this problem?
 
Thanks
Scott
 
 
 
 
 


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


Re: One last ATTACHMENT issue

2005-03-01 Thread Curtis Taylor
Shot in the dark here:
IIRC, you don't need the ampersand after the initial question mark in 
the request URL. Try killing that & see what happens...

Good luck,
-- Curtis
Eric Lemle wrote:
Can anyone tell me why this
 VeselovaNataliaECV.doc
works perfectly.
But this.
function printAttachment( id, name )
{
  childWindow=window.open( 'AttachmentAction.do?&attachment_id='+id,
name,
'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=790,height=600');
  childWindow.focus();
}
which is called with...
if(document.forms[0].printCV.checked==true ||
document.forms[0].printAllAttachments.checked==true) {
  printAttachment( '341', 'printCV');
  }
throws an error messages saying it can find the file.
?

Eric D. Lemle
Senior Programmer / Analyst
Intermountain Health Care
36 South State Street, Suite 1100
Salt Lake City, Utah 84111 
United States of America (USA)
(801) 442-3688 -- e-mail: [EMAIL PROTECTED]

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


Re: Tiles - a reality check (contains many details) - Am I using this thing right?

2005-02-22 Thread Curtis Taylor
Hi Tim,
Scott's response pretty much covers the meat & potatoes. The leading 
"dot" naming convention is optional; some folks use it to clarify path 
confusion among Struts webapp files. I personally don't; the "dot" 
delimiter within the name does the job well enough for my usage.

HTH,
Curtis
Tim Christopher wrote:

   
   


I believe it is convention to place a leading . at the start of the
definition's name.  This signifies where the leading / would be if you
used slashes.  It'll work perfectly well without it though - just
remember that if you change it you will need to update all of your
paths in the struts config file too.
You may also find it useful to use
'org.apache.struts.actions.ForwardAction'.  This action will
automatically forward to the path / definition given as the parameter,
ie. the code below loads the page associated to the definition of
..public.welcome in the tiles configuration file.
  
   
Tim Christopher
On Tue, 22 Feb 2005 13:58:12 -0800, Scott Piker <[EMAIL PROTECTED]> wrote:
When using tiles this way, does this mean that any forward I define in
my struts-config.xml should be a valid Tiles Definition?
Would that then imply that every page in my application is specified
by a tiles Definition, and that's how I GET to any given page?
Yes, that's typically the way you would want to do it, but you're by no 
means forced to do it that way.  Your struts-config can forward to a mixture of 
tiles-defs, JSPs, etc... but I prefer to keep everything tiles-centric.

example: I want to create a Profile Editing page, so I create
profileEditBody.jsp and a NEW definition in the tiles-defs file
specifying only the TITLE and BODY ..a la




Bue heres the question... how do I call this thing from an Action
Class?!?!?! Argh
just refer to the definition name in the action mapping your struts-config:



HTH,
- Scott
-
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: of a header gives an SSL exception?

2005-02-22 Thread Curtis Taylor
What's the <%=header%> expression do? You've already closed the 
bean:include tag.

Have you looked at the SSLExt library (http://sslext.sourceforge.net/)?
Enquiring minds need to know ;-)
David Kennedy wrote:
I have a jsp which is trying to include a simple nav bar across the top 
of the screen:
  

<%=header%>


where 'header' is defined in struts-config.xml like this:
  

Simple. But when it loads as part of my 'ui' app I get this:
javax.servlet.ServletException: Exception opening resource 
https://1.2.3.4:8443/ui/includes/header.jsp: 
javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target

I can see that SSL is involved, but I was able to get past the login 
pages etc so I don't understand what Struts/Tomcat is trying to tell me 
here; any advice?

If it helps, I can load https://1.2.3.4:8443/ui/includes/header.jsp 
manually just fine.

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


Re: newbie question

2005-02-05 Thread Curtis Taylor
I agree with Christian. I've found an XML validation website/tool which 
is invaluable when you're brain-dead & still required to write code:

http://www.stg.brown.edu/service/xmlvalid/
HTH,
Curtis
Christian Bollmeyer wrote:
On Friday 04 February 2005 22:53, Soaring Eagle wrote:
Check the syntax of your struts-config.xml. The one you
posted is heavily mixed up. In fact it's not even well-formed
XML, with odd nestings, closing tags without a start tag,
illegal attributes and the like. I'd recommend to drop the
current version and rebuild it from scratch, using a
working version (like the one from the examples) as
a template. Keep special heed of proper nesting, the
cardinality of elements (0..1  or
 sections, for example), correct
attributes and the fact that order is important when it
comes to XML (top-down).
HTH,
-- Chris.
If it were a classloader problem, the server would
tell one by issuing ClassNotFoundException messages
and the like. It has no reason to lie, so missing jar
files are obviously not the cause here.  

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


Re: Formatting a date with a different time zone.

2005-02-01 Thread Curtis Taylor
Hi Derrick,
You have to declare your properties file in your web.xml. Assuming it's 
called "ApplicationResources.properties," and lives under 
WEB-INF/classes, you'd do it like this:


 javax.servlet.jsp.jstl.fmt.localizationContext
 ApplicationResources

Just to be safe, brush up on the web.xml syntax & the JSTL requirements 
(this is off the top of my head ;-)

HTH,
Curtis
Derrick Koes wrote:
Yes, the fmt library looks like the winner.  It doesn't seem to pick up my key 
from my resource file in the timeStyle attribute.  How do I do that?
 
  
  
Thanks,
Derrick

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


Re: Problem deploying to WebSphere

2005-02-01 Thread Curtis Taylor
Hi Daniel,
What's in your application.xml file? That's the one which tells WS what 
your context root is. In your case it would need to be "StatusInquiry" 
(sans quotes).

HTH,
Curtis
Daniel Kalcevich wrote:
I am currently trying to deploy a Struts 1.2.6 to a WSAD 5.0 Server.
The application starts up correctly, but it appears the action mapping
is not being picked up. 

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


Re: Error Pages

2005-01-31 Thread Curtis Taylor
Hi Tim,
One (maybe obvious) question:
Does your tiles-defs.xml definition for "public.error" have a path to 
your jsp?

If not, that could wreak all kinds of error havoc...
Tim Christopher wrote:
Hi,
I'm trying to setup custom error pages using Tomcat but keep on
getting the following error:
[EMAIL PROTECTED]: Exception
Processing ErrorPage[errorCode=404, location=/errors/404.do]
ClientAbortException:  java.net.SocketException: Software caused
connection abort: socket write error
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
rest of stack dump...
Here is what's in my files:
Web.xml
--
  
404
/errors/404.do
  
Struts-Config.xml
--

  path="/errors/404" 
  type="org.apache.struts.actions.ForwardAction"
  parameter="public.error" />

Thanks in advance for your help.
Tim
##
Ps.
As a matter of best practices should I be using the above to forward
to the page (Tiles plug-in) or should I use the following, where
BlankAction extends action and whose execute method always returns
"success".

  

##

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


Re: Struts 2.0 or Struts 0.0?

2005-01-31 Thread Curtis Taylor
I think Mr. McClanahan summed it up nicely ;-)
Alex Kravets wrote:
So what do you guys think?
http://www.theserverside.com/news/thread.tss?thread_id=31509

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


Re: Validator question

2005-01-20 Thread Curtis Taylor
Hi Hubert,
Thanks for the reply; very helpful & much appreciated (as is all your 
work ;-).

I've done a bit more gumshoeing; it seems to me the html:javascript 
tag's exception handling is a bit different than other Struts tags. I 
discovered that the reason that the html:javascript tag printed the 
commons-validator.jar's scripts to the target JSP was the result of 
another non-related tag error (read: pebkac ;-).

So, by commenting it out I was able to discover what the root problem 
was. Perhaps this can be shared on the wiki? I'd be happy to add it to 
the tribal knowledge there...

Thanks again for your help,
Curtis
Hubert Rabago wrote:
I'm not exactly sure what you mean.  If you meant the
 resulted in javascript code being written without
being surrounded by 

Validator question

2005-01-19 Thread Curtis Taylor
Hello,
Here's (what I hope to be) a simple question:
What causes the  tag to fail & interfere with the http 
response by writing raw text to it?

I've seen only 2 posts regarding this issue, but I'm relatively certain 
there must be more...

Any insights or clarifying questions more than welcomed,
-- Curtis
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] validation syntax - decimal precision

2005-01-16 Thread Curtis Taylor
Hi Nathan,
Two suggestions:
1.) Mastering Regular Expressions by J.E.E. Friedel 
(http://www.amazon.com/exec/obidos/ASIN/0596002890/qid=1105937543/sr=2-1/ref=pd_ka_b_2_1/002-6332011-0856023)

2.) Kodos (http://kodos.sourceforge.net/home.html)
Good luck,
Curtis
Nathan Coast wrote:
Hi,
I have a price field that I want to validate as a float with these 
additional constraints 1-3 digits before the decimal, if the decimal 
exists, 1-2 digits after the decimal.

anyone know the regexp that describes this?
cheers
Nathan

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


Re: Still PLZ Help with Cannot find message resources under key org.apache.struts.action.MESSAGE

2005-01-16 Thread Curtis Taylor
Hello,
This error implies Digester has a problem with your struts-config.xml 
file. If you post your struts-config.xml in its entirety it may help the 
group determine what that problem is.

HTH,
Curtis
Avinash Sridhar wrote:
Hi,
   Thanks for the suggestionsAfter I add 


to the struts-config.xml file, When I start-up the server, I get the following 
error message
/**Error***/
Element type "message-resources" must be declared.
AND
The content of element type "struts-config" must match 
"(data-sources?,form-beans?,global-forwards?,action-mappings?)".
/**Error***/
Help towards this wud be greatly appreciated.
Thanking you 
AS

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


Re: problem submiting List-Backed Indexed ActionForm

2005-01-15 Thread Curtis Taylor
Hi Oleg,
Have a look here:
http://wiki.apache.org/struts/StrutsCatalogLazyList
I've found these techniques to be invaluable.
HTH,
-- Curtis
Oleg wrote:
I am initializing ArrayList fields in reset(), but code is ommited.
I wish it was that easy :)

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


Re: I must be missing something fundamental about Struts ...

2005-01-08 Thread Curtis Taylor
Hi Mark,
Try changing the 'forward' to 'action' in your html:link tag:
Sign in
HTH,
Curtis
Mark McWiggins wrote:
... as I seem to get stuck on the simplest things.
For example:
 
   Sign in 
 
Thanks,
Mark McWiggins
425-369-8286

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


Re: Please explain Struts Chain

2005-01-07 Thread Curtis Taylor
Hi Joe,
Thanks for the clarification; looks way interesting!
One (rather pointed) question: Being that RequestProcessor is one of the 
primary extension points for the Action servlet, how will this new API 
affect HTTPS protocol handling? I assume that the SSLExt library will 
have to be completely rewritten, or are you guys planning on rolling 
that functionality into Struts 1.3?

- Curtis
Joe Germuska wrote:
Geez, you want documentation?
Actually, I was starting to update the current docs the other night, and 
it made me realize that there are things I'd like to change, so that 
they work the way I want to write about them :^)

Anyway, to begin with: if you have never cared about the 
RequestProcessor class, short of, perhaps specifying to use the 
TilesRequestProcessor, then you can safely continue to not care about 
it, ignoring the fact that a different class is doing what should amount 
to the same thing.

(The one exception being that you'll have to take some steps to use 
tiles, but since you'll also have to start using the struts-tiles JAR, I 
imagine we'll have a simple list of steps and most people still won't 
need to know much more about it.)

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


Re: Set request parameters in servlet through action

2005-01-04 Thread Curtis Taylor
Hi,
You *cannot* directly add parameters to an http request inside an Action 
class. You *can* add attributes  to the request context (that's what 
HttpServletRequest was designed for).

So, in your JSTL-aware page, access your request *attribute*:
 or

HTH,
Curtis
dsarris wrote:

I do not thing that Hollaway solution is the correct one. I do not
pass it to the request parameter list. As brenmcguire stated, I can
only set an attribute in the Request (not the parameters).
Thus, what is the equivalent for retrieving the attribute in my JSP page?

OR


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


Re: [OT] Need help with layered Map iteration in JSP

2004-08-13 Thread Curtis Taylor
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>


  <%-- ${entry.key} is the current key --%>
  <%-- ${entry.value} is the associated bean array --%>
  
  

  


See the API docs for the LoopTagStatus interface:  http://tinyurl.com/542tw

"Erik Weber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How can I refer to the index of the current iteration with c:forEach
> (analogous to the indexId attribute to logic:iterate)?
>
> Thanks,
> Erik
>
>
> Kris Schneider wrote:
>
> ><%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
> >
> >
> >  <%-- ${entry.key} is the current key --%>
> >  <%-- ${entry.value} is the associated bean array --%>
> >  
> >...
> >  
> >
> >
> >Quoting Erik Weber <[EMAIL PROTECTED]>:
> >
> >
> >
> >>I could use some Struts-EL/JSTL tag help, please.
> >>
> >>I have a Map with each entry having a String as the key and a bean array
> >>as the value.
> >>
> >>I need two iterations, one nested inside the other.
> >>
> >>For the outer iteration, I want to iterate the keySet of the Map. I
> >>don't know what the keys are going to be or how many there will be.
> >>
> >>Within that iteration, for each key in the keySet, I need to iterate
> >>over the buckets of the array that is the value for that key.
> >>
> >>To make this more clear, let's say I will produce a table of tables,
> >>somewhat like this:
> >>
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>  
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>
> >>
> >>  
> >>
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>  
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>
> >>
> >>  
> >>
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>
> >>Could someone show me some skeleton JSTL or Struts-el code?
> >>
> >>I would appreciate it very much,
> >>Erik
> >>
> >>
> >
> >
> >




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



Re: GOING GOING GONE DYNAMIC

2004-08-06 Thread Curtis Taylor
Hey Michael,

ActionMapping is a subclass of ActionConfig, right? So if you use a similar
construct for your mapping as for your form config, it *might* work (caveat:
superficial API scan only; no testing). It's just a question of where in
your food chain you do it (inside your Action class execute() method,
perhaps).

Of course, that would defeat the declarativity (is that a word?) of an
ActionMapping...

I imagine Mr. McClanahan will weigh in on this at some point ;-)

My 1.25 (inflation-beridden) cents,

Curtis

"Michael McGrady" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 12:57 PM 8/6/2004, you wrote:
> >The problem would with Java in this case, since form is passed in.
> >
> >you could do something like
> > BeanUtils.copyProperties( form,
> > DynamicActionFormFactory.createBlankForm( blah blah);
> >and that might work better.
>
>
> public class DynamicActionFormFactory {
>public static ActionForm createBlankForm(String name, String type,
> String[] fields) {
>  ActionForm form = null;
>  FormBeanConfig config = null;
>  FormPropertyConfig prop = null;
>  config = new FormBeanConfig();
>  config.setName(name);
>  config.setType(type);
>  if (fields != null) {
>for (int i=0; i  prop = new FormPropertyConfig();
>  prop.setName(fields[i]);
>  prop.setType("java.lang.String");
>  prop.setInitial("");
>  prop.freeze();
>  config.addFormPropertyConfig(prop);
>}
>  }
>  config.freeze();
>  try {
>form = (ActionForm)
> DynaActionFormClass.createDynaActionFormClass(config).newInstance();
>  } catch (Exception e) {
>StdOut.log("log.error",new ChainedException(e,"Exception creating
> blank form: " + e.getMessage()));
>  }
>  return form;
>}
> }
>
> What about the ActionMapping?
>
> Michael McGrady
>
>




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



Re: Upgrading a Struts 1.1 app to 1.2.1: any 'gotchas' to watch for?

2004-08-02 Thread Curtis Taylor
Thanks for the detail, Niall; I quite look forward to the upgrade (never
thought I'd hear myself say something like that ;-)

And thank you, Nathan for the positive response.

Curtis

"Niall Pemberton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * jars - I guess its obvious to say you need to replace the jars, but the
> one people might forget is the new commons-validator.jar for version 1.1.3
> of validator. I'm not sure where you can download this from currently,
> except the Struts 1.2.1 distro includes it.
>
> * tlds - remember to deploy the new versions of the tld files for struts
> tags. If you don't you won't be able to use the new tag attributes added.
>
> * validator.xml - change the dtd declaration at the top to refer to the
dtd
> for validator 1.1.3
>
>  "-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.1.3//EN"
>   "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
>
> * validator-rules.xml - upgrade to the new version of validator-rules.xml.
> In the Struts 1.2.1 version the dtd declaration in validator-rules.xml is
> incorrect - its right in the latest nightly build - either use that or
just
> change the dtd declaration as shown above in the 1.2.1 version of
> validator-rules.xml.
>
> * struts-config.xml - its not absolutely necessary but you should upgrade
to
> the 1.2 version of the dtd (Note that as well as the version number
changing
> so has the url to struts.apache.org).
>
>  "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
>"http://struts.apache.org/dtds/struts-config_1_2.dtd";>
>
>  If you do upgrade to the 1.2 version dtd then there are a couple of
> attributes which have been removed and you will need to remove them from
> your struts-config:
> - debug has been removed from the "controller" element.
> - dynamic has been removed from the "form-bean" element
>
> Also "contextRelative" in the "forward" element is now considered
> "deprecated" and a new "module" attribute added.
>
> The only other thing I did was change references to ActionError to
> ActionMessage - its wasn't necessary to do it, but it got rid of the
> "deprecation" warnings when I compile.
>
> Niall
>
> - Original Message - 
> From: "Curtis Taylor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 28, 2004 6:28 PM
> Subject: Upgrading a Struts 1.1 app to 1.2.1: any 'gotchas' to watch for?
>
>
> > Hi everyone,
> >
> > After a cursory check of the Wiki & Struts site, I have a question for
the
> > collective expertise in the group.
> >
> > I'd like to leverage all the new features & fixes available in the 1.2.1
> > release by upgrading my existing app. Here's what we're running now:
> >
> > Struts/Tiles 1.1
> > sslext for Struts 1.10 - 4
> > IBM WebSphere 5.1
> > JSTL 1.0 (Thanks, IBM ;-)
> >
> > Has anyone experienced any issues doing such an upgrade?
> >
> > Thanks in advance for sharing any tribal knowledge,
> >
> > --Curtis




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



Upgrading a Struts 1.1 app to 1.2.1: any 'gotchas' to watch for?

2004-07-30 Thread Curtis Taylor
Hi everyone,

After a cursory check of the Wiki & Struts site, I have a question for the
collective expertise in the group.

I'd like to leverage all the new features & fixes available in the 1.2.1
release by upgrading my existing app. Here's what we're running now:

Struts/Tiles 1.1
sslext for Struts 1.10 - 4
IBM WebSphere 5.1
JSTL 1.0 (Thanks, IBM ;-)

Has anyone experienced any issues doing such an upgrade?

Thanks in advance for sharing any tribal knowledge,

--Curtis




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



Re: html:error in tiles

2004-05-06 Thread Curtis Taylor
Hi Dave,

Tiles seem(s) to have particularly needy scoping issues. Try setting attributes 
for the particular Tile you're inserting in your .jsp, then do a 

You may also want to consider using messages as opposed to errors, AFAIK, errors 
are or will be deprecated.

HTH (& I'm not too off-base),

Curtis

Dave Hallam wrote:
Hi,

I've got a page which uses tiles to load another jsp as part of the
page body.  In the tiled jsp there is a form that I validate.  If I
create ActionErrors in the form validation, I can render the
 correctly in the main jsp page but nothing appears in
the tiled jsp (which is where I actually want the data to appear).
Can anyone help?  I know the resource is there and that the errors
are present as they appear at the top of the main page - they just
don't appear in the tile.
Thanks very much,

Dave

	
	
		

Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html


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


Re: is this posible? return to the same page after being executed

2004-05-05 Thread Curtis Taylor
Hi Julio,

There are 2 ways I'm aware of:

1.) In your struts-config.xml action-mappings, add a "success" mapping that 
points to your mapping path; i.e.:

  

  
Then, in your action class, return mapping.findForward("Success");

and you're done. (Note the ".do" required in the forward; thanks particularly to 
Hubert Rabago for making the little lightbulb go off over my head on this ;-)

2.) If you're using a Dispatch action and a "CRUD" type design where you 
populate your form with a method called for example, "populateData," simply 
refer to that method for the return in the other "letters" of your action class:

return this.populateData(mapping, form, request, response);

and you're done (thanks to co-worker Glenn Wilson for pointing this one out to me).

HTH,

Curtis

Julio Cesar De Salvo wrote:

Is there some way to return to the page / action that called to action
that is being executed?
I've 1 jsp that forwards to an action and I would like to return to the
same page that called the action, by setting the path in the
ActionForward object.
 
Thanks.



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


Re: JSP help

2004-05-04 Thread Curtis Taylor
Hi San Pedro,

This is an HTML question: the "size" attribute refers to the number of rows of 
data visible in the select box, not the physical width on the page.

HTH,

Curtis

Santhosh P wrote:

Hi,

I have a select box in jsp page having data loaded as collection and is
working well.
My problem is the display text content "datalist" is too large and i want
the display limited
content in select box for good look and feel of the display page.
I have set a size="10" for select tag.
But still the select box is streched to include the full text content.
Why here the size attrribute not working here but works well for

Any one help me
Cheers
San Pedro
   
   
  
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 04, 2004 12:44 AM
Subject: [struts] Digest Number 3851


There are 25 messages in this issue.

Topics in this digest:

 1. Validator execution-order, all at once possible?
  From: [EMAIL PROTECTED]
 2. Re: Setting html:text readonly attribute
  From: Jason Miller <[EMAIL PROTECTED]>
 3. RE: Setting html:text readonly attribute
  From: Paul McCulloch <[EMAIL PROTECTED]>
 4. Re: How to use resource bundle in attributes
  From: Nathan Maves <[EMAIL PROTECTED]>
 5. RE: Setting html:text readonly attribute
  From: John Moore <[EMAIL PROTECTED]>
 6. Re: How to use resource bundle in attributes
  From: Ralf Schneider <[EMAIL PROTECTED]>
 7. RE: forwarding to a pop-up window
  From: "Ricardo Cortes" <[EMAIL PROTECTED]>
 8. Re: trouble with taglibs in xml syntax
  From: Tomasz Dreßler <[EMAIL PROTECTED]>
 9. Re: How to use resource bundle in attributes
  From: bOOyah <[EMAIL PROTECTED]>
10. Re: How to use resource bundle in attributes
  From: Nathan Maves <[EMAIL PROTECTED]>
11. Re: trouble with taglibs in xml syntax
  From: Kris Schneider <[EMAIL PROTECTED]>
12. Re: How to use resource bundle in attributes
  From: Ralf Schneider <[EMAIL PROTECTED]>
13. Re: How to use resource bundle in attributes
  From: Ralf Schneider <[EMAIL PROTECTED]>
14. nested:iterate & nested HashMap
  From: Serhiy Brytskyy <[EMAIL PROTECTED]>
15. sslext - non-ssl http links available from https pages
  From: "Eric Dahnke" <[EMAIL PROTECTED]>
16. RE: forwarding to a pop-up window
  From: "Brian Lee" <[EMAIL PROTECTED]>
17. RE: forwarding to a pop-up window
  From: "Ricardo Cortes" <[EMAIL PROTECTED]>
18. Re: Way to reload struts Action classes in WebLogic8.1
  From: Craig McClanahan <[EMAIL PROTECTED]>
19. Re: Split web.xml into multiple files
  From: Craig McClanahan <[EMAIL PROTECTED]>
20. issue with LazyList
  From: "Mathew, Manoj" <[EMAIL PROTECTED]>
21. Alpha and Beta testing...
  From: "Michael Marrotte" <[EMAIL PROTECTED]>
22. Re: Remembering form values across requests
  From: Jason Miller <[EMAIL PROTECTED]>
23. Special Characters (german Umlaute)
  From: Ralf Schneider <[EMAIL PROTECTED]>
24. Re: Alpha and Beta testing...
  From: Vic Cekvenich <[EMAIL PROTECTED]>
25. Re: [OT] Page Cannot Be Displayed
  From: Rick Reumann <[EMAIL PROTECTED]>


Message: 1
  Date: Mon, 3 May 2004 17:06:10 +0200
  From: [EMAIL PROTECTED]
Subject: Validator execution-order, all at once possible?
http://marc.theaimsgroup.com/?t=10590259932&r=1&w=2

Hi folks,

I got stuck on a problem discussed earlier in this list (@see link
above).
Hope this hasn't been answered elsewhere - it was the only thing I could
find.
Forms seem to get validated in a certain order. First, all required
fields are checked. Only after passing all required checks is other
validation performed. Correct?
Suppose you have a field "name" and a field "age". Both a required and
age also has integer checking applied. If user leaves "name" blank and
enters bogus values (non-int values) in age, validation will complain
only about name being required - not age being invalid. Only after name
is filled, integer validation complains.
I would like to see all applicable error messages at once. Is that a
configurable option? Work-arounds?
Thanx
Nils


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [OT] Clustering Application Scope Objects

2004-04-10 Thread Curtis Taylor
Hi Mike,

This is an interesting question. Using the PlugIn interface to store 
"semi-static" data in the app context is a commonly accepted pattern (we use it 
in the project I'm working on now). However, there's no mechanism currently 
available in Struts to allow for data model change event notification 
(evidently, that's the major difference between Struts & Barracuda, from what 
little I understand of Barracuda). I'd personally love it if there were a simple 
mechanism available to Struts for just such event notification.

In the meantime, you may want to store such data in session scope, as it's more 
"volatile" (periodically speaking). I don't know the nature of your data, but if 
it isn't a huge amount, it shouldn't be a problem.

Keep us posted on your progress.

Curtis
--
cee dot tee at verizon dot net
Mike Duffy wrote:
Thanks Christian,

Let me give you a specific example of what I am trying to do.

I have several different sets of label/value pairs that are stored in database tables. 
 These
label/value pairs make up the select options and other interface options for web pages 
in the
application.  The options do not change that often, so rather than going back to the 
database each
time a page is displayed, I'd like to store the options in maps that are stored in 
application
scope and easily accessible through JSTL.
On the occasion that the options do change, I'd like to reload the applicable maps to all servers
in the cluster.  

It seems like this would be a good feature for Tomcat to have, but from reading the 
documentation
it seems that the feature is not there.
Perhaps some sort of JMS broadcast service would do the trick.  Does any one have any suggestions?

Mike


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


Re: Custom attribute on

2004-04-10 Thread Curtis Taylor
Hi Igor,

The "datafld" is, IIRC, an IE-only DOM property. I believe Struts only supports 
the W3C DOM.

HTH,

Curtis
--
c dot tee at verizon dot net
Igor Antonacci wrote:
Not exactly.
I'm trying to bind a textbox to a MS DataSource (DSO) on browser side;
Just downloading a XML (DSO) as part of HTML, I can bind every field
(html controls) of my HTML table to it.
It results in a simple EditList managment (as it's restricted to MS
browser).
As I want to use Struts features on server-side, I'd like to put
 together with datafld.
Have you any solution ?

Thanks,
Igor.
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Fri 4/9/2004 3:55 PM
To: Struts Users Mailing List
Subject: Re: Custom attribute on 
 
Are you trying to map your text field to a database column?

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
MSN: [EMAIL PROTECTED]
Yahoo IM:[EMAIL PROTECTED]


- Original Message - 
From: "Igor Antonacci" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 9:49 AM
Subject: Custom attribute on 

Hi All,
again with an issue :).
I'd like to put a new (non-standard) attribute on 
 tag.

Whenever I try, Struts raise an error saying there's no
setter method for that attribute.
Here an example:



The "datafld" attribute is used just on client-side (on resulting
 tag). 

Is there any solution than implementing a new Taglib (inheriting by
TextTag class)?
Thanks,
Igor.
-
Callidus Software 
Igor Antonacci
Core Engineer
[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: [slightly OT] Any advice for 'jsp.error.useBean.duplicate' ?

2004-04-09 Thread Curtis Taylor
You're creating the bean "status" in the varStatus declaration in your c:forEach 
action. It's in scope in the loop as "status" already, so you don't need to 
re-initialize it. You can access its attributes inside your loop:




...etc.

Just curious; what're you trying to do inside the loop?

Curtis
--
c dot tee at verizon dot net
bOOyah wrote:
It's killing me.  Here's the snippet:

[ServletException in:/pages/editscheduledetails.jsp]
/pages/editscheduledetails.jsp(276,6) jsp.error.useBean.duplicate'
org.apache.jasper.JasperException: /pages/editscheduledetails.jsp(276,6)
My assumption in that the Jasper compiler thinks I have attempted to use 
a bean multiple times in the same scope or something.

Here's the only piece of that JSP that uses a bean:

Line 276:


  
...
If I change "status" to "qwerty" it all works fine!  The JSP books say 
that the 'varStatus' variable is local to the 'c:forEach' loop!  How can 
I be declaring duplicate beans?  I even added a scope="page" to the 
'useBean' clause, but it made no difference.

I'm not explicitly including other JSPs in this JSP...I'm using Tiles 
and Struts.

Google only returns very scant info about 'jsp.error.useBean.duplicate' :-(

Thanks for any help.



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


Re: Question about logic:iterator, indexId and hidden fields

2004-04-06 Thread Curtis Taylor
Sandeep's correct; from the W3C website:

"Every form must be enclosed within a FORM element. There can be several forms 
in a single document, but the FORM element can't be nested."

Curtis
--
c dot tee at verizon dot net
Takhar, Sandeep wrote:
something about having forms in forms that I don't think is correct, but I may be completely wrong.

sandeep

-Original Message-
From: Eric Hodges [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 2:47 PM
To: 'Richard Yee'; Struts Users Mailing List
Subject: RE: Question about logic:iterator, indexId and hidden fields
I have both cases:

1. A single form containing lists.  Each element in the list has a submit
button to edit that element.
2. Lists in which each element contains a form.  Each form has a submit
button to edit that element.
-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 10:19 AM
To: Struts Users Mailing List
Subject: Re: Question about logic:iterator, indexId and hidden fields
This logic isn't going to help the problem.


 "/>


All it is going to do is create a bunch of input
parameters with type="hidden" and having values of
0,1,2,3 
What does your form really look like? Do you have
multiple submit buttons, links? What items are you
indexing? Are you trying to have multiple forms in
your iteration?
Regards,

Richard

--- Adam Hardy <[EMAIL PROTECTED]>
wrote:
Actually you might need a name attribute on that
hidden field as well 
... which could get complicated. It depends on where
you form is. Inside 
or outside the logic:iterate?

On 04/06/2004 06:43 PM Adam Hardy wrote:

This is pseudo-code, so before use it'll need
corrections! For JSP2 & JSTL


 "/>



On 04/06/2004 06:30 PM Eric Hodges wrote:


Does anyone know of a simple way to send a
logic:iterate's indexId 

back as a
form bean property on submit?
-Original Message-
From: Eric Hodges Sent: Friday, April 02, 2004
7:24 AM

To: Struts Users Mailing List
Subject: RE: Question about logic:iterator,
indexId and hidden fields

I mean when the page is compiled, the
 tag is converted 

to an
 tag before the <%=index%> tag produces
Java code.

I think the taglib directive *is* incorrect
whenever I get the <%=index%>

tag to produce Java code, that's why it leaves
 in the 

HTML
output.  When I remove the <%=index%> tag, or
when I include it in such a

way that it doesn't generate Java code, the
 tag is

recognized.

What I want to do is write a  tag
that passes the value of

Integer "index" to a Javascript function in its
"onClick" function.



-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 8:02 AM
To: Struts Users Mailing List
Subject: RE: Question about logic:iterator,
indexId and hidden fields

I think we're having trouble understanding what
you're doing.  In

particular, you say that "the  tag
is evaluated before

the <%=index%> tag".  What do you mean by that? 
Then, you are now

saying that after fixing your scriptlet
expression reference, you say

that the " tag isn't replaced with
an  tag".  Do

you mean that in the HTML output, you see
"" instead

of ""?  If you're really seeing
"" in the

HTML output, then this would indicate that your
taglib directive is

incorrect or not present.



-Original Message-
From: Eric Hodges
[mailto:[EMAIL PROTECTED] Sent: Thursday, 

April 01, 2004 6:30 AM
To: [EMAIL PROTECTED]
Subject: RE: Question about logic:iterator,
indexId and hidden fields

Thanks for the suggestion, but that doesn't work
either.  The

 tag isn't replaced with an
 tag when I use the 

syntax
you suggest.  I've tried many variations on
these syntaxes.  If the JSP

expression get's parsed, the struts tags aren't
understood.  If the 

struts
tags are understood the JSP expression isn't
parsed.

Any other ideas?  Surely this is a common usage
pattern.

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 10:46 AM
To: [EMAIL PROTECTED]
Subject: Re: Question about logic:iterator,
indexId and hidden fields



"Eric Hodges" <[EMAIL PROTECTED]> wrote in
message

news:[EMAIL PROTECTED]

I have a form with a list of elements on it. 
Each element 

has an "Edit"


button associated with it.  When the user
clicks the Edit 

button for a


specific element, I want to send back the value
of indexId 

in a hidden
field

on the form.  I can't figure out a clean way to
do this.  The

documentation


says "indexId" will create a bean, but it
really creates an 

Integer (which


isn't a JavaBean).  I've tried passing my
indexId to a 

Javascript function


that sets the form's hidden field sort of like
this:


but the  tag is evaluated before
the <%=index%> tag

The problem is that you have illegal JSP syntax
for the 'onclick' 

attribute.
The attribute value must be a string literal or
a scripting 

expression. You
cannot mix the two. Try this instead:
onclick='<%= "setEditIndex(" + index + ")" %>'

--
Martin Coope

Re: how to initiate an actionform?

2004-03-29 Thread Curtis Taylor
Hi Mike,

Go here:

http://www.husted.com/struts/tips/007.html

Curtis
--
c dot tee at verizon dot net

Mu Mike wrote:
> I m using a htmol:multibox tag, I want the check boxes checked or 
> unchecked every time differently accoriding to the data I have in my jsp 
> file, I m using an action form ,it has a string[] property, But I dont 
> know how  to initate the property with the data I have in jsp file.
> 
> any good suggestions?
> 
> Thanks&Regards
> Mike
> 
> _
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn 
> 
> -
> 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]