Sharing information among web apps

2002-05-15 Thread Roshan Paiva

Hi..

This is not a struts related question.. but I need to know if there is a
way of sharing information between web applications. for example I have
a common class.. maybe in the server's classpath .. and one web app
accesses it and sets some values.. and then another web app accesses it
and gets those values.. 

Thanks and Kind Regards
Roshan




RE: html:select how to use it?

2002-04-25 Thread Roshan Paiva

Hi Mark, Jim..

I used the html:select tag like you asked me to but it throws me this
exception.. What am I doing wrong..?

java.lang.Error: Fatal Error: missing resource:
java.util.PropertyResourceBundle
at org.apache.jasper.Constants.getString(Constants.java:218)
at
org.apache.jasper.compiler.TagBeginGenerator.convertString(TagBeginGener
ator.java:287)
at
org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGen
erator.java:219)
at
org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatem
ents(TagBeginGenerator.java:309)
at
org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.
java:378)
at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.genera
te(JspParseEventListener.java:888)
at
org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEve
ntListener.java:263)
at
org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspPa
rseEventListener.java:226)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:238)
at
org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:697)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(J
spServlet.java:244)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServle
t.java:261)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)

I have an arraylist(controlNumbers) of an object called transferBox's
and I need to populate the dropdown with a property of transferBox
called controlNumber

Here's my code...


  Select
  

   <%= transferBox.getControlNumber() %>

  


Thanks for your help
Kind Regards
Roshan

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 2:20 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select how to use it?


Thanks, Jim.  I thought about giving that to Rashan as well, but I've
never
been able to get it to work correctly.

Mark

-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:00 PM

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate
a
> dropdown list:
> 
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
> 
> 1.  The html:select property is a property in your bean, if one
exists.
> 2.  styleId is just the HTML reference if you want to get a value
with,
say
> JavaScript.
> 3.  The first html:option is the default "selected" option that
displays.
> 4.  The logic:iterate id is arbitrary but required to reference the
list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned
to a
> session
> attribute in my action class:
> 
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 + 
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute( 
>  "listExpYears", listExpYears);
> 
> 6. In html:option value, remember to cast the List objects to strings
as
> Struts is expecting a string.
> 
> Easy as pie, eh?
> 
> Mark
> 
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
> 
> > Hi...
> > 
> > Could anyone pls tell me how to populate a dropdown list using
struts
> > tag libraries.
> > 
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> > 
> > Kind Regards
> > Roshan
> > 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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

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


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




RE: html:select how to use it?

2002-04-24 Thread Roshan Paiva

Thanks a lot Mark.. I'll try it out.. 

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 1:44 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select how to use it?


Here's a simple example of how I retrieve a List of years to populate a
dropdown list:


  Year
  

   <%= expYear %>

  


1.  The html:select property is a property in your bean, if one exists.
2.  styleId is just the HTML reference if you want to get a value with,
say JavaScript. 3.  The first html:option is the default "selected"
option that displays. 4.  The logic:iterate id is arbitrary but required
to reference the list's elements. 5.  iterate name is the name of my
ArrayList of years that I assigned to a session
attribute in my action class:

   List listExpYears = new ArrayList();
   for( int k = 1; k < 11; k++) {
 listExpYears.add(( new Integer( 2000 + 
 Calendar.getInstance().YEAR + k))
 .toString());
   }
   request.getSession().setAttribute( 
 "listExpYears", listExpYears);

6. In html:option value, remember to cast the List objects to strings as
Struts is expecting a string.

Easy as pie, eh?

Mark

-Original Message-
From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:17 PM

> Hi...
> 
> Could anyone pls tell me how to populate a dropdown list using struts 
> tag libraries.
> 
> I have an arraylist of databeans.. The dropdown list should skim 
> through each item in the arraylist and take the value of
> databean.getFirstValue() (or the firstValue property of the data 
> bean). I believe the tag is html:select. However I am not certain on 
> how to use it.
> 
> Kind Regards
> Roshan
> 

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


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




html:select how to use it?

2002-04-24 Thread Roshan Paiva

> Hi...
> 
> Could anyone pls tell me how to populate a dropdown list using struts
> tag libraries.
> 
> I have an arraylist of databeans.. The dropdown list should skim
> through each item in the arraylist and take the value of
> databean.getFirstValue() (or the firstValue property of the data
> bean). I believe the tag is html:select. However I am not certain on
> how to use it.
> 
> Kind Regards
> Roshan
> 



RE: Design Help...

2002-04-16 Thread Roshan Paiva

Thanks..

Where do i populate the collection? should i continue populating it in a
servlet before forwarding it to the jsp .. and then use a iterate tag to
display it? or is there another way i should follow in struts.

Thanks and Kind Regards
Roshan


-Original Message-
From: Enrique M. Almonte [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 4:54 PM
To: Struts Users Mailing List
Subject: Re: Design Help...


Hi, check the iterate, nested tags or display tags at
http://edhill.its.uiowa.edu/display/

Enrique Almonte
Datapro Inc.

- Original Message -
From: "Roshan Paiva" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List' (E-mail)"
<[EMAIL PROTECTED]>
Sent: Tuesday, April 16, 2002 12:48 PM
Subject: Design Help...


> Hi..
>
> I am designing an application which needs to populate a table in the
index
> page.
>
> Previously what i had done was, in a servlet first populated a
collection
by
> calling a Manager class, then setting the collection in a request
object,
> and then forwarding it to the index page which will get the collection
> from the request object and then populate the table.
>
> Could you pls help me out and tell me the best way to implement that
> using the struts framework.
>
>
> Thanks and Kind Regards
> Roshan
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>


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


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




Design Help...

2002-04-16 Thread Roshan Paiva

Hi..

I am designing an application which needs to populate a table in the index
page.

Previously what i had done was, in a servlet first populated a collection by
calling a Manager class, then setting the collection in a request object,
and then forwarding it to the index page which will get the collection
from the request object and then populate the table.

Could you pls help me out and tell me the best way to implement that
using the struts framework.


Thanks and Kind Regards
Roshan


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




Pupulating the index page using struts

2002-04-16 Thread Roshan Paiva

Hi..

Firstly i am new to struts.
I am designing an application which needs to populate a table in the index
page.
Previously what i had done was, in a servlet first populated a collection by
calling a Manager class, then setting the collection in a request object,
and then forwarding it to the index page which will get the collection from
the request object and then populate the table.

Could you pls help me out and tell me the best way to implement that using
hte strust framework.

Thanks and Kind Regards
Roshan


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




Dynamic Attributes

2001-07-16 Thread Roshan Paiva

Hi Everyone...

I have a jsp page which dynamically populates fields ( eg: at one instance
there may be 5 edit boxes and at another instance there may be 3 edit boxes
and a date picker etc. ) The number of fields and there types are not
static. We have currently implemented this without the strut framework
usings Vectors and Collection objects. 

We are now in the process of restructuring the app using struts.. How are we
to create the ActionForm as the number of properties and their types are
dynamic.

Any answers?

Thanks in advance...

Kind Regards
Roshan