html:link and array

2003-04-04 Thread Brian Buckley
All I want is a single html link created from a single element of the array
(in my example the third element).  I am thinking that I do have the correct
html:link attributes for "name" and/or "property" but I am not sure.

Did you really mean to say  name="foos" property="params.2"?  I tried it and
it did not work either.

Brian




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



html:link and array

2003-04-04 Thread Brian Buckley
Hello,

I've have an array of Foo (Foo[]) in requestScope under the name "foos".
Foo has a getParams() method that returns a Map.

The following is not working.

...

What is the correct syntax to use a specific array element in a html:link ?

Brian




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



initialize application-scope variables

2003-03-29 Thread Brian Buckley
Hello,

I am writing a PlugIn (subclass of org.apache.struts.action.PlugIn ) to
initialize a bunch of application-scope variables.

Several of my JSP snippets also initialize application-scope variables
(using either , , , and/or <%
application.setAttribute(...); %>) and I would like to reuse these.

Is it possible to call JSPs from the init() method of a PlugIn?

One could of course just translate the JSP snippets to java for the PlugIn,
but the JSP is already written and some of the initializations are more
easily written in JSP than java anyway.

Any tips appreciated.

Brian



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



nested:forms

2003-01-15 Thread Brian Buckley
I have 3 actionform classes AForm, BForm, and ABForm.  AForm and BForm
contain only normal String fields (with getters/setters), while ABForm
contains instances of AForm and BForm (getters only).

I want to use nesting in my JSPs to promote consistency/eliminate redundant
work, so for example, ab.jsp looks like this:



...
  
 
  
 ...
  
 
  
...


a.jsp and b.jsp are wrapped with nested:root (as the above ab.jsp is) to
make the jsp:includes work.

My webapp can use either AForm alone, BForm alone, or ABForm.  On starting
my webapp, whichever form the user calls first works, but then the other
forms fail when called.  The nested tags seem to save something (must be in
either session or application scope?) that confuses property names and cause
subsequent calls to the other forms to look for properties from the first
form called.

Can anyone suggest what I've got wrong?  My understanding of nested tags is
not 100% clear.

Brian

PS My webapp is configured so that /form/ab.do, /form/a.do or /form/a.do,
will call either abform.jsp, aform.jsp or bform.jsp:



  





  





  





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: nested tag error

2002-12-13 Thread Brian Buckley
!!! That fixed it indeed.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




nested tag error

2002-12-13 Thread Brian Buckley
Here's a snippet of JSP which is not working:


  
 
  


It is giving a compile error "org.apache.jasper.JasperException: Options tag
must be nested in a Select tag".

I tried changing nested:select,nested:options to html:select,html:options
but then the tag doesn't find the nested property.

How can I fix the above snippet?

Brian (using struts1.1 beta1, Tomcat 4.1.12)






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: redundant tag declarations and JSTL

2002-12-05 Thread Brian Buckley
>>You might try putting all your taglib declarations into a taglibs.jsp file
and include that file on the rest of your pages. This has the added benefit
of localizing the declarations to one place.

Making a "taglibs.jsp" file as you suggest and including it in my "main
JSPs" but not my "JSP snippets" could be a good way to reorganize my jsp
files to eliminate redundant tag declarations.

A downside to such an approach is my JSP editor (IDEA) provides assistance
when there is a tag declaration in the JSP so removing the declaration from
my snippets would make writing the snippets a little harder.

I still find it weird that this wasn't a problem until adding in the JSTL
tag library.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




redundant tag declarations and JSTL

2002-12-04 Thread Brian Buckley
Hello:

My JSPs contain a bunch of include file statements inside of 
tags.  For example,


<%@ include file="/util/xxx/editor.jsp"  %>


They work great.  However, when I attempt to add JSTL into my pages, I get a
compile error when Tomcat attempts to process a JSP:

org.apache.jasper.JasperException: null(-1,-1) null:
org.xml.sax.SAXParseException: Attribute "xmlns:logic" was already specified
for element "jsp:root".

As the error message implies, I've determined the error is the result of
redundant taglib declarations, and this is happening because I have struts
tags in both included jsps and the main jsp.  It is surprising to me that
this error does not surface until adding in even one line of JSTL, which
does not seem to be part of the problem.

Why does this error only appear when adding in JSTL?

Are my original JSPs actually invalid (because they contain redundant taglib
declarations) and should not have been working in the first place?

I am Tomcat 4.1.12 and struts 1.1b1.

Brian







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: test.tomcat.41 failing due to LogService class

2002-09-25 Thread Brian Buckley

> Yes, try a Tomcat mailing list for help for starters :)

The test which is failing is one of the targets in the *struts* build.xml.  Does 
anybody run (and pass) the test targets when building struts from source?

Brian




test.tomcat.41 failing due to LogService class

2002-09-22 Thread Brian Buckley

Hello,

When I run the task "test.tomcat.41" from the struts build.xml in cvs, that serverside 
test is failing on me because Tomcat is unable to compile jspRedirector.jsp.  It 
appears the reason for the failure is Tomcat is not recognizing the 
org.apache.cactus.util.log.LogService class which is used in jspRedirector.jsp.  

I checked the cactus.jar file I am using (1.4.1) and sure enough, LogService is not in 
there.

Can anyone suggest what I should do to get this test passing?

Brian



setting a bean property

2002-06-25 Thread Brian Buckley

Beans named "a" and "b" are in request scope.  "a" has setter method setY() and "b" 
has getter method getY().

How would one execute 

a.setY(b.getY()); 

using taglib (either struts' bean: or std jsp:) syntax?

-Brian





MockStrutsTestCase and ServletContextListener

2002-06-24 Thread Brian Buckley

Hello,

I am running some MockStrutsTestCases (StrutsTestCase 1.7.1 from
strutstest-1.1_2.3.zip) and they are working well, but now I need to add a
TestCase which requires a ServletContext listener (Servlet API 2.3) to be
run prior to running my test.  The listener initializes several attributes
in the ServletContext that the test uses.

Reading the MockStrutsTestCase documentation, it appears that this
capability is part of the framework but I have not been able to get it
working - the ServletContext attributes that my ServletContextListener is
supposed to setup are not being set.

My setup to attempt to get this working includes putting my web.xml in the
same WEB-INF directory as my struts-config.xml.  The web.xml file contains
my listener entry and it works properly when used in a normal webapp war.
My classpath for the test includes the WEB-INF directory and my listener
class.

Has anyone gotten this capability working for them?  Any suggestions for me
to get this going?

Thank you.

-Brian


...

com.abcco.MyServletContextListener

...




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




MockStrutsTestCase

2002-06-21 Thread Brian Buckley

Hello,

I have been trying to run the example testcase in StrutsTestCase 1.7.1 
(strutstest-1.1_2.3.zip) but I am getting an error "Parsing error processing resource 
path /WEB-INF/struts-config.xml" from an underlying 
MalformedURLException/NullPointerException.

I have tried to follow the instructions in the readme file exactly - here is the ant 
task I wrote based on the readme instructions, which gives me this error.

  

 
 
 
 
 
 
 
 
 
 
 

  

 
The only adjustment I made to the instructions in the readme was to add the xerces' 
xmlParserAPIs/xercesImpl jars to the classpath to get by an original class not found 
exception.

Has anyone had a problem trying to run the TestLoginAction example, or have any 
suggestions for me to get this running?

Thank you.

-Brian