Flash Arrays: Possible on Struts with WEB-INF?

2002-05-01 Thread Micael Padraig Og mac Grene



Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash 
element files in the same directory with relative file URLs?  You don't 
have to tell me how to do it, I just want to know if it is possible.  This 
is fhe fourth time I have asked this question.  It seems to me to be a 
reasonable question.  I know how to do the normal stuff with struts.  But, 
here there is no way to use the structs tags in the Flash .swf array 
files.  I am asking about inside WEB-INF, because obviously outside WEB-INF 
is easy.

Please give me a nod if it can or cannot be done.  Hopefully Craig will 
take an interest, or someone who knows?  If this cannot be done, it is a 
problem with the architecture, in my mind.

micael



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




How to map form data to a HIERARCHY of domain objects

2002-05-01 Thread Mike Hogan

Hi, I want to map data posted from a form to a hierarchy of domain objects.
For exampe, my form includes the following information:

Person first name
Person last name
Company name
Company address

I would like a javabean hierarchy, whose root is an object of type Person,
and which allows me do the following:

person.getFirstname();
person.getLastname();
person.getCompany();
person.getCompany().getAddress()

The last line is the crucial bit. It indicates that I require mapping of the
form data to a nested object model. Is there a component in Struts to do
this?

I expect there is, but have so far been unable to find it.

Thanks for your help,
Mike




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




RE: Need Help: Please do help me

2002-05-01 Thread David Cypers

for page validation, i use the filter-mechanism from the servlet 2.3 api.
just write a filter which checks the parameters in your request, validates
them against an internal table , and forwards the filter chain to 1) the
page OR 2) an error page indicating that the user is not validated for the
request

if you attach your filter to the Struts controller , all requests can be
filtered (ic. validated) before the requests even reach the controller.

Regards,
David

ps : it's also very very easy to reuse your validation mechanism for other
servlets!!

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: dinsdag 30 april 2002 19:40
To: [EMAIL PROTECTED]
Subject: Re: Need Help: Please do help me


Subject: Re: Need Help: Please do help me
From: Vic C [EMAIL PROTECTED]
 ===
For user authentication, use container security not Struts. Struts
example should not be based on login.

Vic
vivek shrivastava wrote:
 Hi,

 I know following questions have been asked or discussed so many times
 but I am still confuse. Please do help me.

 Once a users is logged in, I want to validate each page for a valid
 user. I understand that I can use CheckLogon tab in each .jsp page
 check for valid user. But I really don't think that it is good idea to
 mix flow and presentation.

 We have two other options.

 1. We create a base class by extending struts's Action class and define
 a function to do validation and extend all application specific Action
 classes using that base class.
 2. Or we extend ActionServlet class and define a function to do
validation.

 I think 2nd option is much more flexible and it does not have redundancy
 of code like first option.

 I want to know which one is best in real world.
 If someone has implemented it using either of method, please provide me
 some sample code so that I can implement it.

 Please Please do help me.

 Thanks



 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com


 --
 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: Bean Bug?

2002-05-01 Thread Peter Pilgrim



(1) Use BigDecimal for all financial currency amounts
(2) Write your own Custom Tag to print out monetary data.

It is easy to subclass org.apache.struts.taglib.bean.WriteTag
to provide a custom tag similar to

acme:numberFormat  format=#,###.00(#,###.00)  name=obj property=moneyAttr /

--
Peter Pilgrim   ++44 (0)207-545-9923

 Swamped under electronic mails


 Message History 



From:  Galbreath, Mark [EMAIL PROTECTED] on 30/04/2002 18:15 AST

Please respond to Struts Users Mailing List [EMAIL PROTECTED]

To:'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:RE: Bean Bug?


I'd be interested in how you can use ints for decimal numbers.  The right
way is to use BIG_DECIMAL, but I have to use the session bean method given
me for my bean data.  But this still does not address the issue of the
bean:write behavior.

Mark

-Original Message-
From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 6:00 PM

First Principle of Economics: ever use float or double for money.  Use
ints.  Or, for serious money, longs.  'The real problem is not the output
but the whole idea.

micael

At 05:56 PM 4/30/02 -0400, you wrote:
I'm using a simple bean:write name=phone property=price / which grabs
a float price from the form bean.  The display, however, is unpredictable.
For a price of 25.00, e.g., can get returns of 25.00, 25.0 and 25.
Anybody else experiencing this behavior?  I've had to wrap the bean:write
with JavaScript to get the formatting correct.

Mark
De recta non tolerandum sunt.




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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




Re: How to map form data to a HIERARCHY of domain objects

2002-05-01 Thread Victor Hadianto


 Hi, I want to map data posted from a form to a hierarchy of domain objects.

http://jakarta.apache.org/struts/struts-nested.html


-- 
Victor Hadianto
---
That's the thing about people who think they hate computers.  What they
really hate is lousy programmers.
- Larry Niven and Jerry Pournelle in Oath of Fealty

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




Struts 1.1 RequestProcessor subclassing

2002-05-01 Thread John Reid

Hi Guys

I am trying to override requestPreprocess to do some authentication
checking. I see that the RequestProcessor is held in a field in the
ActionServlet. What is the correct way to change the RequestProcessor
instance? I have tried subclassing the ActionServlet and setting the field
to an instance of my RequestProcessor but that didn't seem to work. Any
suggestions?

John

John Reid

OpenConnect (Ireland) Ltd
+44 (0)2893 329 321
www.openconnect.co.uk
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/2002


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




RE: Bean Bug?

2002-05-01 Thread Galbreath, Mark

I see your point, but aren't you incurring unnecessary formatting overhead
in the presentation tier (to say nothing of ongoing maintenance)?  Any
Struts tag that writes to the presentation tier should take such formatting
issues into consideration.  For example, the formatting tag that Chandras
suggests (or using java.text.NumberFormat in the action) look like good
solutions.

Mark

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 6:55 PM

Mark,
In continuing with my last email. 1.00 would be stored as 100 in an int.

-Richard
At 03:52 PM 4/30/2002 -0700, you wrote:
Mark,
To store decimal numbers or any currency for that matter as ints, you 
store the values as the smallest unit of currency.  For dollars, this is 
0.01 or a cent. You then can avoid any round off errors when doing 
multiplication or division.

Regards,

Richard

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




atction-mappings and default action path

2002-05-01 Thread Rainer Jünger

Hi,

we would like to have a default action at the end of our mappings.
So if none of the other paths matched that the last or default one would be executed.
As far as I know ther is basically no fist or last. But still there must be a solouton 
something like:

action-mappings
.
.
.
.
action path=/*
.
.
actionClass=my.actionClass
.
./

/action
/action-mappings
How can something like this be done??

thanks rainer jünger



Need help, by using select tag correctly

2002-05-01 Thread Björn Blum

Hello,

I've got a little Problem in how using the struts select - tag correctly.
I'm new to Struts and have read the mails correspondig to the select-tag in
this mailing-list, but i'm not able to run my select tag.

Scenario:

In my action class a list of planningperiods is generated. the select - tag
in the following jsp should be filled with the ids of these periods. I wrote
an helper class containing only three attributes (planninperiodid,
begindate, enddate), with the correct getter-/setter-Methods.

here is the code of the helper class, action class, the jsp containing the
select tag and the error code:

-- helper class code -
package actions.helper;



public class PlanningPeriodHelper extends PlanningPeriod {

  private String planningperiodid;
  private String begindate;
  private String enddate;

  public PlanningPeriodHelper() {
  }
  public PlanningPeriodHelper(String ppid, String begindate, String enddate)
  {
this.planningperiodid = ppid;
this.begindate = begindate;
this.enddate = enddate;
  }

  public void setPlanningperiodid(String ppid)
  {
this.planningperiodid = ppid;
  }

  public void setBegindate(String bd)
  {
this.begindate = bd;
  }

  public void setEeginddate(String ed)
  {
this.enddate = ed;
  }

  public String getPlanningperiodid()
  {
return super.getPlanningPeriodID();
  }

  public String getBegindate()
  {
return begindate;
  }
  public String getEnddate()
  {
return enddate;
  }

  public static List getAllPlanningperiods()
  {
Iterator _pps = PlanningPeriod.getPlanningPeriods().iterator();
List _pplist = new ArrayList();

while (_pps.hasNext())
{
  PlanningPeriod next = (PlanningPeriod)_pps.next();
  _pplist.add(new PlanningPeriodHelper(next.getPlanningPeriodID(),
   new
Long(next.getBeginDate()).toString(),
   new
Long(next.getEndDate()).toString()));
}
return _pplist;
  }
}

-- end --
-- action class -
public class InitSelectAction extends Action {

  public ActionForward perform (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
IOException, ServletException
 {
List _pplist = PlanningPeriodHelper.getAllPlanningperiods();

request.setAttribute(pplist,_pplist);
request.setAttribute(begindate, new Long(1234).toString());
request.setAttribute(enddate, new Long(1235).toString());

return mapping.findForward(init);
 }

}
-- end --
-- jsp --
body bgcolor=#FF text=#00
html:form action=selectPP.do
table width=400 border=1
 tr
  td
   html:select property=planningperiodid
   html:options collection=pplist property=planningperiodid
labelProperty=planningperiodid/
   /html:select
  /td
 /tr
 tr
  td
   % out.print(Begin Date =  + request.getAttribute(begindate));%
  /td
 /tr
 tr
  td
   % out.print(End Date =  + request.getAttribute(enddate));%
  /td
 /tr
 tr
  td
  /td
 /tr
/table
/html:form
/body
/html:html
-- end --
-- error code ---
javax.servlet.ServletException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
 at org.apache.jsp._0002fselect_jsp._jspService(_0002fselect_jsp.java:218)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..
root cause

javax.servlet.jsp.JspException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304)
 at org.apache.jsp._0002fselect_jsp._jspService(_0002fselect_jsp.java:115)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..

-- end --

I hope you can help me. I'm at my wit's end.

many,many thanx

bjoern


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




RE: Struts 1.1 RequestProcessor subclassing

2002-05-01 Thread David Wilkinson

John

You don't need to subclass ActionServlet all you need to do is tell the
controller which class to use to override the RequestProcessor. This is
done by adding a line into your struts-config.xml as follows

controller processorClass=foo.bar.RequestProcessor/

where foo.bar.RequestProcessor is the name of your subclass of
RequestProcessor

DRAW

-Original Message-
From: John Reid [mailto:[EMAIL PROTECTED]] 
Sent: 01 May 2002 11:10
To: Struts Users Mailing List
Subject: Struts 1.1 RequestProcessor subclassing

Hi Guys

I am trying to override requestPreprocess to do some authentication
checking. I see that the RequestProcessor is held in a field in the
ActionServlet. What is the correct way to change the RequestProcessor
instance? I have tried subclassing the ActionServlet and setting the
field
to an instance of my RequestProcessor but that didn't seem to work. Any
suggestions?

John

John Reid

OpenConnect (Ireland) Ltd
+44 (0)2893 329 321
www.openconnect.co.uk
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/2002


--
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: Struts bean usage

2002-05-01 Thread Galbreath, Mark

Because the bean is not reportsForm, it's ReportsForm.  Change the
name= parameter.

And why are you casting a ListArray() to a Collection in its constructor?

Mark

-Original Message-
From: Villegas, Courtney [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 8:09 PM
To: 'Struts Users Mailing List'
Subject: Struts bean usage


I have a jsp page and am trying to add text created by a form bean.  I am
using bean:define id=reports name=reportsForm
type=java.util.Collection/ to define the bean and bean:write
name=reports property=report[7].reportID/ to write the desired
information.  

I am getting the error Cannot find bean reportsForm in scope null

Am I referencing my bean incorrectly?

I have appended the form bean that I am using.

Thanks
Courtney

package com.trimet.gis.buds.forms;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import java.util.*;
import com.trimet.gis.buds.states.Report;
import java.lang.reflect.Array;
import java.util.Vector;

/**
 * Form bean for the Reports page.  This form has the following fields,
 * with default values in square brackets:
 *
 * @author Courtney Villegas
 * @version $Revision: 1.0 $ $Date: 2002/04/24 4:34:00 $
 */

public class ReportsForm extends ActionForm  {


// --- Instance
Variables
/**
 * The maintenance action we are performing (Create or Edit).
 */
private String action = Load;

/**
 * Should we auto-connect at startup time?
 */
private boolean autoConnect = false;

// Reports collection
private Collection reports = null;

//Group report ID
private Integer groupReportId = null;

// Selected ReportId
private Integer reportId = null;

// ---
Properties
public String getAction() {
return (this.action);
}
public void setAction(String action) {
this.action = action;
}

public boolean getAutoConnect() {
return (this.autoConnect);
}

public void setAutoConnect(boolean autoConnect) {
this.autoConnect = autoConnect;
}

public void setReports(Integer groupReportId) {
this.groupReportId=groupReportId;
}

public Integer getGroupReportId() {
return (this.groupReportId);
}

public void setReportId(Integer reportId) {
this.reportId = reportId;
}

public Collection getReports() {
reports = (Collection) new ArrayList();

//Hardcoded data for now... should be populated from db
Report[] report= new Report[9];

report[0] = new Report(1);
report[0].setReportName(on-time performance by individual trip);
reports.add(report[0]);

report[1] = new Report(2);
report[1].setReportName(on-time performance by route (all trips));
reports.add(report[1]);

report[2] = new Report(3);
report[2].setReportName(ridership by individual trip );
reports.add(report[2]);

report[3] = new Report(4);
report[3].setReportName(ridership by route (all trips));
reports.add(report[3]);

report[4] = new Report(5);
report[4].setReportName(passenger census);
reports.add(report[4]);

report[5] = new Report(6);
report[5].setReportName(service events by train, by route and/or by
supervisory district);
reports.add(report[5]);

report[6] = new Report(7);
report[6].setReportName(run times by time point segment and date);
reports.add(report[6]);

report[7] = new Report(8);
report[7].setReportName(passenger census);
reports.add(report[7]);

report[8] = new Report(9);
report[8].setReportName(service events);
reports.add(report[8]);

return reports;
}


--
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: Need some votes for improved Javascript support in Link Tag

2002-05-01 Thread Galbreath, Mark

Absolutely.  Can you make that tag available now?

Mark

-Original Message-
From: Phase Web and Multimedia [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:26 AM
To: Struts User List
Subject: Need some votes for improved Javascript support in Link Tag


Hey all,

I submitted an enhancement to struts. Read the following and if it sounds
worth having in struts give me a vote on the developer's list or make some
noise for some of the gurus to see.

Here is the info on the tag:

I don't know if a similar solution has been provided, but, I tweaked the
Link Tag to support the writing of
'javascript:[function_name]([param1,param2,param3...])' to the href
attribute of the final output. Here is a summarization of it's
functionality:

I added the following attributes:

function - This is the name of the javascript function that will be called;

functionName - This is the name of the bean that will provide parameter
values from one of it's properties.

functionProperty - This is a property of a bean that will either provide a
String or an ArrayList to populate the parameters of the function

urlIndex - This allows you to include the url generated by href,forward or
page to be included at a specific place in the function's parameters.

There is another class that I wrote that does the actual processing and
preparation of the url. I named it EcmaUtil.  I modeled the computeURL and
computerParam methods of the RequestUtils class when I built the methods for
the EcmaUtil.

The LinkTag class that I wrote extends the BaseHandlerTag under the
org.apache.struts.taglib.html package of struts jar.

I know the code needs a bit of reworking to fit back in to the struts
framework. I stripped out the MessageReources for the most part and removed
some exception handling that will need to be included again.

Anyways, if nobody has done this in the nightly or if it sounds like it
might be of use. Let me know and I will post the code,the tld and an example
of it's usage.

EXAMPLE OF USAGE:

This tag works exactly like the struts html tag with expanded feature
outlined above:

pwshtml:link forward=listings/detail/popup function=popUpWin
urlIndex=1 paramId=image paramName=image
img src=image.jpg some text/pwshtml:link

This code will produce the follwing html
a
href=javascript:popUpWin('/do/listings/detail/popup?image=NWMT203336.jpg')
img src=image.jpg/a

Of course some of the elements are arbitrary to the values in your beans.
But you should be able to traverse the code and get the idea.

Thanks in advance.
Brandon Goodin
Phase Web and Multimedia
P(406)862-2245
F(406)862-0354
http://www.phase.ws
[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: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

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




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

Great rhetorical answer!  You guys are learning ;-)

Mark

-Original Message-
From: James Mitchell
Sent: Wednesday, May 01, 2002 6:43 AM

What exactly is your question?

Errwell did you answer your own question?

If I am understanding what you are saying:

taking-a-poke-at-it

If struts appends the sessionid in case the client doesn't accept cookies,
why wasn't I prompted about cookies that were never set?


Am I way off here?

JM

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




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Vikram Goyal01

It will create and return a session if none exists. If session exists it will return 
that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
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: atction-mappings and default action path

2002-05-01 Thread Galbreath, Mark

Why? (really)

Mark

-Original Message-
From: Rainer Jünger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:35 AM

we would like to have a default action at the end of our mappings.
So if none of the other paths matched that the last or default one would be
executed.
As far as I know ther is basically no fist or last. But still there must be
a solouton something like:

action-mappings
.
.
.
.
action path=/*
.
.
actionClass=my.actionClass
.
./

/action
/action-mappings
How can something like this be done??

thanks rainer jünger

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




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
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: Need help, by using select tag correctly

2002-05-01 Thread Hogan, John

The PlaningPeriodHelper class needs to be an attribute of your ActionForm
class.  The jsp then uses this form bean.


-Original Message-
From: Björn Blum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:21 AM
To: Struts Users Mailing List
Subject: Need help, by using select tag correctly


Hello,

I've got a little Problem in how using the struts select - tag correctly.
I'm new to Struts and have read the mails correspondig to the select-tag in
this mailing-list, but i'm not able to run my select tag.

Scenario:

In my action class a list of planningperiods is generated. the select - tag
in the following jsp should be filled with the ids of these periods. I wrote
an helper class containing only three attributes (planninperiodid,
begindate, enddate), with the correct getter-/setter-Methods.

here is the code of the helper class, action class, the jsp containing the
select tag and the error code:

-- helper class code -
package actions.helper;



public class PlanningPeriodHelper extends PlanningPeriod {

  private String planningperiodid;
  private String begindate;
  private String enddate;

  public PlanningPeriodHelper() {
  }
  public PlanningPeriodHelper(String ppid, String begindate, String enddate)
  {
this.planningperiodid = ppid;
this.begindate = begindate;
this.enddate = enddate;
  }

  public void setPlanningperiodid(String ppid)
  {
this.planningperiodid = ppid;
  }

  public void setBegindate(String bd)
  {
this.begindate = bd;
  }

  public void setEeginddate(String ed)
  {
this.enddate = ed;
  }

  public String getPlanningperiodid()
  {
return super.getPlanningPeriodID();
  }

  public String getBegindate()
  {
return begindate;
  }
  public String getEnddate()
  {
return enddate;
  }

  public static List getAllPlanningperiods()
  {
Iterator _pps = PlanningPeriod.getPlanningPeriods().iterator();
List _pplist = new ArrayList();

while (_pps.hasNext())
{
  PlanningPeriod next = (PlanningPeriod)_pps.next();
  _pplist.add(new PlanningPeriodHelper(next.getPlanningPeriodID(),
   new
Long(next.getBeginDate()).toString(),
   new
Long(next.getEndDate()).toString()));
}
return _pplist;
  }
}

-- end --
-- action class -
public class InitSelectAction extends Action {

  public ActionForward perform (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
IOException, ServletException
 {
List _pplist = PlanningPeriodHelper.getAllPlanningperiods();

request.setAttribute(pplist,_pplist);
request.setAttribute(begindate, new Long(1234).toString());
request.setAttribute(enddate, new Long(1235).toString());

return mapping.findForward(init);
 }

}
-- end --
-- jsp --
body bgcolor=#FF text=#00
html:form action=selectPP.do
table width=400 border=1
 tr
  td
   html:select property=planningperiodid
   html:options collection=pplist property=planningperiodid
labelProperty=planningperiodid/
   /html:select
  /td
 /tr
 tr
  td
   % out.print(Begin Date =  + request.getAttribute(begindate));%
  /td
 /tr
 tr
  td
   % out.print(End Date =  + request.getAttribute(enddate));%
  /td
 /tr
 tr
  td
  /td
 /tr
/table
/html:form
/body
/html:html
-- end --
-- error code ---
javax.servlet.ServletException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
 at org.apache.jsp._0002fselect_jsp._jspService(_0002fselect_jsp.java:218)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..
root cause

javax.servlet.jsp.JspException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304)
 at org.apache.jsp._0002fselect_jsp._jspService(_0002fselect_jsp.java:115)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..

-- end --

I hope you can help me. I'm at my wit's end.

many,many thanx

bjoern


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

RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

Oops, sorry...finger slipped off the ' key and hit return.

No, it won't if the method parameter is getSession( false);  
With getSession() or getSession( true), an existing session
will be returned IF IT EXISTS, else a new session for the
request will be created.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, May 01, 2002 7:55 AM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
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[2]: atction-mappings and default action path

2002-05-01 Thread Dariusz Wojtas

 we would like to have a default action at the end of our mappings.
 So if none of the other paths matched that the last or default one would be
 executed.
 As far as I know ther is basically no fist or last. But still there must be
 a solouton something like:
 
 action-mappings
 .
 .
 .
 .
 action path=/*
 .
 .
 actionClass=my.actionClass
 .
 ./
 
 /action
 /action-mappings
 How can something like this be done??

Isn't the property unknown for that?
You may create 1 action with unknown set to true.
That will be the default action if no other action matches.
 unknown=true
Example:
action path=/unknown
type=some.class
unknown=true
forward name=success path=/my/defaultPage.jsp/
/action

Darek


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




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Vikram Goyal01

copy-paste-javadoc

getSession
public HttpSession getSession()
Returns the current session associated with this request, or if the request does not 
have a session, creates one.

/copy-paste-javadoc

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:25 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
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: ideal method to set the sessionid in struts?

2002-05-01 Thread Vikram Goyal01

Exactly my point... :)

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:29 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


Oops, sorry...finger slipped off the ' key and hit return.

No, it won't if the method parameter is getSession( false);  
With getSession() or getSession( true), an existing session
will be returned IF IT EXISTS, else a new session for the
request will be created.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, May 01, 2002 7:55 AM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

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


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




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

Right, I just wanted to give him the options, since it appears he doesn't
understand session persistence mechanisms.

Mark

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 8:06 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


Exactly my point... :)

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:29 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


Oops, sorry...finger slipped off the ' key and hit return.

No, it won't if the method parameter is getSession( false);  
With getSession() or getSession( true), an existing session
will be returned IF IT EXISTS, else a new session for the
request will be created.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, May 01, 2002 7:55 AM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

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


--
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: atction-mappings and default action path

2002-05-01 Thread Rainer Jünger

Hi Mark,


 Why? (really)

We need to integrate an old own designed MVC architecure into Struts but do
not wont to rewrite have of it.
The old ActionServelt (controller) or dispatcher is getting his forward
paths out of a databasebean and it just works fine.
But for new interaction with userforms, login and database manipulation we
want to use Struts in future.

Rainer


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




Need some votes for improved Javascript support in Link Tag

2002-05-01 Thread Phase Web and Multimedia

Hey all,

I submitted an enhancement to struts. Read the following and if it sounds
worth having in struts give me a vote on the developer's list or make some
noise for some of the gurus to see.

The code is at the following url in zip format:

Here is the info on the tag:
http://www.phase.ws/linktag/taglib.zip

I don't know if a similar solution has been provided, but, I tweaked the
Link Tag to support the writing of
'javascript:[function_name]([param1,param2,param3...])' to the href
attribute of the final output. Here is a summarization of it's
functionality:

I added the following attributes:

function - This is the name of the javascript function that will be called;

functionName - This is the name of the bean that will provide parameter
values from one of it's properties.

functionProperty - This is a property of a bean that will either provide a
String or an ArrayList to populate the parameters of the function

urlIndex - This allows you to include the url generated by href,forward or
page to be included at a specific place in the function's parameters.

There is another class that I wrote that does the actual processing and
preparation of the url. I named it EcmaUtil.  I modeled the computeURL and
computerParam methods of the RequestUtils class when I built the methods for
the EcmaUtil.

The LinkTag class that I wrote extends the BaseHandlerTag under the
org.apache.struts.taglib.html package of struts jar.

I know the code needs a bit of reworking to fit back in to the struts
framework. I stripped out the MessageReources for the most part and removed
some exception handling that will need to be included again.

Anyways, if nobody has done this in the nightly or if it sounds like it
might be of use. Let me know and I will post the code,the tld and an example
of it's usage.

EXAMPLE OF USAGE:

This tag works exactly like the struts html tag with expanded feature
outlined above:

pwshtml:link forward=listings/detail/popup function=popUpWin
urlIndex=1 paramId=image paramName=image
img src=image.jpg some text/pwshtml:link

This code will produce the follwing html
a
href=javascript:popUpWin('/do/listings/detail/popup?image=NWMT203336.jpg')
img src=image.jpg/a

Of course some of the elements are arbitrary to the values in your beans.
But you should be able to traverse the code and get the idea.

Thanks in advance.
Brandon Goodin
Phase Web and Multimedia
P(406)862-2245
F(406)862-0354
http://www.phase.ws
[EMAIL PROTECTED]


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




Re: Need help, by using select tag correctly

2002-05-01 Thread Björn Blum

Hello,


The PlaningPeriodHelper class needs to be an attribute of your ActionForm
class.  The jsp then uses this form bean.

no, it doesn't work. The same error comes up. I added the attribute
PlanningPeriodHelper with getter- and setter Method in the ActionForm which
is associated with the selectPP.do Action, but it doesn#t work.

Bjoern


-Original Message-
From: Björn Blum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:21 AM
To: Struts Users Mailing List
Subject: Need help, by using select tag correctly


Hello,

I've got a little Problem in how using the struts select - tag correctly.
I'm new to Struts and have read the mails correspondig to the select-tag in
this mailing-list, but i'm not able to run my select tag.

Scenario:

In my action class a list of planningperiods is generated. the select - tag
in the following jsp should be filled with the ids of these periods. I wrote
an helper class containing only three attributes (planninperiodid,
begindate, enddate), with the correct getter-/setter-Methods.

here is the code of the helper class, action class, the jsp containing the
select tag and the error code:

-- helper class code -
package actions.helper;



public class PlanningPeriodHelper extends PlanningPeriod {

  private String planningperiodid;
  private String begindate;
  private String enddate;

  public PlanningPeriodHelper() {
  }
  public PlanningPeriodHelper(String ppid, String begindate, String enddate)
  {
this.planningperiodid = ppid;
this.begindate = begindate;
this.enddate = enddate;
  }

  public void setPlanningperiodid(String ppid)
  {
this.planningperiodid = ppid;
  }

  public void setBegindate(String bd)
  {
this.begindate = bd;
  }

  public void setEeginddate(String ed)
  {
this.enddate = ed;
  }

  public String getPlanningperiodid()
  {
return super.getPlanningPeriodID();
  }

  public String getBegindate()
  {
return begindate;
  }
  public String getEnddate()
  {
return enddate;
  }

  public static List getAllPlanningperiods()
  {
Iterator _pps = PlanningPeriod.getPlanningPeriods().iterator();
List _pplist = new ArrayList();

while (_pps.hasNext())
{
  PlanningPeriod next = (PlanningPeriod)_pps.next();
  _pplist.add(new PlanningPeriodHelper(next.getPlanningPeriodID(),
   new
Long(next.getBeginDate()).toString(),
   new
Long(next.getEndDate()).toString()));
}
return _pplist;
  }
}

-- end --
-- action class -
public class InitSelectAction extends Action {

  public ActionForward perform (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
IOException, ServletException
 {
List _pplist = PlanningPeriodHelper.getAllPlanningperiods();

request.setAttribute(pplist,_pplist);
request.setAttribute(begindate, new Long(1234).toString());
request.setAttribute(enddate, new Long(1235).toString());

return mapping.findForward(init);
 }

}
-- end --
-- jsp --
body bgcolor=#FF text=#00
html:form action=selectPP.do
table width=400 border=1
 tr
  td
   html:select property=planningperiodid
   html:options collection=pplist property=planningperiodid
labelProperty=planningperiodid/
   /html:select
  /td
 /tr
 tr
  td
   % out.print(Begin Date =  + request.getAttribute(begindate));%
  /td
 /tr
 tr
  td
   % out.print(End Date =  + request.getAttribute(enddate));%
  /td
 /tr
 tr
  td
  /td
 /tr
/table
/html:form
/body
/html:html
-- end --
-- error code ---
javax.servlet.ServletException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
 at org.apache.jsp._0002fselect_jsp._jspService(_0002fselect_jsp.java:218)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..
root cause

javax.servlet.jsp.JspException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304)
 at org.apache.jsp._0002fselect_jsp._jspService(_0002fselect_jsp.java:115)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..

-- end --

I hope you can help me. I'm at my wit's end.


RE: atction-mappings and default action path

2002-05-01 Thread Bill Page

Haven't tried this but you could probably make a global forward named
default and 
instead of (not checking my syntax here) 
return (_mapping.findForward(ForwardName)); 
use
ActionForward forward = _mapping.findForward(ForwardName);
if(forward == null)
reutrn  _mapping.findForward(globalname);
else
return forward

bp

 -Original Message-
 From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 7:55 AM
 To: 'Struts Users Mailing List'
 Subject: RE: atction-mappings and default action path
 
 
 Why? (really)
 
 Mark
 
 -Original Message-
 From: Rainer Jünger [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 6:35 AM
 
 we would like to have a default action at the end of our mappings.
 So if none of the other paths matched that the last or 
 default one would be
 executed.
 As far as I know ther is basically no fist or last. But still 
 there must be
 a solouton something like:
 
 action-mappings
 .
 .
 .
 .
 action path=/*
 .
 .
 actionClass=my.actionClass
 .
 ./
 
 /action
 /action-mappings
 How can something like this be done??
 
 thanks rainer jünger
 
 --

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




RE: atction-mappings and default action path

2002-05-01 Thread Galbreath, Mark

Well, AFAIK (as far as I know), Struts does not provide a default action
forward in the sense that if an action form doesn't declare an action, the
action servlet will choose one for it (is this what you want to happen?).
We did something similar (though I disagree with the rationale) by sub
classing ActionServlet and modifying its RequestDispatcher.forward()
behavior to include mapping to a default Action class.  But as far as
defining this in struts-config.xml, I don't think there is a way.  You have
to have an action= specified in an html:form that matches the action path=
in struts-config for a mapping to be declaratively performed.

My advice is to bite the bullet and recode the application; retrofitting
most times just ends up being a kludge.

Mark

-Original Message-
From: Rainer Jünger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 8:25 AM

Hi Mark,


 Why? (really)

We need to integrate an old own designed MVC architecure into Struts but do
not wont to rewrite have of it.
The old ActionServelt (controller) or dispatcher is getting his forward
paths out of a databasebean and it just works fine.
But for new interaction with userforms, login and database manipulation we
want to use Struts in future.

Rainer


--
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: atction-mappings and default action path

2002-05-01 Thread Galbreath, Mark

Sounds doablein theory.  ;-)

-Original Message-
From: Bill Page [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 8:37 AM

Haven't tried this but you could probably make a global forward named
default and 
instead of (not checking my syntax here) 
return (_mapping.findForward(ForwardName)); 
use
ActionForward forward = _mapping.findForward(ForwardName);
if(forward == null)
reutrn  _mapping.findForward(globalname);
else
return forward

bp

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




Re: atction-mappings and default action path

2002-05-01 Thread Rainer Jünger

Hi Mark,



 retrofitting
 most times just ends up being a kludge.

you are feeding my doubts!

R.


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




Re: ideal method to set the sessionid in struts?

2002-05-01 Thread jfc100

Galbreath, Mark wrote:

Right, I just wanted to give him the options, since it appears he doesn't
understand session persistence mechanisms.

Mark

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 8:06 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


Exactly my point... :)

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:29 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


Oops, sorry...finger slipped off the ' key and hit return.

No, it won't if the method parameter is getSession( false);  
With getSession() or getSession( true), an existing session
will be returned IF IT EXISTS, else a new session for the
request will be created.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, May 01, 2002 7:55 AM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

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


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


ok, well somewhere a session is being created without me having to 
explicitly create one - perhaps in the struts controller.

This is why I say that my call to getSession() in MyAction will only 
return an existing session.

Joe



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




Simple Scope Question (I Hope)

2002-05-01 Thread Tim Sawyer

Hi,

I would like to put an object in application scope rather than session scope, from an 
action handler, but I can't find out how.

To put it in session scope I do:

  theSession.setAttribute(makeList, lMakeBean);

What's the equivalent for application scope?

I'm trying to share an object between all users of my web application, so there is a 
singleton rather than one per session.  The data is a large static list of car makes 
that I want to display in a drop list.  Somebody shout if I'm doing this the wrong way 
please...

ta,

Tim.




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




RE: Simple Scope Question (I Hope)

2002-05-01 Thread Galbreath, Mark

ServletContext context = getServletContext();
context.setAttribute( makeList, lMakeBean);

Mark

-Original Message-
From: Tim Sawyer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 9:23 AM
To: [EMAIL PROTECTED]
Cc: Tim Sawyer
Subject: Simple Scope Question (I Hope)


Hi,

I would like to put an object in application scope rather than session
scope, from an action handler, but I can't find out how.

To put it in session scope I do:

  theSession.setAttribute(makeList, lMakeBean);

What's the equivalent for application scope?

I'm trying to share an object between all users of my web application, so
there is a singleton rather than one per session.  The data is a large
static list of car makes that I want to display in a drop list.  Somebody
shout if I'm doing this the wrong way please...

ta,

Tim.




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




Converting application that was using jsp:useBean to Struts...

2002-05-01 Thread Alex Paransky

I am trying to convert an application that was using jsp:useBean to Struts.
In typical Struts pattern, I created a xxxLoad.do for different type of
beans that I was putting into the request context.

For simple pages, I can simply execute a single xxxLoad.do and forward to
the desired presentation page (.jsp).  However, for some of more complex
pages, I need to execute xx1Load.do, xx2Load.do, xx3Load.do and only then
forward to the .jsp page.  For other pages, I need to load a different set
of beans.

What I want to do, is create a composite forward, that would forward to a
number of actions, and then finally forward to my page.  Is there such a
thing in Struts?  We are using one of the nightly builds, so moving to a
later version should not a problem.

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal


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




RE: How to map form data to a HIERARCHY of domain objects

2002-05-01 Thread Alex Paransky

Struts does this by default,

name=person property=firstName
name=person property=lastName
name=person property=company.name
name=person property=company.addresss.line1
name=person property=company.addresss.line2
name=person property=company.addresss.line3

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: Mike Hogan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 6:14 PM
To: [EMAIL PROTECTED]
Subject: How to map form data to a HIERARCHY of domain objects


Hi, I want to map data posted from a form to a hierarchy of domain objects.
For exampe, my form includes the following information:

Person first name
Person last name
Company name
Company address

I would like a javabean hierarchy, whose root is an object of type Person,
and which allows me do the following:

person.getFirstname();
person.getLastname();
person.getCompany();
person.getCompany().getAddress()

The last line is the crucial bit. It indicates that I require mapping of the
form data to a nested object model. Is there a component in Struts to do
this?

I expect there is, but have so far been unable to find it.

Thanks for your help,
Mike




--
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: Flash Arrays: Possible on Struts with WEB-INF?

2002-05-01 Thread Alex Paransky

I am not familiar with the way Flash .swf array works, however, if it embeds
a reference to the file and then executes an http GET to actually download
the file, then putting image just like any other picture on the page should
work (assuming you are not using user logins, and require url-rewriting or
cookies to be passed).

On the other hand, if the actual picture is embedded into the Flash, then
it does not matter where the file is since it's already inside of the
Flash presentation.

If the Flash package is assembled at the server at the time user makes a
request, then you will have a harder time specifying location of your files.

I, for once, don't use WEB-INF for my .jsp/.html files.  I only use it for
classes, libraries, and .tlb specifications, as well as standard J2EE/struts
configuration files.  All of the images and other presentation are a level
up from the WEB-INF anyway.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:30 AM
To: [EMAIL PROTECTED]
Subject: Flash Arrays: Possible on Struts with WEB-INF?




Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
element files in the same directory with relative file URLs?  You don't
have to tell me how to do it, I just want to know if it is possible.  This
is fhe fourth time I have asked this question.  It seems to me to be a
reasonable question.  I know how to do the normal stuff with struts.  But,
here there is no way to use the structs tags in the Flash .swf array
files.  I am asking about inside WEB-INF, because obviously outside WEB-INF
is easy.

Please give me a nod if it can or cannot be done.  Hopefully Craig will
take an interest, or someone who knows?  If this cannot be done, it is a
problem with the architecture, in my mind.

micael



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




jsp:include tag invalid...

2002-05-01 Thread Jean Fotovat

hello community,

this is surely a request not closed to our mail list, but.
i've this error when trying to run a jsp file under jbuilder :
index.jsp : Invalid jsp:include tag at...



could someone help me please ?

thanks

jean fotovat




Re: Form based security

2002-05-01 Thread Larry Meadors

Pete,
 
You sound like you are on the same path I am. The last application used
a custom model that was written in-house, based on jsp tags and struts
action servlets. 
 
With the current project, we are using TC to provide the security (via
LDAP to a Novell NDS tree). 
 
So far, the only surprise is that form-based authentication is a real
stinker for development. When a class gets reloaded, the login
information goes south, and you have to login again to refresh your
page. Grrr. If you change to BASIC authentication, this is not a
problem, but you have to be sure that if you are running over an
untrusted network you are always going over SSL because the
userid/password is sent as clear text with every request.
 
One of the reasons we went with TC-based security instead of the
roll-your-own variety was because now we can more easily harvest the
web logs (that are automatically generated) for usage information using
webtrends or other tools. Based on the logs (which contain the userid),
we have a good idea of who uses what, when they use it, how often, what
time of day, what day of the week or month, etc...
 
We can then look at what users really use and focus our efforts instead
of guessing based upon who complains the loudest. ;-)
 
Larry

 [EMAIL PROTECTED] 04/29/02 02:12PM 
curious how other developers are approaching security. If you are
using
application server managed security, have you run into any
limitations,
or has it been a better approach than a custom solution?  Thanks,




table creation using Iterate

2002-05-01 Thread Hari Menon


Hi I have been getting helped out with couple of struts users.  I have a question on 
the table population using Iterate tags.  When I use Iterate all I obtain is the table 
populated with different rows.  Is there any way to get the length of the bean so that 
I can have three columns and as many rows.  

For example currently I get data in jsp in only one column with 5 rows(bean length=5). 
 I want to write it into two rows with three in each row.  Please throw me your ideas. 
 thanx.

 



-
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness


Struts enhydra problems

2002-05-01 Thread Karim Qazi

I am getting this error:
Root cause: 


java.lang.IllegalArgumentException: cant remove Attributes from request
scope
at 
org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.ja
va:230)
at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:591)
at 
_0002fstruts_0005flogin_0002ejspstruts_0005flogin_jsp_0._jspService(_0002fst
ruts_0005flogin_0002ejspstruts_0005flogin_jsp_0.java:234)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:161)
at 
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:247)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:352)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at 
org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:6
41)
at 
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:5
49)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:392)
at org.apache.tomcat.core.Context.handleRequest(Context.java:732)
at 
org.enhydra.servlet.servletManager.ServletManager.service(ServletManager.jav
a:1096)
at 
org.enhydra.servlet.connectionMethods.EnhydraDirector.EnhydraDirectorHandler
.processRequest(EnhydraDirectorHandler.java:290)
at 
org.enhydra.servlet.connectionMethods.EnhydraDirector.EnhydraDirectorHandler
.run(EnhydraDirectorHandler.java:134)
at java.lang.Thread.run(Thread.java:484)

Anyone have any ideas on how to get struts working on enhydra???



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




html:select help!

2002-05-01 Thread Muthukumar
Title: Message



Hi

How to make one or 
more option of select object bold.



Thanks and 
Regards
Muthukumar .S
Mysore.


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


atction-mappings and default action path

2002-05-01 Thread rainer jünger

Hi,

we would like to have a default action at the end of our mappings.
So if none of the other paths matched that the last or default one would be executed.
As far as I know ther is basically no fist or last. But still there must be a solouton 
something like:

action-mappings
.
.
.
.
action path=/*
.
.
actionClass=my.actionClass
.
./

/action
/action-mappings
How can something like this be done??

thanks rainer jünger



Question about select multiple='true' ...

2002-05-01 Thread Larry Meadors

OK, I have this html:
 
select name='unt' multiple='yes' disabled='yes' size='5'
  option value='MAINE'Maine/option  option
value='FLTHD'Flathead/option  option
value='CLRWT'Clearwater/option  option value='RKYPR'Rockies
Purchased Logs/option  option value='WNFLD'Winnfield/option 
option value='HUTTG'Huttig/option  option
value='OREGN'Oregon/option  option
value='CRSET'Crossett/option/select








 
and these setters in my form bean:
 
 public void setUnt(int index, String unt) {
  this.unt[index] = unt;
 }
 
 public void setUnt(String[] unt) {
  this.unt = unt;
 }

But I get an IllegalArgumentException when I submit my page before
either method gets called.
 
What am I missing?
 
Larry
 






RE: Struts bean usage

2002-05-01 Thread Alex Paransky

Well, the documentation of the define tag states:


Retrieve the value of a specified bean property, and define it as an
attribute (in the scope specified by the toScope property) accessible to the
remainder of the current page


So, the bean reportsForm must already be present in the scope at the time
you are performing your define.  Who creates/populates the reportsForm bean
in the first place?  To make your code work, you may want to use jsp:useBean
to create a new bean in the scope that you desire, however, you will still
need to do something to populate it (a loadReports.do action that forwards
to the proper .jsp page perhaps).

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: Villegas, Courtney [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 5:09 PM
To: 'Struts Users Mailing List'
Subject: Struts bean usage


I have a jsp page and am trying to add text created by a form bean.  I am
using bean:define id=reports name=reportsForm
type=java.util.Collection/ to define the bean and bean:write
name=reports property=report[7].reportID/ to write the desired
information.

I am getting the error Cannot find bean reportsForm in scope null

Am I referencing my bean incorrectly?

I have appended the form bean that I am using.

Thanks
Courtney

package com.trimet.gis.buds.forms;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import java.util.*;
import com.trimet.gis.buds.states.Report;
import java.lang.reflect.Array;
import java.util.Vector;

/**
 * Form bean for the Reports page.  This form has the following fields,
 * with default values in square brackets:
 *
 * @author Courtney Villegas
 * @version $Revision: 1.0 $ $Date: 2002/04/24 4:34:00 $
 */

public class ReportsForm extends ActionForm  {


// --- Instance
Variables
/**
 * The maintenance action we are performing (Create or Edit).
 */
private String action = Load;

/**
 * Should we auto-connect at startup time?
 */
private boolean autoConnect = false;

// Reports collection
private Collection reports = null;

//Group report ID
private Integer groupReportId = null;

// Selected ReportId
private Integer reportId = null;

// ---
Properties
public String getAction() {
return (this.action);
}
public void setAction(String action) {
this.action = action;
}

public boolean getAutoConnect() {
return (this.autoConnect);
}

public void setAutoConnect(boolean autoConnect) {
this.autoConnect = autoConnect;
}

public void setReports(Integer groupReportId) {
this.groupReportId=groupReportId;
}

public Integer getGroupReportId() {
return (this.groupReportId);
}

public void setReportId(Integer reportId) {
this.reportId = reportId;
}

public Collection getReports() {
reports = (Collection) new ArrayList();

//Hardcoded data for now... should be populated from db
Report[] report= new Report[9];

report[0] = new Report(1);
report[0].setReportName(on-time performance by individual trip);
reports.add(report[0]);

report[1] = new Report(2);
report[1].setReportName(on-time performance by route (all trips));
reports.add(report[1]);

report[2] = new Report(3);
report[2].setReportName(ridership by individual trip );
reports.add(report[2]);

report[3] = new Report(4);
report[3].setReportName(ridership by route (all trips));
reports.add(report[3]);

report[4] = new Report(5);
report[4].setReportName(passenger census);
reports.add(report[4]);

report[5] = new Report(6);
report[5].setReportName(service events by train, by route and/or by
supervisory district);
reports.add(report[5]);

report[6] = new Report(7);
report[6].setReportName(run times by time point segment and date);
reports.add(report[6]);

report[7] = new Report(8);
report[7].setReportName(passenger census);
reports.add(report[7]);

report[8] = new Report(9);
report[8].setReportName(service events);
reports.add(report[8]);

return reports;
}


--
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: Converting simple report app to struts.

2002-05-01 Thread Sandra Cann

 Suggestions welcome, or pointers to good examples of a simple report
 display application using struts.  If it makes a difference, this will
 be run under the Oracle 9iAS server using OC4J J2EE container - I
 think this is more simply called the Orion server.

eContent at www.jcorporate.com displays reports using Struts and much more.
The drawback is the source code is not free.



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




Databases and JNDI resource problem

2002-05-01 Thread @Basebeans.com

Subject: Databases and JNDI resource problem
From: guido schnider [EMAIL PROTECTED]
 ===
While trying to connect a mysql DB with Tomcat 4.0.4-b1 ant struts 1.1 
b1 as described in the Tomcat manual under JNDI Resources HOW-TO
I get the following error. It looks like that he is still looking for 
the HypersonicDriver as in the example, but i changed it.
Any ideas or working examples?

Thanks!

TyrexDataSourceFactory:  Cannot create DataSource, Exception
java.lang.ClassNotFoundException: org.hsql.jdbcDriver

PS: What's the smartest way working with DB's and Struts? Poolman.xml, 
struts-config, ...?

My configuration
-
!-- server.xml  --
Resource name=jdbc/test auth=Container type=javax.sql.DataSource/
ResourceParams name=jdbc/test
parameter 
nameuser/name   
valueroot/value 
/parameter
parameter 
namepassword/name   
valueroot/value 
/parameter
parameter 
namedriverClassName/name
valueorg.gjt.mm.mysql.Driver/value  
/parameter
parameter 
namedriverName/name 
valuejdbc:mysql:database/value  
/parameter
/ResourceParams
-
!-- Web.xml  --
resource-ref
   description
 Resource reference to a factory for java.sql.Connection
 instances that may be used for talking to a particular
 database that is configured in the server.xml file.
   /description
   res-ref-namejdbc/test/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
/resource-ref
-
//java file
public static final Connection getConnection() throws SQLException {
 try {
 Context env = (Context) new 
InitialContext().lookup(java:comp/env);
 DataSource ds = (DataSource) env.lookup(jdbc/test);
 if (ds==null)
 throw new SQLException(Cannot connect to mysql db test);
 return(ds.getConnection());
 }
 catch (NamingException ne) {
 throw new SQLException(ne.getMessage());
 }
}


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




RE: table creation using Iterate

2002-05-01 Thread Alex Paransky

Well, there is a size tag you can use to get the size of a collection.
What you do with it, or how you use it to layout your table is up to you.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: Hari Menon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 2:27 PM
To: [EMAIL PROTECTED]
Subject: table creation using Iterate



Hi I have been getting helped out with couple of struts users.  I have a
question on the table population using Iterate tags.  When I use Iterate all
I obtain is the table populated with different rows.  Is there any way to
get the length of the bean so that I can have three columns and as many
rows.

For example currently I get data in jsp in only one column with 5 rows(bean
length=5).  I want to write it into two rows with three in each row.  Please
throw me your ideas.  thanx.





-
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness


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




RE: Converting simple report app to struts.

2002-05-01 Thread Alex Paransky

Start by creating an action that would replace your servlet.  If the user
enters any parameters for the report then create a Form.  The action
attribute of the form would be your new action to execute the report.  The
action would define a FORWARD to the proper presentation .JSP page.  Once
the action executes, it creates a bean in the request context, and forwards
to the page specified in the configuration.  The page uses the Iterator and
other struts beans to display the final report to the user.

This will work fine as long as the report is not too large.  If the report
is thousands of pages long, your JVM might run out of memory before the bean
is finished initializing.  That's a bigger problem.  You would need to
implement paging support.  But start simple, and see how that works out for
you.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: Malcolm Dew-Jones [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 2:26 PM
To: Struts Users Mailing List
Subject: Q: Converting simple report app to struts.


Hello...

I have a small web app that displays some reports and extracts some data
(from a database) and have been tasked with converting it to be a struts
application.

My problem us that it's not clear in my mind how to merge the application
into the MVC paradigm, and so I'm looking for suggestions or examples on
the layout of the logic internals of a simple reporting application such
as this (its classes etc).

The current app has some html pages, one jsp, and one servlet.

The home page is just an HTML that asks what kind of report the user
wants.  The user does not need to login, or provide any explicit input to
access anything.  The main page links to several more html pages, which
display some geographic maps (as MAP's).  The user clicks on a region
within a map and that links to the single JSP with two parameters, the
type of map (climate, political, or terrain) and the code for the selected
area.

The single JSP generates all the reports, which are identical in layout,
and simply come from different views (the views are also all identical
except that they categorize various sets of data in numerous ways).

The JSP uses an Oracle cache bean in application scope to login to the
database. The user does not need to login as such, anyone can access the
JSP, all connection info is contained in a config file that the JSP reads
to get the user and password.  The JSP builds a SELECT statement that
selects from the correct table, and then loops over the rows of data,
embedding many of the columns as TD's in a TABLE.

The JSP also has a link to a servlet that will dump the underlying data in
CSV format.  The servlet takes the same two parameters as the JSP, and
builds a similar SELECT statement to select the underlying data, and then
loops over each row, outputing it in CSV format.  The servlet uses the
same cached connection class as the JSP to login to the database.  The
same login parameters are read during the servlet's init() method, though
for some reason the pool of connections the servlet uses is always a
different pool than the JSP.

I'm supposed to rewrite this as a struts application, but as I said, I'm
not sure how to apply the MVC pardigm to this.  What things should be done
by (any?) jsp, and what things should be action classes, and since the
input parameters are never saved for later, how does this fit into the
form class paradigm, etc etc.  - and where in the struts arrangement  of
things do I create a single pool of connections that can be used by a(ny)
JSP or servlet?

Suggestions welcome, or pointers to good examples of a simple report
display application using struts.  If it makes a difference, this will
be run under the Oracle 9iAS server using OC4J J2EE container - I
think this is more simply called the Orion server.

Thanks, Malcolm Dew-Jones



--
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: Simple Scope Question (I Hope)

2002-05-01 Thread Tim Sawyer

Cheers Mark.

I had to do

ServletContext lContext = this.getServlet().getServletContext();

to get it to work from an action though.  (I'm using 1.0.2)

ta,

Tim.

Galbreath, Mark [EMAIL PROTECTED] wrote :

 ServletContext context = getServletContext();
 context.setAttribute( makeList, lMakeBean);
 
 Mark
 
 -Original Message-
 From: Tim Sawyer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 9:23 AM
 To: [EMAIL PROTECTED]
 Cc: Tim Sawyer
 Subject: Simple Scope Question (I Hope)
 
 
 Hi,
 
 I would like to put an object in application scope rather than session
 scope, from an action handler, but I can't find out how.
 
 To put it in session scope I do:
 
   theSession.setAttribute(makeList, lMakeBean);
 
 What's the equivalent for application scope?
 
 I'm trying to share an object between all users of my web application, so
 there is a singleton rather than one per session.  The data is a large
 static list of car makes that I want to display in a drop list.  Somebody
 shout if I'm doing this the wrong way please...
 
 ta,
 
 Tim.
 
 
 
 
 --
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





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




RE: table creation using Iterate

2002-05-01 Thread Galbreath, Mark

I am probably oversimplify your question, but do you mean something like

table
tr
tdbean:write name=MyBean property=prop1/td
tdbean:write name=MyBean property=prop2/td
tdbean:write name=MyBean property=prop3/td
/tr
tr
...
?

-Original Message-
From: Hari Menon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 5:27 PM
To: [EMAIL PROTECTED]
Subject: table creation using Iterate



Hi I have been getting helped out with couple of struts users.  I have a
question on the table population using Iterate tags.  When I use Iterate all
I obtain is the table populated with different rows.  Is there any way to
get the length of the bean so that I can have three columns and as many
rows.  

For example currently I get data in jsp in only one column with 5 rows(bean
length=5).  I want to write it into two rows with three in each row.  Please
throw me your ideas.  thanx.

 



-
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

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




RE: Question about select multiple='true' ...

2002-05-01 Thread Galbreath, Mark

First, I don't know how you are getting anything with disabled='yes.'

Second, a select sends only its value(s); you are (apparently) expecting
the options' index position and text in your first mutator.


Mark

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 10:25 AM
To: [EMAIL PROTECTED]
Subject: Question about select multiple='true' ...


OK, I have this html:
 
select name='unt' multiple='yes' disabled='yes' size='5'
  option value='MAINE'Maine/option  option
value='FLTHD'Flathead/option  option
value='CLRWT'Clearwater/option  option value='RKYPR'Rockies
Purchased Logs/option  option value='WNFLD'Winnfield/option 
option value='HUTTG'Huttig/option  option
value='OREGN'Oregon/option  option
value='CRSET'Crossett/option/select








 
and these setters in my form bean:
 
 public void setUnt(int index, String unt) {
  this.unt[index] = unt;
 }
 
 public void setUnt(String[] unt) {
  this.unt = unt;
 }

But I get an IllegalArgumentException when I submit my page before
either method gets called.
 
What am I missing?
 
Larry
 




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




RE: include tag invalid...

2002-05-01 Thread Galbreath, Mark

Not without seeing the offending code.

Mark

-Original Message-
From: Jean Fotovat [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 11:38 AM
To: [EMAIL PROTECTED]
Subject: jsp:include tag invalid...


hello community,

this is surely a request not closed to our mail list, but.
i've this error when trying to run a jsp file under jbuilder :
index.jsp : Invalid jsp:include tag at...



could someone help me please ?

thanks

jean fotovat


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




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 




RE: Flash Arrays: Possible on Struts with WEB-INF?

2002-05-01 Thread James Mitchell

To answer your question suppressing-annoyance for the ?th time.

What do Flash files (.swf) have to do with struts?

Its a simple document request.

Whether you choose to put you jsp files (I said jsp not all content )
under WEB-INF is up to you.

Whether you choose to make it: relative to the url (flash-me-baby.swf),
relative to the application (/flash-me-again-from-the-root.swf), or
absolute (http://www.flashers-anon.com/struts/oh-ya.swf;) is up to you.


Here's a snip of html from flash.com main page..notice the movie param
and the embed urls, those are relative to the application.

object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354

codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=5,0,30,0
width=749
height=68
param name=movie value=/uber/nav/global.swf
param name=quality value=high
param name=BGCOLOR value=#EE
param name=salign value=tl
param name=menu value=0
embed src=/uber/nav/global.swf
quality=high

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash
type=application/x-shockwave-flash
width=749
height=68
bgcolor=#EE
salign=tl
menu=0
/embed
/object



Life is full of choices, its up to you.

My suggestion to you is:
1. To write a **REEAALY** killer custom taglib that handles every possible
.swf configuration and then donate it to the open source cause.
2. Shut the H#LL up and get over it.

;) Have a wonderful day

JM






 -Original Message-
 From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 3:30 AM
 To: [EMAIL PROTECTED]
 Subject: Flash Arrays: Possible on Struts with WEB-INF?




 Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
 element files in the same directory with relative file URLs?  You don't
 have to tell me how to do it, I just want to know if it is
 possible.  This
 is fhe fourth time I have asked this question.  It seems to me to be a
 reasonable question.  I know how to do the normal stuff with
 struts.  But,
 here there is no way to use the structs tags in the Flash .swf array
 files.  I am asking about inside WEB-INF, because obviously
 outside WEB-INF
 is easy.

 Please give me a nod if it can or cannot be done.  Hopefully Craig will
 take an interest, or someone who knows?  If this cannot be done, it is a
 problem with the architecture, in my mind.

 micael



 --
 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 help!

2002-05-01 Thread James Mitchell

Muthukumar, you are kidding right?



Choices

1. Write your own applet in Java
2. Write your own Web Control in VC++ or VB
3. Submit a request to Microsoft to have this added as a patch to IE4, IE5,
and IE6.
   Be sure to copy Netscape on it so they can add it also.
   Oh and don't forget the fine folks at W3C to modify the html specs


all-joking-aside

What you are wanting is not possible with standard browser controls.
Although I have seen some reallyinteresting (for lack of a better word)
things done with style sheets, but that affects the entire control.

Good luck!
JM




 -Original Message-
 From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 11:10 AM
 To: 'Struts Users Mailing List'
 Subject: RE: html:select help!


 You can't.

 -Original Message-
 From: Muthukumar [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 5:45 AM
 To: [EMAIL PROTECTED]
 Subject: html:select help!


 Hi

 How to make one or more option of select object bold.



 Thanks and Regards
 Muthukumar .S
 Mysore.





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




RE: html:select help!

2002-05-01 Thread Hardee, Tony

Not sure how this applies to the html:select tag, but in html:

select name=country

option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
United States of America
/option

option value=afAfghanistan, Islamic State of

/option

option value=al Albania

/option

/select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


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




James Mitchell is Rude and Ignorant

2002-05-01 Thread Micael Padraig Og mac Grene

James,

You don't know what you are talking about.  I know all about what you are 
speaking about.  I am talking about Flash ARRAYS.  Get it?  If you don't 
know the question, don't try the answer.  The question is not so simple as 
you blithely ASSUME.  Plus, your advice s$cks.

Micael

At 11:18 AM 5/1/02 -0400, you wrote:
To answer your question suppressing-annoyance for the ?th time.

What do Flash files (.swf) have to do with struts?

Its a simple document request.

Whether you choose to put you jsp files (I said jsp not all content )
under WEB-INF is up to you.

Whether you choose to make it: relative to the url (flash-me-baby.swf),
relative to the application (/flash-me-again-from-the-root.swf), or
absolute (http://www.flashers-anon.com/struts/oh-ya.swf;) is up to you.


Here's a snip of html from flash.com main page..notice the movie param
and the embed urls, those are relative to the application.

object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354

codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=5,0,30,0
 width=749
 height=68
param name=movie value=/uber/nav/global.swf
param name=quality value=high
param name=BGCOLOR value=#EE
param name=salign value=tl
param name=menu value=0
embed src=/uber/nav/global.swf
 quality=high

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash
 type=application/x-shockwave-flash
 width=749
 height=68
 bgcolor=#EE
 salign=tl
 menu=0
/embed
/object



Life is full of choices, its up to you.

My suggestion to you is:
1. To write a **REEAALY** killer custom taglib that handles every possible
.swf configuration and then donate it to the open source cause.
2. Shut the H#LL up and get over it.

;) Have a wonderful day

JM






  -Original Message-
  From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 01, 2002 3:30 AM
  To: [EMAIL PROTECTED]
  Subject: Flash Arrays: Possible on Struts with WEB-INF?
 
 
 
 
  Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
  element files in the same directory with relative file URLs?  You don't
  have to tell me how to do it, I just want to know if it is
  possible.  This
  is fhe fourth time I have asked this question.  It seems to me to be a
  reasonable question.  I know how to do the normal stuff with
  struts.  But,
  here there is no way to use the structs tags in the Flash .swf array
  files.  I am asking about inside WEB-INF, because obviously
  outside WEB-INF
  is easy.
 
  Please give me a nod if it can or cannot be done.  Hopefully Craig will
  take an interest, or someone who knows?  If this cannot be done, it is a
  problem with the architecture, in my mind.
 
  micael
 
 
 
  --
  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 help!

2002-05-01 Thread Mannem, Taati

Muthu,
its possible by the style sheet  but as Jim pointed out it might
affect ur look and feel of the listbox.
Create a styleclass and give the following property 

font-weight: bold

and refer top t his style class using this syntax in ur html:select tag
html:select styleclass=urstyleclassname .
Try this and it will work..Lemme know
Good Luck

Regards,
Taati
 -Original Message-
 From: Muthukumar [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 5:45 AM
 To:   [EMAIL PROTECTED]
 Subject:  html:select help!
 
 Hi
  
 How to make one or more option of select object bold.
  
  
  
 Thanks and Regards
 Muthukumar .S
 Mysore.
File: ATT1065227.txt  

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




RE: Need help, by using select tag correctly

2002-05-01 Thread Hogan, John

Do you have an appropriate form class declaration and an associated action
class mapping in your struts-config.xml?

-Original Message-
From: Björn Blum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 8:23 AM
To: Struts Users Mailing List
Subject: Re: Need help, by using select tag correctly


Hello,


The PlaningPeriodHelper class needs to be an attribute of your ActionForm
class.  The jsp then uses this form bean.

no, it doesn't work. The same error comes up. I added the attribute
PlanningPeriodHelper with getter- and setter Method in the ActionForm which
is associated with the selectPP.do Action, but it doesn#t work.

Bjoern


-Original Message-
From: Björn Blum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:21 AM
To: Struts Users Mailing List
Subject: Need help, by using select tag correctly


Hello,

I've got a little Problem in how using the struts select - tag correctly.
I'm new to Struts and have read the mails correspondig to the select-tag in
this mailing-list, but i'm not able to run my select tag.

Scenario:

In my action class a list of planningperiods is generated. the select - tag
in the following jsp should be filled with the ids of these periods. I wrote
an helper class containing only three attributes (planninperiodid,
begindate, enddate), with the correct getter-/setter-Methods.

here is the code of the helper class, action class, the jsp containing the
select tag and the error code:

-- helper class code -
package actions.helper;



public class PlanningPeriodHelper extends PlanningPeriod {

  private String planningperiodid;
  private String begindate;
  private String enddate;

  public PlanningPeriodHelper() {
  }
  public PlanningPeriodHelper(String ppid, String begindate, String enddate)
  {
this.planningperiodid = ppid;
this.begindate = begindate;
this.enddate = enddate;
  }

  public void setPlanningperiodid(String ppid)
  {
this.planningperiodid = ppid;
  }

  public void setBegindate(String bd)
  {
this.begindate = bd;
  }

  public void setEeginddate(String ed)
  {
this.enddate = ed;
  }

  public String getPlanningperiodid()
  {
return super.getPlanningPeriodID();
  }

  public String getBegindate()
  {
return begindate;
  }
  public String getEnddate()
  {
return enddate;
  }

  public static List getAllPlanningperiods()
  {
Iterator _pps = PlanningPeriod.getPlanningPeriods().iterator();
List _pplist = new ArrayList();

while (_pps.hasNext())
{
  PlanningPeriod next = (PlanningPeriod)_pps.next();
  _pplist.add(new PlanningPeriodHelper(next.getPlanningPeriodID(),
   new
Long(next.getBeginDate()).toString(),
   new
Long(next.getEndDate()).toString()));
}
return _pplist;
  }
}

-- end --
-- action class -
public class InitSelectAction extends Action {

  public ActionForward perform (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
IOException, ServletException
 {
List _pplist = PlanningPeriodHelper.getAllPlanningperiods();

request.setAttribute(pplist,_pplist);
request.setAttribute(begindate, new Long(1234).toString());
request.setAttribute(enddate, new Long(1235).toString());

return mapping.findForward(init);
 }

}
-- end --
-- jsp --
body bgcolor=#FF text=#00
html:form action=selectPP.do
table width=400 border=1
 tr
  td
   html:select property=planningperiodid
   html:options collection=pplist property=planningperiodid
labelProperty=planningperiodid/
   /html:select
  /td
 /tr
 tr
  td
   % out.print(Begin Date =  + request.getAttribute(begindate));%
  /td
 /tr
 tr
  td
   % out.print(End Date =  + request.getAttribute(enddate));%
  /td
 /tr
 tr
  td
  /td
 /tr
/table
/html:form
/body
/html:html
-- end --
-- error code ---
javax.servlet.ServletException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
 at org.apache.jsp._0002fselect_jsp._jspService(_0002fselect_jsp.java:218)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
..
root cause

javax.servlet.jsp.JspException: No getter method available for property
planningperiodid for bean under name org.apache.struts.taglib.html.BEAN
 at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304)
 at 

RE: html:select help!

2002-05-01 Thread Mannem, Taati

An addendum
The code that Is en was for the whole select ..We do not have the style
class fo options.. 

Regards,
Taati

 -Original Message-
 From: Mannem, Taati 
 Sent: Wednesday, May 01, 2002 11:34 AM
 To:   'Struts Users Mailing List'
 Subject:  RE: html:select help!
 
 Muthu,
   its possible by the style sheet  but as Jim pointed out it might
 affect ur look and feel of the listbox.
 Create a styleclass and give the following property 
 
 font-weight: bold
 
 and refer top t his style class using this syntax in ur html:select tag
 html:select styleclass=urstyleclassname .
 Try this and it will work..Lemme know
 Good Luck
 
 Regards,
 Taati
   -Original Message-
   From:   Muthukumar [SMTP:[EMAIL PROTECTED]]
   Sent:   Wednesday, May 01, 2002 5:45 AM
   To: [EMAIL PROTECTED]
   Subject:html:select help!
 
   Hi

   How to make one or more option of select object bold.



   Thanks and Regards
   Muthukumar .S
   Mysore.
  File: ATT1065227.txt  

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




RE: James Mitchell is Rude and Ignorant

2002-05-01 Thread James Mitchell

Apparently I'm not an expert on Flash.

Oh SH##, I'm sorry.  I meant to send that reply to the
[EMAIL PROTECTED]

Please accept my apologies.

JM



 -Original Message-
 From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 11:29 AM
 To: Struts Users Mailing List
 Subject: James Mitchell is Rude and Ignorant


 James,

 You don't know what you are talking about.  I know all about what you are
 speaking about.  I am talking about Flash ARRAYS.  Get it?  If you don't
 know the question, don't try the answer.  The question is not so
 simple as
 you blithely ASSUME.  Plus, your advice s$cks.

 Micael

 At 11:18 AM 5/1/02 -0400, you wrote:
 To answer your question suppressing-annoyance for the ?th time.
 
 What do Flash files (.swf) have to do with struts?
 
 Its a simple document request.
 
 Whether you choose to put you jsp files (I said jsp not all content )
 under WEB-INF is up to you.
 
 Whether you choose to make it: relative to the url (flash-me-baby.swf),
 relative to the application (/flash-me-again-from-the-root.swf), or
 absolute (http://www.flashers-anon.com/struts/oh-ya.swf;) is up to you.
 
 
 Here's a snip of html from flash.com main page..notice the
 movie param
 and the embed urls, those are relative to the application.
 
 object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354
 
 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash
 /swflash.ca
 b#version=5,0,30,0
  width=749
  height=68
 param name=movie value=/uber/nav/global.swf
 param name=quality value=high
 param name=BGCOLOR value=#EE
 param name=salign value=tl
 param name=menu value=0
 embed src=/uber/nav/global.swf
  quality=high
 
 pluginspage=http://www.macromedia.com/shockwave/download/index.c
 gi?P1_Prod_
 Version=ShockwaveFlash
  type=application/x-shockwave-flash
  width=749
  height=68
  bgcolor=#EE
  salign=tl
  menu=0
 /embed
 /object
 
 
 
 Life is full of choices, its up to you.
 
 My suggestion to you is:
 1. To write a **REEAALY** killer custom taglib that handles
 every possible
 .swf configuration and then donate it to the open source cause.
 2. Shut the H#LL up and get over it.
 
 ;) Have a wonderful day
 
 JM
 
 
 
 
 
 
   -Original Message-
   From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, May 01, 2002 3:30 AM
   To: [EMAIL PROTECTED]
   Subject: Flash Arrays: Possible on Struts with WEB-INF?
  
  
  
  
   Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
   element files in the same directory with relative file URLs?
 You don't
   have to tell me how to do it, I just want to know if it is
   possible.  This
   is fhe fourth time I have asked this question.  It seems to me to be a
   reasonable question.  I know how to do the normal stuff with
   struts.  But,
   here there is no way to use the structs tags in the Flash .swf array
   files.  I am asking about inside WEB-INF, because obviously
   outside WEB-INF
   is easy.
  
   Please give me a nod if it can or cannot be done.  Hopefully
 Craig will
   take an interest, or someone who knows?  If this cannot be
 done, it is a
   problem with the architecture, in my mind.
  
   micael
  
  
  
   --
   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: James Mitchell is Rude and Ignorant

2002-05-01 Thread Micael Padraig Og mac Grene

The thing this question has to do with STRUTS is that it is an application 
which generates and AUTOMATIC relative reference within a SWF file that is 
NOT controlled in STRUTS.  So, if STRUTS cannot accommodate that, then 
there is a significant functionality out there that is inconsistent with 
using JSP files inside WEB-INF.  Do you now understand, James Mitchell?

Your Pal, Micael

At 08:29 AM 5/1/02 -0700, you wrote:
James,

You don't know what you are talking about.  I know all about what you are 
speaking about.  I am talking about Flash ARRAYS.  Get it?  If you don't 
know the question, don't try the answer.  The question is not so simple as 
you blithely ASSUME.  Plus, your advice s$cks.

Micael

At 11:18 AM 5/1/02 -0400, you wrote:
To answer your question suppressing-annoyance for the ?th time.

What do Flash files (.swf) have to do with struts?

Its a simple document request.

Whether you choose to put you jsp files (I said jsp not all content )
under WEB-INF is up to you.

Whether you choose to make it: relative to the url (flash-me-baby.swf),
relative to the application (/flash-me-again-from-the-root.swf), or
absolute (http://www.flashers-anon.com/struts/oh-ya.swf;) is up to you.


Here's a snip of html from flash.com main page..notice the movie param
and the embed urls, those are relative to the application.

object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354

codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
 b#version=5,0,30,0
 width=749
 height=68
param name=movie value=/uber/nav/global.swf
param name=quality value=high
param name=BGCOLOR value=#EE
param name=salign value=tl
param name=menu value=0
embed src=/uber/nav/global.swf
 quality=high

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
 Version=ShockwaveFlash
 type=application/x-shockwave-flash
 width=749
 height=68
 bgcolor=#EE
 salign=tl
 menu=0
/embed
/object



Life is full of choices, its up to you.

My suggestion to you is:
1. To write a **REEAALY** killer custom taglib that handles every possible
.swf configuration and then donate it to the open source cause.
2. Shut the H#LL up and get over it.

;) Have a wonderful day

JM






  -Original Message-
  From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 01, 2002 3:30 AM
  To: [EMAIL PROTECTED]
  Subject: Flash Arrays: Possible on Struts with WEB-INF?
 
 
 
 
  Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
  element files in the same directory with relative file URLs?  You don't
  have to tell me how to do it, I just want to know if it is
  possible.  This
  is fhe fourth time I have asked this question.  It seems to me to be a
  reasonable question.  I know how to do the normal stuff with
  struts.  But,
  here there is no way to use the structs tags in the Flash .swf array
  files.  I am asking about inside WEB-INF, because obviously
  outside WEB-INF
  is easy.
 
  Please give me a nod if it can or cannot be done.  Hopefully Craig will
  take an interest, or someone who knows?  If this cannot be done, it is a
  problem with the architecture, in my mind.
 
  micael
 
 
 
  --
  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]




James Mitchell Continues His Faux Pax's

2002-05-01 Thread Micael Padraig Og mac Grene

You should have thought again, James.  It is a STRUTS problem because some 
people MIGHT WANT TO USE A FLASH ARRAY WITH STRUTS AND THEY AUTOMATE 
RELATIVE IMAGE INCLUDES.  Catching on?

Micael

At 11:41 AM 5/1/02 -0400, you wrote:
Apparently I'm not an expert on Flash.

Oh SH##, I'm sorry.  I meant to send that reply to the
[EMAIL PROTECTED]

Please accept my apologies.

JM



  -Original Message-
  From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 01, 2002 11:29 AM
  To: Struts Users Mailing List
  Subject: James Mitchell is Rude and Ignorant
 
 
  James,
 
  You don't know what you are talking about.  I know all about what you are
  speaking about.  I am talking about Flash ARRAYS.  Get it?  If you don't
  know the question, don't try the answer.  The question is not so
  simple as
  you blithely ASSUME.  Plus, your advice s$cks.
 
  Micael
 
  At 11:18 AM 5/1/02 -0400, you wrote:
  To answer your question suppressing-annoyance for the ?th time.
  
  What do Flash files (.swf) have to do with struts?
  
  Its a simple document request.
  
  Whether you choose to put you jsp files (I said jsp not all content )
  under WEB-INF is up to you.
  
  Whether you choose to make it: relative to the url (flash-me-baby.swf),
  relative to the application (/flash-me-again-from-the-root.swf), or
  absolute (http://www.flashers-anon.com/struts/oh-ya.swf;) is up to you.
  
  
  Here's a snip of html from flash.com main page..notice the
  movie param
  and the embed urls, those are relative to the application.
  
  object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354
  
  codebase=http://download.macromedia.com/pub/shockwave/cabs/flash
  /swflash.ca
  b#version=5,0,30,0
   width=749
   height=68
  param name=movie value=/uber/nav/global.swf
  param name=quality value=high
  param name=BGCOLOR value=#EE
  param name=salign value=tl
  param name=menu value=0
  embed src=/uber/nav/global.swf
   quality=high
  
  pluginspage=http://www.macromedia.com/shockwave/download/index.c
  gi?P1_Prod_
  Version=ShockwaveFlash
   type=application/x-shockwave-flash
   width=749
   height=68
   bgcolor=#EE
   salign=tl
   menu=0
  /embed
  /object
  
  
  
  Life is full of choices, its up to you.
  
  My suggestion to you is:
  1. To write a **REEAALY** killer custom taglib that handles
  every possible
  .swf configuration and then donate it to the open source cause.
  2. Shut the H#LL up and get over it.
  
  ;) Have a wonderful day
  
  JM
  
  
  
  
  
  
-Original Message-
From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 3:30 AM
To: [EMAIL PROTECTED]
Subject: Flash Arrays: Possible on Struts with WEB-INF?
   
   
   
   
Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
element files in the same directory with relative file URLs?
  You don't
have to tell me how to do it, I just want to know if it is
possible.  This
is fhe fourth time I have asked this question.  It seems to me to be a
reasonable question.  I know how to do the normal stuff with
struts.  But,
here there is no way to use the structs tags in the Flash .swf array
files.  I am asking about inside WEB-INF, because obviously
outside WEB-INF
is easy.
   
Please give me a nod if it can or cannot be done.  Hopefully
  Craig will
take an interest, or someone who knows?  If this cannot be
  done, it is a
problem with the architecture, in my mind.
   
micael
   
   
   
--
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]



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




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:

select name=country

option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
United States of America
/option

option value=afAfghanistan, Islamic State of

/option

option value=al Albania

/option

/select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


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




Help with Struts1.1b and IPlanet 6.0 SP1

2002-05-01 Thread Vlad Levin

Some help would be greatly appreciated for the
following problem:

We cannot get an application developed using struts
1.1 (milestone release) working with IPlanet 6.0
Service Pack 1. 

If we use Struts 1.0, we can get things running.
It seems as though there is a problem loading the
struts-config.xml file.

The following error shows up in the log:

[01/May/2002:09:09:32] info (25705):
vs(https-ris_dev_7306)servlet 'action' class =
'org.apache.struts.action.ActionServlet'
loaded in context = '/ris' 
[01/May/2002:09:09:32] info (25705): action: init 
[01/May/2002:09:09:33] warning (25705):
vs(https-ris_dev_7306)ServletException thrown in
servlet.init; context = /ris, servlet
= 'action'; stack tace:
javax.servlet.UnavailableException: Parsing error
processing resource path
/WEB-INF/struts-config.xml 
 at
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:780)

 at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:417)

 at
javax.servlet.GenericServlet.init(GenericServlet.java:258)

 at
com.iplanet.server.http.servlet.WServletEntity.loadAndInitServlet(WServletEntity.java:98)

 at
com.iplanet.server.http.servlet.WebApplication.init(WebApplication.java:317)

 at
com.iplanet.server.http.servlet.VirtualServer.init(VirtualServer.java:170)

 at com.iplanet.server.http.servlet.NSServletRunner.VSInit(NSServletRunner.java:675)

__ 
Find, Connect Date! http://personals.yahoo.ca

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




RE: James Mitchell is Rude and Ignorant

2002-05-01 Thread Galbreath, Mark

Extensive discussions regarding Flash and servlets have been held on
servlet-interest.  Check out its archive at java.sun.com/products/servlet.
There was a French guy on their about a year ago who was an expert.  It's
possible that he's lurking.

Mark

-Original Message-
From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:37 AM
To: Struts Users Mailing List
Subject: Re: James Mitchell is Rude and Ignorant


The thing this question has to do with STRUTS is that it is an application 
which generates and AUTOMATIC relative reference within a SWF file that is 
NOT controlled in STRUTS.  So, if STRUTS cannot accommodate that, then 
there is a significant functionality out there that is inconsistent with 
using JSP files inside WEB-INF.  Do you now understand, James Mitchell?

Your Pal, Micael

At 08:29 AM 5/1/02 -0700, you wrote:
James,

You don't know what you are talking about.  I know all about what you are 
speaking about.  I am talking about Flash ARRAYS.  Get it?  If you don't 
know the question, don't try the answer.  The question is not so simple as 
you blithely ASSUME.  Plus, your advice s$cks.

Micael

At 11:18 AM 5/1/02 -0400, you wrote:
To answer your question suppressing-annoyance for the ?th time.

What do Flash files (.swf) have to do with struts?

Its a simple document request.

Whether you choose to put you jsp files (I said jsp not all content )
under WEB-INF is up to you.

Whether you choose to make it: relative to the url (flash-me-baby.swf),
relative to the application (/flash-me-again-from-the-root.swf), or
absolute (http://www.flashers-anon.com/struts/oh-ya.swf;) is up to you.


Here's a snip of html from flash.com main page..notice the movie
param
and the embed urls, those are relative to the application.

object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354

codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.
ca
 b#version=5,0,30,0
 width=749
 height=68
param name=movie value=/uber/nav/global.swf
param name=quality value=high
param name=BGCOLOR value=#EE
param name=salign value=tl
param name=menu value=0
embed src=/uber/nav/global.swf
 quality=high

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Pro
d_
 Version=ShockwaveFlash
 type=application/x-shockwave-flash
 width=749
 height=68
 bgcolor=#EE
 salign=tl
 menu=0
/embed
/object



Life is full of choices, its up to you.

My suggestion to you is:
1. To write a **REEAALY** killer custom taglib that handles every possible
.swf configuration and then donate it to the open source cause.
2. Shut the H#LL up and get over it.

;) Have a wonderful day

JM






  -Original Message-
  From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 01, 2002 3:30 AM
  To: [EMAIL PROTECTED]
  Subject: Flash Arrays: Possible on Struts with WEB-INF?
 
 
 
 
  Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
  element files in the same directory with relative file URLs?  You don't
  have to tell me how to do it, I just want to know if it is
  possible.  This
  is fhe fourth time I have asked this question.  It seems to me to be a
  reasonable question.  I know how to do the normal stuff with
  struts.  But,
  here there is no way to use the structs tags in the Flash .swf array
  files.  I am asking about inside WEB-INF, because obviously
  outside WEB-INF
  is easy.
 
  Please give me a nod if it can or cannot be done.  Hopefully Craig will
  take an interest, or someone who knows?  If this cannot be done, it is
a
  problem with the architecture, in my mind.
 
  micael
 
 
 
  --
  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]

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




RE: html:select help!

2002-05-01 Thread Leonardo Maciel

For your number 2. Inside the iterator you can have something like this

  html:select property=result 
logic:iterate id=cType name=cList
  logic:equal name=cType value=USA
option selected style=background-color:#FFAA00; font-style:italic;
color:blue value=bean:write name=cType/
bean:write name=cType/
/option
  /logic:equal
  logic:notEqual name=cType value=USA
option value=bean:write name=cType/
  bean:write name=cType/
/option
  /logic:notEqual
/logic:iterate
  /html:select


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:

select name=country

option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
United States of America
/option

option value=afAfghanistan, Islamic State of

/option

option value=al Albania

/option

/select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


--
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: table creation using Iterate

2002-05-01 Thread Eddie Bush

To do things such as this, I think most folks typically have a bean that
models one row of data and then stuff them all into a Vector.  You can then
iterate over your Vector and use jsp property-getter tags to retrieve the
values for the current column from the bean.

If that's as clear as mud to you, perhaps looking through some examples
would help.  My suggestion would be unpack the struts-tiles.war file and
look at the layouts there.  Ignore the scriplet stuff - it's a necessary
evil in the case of part of the layouts.  Unless you have multiple lists you
need to iterate simultaneously (which is when he uses them) it's not
necessary to do as he has done.

HTH,

Eddie

- Original Message -
From: Hari Menon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 30, 2002 4:26 PM
Subject: table creation using Iterate



 Hi I have been getting helped out with couple of struts users.  I have a
question on the table population using Iterate tags.  When I use Iterate all
I obtain is the table populated with different rows.  Is there any way to
get the length of the bean so that I can have three columns and as many
rows.

 For example currently I get data in jsp in only one column with 5
rows(bean length=5).  I want to write it into two rows with three in each
row.  Please throw me your ideas.  thanx.





 -
 Do You Yahoo!?
 Yahoo! Health - your guide to health and wellness


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




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

  html:select property=result 
logic:iterate id=cType name=cList
  logic:equal name=cType value=USA
option selected style=background-color:#FFAA00; font-style:italic;
color:blue value=bean:write name=cType/
bean:write name=cType/
/option
  /logic:equal
  logic:notEqual name=cType value=USA
option value=bean:write name=cType/
  bean:write name=cType/
/option
  /logic:notEqual
/logic:iterate
  /html:select


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:

select name=country

option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
United States of America
/option

option value=afAfghanistan, Islamic State of

/option

option value=al Albania

/option

/select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


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




Session Attributes Lost!!

2002-05-01 Thread KIRKLAND,BRIAN (HP-PaloAlto,ex1)

Hi,
 
I am using the latest version of struts and noticing a very weird issue.
Please let me know if you have any ideas or have seen this before
 
On the first JSP page I add click a link and initiate an action (A). This
action puts the user key into the session attributes. On success, the
response is forwarded to the second JSP page. The second JSP page has
another link that when clicked another action (B) is initiated. Action B
takes the User key from the session and performs some business logic. The
problem is that when I get to the Action B class, the user key is no longer
in the session. I verified that I am adding the item to the session itself
and not the request. I also verified that none of my code removes ANYTHING
from the attribute list. 
 
Any ideas? Is there some way to configure Struts or the servlet API to clear
out the session attributes? If there is, I need to make sure I am not doing
that!
 
I should say that I am forced to run my app in BroadVision's servlet
container. Hopefully this is not ANOTHER BV bug, but is user error.
 
Thanks.
 
brian kirkland
hp

Disclaimer: Any errors in spelling, tact, or fact are transmission errors.

 



RE: html:select help!

2002-05-01 Thread Leonardo Maciel

works at least in IE. But what I have is a multiple dropdown box with
pre-selected options

copy-paste-from-working-code

  html:select property=contactTypesResult
multiple=true size=5 style=font-size:12px;
onchange=updateCounter()
logic:iterate id=cType name=ContactForm
property=contactTypesList
type=com.contact.ContactTypeResultData

  logic:equal name=cType property=selected
value=true
option value=bean:write name=cType
property=participantTypeDescription/ selected
bean:write name=cType
property=participantTypeDescription/
/option
  /logic:equal
  logic:notEqual name=cType
property=selected value=true
option value=bean:write name=cType
property=participantTypeDescription/
bean:write name=cType
property=participantTypeDescription/
/option
  /logic:notEqual


/logic:iterate
  /html:select

/copy-paste-from-working-code



-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

  html:select property=result 
logic:iterate id=cType name=cList
  logic:equal name=cType value=USA
option selected style=background-color:#FFAA00; font-style:italic;
color:blue value=bean:write name=cType/
bean:write name=cType/
/option
  /logic:equal
  logic:notEqual name=cType value=USA
option value=bean:write name=cType/
  bean:write name=cType/
/option
  /logic:notEqual
/logic:iterate
  /html:select


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:

select name=country

option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
United States of America
/option

option value=afAfghanistan, Islamic State of

/option

option value=al Albania

/option

/select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


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

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




Re: Help with Struts1.1b and IPlanet 6.0 SP1

2002-05-01 Thread ajTreece

Vlad...

Not sure I can help with your problem, but on the Apache web site it states that 
the recommended iPlanet version is sp2. You may or may not be able to move to 
that release, but I just wanted to let you know that I am running Struts v1.1 
(latest nightly build) on sp2 and the only thing I am having problems with are 
some of the html taglibs (see earlier email from me to the alias). I have 
resigned myself to not utilizing those tags and Struts is working flawlessly.


Later, ajTreece




Vlad Levin wrote:

 Some help would be greatly appreciated for the
 following problem:
 
 We cannot get an application developed using struts
 1.1 (milestone release) working with IPlanet 6.0
 Service Pack 1. 
 
 If we use Struts 1.0, we can get things running.
 It seems as though there is a problem loading the
 struts-config.xml file.
 
 The following error shows up in the log:
 
 [01/May/2002:09:09:32] info (25705):
 vs(https-ris_dev_7306)servlet 'action' class =
 'org.apache.struts.action.ActionServlet'
 loaded in context = '/ris' 
 [01/May/2002:09:09:32] info (25705): action: init 
 [01/May/2002:09:09:33] warning (25705):
 vs(https-ris_dev_7306)ServletException thrown in
 servlet.init; context = /ris, servlet
 = 'action'; stack tace:
 javax.servlet.UnavailableException: Parsing error
 processing resource path
 /WEB-INF/struts-config.xml 
  at
 org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:780)
 
  at
 org.apache.struts.action.ActionServlet.init(ActionServlet.java:417)
 
  at
 javax.servlet.GenericServlet.init(GenericServlet.java:258)
 
  at
 
com.iplanet.server.http.servlet.WServletEntity.loadAndInitServlet(WServletEntity.java:98)
 
  at
 com.iplanet.server.http.servlet.WebApplication.init(WebApplication.java:317)
 
  at
 com.iplanet.server.http.servlet.VirtualServer.init(VirtualServer.java:170)
 
  at com.iplanet.server.http.servlet.NSServletRunner.VSInit(NSServletRunner.java:675)
 
 __ 
 Find, Connect Date! http://personals.yahoo.ca
 
 --
 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 help!

2002-05-01 Thread Galbreath, Mark

That's pretty cool!  It never occurred to me to use logic:equal inside an
interator on an html:select. Just goes to further prove that TAMTOWTDI
(old Perl saying).

Mark

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:36 PM

works at least in IE. But what I have is a multiple dropdown box with
pre-selected options

copy-paste-from-working-code

  html:select property=contactTypesResult
multiple=true size=5 style=font-size:12px;
onchange=updateCounter()
logic:iterate id=cType name=ContactForm
property=contactTypesList
type=com.contact.ContactTypeResultData

  logic:equal name=cType property=selected
value=true
option value=bean:write name=cType
property=participantTypeDescription/ selected
bean:write name=cType
property=participantTypeDescription/
/option
  /logic:equal
  logic:notEqual name=cType
property=selected value=true
option value=bean:write name=cType
property=participantTypeDescription/
bean:write name=cType
property=participantTypeDescription/
/option
  /logic:notEqual


/logic:iterate
  /html:select

/copy-paste-from-working-code



-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

  html:select property=result 
logic:iterate id=cType name=cList
  logic:equal name=cType value=USA
option selected style=background-color:#FFAA00; font-style:italic;
color:blue value=bean:write name=cType/
bean:write name=cType/
/option
  /logic:equal
  logic:notEqual name=cType value=USA
option value=bean:write name=cType/
  bean:write name=cType/
/option
  /logic:notEqual
/logic:iterate
  /html:select


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:

select name=country

option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
United States of America
/option

option value=afAfghanistan, Islamic State of

/option

option value=al Albania

/option

/select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


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

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




Repost: Where did it go?!

2002-05-01 Thread dhay



Just been contacted privately about this problem, and still haven't been able to
fix it (since last July)!  Has anyone else encountered the problem (I now know
at least one other has!).  But more importantly, does anyone know why this is
happening, and have a fix for it?

Seems like when I return null from my action (and obviously stay on the same
page) if I try and then *view* the same file in the bottom frame, rather than
downloading it, the action gets processed but the output somehow doesn't make it
to the frame.

Am completely stuck on this one, now, so would really appreciate some help...

Cheers,

Dave




--- Original ---

David Hay
07/20/2001 04:36 PM

To:   [EMAIL PROTECTED],

cc:

Subject:  Where did it go?!

I have something strange happening.  I have a 2 frame frameset, with buttons
in
the top fram to let a user view a logfile in the lower frame, or download
it.
If the chose to download the file, I get the ServletOutputStream from the
response in my action, and write to it.  I then close it and return null.

All that works fine - the user is prompted to download the file etc. - but I
then hit my strange problem.  If I click on the view button in the top
frame,
nothing appears in the bottom frame, although I see in the tomcat window
that
everything is geting processed like before.  It is as if it is writing it
into
thin air!

Would really appreciate any help to find it!!

Cheers,

Dave





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




RE: Session Attributes Lost!! (UPDATE)

2002-05-01 Thread KIRKLAND,BRIAN (HP-PaloAlto,ex1)

Ok. So I wanted to eliminate the user-error variable so I ported my web-app
to Tomcat. The issue is not there on Tomcat. Yet again, another BV bug.

Anyone out there use struts on BV? This is the 3rd bug I have had to face.
1. BV does not return correct info from getServletContext() = worked around
2. BV does not put the user's Locale preferences in the right header
(Accept-Language) = worked around.
3. This one! = hoping to work around.

I would if I could (answer to those people saying get off BV!).

Thanks.

~Brian Kirkland 
Advanced Technologies Group 
Hewlett-Packard 
(858) 655-4657 

Disclaimer: Any errors in spelling, tact, or fact are transmission errors. 
 


-Original Message-
From: KIRKLAND,BRIAN (HP-PaloAlto,ex1) [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 01, 2002 9:36 AM
To: '[EMAIL PROTECTED]'
Subject: Session Attributes Lost!!


Hi,
 
I am using the latest version of struts and noticing a very weird issue.
Please let me know if you have any ideas or have seen this before
 
On the first JSP page I add click a link and initiate an action (A). This
action puts the user key into the session attributes. On success, the
response is forwarded to the second JSP page. The second JSP page has
another link that when clicked another action (B) is initiated. Action B
takes the User key from the session and performs some business logic. The
problem is that when I get to the Action B class, the user key is no longer
in the session. I verified that I am adding the item to the session itself
and not the request. I also verified that none of my code removes ANYTHING
from the attribute list. 
 
Any ideas? Is there some way to configure Struts or the servlet API to clear
out the session attributes? If there is, I need to make sure I am not doing
that!
 
I should say that I am forced to run my app in BroadVision's servlet
container. Hopefully this is not ANOTHER BV bug, but is user error.
 
Thanks.
 
brian kirkland
hp

Disclaimer: Any errors in spelling, tact, or fact are transmission errors.

 

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




James Mitchell is a kind and generous person

2002-05-01 Thread James Mitchell

I'll be done with my rebuttal shortly.

JM

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




Re: Help required on Digester class

2002-05-01 Thread Stefan Arentz


On Tuesday, April 30, 2002, at 05:24  PM, Craig R. McClanahan wrote:



 On Tue, 30 Apr 2002, Vijay Arokayaraj wrote:

 Date: Tue, 30 Apr 2002 05:18:39 -0700
 From: Vijay Arokayaraj [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Help required on Digester class

 Hi all,
 I am new to struts. My question is do we have to use the Digester 
 class to actually read any of the XML files? If so how do I actually 
 map an XML file into a class object (class here represents a model) 
 when the XML file has got multiple elements in them and is not 
 attribuite oriented . For example

 ?xml version=1.0?
   user
 namevijay/name
  mail[EMAIL PROTECTED]/mail
/user


 One way to do this would be to define a Digester rule for each nested
 property name:

   digester.addObjectCreate(user, com.mycompany.MyUserClass);
   digester.addCallMethod(user/name, setName, 0);
   digester.addCallMethod(user/mail, setMail, 0);

Yup. This works fine. Digester is a great tool! One thing I'm looking at 
is how to combine it with a set of regular expression rules for the 
elements and attributes. Something like:

  command id=123
user username=stefan/
  /command

With a property list:

  command.id=/^\d+$/
  user.username=/^[a-z0-9]+$/

And make this part of the validation process. I'm interested in your 
thoughts about this. Is this something to add to the Digester core code 
or something that I should move to my own classes?

  Stefan


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




RE: James Mitchell is Rude and Ignorant

2002-05-01 Thread Micael Padraig Og mac Grene

Mark,

You don't get it either.  This is a STRUTS specific question.  Thanks for 
trying to help, however.

Micael

At 11:56 AM 5/1/02 -0400, you wrote:
Extensive discussions regarding Flash and servlets have been held on
servlet-interest.  Check out its archive at java.sun.com/products/servlet.
There was a French guy on their about a year ago who was an expert.  It's
possible that he's lurking.

Mark

-Original Message-
From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:37 AM
To: Struts Users Mailing List
Subject: Re: James Mitchell is Rude and Ignorant


The thing this question has to do with STRUTS is that it is an application
which generates and AUTOMATIC relative reference within a SWF file that is
NOT controlled in STRUTS.  So, if STRUTS cannot accommodate that, then
there is a significant functionality out there that is inconsistent with
using JSP files inside WEB-INF.  Do you now understand, James Mitchell?

Your Pal, Micael

At 08:29 AM 5/1/02 -0700, you wrote:
 James,
 
 You don't know what you are talking about.  I know all about what you are
 speaking about.  I am talking about Flash ARRAYS.  Get it?  If you don't
 know the question, don't try the answer.  The question is not so simple as
 you blithely ASSUME.  Plus, your advice s$cks.
 
 Micael
 
 At 11:18 AM 5/1/02 -0400, you wrote:
 To answer your question suppressing-annoyance for the ?th time.
 
 What do Flash files (.swf) have to do with struts?
 
 Its a simple document request.
 
 Whether you choose to put you jsp files (I said jsp not all content )
 under WEB-INF is up to you.
 
 Whether you choose to make it: relative to the url (flash-me-baby.swf),
 relative to the application (/flash-me-again-from-the-root.swf), or
 absolute (http://www.flashers-anon.com/struts/oh-ya.swf;) is up to you.
 
 
 Here's a snip of html from flash.com main page..notice the movie
param
 and the embed urls, those are relative to the application.
 
 object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354
 
 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.
ca
  b#version=5,0,30,0
  width=749
  height=68
 param name=movie value=/uber/nav/global.swf
 param name=quality value=high
 param name=BGCOLOR value=#EE
 param name=salign value=tl
 param name=menu value=0
 embed src=/uber/nav/global.swf
  quality=high
 
 pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Pro
d_
  Version=ShockwaveFlash
  type=application/x-shockwave-flash
  width=749
  height=68
  bgcolor=#EE
  salign=tl
  menu=0
 /embed
 /object
 
 
 
 Life is full of choices, its up to you.
 
 My suggestion to you is:
 1. To write a **REEAALY** killer custom taglib that handles every possible
 .swf configuration and then donate it to the open source cause.
 2. Shut the H#LL up and get over it.
 
 ;) Have a wonderful day
 
 JM
 
 
 
 
 
 
   -Original Message-
   From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, May 01, 2002 3:30 AM
   To: [EMAIL PROTECTED]
   Subject: Flash Arrays: Possible on Struts with WEB-INF?
  
  
  
  
   Can Flash .swf array files access photo1.swf, photo2.swf, etc., Flash
   element files in the same directory with relative file URLs?  You don't
   have to tell me how to do it, I just want to know if it is
   possible.  This
   is fhe fourth time I have asked this question.  It seems to me to be a
   reasonable question.  I know how to do the normal stuff with
   struts.  But,
   here there is no way to use the structs tags in the Flash .swf array
   files.  I am asking about inside WEB-INF, because obviously
   outside WEB-INF
   is easy.
  
   Please give me a nod if it can or cannot be done.  Hopefully Craig will
   take an interest, or someone who knows?  If this cannot be done, it is
a
   problem with the architecture, in my mind.
  
   micael
  
  
  
   --
   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]

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




How do I pass an ActionForward's path into a button's onclick() h andler

2002-05-01 Thread lindsay . hamoudi

I have a form and it has a 'confirm' and a 'cancel' button.  The 'confirm'
button submits to the Action class.  I'd like the 'cancel' button to
redirect user to another Action, which has a global-forward named 'home'.

Here's what I'm attempting...

html:submit property=irrelevant value=Cancel
onclick=javascript:location.href='html:rewrite forward=home/';/

This does not work at all.

Does anyone know how I could do this?

Many thanks.

Lindsay

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




RE: How do I pass an ActionForward's path into a button's onclick() h andler

2002-05-01 Thread Bill Page

you could just detect the kind of submit in your action and then if it's a
cancel, forward to the other action.  But if I understand what you're
saying, you could just check the submit type and global forward from the
first action.

bp

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 1:26 PM
 To: [EMAIL PROTECTED]
 Subject: How do I pass an ActionForward's path into a 
 button's onclick()
 h andler
 
 
 I have a form and it has a 'confirm' and a 'cancel' button.  
 The 'confirm'
 button submits to the Action class.  I'd like the 'cancel' button to
 redirect user to another Action, which has a global-forward 
 named 'home'.
 
 Here's what I'm attempting...
 
 html:submit property=irrelevant value=Cancel
 onclick=javascript:location.href='html:rewrite forward=home/';/
 
 This does not work at all.
 
 Does anyone know how I could do this?
 
 Many thanks.
 
 Lindsay
 
 --
 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: Bean Bug?

2002-05-01 Thread Richard Yee

Mark,
Regardless of how the number is formatted, there will always be a problem 
when handling currency amounts as floating numbers. Multiplication and 
division operations will introduce rounding errors. I have found that it is 
best to store currency amounts as ints and then have code in the beans to 
format the values for display. This also can ease I18n issues when dealing 
with currencies that don't contain decimals.

Regards,

Richard



At 06:22 AM 5/1/2002 -0400, you wrote:
I see your point, but aren't you incurring unnecessary formatting overhead
in the presentation tier (to say nothing of ongoing maintenance)?  Any
Struts tag that writes to the presentation tier should take such formatting
issues into consideration.  For example, the formatting tag that Chandras
suggests (or using java.text.NumberFormat in the action) look like good
solutions.

Mark

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 6:55 PM

Mark,
In continuing with my last email. 1.00 would be stored as 100 in an int.

-Richard
At 03:52 PM 4/30/2002 -0700, you wrote:
 Mark,
 To store decimal numbers or any currency for that matter as ints, you
 store the values as the smallest unit of currency.  For dollars, this is
 0.01 or a cent. You then can avoid any round off errors when doing
 multiplication or division.
 
 Regards,
 
 Richard

--
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: Session Attributes Lost!! (UPDATE)

2002-05-01 Thread Eddie Bush

Tomcat is free you know ...

- Original Message -
From: KIRKLAND,BRIAN (HP-PaloAlto,ex1) [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, May 01, 2002 12:16 PM
Subject: RE: Session Attributes Lost!! (UPDATE)


 Ok. So I wanted to eliminate the user-error variable so I ported my
web-app
 to Tomcat. The issue is not there on Tomcat. Yet again, another BV bug.

 Anyone out there use struts on BV? This is the 3rd bug I have had to face.
 1. BV does not return correct info from getServletContext() = worked
around
 2. BV does not put the user's Locale preferences in the right header
 (Accept-Language) = worked around.
 3. This one! = hoping to work around.

 I would if I could (answer to those people saying get off BV!).

 Thanks.

 ~Brian Kirkland
 Advanced Technologies Group
 Hewlett-Packard
 (858) 655-4657

 Disclaimer: Any errors in spelling, tact, or fact are transmission errors.



 -Original Message-
 From: KIRKLAND,BRIAN (HP-PaloAlto,ex1) [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 9:36 AM
 To: '[EMAIL PROTECTED]'
 Subject: Session Attributes Lost!!


 Hi,

 I am using the latest version of struts and noticing a very weird issue.
 Please let me know if you have any ideas or have seen this before

 On the first JSP page I add click a link and initiate an action (A). This
 action puts the user key into the session attributes. On success, the
 response is forwarded to the second JSP page. The second JSP page has
 another link that when clicked another action (B) is initiated. Action B
 takes the User key from the session and performs some business logic. The
 problem is that when I get to the Action B class, the user key is no
longer
 in the session. I verified that I am adding the item to the session itself
 and not the request. I also verified that none of my code removes ANYTHING
 from the attribute list.

 Any ideas? Is there some way to configure Struts or the servlet API to
clear
 out the session attributes? If there is, I need to make sure I am not
doing
 that!

 I should say that I am forced to run my app in BroadVision's servlet
 container. Hopefully this is not ANOTHER BV bug, but is user error.

 Thanks.

 brian kirkland
 hp

 Disclaimer: Any errors in spelling, tact, or fact are transmission errors.



 --
 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: James Mitchell is a kind and generous person

2002-05-01 Thread Eddie Bush

LMAO! =D

- Original Message -
From: James Mitchell [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, May 01, 2002 12:20 PM
Subject: James Mitchell is a kind and generous person


 I'll be done with my rebuttal shortly.

 JM

 --
 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: James Mitchell is a kind and generous person

2002-05-01 Thread Eddie Bush

Friday - not a day of the week, but a state of mind =)

- Original Message -
From: James Mitchell [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, May 01, 2002 12:20 PM
Subject: James Mitchell is a kind and generous person


 I'll be done with my rebuttal shortly.

 JM

 --
 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: Bean Bug?

2002-05-01 Thread Jakkampudi, ChandraseKhar

I would think (hope, rather) that calculations are not being performed in
the form beans. While you are correct about rounding errors, this has
nothing to do with display beans(for want of a better word) For example,
reading a float/double value from a database and displaying it requires this
kind of formatting. I think this is what Mark is asking about.

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:35 PM
To: Struts Users Mailing List
Subject: RE: Bean Bug?


Mark,
Regardless of how the number is formatted, there will always be a problem 
when handling currency amounts as floating numbers. Multiplication and 
division operations will introduce rounding errors. I have found that it is 
best to store currency amounts as ints and then have code in the beans to 
format the values for display. This also can ease I18n issues when dealing 
with currencies that don't contain decimals.

Regards,

Richard



At 06:22 AM 5/1/2002 -0400, you wrote:
I see your point, but aren't you incurring unnecessary formatting overhead
in the presentation tier (to say nothing of ongoing maintenance)?  Any
Struts tag that writes to the presentation tier should take such formatting
issues into consideration.  For example, the formatting tag that Chandras
suggests (or using java.text.NumberFormat in the action) look like good
solutions.

Mark

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 6:55 PM

Mark,
In continuing with my last email. 1.00 would be stored as 100 in an int.

-Richard
At 03:52 PM 4/30/2002 -0700, you wrote:
 Mark,
 To store decimal numbers or any currency for that matter as ints, you
 store the values as the smallest unit of currency.  For dollars, this is
 0.01 or a cent. You then can avoid any round off errors when doing
 multiplication or division.
 
 Regards,
 
 Richard

--
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: How do I pass an ActionForward's path into a button's onclick () h andler

2002-05-01 Thread lindsay . hamoudi

I have tried detecting what type of submit (e.g. cancel) in the action and
then dealing with it from there (i.e. go back to another action).  But
when you do such detection in all your actions, then (unless you redirect)
the parameter is still there when you reach your forwarded-to action - and
this is not desirable in my case - because that action will then see this
'cancel' parameter and go back to another action, and so on.

I find explaining this very difficult - does it show?!

I really need a mechanism for handling back or cancel requests
effectively.  There's no way I'm using history.back() because it might not
point to the right place.  

I think I'll just go home and lose some sleep over it.

 -Original Message-
From:   Bill Page [mailto:[EMAIL PROTECTED]] 
Sent:   01 May 2002 18:31
To: Struts Users Mailing List
Subject:RE: How do I pass an ActionForward's path into a button's
onclick () h andler

you could just detect the kind of submit in your action and then if it's a
cancel, forward to the other action.  But if I understand what you're
saying, you could just check the submit type and global forward from the
first action.

bp

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 1:26 PM
 To: [EMAIL PROTECTED]
 Subject: How do I pass an ActionForward's path into a 
 button's onclick()
 h andler
 
 
 I have a form and it has a 'confirm' and a 'cancel' button.  
 The 'confirm'
 button submits to the Action class.  I'd like the 'cancel' button to
 redirect user to another Action, which has a global-forward 
 named 'home'.
 
 Here's what I'm attempting...
 
 html:submit property=irrelevant value=Cancel
 onclick=javascript:location.href='html:rewrite forward=home/';/
 
 This does not work at all.
 
 Does anyone know how I could do this?
 
 Many thanks.
 
 Lindsay
 
 --
 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: James Mitchell is a kind and generous person

2002-05-01 Thread Joseph Barefoot

I'll drink to that.  'Course, I'm aiming for a state of Zen-like bliss in
which I code by sheer intuition.  :)

 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 10:37 AM
 To: Struts Users Mailing List
 Subject: Re: James Mitchell is a kind and generous person


 Friday - not a day of the week, but a state of mind =)

 - Original Message -
 From: James Mitchell [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, May 01, 2002 12:20 PM
 Subject: James Mitchell is a kind and generous person


  I'll be done with my rebuttal shortly.
 
  JM
 
  --
  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]




Installing Apps into WAS 4.0

2002-05-01 Thread Thigpen, David

I recently got two Struts apps (NoosApp, and StrutsExample) working =
within the Test Environment in Visual Age 4.0.  I was able to get the =
StrutsExample installed into a WebSphere 4.0 server (WAS) OK, but can't =
seem to get NoosApp to do the same.  I think it's dieing when it tries =
to pre-compile the JSPs; but the app will not start in any case.

One additional thing, how does Xalan, Xerces, XML-parser and even Struts =
get imported into WebSphere?  The Struts example ran no problem and I =
didn't have to import any of those libs into WAS.  That confuses me.

Thanks in advance.

DT

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




RE: Bean Bug?

2002-05-01 Thread Richard Yee

Chandra,
I think the point I am trying to make is that if you store amounts as 
integers in the database, you can avoid a lot of problems with rounding 
errors and the code that is necessary to avoid them in your business logic. 
I have had to add a lot of code to deal with the removal of fractional 
cents every time a multiplication or division operation is done on a value 
and when storing amounts. I've found that its easier just to store the 
amount as an integer and deal with the formatting when displaying the value.

-Richard

At 12:40 PM 5/1/2002 -0500, you wrote:
I would think (hope, rather) that calculations are not being performed in
the form beans. While you are correct about rounding errors, this has
nothing to do with display beans(for want of a better word) For example,
reading a float/double value from a database and displaying it requires this
kind of formatting. I think this is what Mark is asking about.

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:35 PM
To: Struts Users Mailing List
Subject: RE: Bean Bug?


Mark,
Regardless of how the number is formatted, there will always be a problem
when handling currency amounts as floating numbers. Multiplication and
division operations will introduce rounding errors. I have found that it is
best to store currency amounts as ints and then have code in the beans to
format the values for display. This also can ease I18n issues when dealing
with currencies that don't contain decimals.

Regards,

Richard



At 06:22 AM 5/1/2002 -0400, you wrote:
 I see your point, but aren't you incurring unnecessary formatting overhead
 in the presentation tier (to say nothing of ongoing maintenance)?  Any
 Struts tag that writes to the presentation tier should take such formatting
 issues into consideration.  For example, the formatting tag that Chandras
 suggests (or using java.text.NumberFormat in the action) look like good
 solutions.
 
 Mark
 
 -Original Message-
 From: Richard Yee [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 30, 2002 6:55 PM
 
 Mark,
 In continuing with my last email. 1.00 would be stored as 100 in an int.
 
 -Richard
 At 03:52 PM 4/30/2002 -0700, you wrote:
  Mark,
  To store decimal numbers or any currency for that matter as ints, you
  store the values as the smallest unit of currency.  For dollars, this is
  0.01 or a cent. You then can avoid any round off errors when doing
  multiplication or division.
  
  Regards,
  
  Richard
 
 --
 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: James Mitchell is a kind and generous person

2002-05-01 Thread James Mitchell


Hmmmapparently I have made someone (no names) feel insecure about their
abilities and/or knowledge of struts (hence the vicious personal attack)

My intentions were not to piss anyone off.

I just don't think they understand what's really happening.

**DISCLAIMER**
If you don't read this entire message then you have no right to reply to it.
Also, the example uses a .jpg file.  This could just have easily been a
.swf, .jar (applet), .class (applet), .gif  or whatever.





*Note there are 3 types of URLs
#1 - relative to the file/dir
 examples (somefile.txt, somedir/somefile.txt, ./somedir/somefile.txt,
../subdir/otherfile.txt)

#2 - relative to the application (/somefile.txt)
 examples (/somefile.txt, /somedir/somefile.txt)

#3 - absolute
 examples (http://jakarta.apache.com/struts/somefile.txt;)


I'll use the struts-example for my explanation.

 * Prep
   I moved the registration.jsp under the WEB-INF and
   changed the reference to it (2 places) in the struts-config.xml
   Then I copied the html:img page=/struts-power.gif
   alt=Powered by Struts/ from index.jsp and placed
   it at the bottom of registration.jsp (just above the ending body tag)
   I created the link in every possible way that I know how.
   There may be additional ways, but this makes my point clear.
   I'll refer to these by their associated index

Here's the source
1.1   html:img src=struts-power.gif alt=Powered by Struts/br
1.2   html:img src=/struts-power.gif alt=Powered by Struts/br
1.3   html:img src=/struts-example/struts-power.gif alt=Powered by
Struts/br
1.4   html:img src=struts-example/struts-power.gif alt=Powered by
Struts/br
1.5   html:img src=WEB-INF/struts-power.gif alt=Powered by Struts/br
1.6   html:img src=/WEB-INF/struts-power.gif alt=Powered by
Struts/br
1.7   html:img src=/struts-example/WEB-INF/struts-power.gif alt=Powered
by Struts/br
1.8   html:img src=struts-example/WEB-INF/struts-power.gif alt=Powered
by Struts/br

1.9   html:img src=http://localhost/struts-example/struts-power.gif;
alt=Powered by Struts/br
1.10  html:img
src=http://localhost/struts-example/WEB-INF/struts-power.gif; alt=Powered
by Struts/br

1.11  html:img page=struts-power.gif alt=Powered by Struts/br
1.12  html:img page=/struts-power.gif alt=Powered by Struts/br
1.13  html:img page=/struts-example/struts-power.gif alt=Powered by
Struts/br
1.14  html:img page=struts-example/struts-power.gif alt=Powered by
Struts/br
1.15  html:img page=WEB-INF/struts-power.gif alt=Powered by
Struts/br
1.16  html:img page=/WEB-INF/struts-power.gif alt=Powered by
Struts/br
1.17  html:img page=/struts-example/WEB-INF/struts-power.gif alt=Powered
by Struts/br
1.18  html:img page=struts-example/WEB-INF/struts-power.gif alt=Powered
by Struts/br

1.19  html:img page=http://localhost/struts-example/struts-power.gif;
alt=Powered by Struts/br
1.20  html:img
page=http://localhost/struts-example/WEB-INF/struts-power.gif; alt=Powered
by Struts/br

Here is the rendered html from the page:
The ones with the x in front are the ones that actually displayed in the
browser.

[using ( instead of ]

1.1   (img src=struts-power.gif alt=Powered by Struts(br
1.2   (img src=/struts-power.gif alt=Powered by Struts(br
1.3  x(img src=/struts-example/struts-power.gif alt=Powered by
Struts(br
1.4   (img src=struts-example/struts-power.gif alt=Powered by
Struts(br
1.5   (img src=WEB-INF/struts-power.gif alt=Powered by Struts(br
1.6   (img src=/WEB-INF/struts-power.gif alt=Powered by Struts(br
1.7   (img src=/struts-example/WEB-INF/struts-power.gif alt=Powered by
Struts(br
1.8   (img src=struts-example/WEB-INF/struts-power.gif alt=Powered by
Struts(br

1.9  x(img src=http://localhost/struts-example/struts-power.gif;
alt=Powered by Struts(br
1.10  (img src=http://localhost/struts-example/WEB-INF/struts-power.gif;
alt=Powered by Struts(br

1.11  (img src=/struts-examplestruts-power.gif alt=Powered by
Struts(br
1.12 x(img src=/struts-example/struts-power.gif alt=Powered by
Struts(br
1.13  (img src=/struts-example/struts-example/struts-power.gif
alt=Powered by Struts(br
1.14  (img src=/struts-examplestruts-example/struts-power.gif alt=Powered
by Struts(br
1.15  (img src=/struts-exampleWEB-INF/struts-power.gif alt=Powered by
Struts(br
1.16  (img src=/struts-example/WEB-INF/struts-power.gif alt=Powered by
Struts(br
1.17  (img src=/struts-example/struts-example/WEB-INF/struts-power.gif
alt=Powered by Struts(br
1.18  (img src=/struts-examplestruts-example/WEB-INF/struts-power.gif
alt=Powered by Struts(br

1.19  (img
src=/struts-examplehttp://localhost/struts-example/struts-power.gif;
alt=Powered by Struts(br
1.20  (img
src=/struts-examplehttp://localhost/struts-example/WEB-INF/struts-power.gif
 alt=Powered by Struts(br



 * When you go to http://localhost/struts-example/

   You get the index.jsp served to you. ( I know that you already know
that )
   So that means that you will see http://localhost/struts-example/index.jsp
in your browser window.

   This is true for IE and Netscape


 * 

RE: html:select help!

2002-05-01 Thread Richard Yee

It also works in Netscape. I just tried it.

-Richard

At 12:36 PM 5/1/2002 -0400, you wrote:
works at least in IE. But what I have is a multiple dropdown box with
pre-selected options

copy-paste-from-working-code

   html:select property=contactTypesResult
multiple=true size=5 style=font-size:12px;
onchange=updateCounter()
 logic:iterate id=cType name=ContactForm
property=contactTypesList
type=com.contact.ContactTypeResultData

   logic:equal name=cType property=selected
value=true
 option value=bean:write name=cType
property=participantTypeDescription/ selected
 bean:write name=cType
property=participantTypeDescription/
 /option
   /logic:equal
   logic:notEqual name=cType
property=selected value=true
 option value=bean:write name=cType
property=participantTypeDescription/
 bean:write name=cType
property=participantTypeDescription/
 /option
   /logic:notEqual


 /logic:iterate
   /html:select

/copy-paste-from-working-code



-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

   html:select property=result 
 logic:iterate id=cType name=cList
   logic:equal name=cType value=USA
 option selected style=background-color:#FFAA00; font-style:italic;
color:blue value=bean:write name=cType/
 bean:write name=cType/
 /option
   /logic:equal
   logic:notEqual name=cType value=USA
 option value=bean:write name=cType/
   bean:write name=cType/
 /option
   /logic:notEqual
 /logic:iterate
   /html:select


8*)

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:

 select name=country

 option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
 United States of America
 /option

 option value=afAfghanistan, Islamic State of

 /option

 option value=al Albania

 /option

 /select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi

How to make one or more option of select object bold.



Thanks and Regards
Muthukumar .S
Mysore.



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

--
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: James Mitchell is a kind and generous person

2002-05-01 Thread Galbreath, Mark

Oh, well.  My philosophy has always been, Joke 'em if they can't take a
f*ck.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:02 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: James Mitchell is a kind and generous person



Hmmmapparently I have made someone (no names) feel insecure about their
abilities and/or knowledge of struts (hence the vicious personal attack)


PS.  I can't believe I had to write a book to explain this.  However, I fear
that someone (no names) still doesn't understand my point and may resort to
sending a mean and hateful e-mail with my name blasted on the subject line
and ..doh!!!   Too late ;)

You're right Mark, that stove is pretty hot.

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




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

I tested it with 6.2 and the style is not apparent until after a select is
made first.  Oh well, I'm already using it for an IE-centric app I'm writing
now.  :-)

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:04 PM

It also works in Netscape. I just tried it.

-Richard

At 12:36 PM 5/1/2002 -0400, you wrote:
works at least in IE. But what I have is a multiple dropdown box with
pre-selected options

copy-paste-from-working-code

   html:select property=contactTypesResult
multiple=true size=5 style=font-size:12px;
onchange=updateCounter()
 logic:iterate id=cType name=ContactForm
property=contactTypesList
type=com.contact.ContactTypeResultData

   logic:equal name=cType property=selected
value=true
 option value=bean:write name=cType
property=participantTypeDescription/ selected
 bean:write name=cType
property=participantTypeDescription/
 /option
   /logic:equal
   logic:notEqual name=cType
property=selected value=true
 option value=bean:write name=cType
property=participantTypeDescription/
 bean:write name=cType
property=participantTypeDescription/
 /option
   /logic:notEqual


 /logic:iterate
   /html:select

/copy-paste-from-working-code



-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

   html:select property=result 
 logic:iterate id=cType name=cList
   logic:equal name=cType value=USA
 option selected style=background-color:#FFAA00;
font-style:italic;
color:blue value=bean:write name=cType/
 bean:write name=cType/
 /option
   /logic:equal
   logic:notEqual name=cType value=USA
 option value=bean:write name=cType/
   bean:write name=cType/
 /option
   /logic:notEqual
 /logic:iterate
   /html:select


8*)

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:

 select name=country

 option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
 United States of America
 /option

 option value=afAfghanistan, Islamic State of

 /option

 option value=al Albania

 /option

 /select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi

How to make one or more option of select object bold.



Thanks and Regards
Muthukumar .S
Mysore.



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

--
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: Bean Bug?

2002-05-01 Thread Galbreath, Mark

The java.math.BigDecimal class gives its user complete control over rounding
behavior.

Mark

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 1:57 PM
To: Struts Users Mailing List
Subject: RE: Bean Bug?


Chandra,
I think the point I am trying to make is that if you store amounts as 
integers in the database, you can avoid a lot of problems with rounding 
errors and the code that is necessary to avoid them in your business logic. 
I have had to add a lot of code to deal with the removal of fractional 
cents every time a multiplication or division operation is done on a value 
and when storing amounts. I've found that its easier just to store the 
amount as an integer and deal with the formatting when displaying the value.

-Richard

At 12:40 PM 5/1/2002 -0500, you wrote:
I would think (hope, rather) that calculations are not being performed in
the form beans. While you are correct about rounding errors, this has
nothing to do with display beans(for want of a better word) For example,
reading a float/double value from a database and displaying it requires
this
kind of formatting. I think this is what Mark is asking about.

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:35 PM
To: Struts Users Mailing List
Subject: RE: Bean Bug?


Mark,
Regardless of how the number is formatted, there will always be a problem
when handling currency amounts as floating numbers. Multiplication and
division operations will introduce rounding errors. I have found that it is
best to store currency amounts as ints and then have code in the beans to
format the values for display. This also can ease I18n issues when dealing
with currencies that don't contain decimals.

Regards,

Richard



At 06:22 AM 5/1/2002 -0400, you wrote:
 I see your point, but aren't you incurring unnecessary formatting
overhead
 in the presentation tier (to say nothing of ongoing maintenance)?  Any
 Struts tag that writes to the presentation tier should take such
formatting
 issues into consideration.  For example, the formatting tag that Chandras
 suggests (or using java.text.NumberFormat in the action) look like good
 solutions.
 
 Mark
 
 -Original Message-
 From: Richard Yee [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 30, 2002 6:55 PM
 
 Mark,
 In continuing with my last email. 1.00 would be stored as 100 in an int.
 
 -Richard
 At 03:52 PM 4/30/2002 -0700, you wrote:
  Mark,
  To store decimal numbers or any currency for that matter as ints, you
  store the values as the smallest unit of currency.  For dollars, this
is
  0.01 or a cent. You then can avoid any round off errors when doing
  multiplication or division.
  
  Regards,
  
  Richard
 
 --
 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]

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




RE: How do I pass an ActionForward's path into a button's onclick () handler

2002-05-01 Thread Raffy_Lata


Hi,

Why don't you just put the action  class' name in the href=   instead of
doing an html:rewrite?

I do this in my code and it works

html:button property=doesNotMatter value=Cancel onclick=javascript: 
document.location.href = 'goToNextAction.do?' /






[EMAIL PROTECTED] on 05/01/2002 10:41:40 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  RE: How do I pass an ActionForward's path into a button's onclick
  () h andler


I have tried detecting what type of submit (e.g. cancel) in the action and
then dealing with it from there (i.e. go back to another action).  But
when you do such detection in all your actions, then (unless you redirect)
the parameter is still there when you reach your forwarded-to action -
and
this is not desirable in my case - because that action will then see this
'cancel' parameter and go back to another action, and so on.

I find explaining this very difficult - does it show?!

I really need a mechanism for handling back or cancel requests
effectively.  There's no way I'm using history.back() because it might not
point to the right place.

I think I'll just go home and lose some sleep over it.

 -Original Message-
From: Bill Page [mailto:[EMAIL PROTECTED]]
Sent: 01 May 2002 18:31
To:  Struts Users Mailing List
Subject:  RE: How do I pass an ActionForward's path into a button's
onclick () h andler

you could just detect the kind of submit in your action and then if it's a
cancel, forward to the other action.  But if I understand what you're
saying, you could just check the submit type and global forward from the
first action.

bp

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 1:26 PM
 To: [EMAIL PROTECTED]
 Subject: How do I pass an ActionForward's path into a
 button's onclick()
 h andler


 I have a form and it has a 'confirm' and a 'cancel' button.
 The 'confirm'
 button submits to the Action class.  I'd like the 'cancel' button to
 redirect user to another Action, which has a global-forward
 named 'home'.

 Here's what I'm attempting...

 html:submit property=irrelevant value=Cancel
 onclick=javascript:location.href='html:rewrite forward=home/';/


 This does not work at all.

 Does anyone know how I could do this?

 Many thanks.

 Lindsay

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






**
Please Note:
The information in this E-mail message, and any files transmitted
with it, is confidential and may be legally privileged.  It is
intended only for the use of the individual(s) named above.  If you
are the intended recipient, be aware that your use of any confidential
or personal information may be restricted by state and federal
privacy laws.  If you, the reader of this message, are not the
intended recipient, you are hereby notified that you should not
further disseminate, distribute, or forward this E-mail message.
If you have received this E-mail in error, please notify the sender
and delete the material from any computer.  Thank you.
**



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




Q: data/control flow diagram - where

2002-05-01 Thread Malcolm Dew-Jones

When I first examined the struts web site, I almost immediately came
across a good diagram that illustrated the flow of control and data
through a struts application.

I am looking for that diagram, but can't find it now.

Would anyone have any idea which diagram I might have seen and where to 
find it?

It had four or five boxes, joined in a square with data flow lines , with
some additional data flow lines in the middle. 

Not much to go on, but maybe someone recognizes what I mean.

Thanks, Malcolm


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




RE: James Mitchell is a kind and generous person

2002-05-01 Thread Micael Padraig Og mac Grene

The fact is that both of you typically shoot your mouths off before you 
understand the issues.  In this case, there is a struts issue and you both 
assumed that it was something else.  The issue is not joking, it is that 
you both are impossible puerile.

At 02:08 PM 5/1/02 -0400, you wrote:
Oh, well.  My philosophy has always been, Joke 'em if they can't take a
f*ck.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:02 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: James Mitchell is a kind and generous person



Hmmmapparently I have made someone (no names) feel insecure about their
abilities and/or knowledge of struts (hence the vicious personal attack)


PS.  I can't believe I had to write a book to explain this.  However, I fear
that someone (no names) still doesn't understand my point and may resort to
sending a mean and hateful e-mail with my name blasted on the subject line
and ..doh!!!   Too late ;)

You're right Mark, that stove is pretty hot.

--
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: Help required on Digester class

2002-05-01 Thread Craig R. McClanahan



On Wed, 1 May 2002, Stefan Arentz wrote:

 Date: Wed, 1 May 2002 19:20:48 +0200
 From: Stefan Arentz [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: Help required on Digester class


 On Tuesday, April 30, 2002, at 05:24  PM, Craig R. McClanahan wrote:

 
 
  On Tue, 30 Apr 2002, Vijay Arokayaraj wrote:
 
  Date: Tue, 30 Apr 2002 05:18:39 -0700
  From: Vijay Arokayaraj [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
   [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Help required on Digester class
 
  Hi all,
  I am new to struts. My question is do we have to use the Digester
  class to actually read any of the XML files? If so how do I actually
  map an XML file into a class object (class here represents a model)
  when the XML file has got multiple elements in them and is not
  attribuite oriented . For example
 
  ?xml version=1.0?
user
  namevijay/name
   mail[EMAIL PROTECTED]/mail
 /user
 
 
  One way to do this would be to define a Digester rule for each nested
  property name:
 
digester.addObjectCreate(user, com.mycompany.MyUserClass);
digester.addCallMethod(user/name, setName, 0);
digester.addCallMethod(user/mail, setMail, 0);

 Yup. This works fine. Digester is a great tool! One thing I'm looking at
 is how to combine it with a set of regular expression rules for the
 elements and attributes. Something like:

   command id=123
 user username=stefan/
   /command

 With a property list:

   command.id=/^\d+$/
   user.username=/^[a-z0-9]+$/

 And make this part of the validation process. I'm interested in your
 thoughts about this. Is this something to add to the Digester core code
 or something that I should move to my own classes?


Do you mean that you want to ensure that the attributes match those
patterns?  Personally, I think that's a little out of scope for Digester,
although you could probably do it by implementing your own matching
algorithm in an org.apache.commons.digester.Rules implementation (either
don't select the rules on mismatched patterns, or throw an exception or
something).  Another alternative would be to throw an exception in the
property setter of the beans being created.

   Stefan


Craig



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




RE: James Mitchell is a kind and generous person

2002-05-01 Thread James Mitchell

Ok.  So now you know where we are coming from.

Why don't you refactor your question so that someone on list understands
what you are asking?

I think that by the lack of response and your 4th time asking should clue
you into the fact that nobody (apparently) understands your question.

My responses we to try and be helpful.  Your responses were unwarranted and
hateful.

Let's fix this so we can get on with thinking up a really nice Friday
discussion.

JM






 -Original Message-
 From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 2:18 PM
 To: Struts Users Mailing List
 Subject: RE: James Mitchell is a kind and generous person


 The fact is that both of you typically shoot your mouths off before you
 understand the issues.  In this case, there is a struts issue and
 you both
 assumed that it was something else.  The issue is not joking, it is that
 you both are impossible puerile.

 At 02:08 PM 5/1/02 -0400, you wrote:
 Oh, well.  My philosophy has always been, Joke 'em if they can't take a
 f*ck.
 
 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 2:02 PM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: James Mitchell is a kind and generous person
 
 
 
 Hmmmapparently I have made someone (no names) feel insecure
 about their
 abilities and/or knowledge of struts (hence the vicious personal attack)
 
 
 PS.  I can't believe I had to write a book to explain this.
 However, I fear
 that someone (no names) still doesn't understand my point and
 may resort to
 sending a mean and hateful e-mail with my name blasted on the
 subject line
 and ..doh!!!   Too late ;)
 
 You're right Mark, that stove is pretty hot.
 
 --
 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: James Mitchell is a kind and generous person

2002-05-01 Thread SUPRIYA MISRA


Mark is a kind and generous person

From: Galbreath, Mark [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: James Mitchell is a kind and generous person
Date: Wed, 1 May 2002 14:08:18 -0400

Oh, well.  My philosophy has always been, Joke 'em if they can't take a
f*ck.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:02 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: James Mitchell is a kind and generous person



Hmmmapparently I have made someone (no names) feel insecure about their
abilities and/or knowledge of struts (hence the vicious personal attack)


PS.  I can't believe I had to write a book to explain this.  However, I 
fear
that someone (no names) still doesn't understand my point and may resort to
sending a mean and hateful e-mail with my name blasted on the subject line
and ..doh!!!   Too late ;)

You're right Mark, that stove is pretty hot.

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





_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




  1   2   >