Re: STRUTS with TORQUE

2003-03-02 Thread Karim Saloojee
Hi

We used Torque in two of our previous projects. As a persistance layer I
think its great, it was fast and easy to use - once its up and running. That
is probably the only issue, since the documentation is not always great with
Turbine and its sub-projects, that is probably where you might struggle. But
once its up and running, it works great, if you have issues, there is an
active mailing list (search the archives first).

We used an ERD tool to create the structure of our db, give Torque the DDL
and Torque would generate the java for the tables and an XML representation
of the db. Note this is not the recommended way, the recommended way us
XML --> DDL & JAVA source.

One may question the OO of the above methods, but they do work well in
practice.

-Karim


- Original Message -
From: "Mitchell Morris" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 5:11 PM
Subject: RE: STRUTS with TORQUE


> I don't know that I'd love TORQUE since I'm not using it. I can say,
> however, that I'm using Hibernate and think quite a great deal of it.
>
> > -Original Message-
> > From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
> > Sent: Friday, February 28, 2003 10:06 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: STRUTS with TORQUE
> >
> >
> > If you like Torque, you would LOVE CommonsSQL in the commons
> > CVS sandbox.
> >
> > .V
> >
> > Mitchell Morris wrote:
> > > Please summarize your findings to the list, if you would; I would
> > > be interested in seeing the group consensus on Torque as well.
> > >
> > > From following Jetspeed and Turbine user lists it seems that
> > > there's a lot of confusion about where the various Turbine projects
> > > are going especially with respect to Avalon. In my professional
> > > caution, I discarded Torque as a candidate persistence layer
> > > because of the organizational uncertainty that I thought I saw. I
> > > would be delighted to find out that I was overly hasty.
> > >
> > > +Mitchell
> > >
> > >
> > >>-Original Message-
> > >>From: Petrus, Christian (CORP, GEITC)
> > >>[mailto:[EMAIL PROTECTED]
> > >>Sent: Thursday, February 27, 2003 11:19 PM
> > >>To: [EMAIL PROTECTED]
> > >>Subject: STRUTS with TORQUE
> > >>
> > >>
> > >>  Hello All,
> > >>
> > >>Thanks for all the help in this list.
> > >>
> > >>We are rewriting an entire swing application and we have
> > >>chosen Struts for
> > >>the new web version of the product.
> > >>
> > >>For the database handling part, we are planning to use
> > >>Torque.  Does anyone
> > >>have experience working with Struts / Torque or have
> > >>Information especially
> > >>on what can go wrong with this combo?  Torque seems to be too
> > >>good and easy
> > >>to be true!!!
> > >>
> > >>Any info. would be greatly appreciated!!
> > >>
> > >>Thanks in advance,
> > >>Christian
> > >>
> > >>
> > >>
> > >>
> > >>"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED
> > >>ONLY FOR THE
> > >>ADDRESSEE and may contain confidential and privileged information.
> > >>If the reader of this message is not the intended recipient,
> > >>you are notified that any dissemination, distribution or
> > copy of this
> > >>communication is strictly Prohibited.
> > >>If you have received this message by error, please notify us
> > >>immediately, return the original mail to the sender and delete the
> > >>message from your system."
> > >>
> > >>
> >
> >
> >
> > -
> > 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Modeling tools

2003-02-11 Thread Karim Saloojee
Although my drinking days are over, I have found the best wines to be the
cheapest ones - more *BANG* for your buck...

- Original Message -
From: "Diego" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 1:55 PM
Subject: RE: [OT] Modeling tools


> Aren't wines from La Rioja from Argentina?
>
> -Original Message-
> From: Manuel Montoro [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 4:07 AM
> To: Struts Users Mailing List
> Subject: Re: [OT] Modeling tools
>
>
> My two cents. You have to try the spanish red wines from La Rioja,
> Ribera del Duero, Priorato, etc. They are in many cases superior to
> french ones (IMHO).
> Of course, the Jerez wine is superb and the sweets ones (Malaga,
> for examples) don't have anything similar in the whole world.
>
> Regards
>
>
> On 10 Feb 2003 at 23:08, alexj wrote:
>
> > I will try this one ;) , I heard some Australian wine are pretty good
to.
> > (but I can't understand how English guy can drink warm beer lol)
> >
> > - Original Message -
> > From: "Mark Galbreath" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Monday, February 10, 2003 8:59 PM
> > Subject: RE: [OT] Modeling tools
> >
> >
> > The best California wines in my long flirtation with the nectar are
> anything
> > from Cakebread Cellars, and any cabernet sauvignon (Bordeaux grape) from
> the
> > Russian River Valley.  These vineyards truly rival the best the French
> have,
> > and you don't have to get upset drinking them because the growers
support
> > getting rid of Suddam Insane.
> >
> >
> > Mark Galbreath
> > Principal Consultant
> > Workflow Process Engineering and Systems Integration
> > http://www.QAT.com
> > 410-703-367 / 800-799-8545
> > "Never attribute to malice that which can be adequately explained by
> > stupidity."  ~Hanlon's Razor
> >
> >
> > -Original Message-
> > From: Daniel Jaffa [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 10, 2003 2:53 PM
> > To: Struts Users Mailing List
> > Subject: Re: [OT] Modeling tools
> >
> >
> > To name a few at my house, but I agree that French wines are better. But
> > California is getting close.  And Australia is also getting close.
> >
> > Diamond Creek 1985 VH Cabernet Sauvignon, , Beringer 1997 Private
Reserve
> > Cabernet Sauvignon, Opus One 1999 Opus One
> >
> >
> >
> > > > But we are catch up quickly, just look at the quality of Californian
> > > >wines, they sucked in the 80's and now that are almost as
> > tasty
> > > > as French wines.
> > >
> > > I don't think you can "compare" with nice french wines (or you have
> > > try only bad french wine) ;) Let's drink a Mouton Rotschild, Pétrus,
> > > Chateau Margaux 
> > >
> > > >
> > > >
> > > > Mark Galbreath
> > > > Principal Consultant
> > > > Workflow Process Engineering and Systems Integration
> > > >
> > > > http://www.QAT.com
> > > > 410-703-367 / 800-799-8545
> > > >
> > > > "Never attribute to malice that which can be adequately explained by
> > > > stupidity."  ~Hanlon's Razor
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, February 10, 2003 11:38 AM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: [OT] Modeling tools
> > > >
> > > >
> > > > And we all know that in the U.S. that there is no such thing as a
> > > > good
> > > beer!
> > > > :-P
> > > >
> > > > >-Original Message-
> > > > >From: Robert McIntosh [mailto:[EMAIL PROTECTED]]
> > > > >Sent: Monday, February 10, 2003 10:27 AM
> > > > >To: Struts Users Mailing List
> > > > >Subject: Re: [OT] Modeling tools
> > > > >
> > > > >
> > > > >I agree, especially for collaboration. A whiteboard is a good
> > > > >developer's best friend (short of a good beer)...
> > > > >
> > > > >- Robert
> > > > >
> > > > >Chappell, Simon P wrote:
> > > > >
> > > > >>It's called a whiteboard (or greaseboard if you fixate about
> > > > >not refering to colours when describing inanimate objects) and it
> > > > >does a better job of what I use Rose for than Rose does.
> > > > >>
> > > > >>
> > > > >>
> > > > >>>-Original Message-
> > > > >>>From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
> > > > >>>Sent: Monday, February 10, 2003 9:30 AM
> > > > >>>To: 'Struts Users Mailing List'
> > > > >>>Subject: RE: [OT] Modeling tools
> > > > >>>
> > > > >>>
> > > > >>>There is no alternative to Rose.
> > > > >>>
> > > > >>>Mark Galbreath
> > > > >>>Principal Consultant, Workflow Process Engineering and Systems
> > > > >>>Integration http://www.QAT.com
> > > > >>>410-703-367 / 800-799-8545
> > > > >>>
> > > > >>>"Never attribute to malice that which can be adequately explained
> > > > >>>by stupidity."  ~Hanlon's Razor
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>-Original Message-
> > > > >>>From: Durham David Cntr 805CSS/SCBE
> > > > >>>[mailto:[EMAIL PROTECTED]]
> > > > >>>Se

How to re-direct from within and ActionForm

2003-02-10 Thread Karim Saloojee
Hi

How would one re-direct to an error page from within the validate method of
an ActionForm - this would be done when one encounters a serious exception
within the form?

TIA,
Karim



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




Re: selecting all the checkboxes

2003-01-24 Thread Karim Saloojee
Try the ff, you just have to modify the button to be a link

// Used to check all checkboxes in a form
function checkAll(field) {
  for (i = 0; i < field.length; i++) {
field[i].checked = true;
  }
}

// Used to un-check all checkboxes in a form
function unCheckAll(field) {
  for (i = 0; i < field.length; i++) {
field[i].checked = false;
  }

In the JSP


- Original Message -
From: "Uday" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, January 24, 2003 12:46 PM
Subject: RE: selecting all the checkboxes


> Hi,
> Yes in my jsp, but i use  I know how to do with pure javascript.
> But when use  am not able to get it dynamically.
>
>
> Can you tell me how to check all the checkboxes by clicking a link.
>
>
>
> Regards,
> Uday
>
> -Original Message-
> From: Kiss, Tibor (Contractor) [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 3:39 PM
> To: 'Struts Users Mailing List'
> Subject: AW: selecting all the checkboxes
>
>
> In your jsp.
>
> -Ursprüngliche Nachricht-
> Von: Uday [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 24. Januar 2003 11:11
> An: [EMAIL PROTECTED]
> Betreff: selecting all the checkboxes
>
>
> Hi,
>
> I have a table in which i have one column with multiple checkboxes.
> I have one hyperlink below that table, using javascript if i click on the
> link all checkboxes should get select.
> I have one hyperlink below that table, using javascript if i click on the
> link all checkboxes should get deselect.
>
> Can you tell me how to do it. i am using  working fine if i select individually.
>
> How to embedd javascript with structs.
>
>
> Have a nice day
>
> Regards,
> Uday
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>




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




Re: AW: Refresh on MSIE, PLEASE HELP!! NOT SOLVED

2003-01-17 Thread Karim Saloojee
Hi

I know that in IE you sometimes have to set the response headers in Java,
e.g:

<%
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
response.setHeader("Cache-Control", "no-cache");
%>

Put that in skel.jsp.

One last thing, make sure you have cleared out your IE cache before
re-testing (Tools > Internet Options > Delete Files > Delete All Offline
Content > Ok).

Good Luck,
Karim

- Original Message -
From: "kiuma" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 3:00 PM
Subject: Re: AW: Refresh on MSIE, PLEASE HELP!! NOT SOLVED


> Hirschmann, Bernhard ha scritto:
>
> >>Sadly this doesn't solve the problem!
> >>
> >>
> >
> >Does your browser use a http proxy? Maybe this is the reason.
> >
> >Bernhard
> >
> >--
> >To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
> >.
> >
> >
> >
> No proxy set.
> The fact is that with Mozilla works but not with MSIE.
> I'm using tiles  and I see this strange bheav.
>
> I'm using tiles
>
> so I have
>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld"
> prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/struts-bean-el.tld"
> prefix="bean-el" %>
>
> 
> 
> 
> 
>  content='/secure/activitycenteredit_center.jsp'/>
> 
>
>
> I write the server current time in '/secure/menu.jsp' and
> '/secure/activitycenteredit_center.jsp' which contains the form.
>
> but, while in men the time is update when i access the page,
> /secure/activitycenteredit_center.jsp continue to hold old values.
>
>
> in skel.jsp'   header I've put
>
> 
> 
> 
>
>
> The problem is only with MSIE!!
>
>
> --
> 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: Two Actions using the same form

2003-01-14 Thread Karim Saloojee
Hi

Sounds fine but you may not need to go to action 2 i.e.

JSP1 > Form1 > Action1 (new Form2) > JSP2

Regards,
Karim

- Original Message -
From: "João Paulo Batistella" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 2:50 PM
Subject: Two Actions using the same form


>
> Hi!
>
> I have a doubt about using the same form in two different actions.
>
> Let me explain.
>
> I have a form (let's call form1) and, when I submit it, action1 is called.
Action1 do whatever it wants and now the application have to show form2
(asscotiated with action2), with some data already filled, based on form1
selection.
>
> I'm thinking about doing the following.
>
> 1. Submit form1 data
>
> 2. In action1, get the form1 data, process it and fill an instance of
form2 for presentation. (here action1 is access form2)
>
> 3. Forward the control to action2.
>
> 4. In action2, I can access an intance of form2 already filled and I can
show it to the user, who can now interact with form2.
>
> Is there any problem with this approach? Or any new idea?
>
> Thanks,
>
> Joao Paulo.
>
>
>
> -
> Busca Yahoo!
> O melhor lugar para encontrar tudo o que você procura na Internet



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




Re: [Our Practice]Collection Population Post-Validation Best Practice

2003-01-14 Thread Karim Saloojee
Hi

What we have done is introduce a ListManager class. This is a singleton
object that is accessible from the form via its superclass (our custom
superclass).

What we have done in our form is have two fields for a collection, i.e. our
dropdown list. The first field is used to populate the values of the list
and the second is used to store the selected value.

E.G.:
public Collection getListOfPeople() {
  return ListManager.getInstance().getPeople();
}

public String getSelectedPerson() {
  return selectedPerson;
}

public void setSelectedPerson(String selectedPerson) {
  this.selectedPerson = selectedPerson;
}

Our JSP is coded so that the setup of the dropdown calls getListOfPeople()
and the selected item populates setSelectedPerson(). The taglib allows this
Struts 1.1 b2.

This allows us to store the forms in the request and never have to worry
about pre-populating them, this seems to work very well for us.

I would appreciate feedback wrt this approach.

Regards,
Karim



- Original Message -
From: "Puneet Agarwal" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 1:41 PM
Subject: Re: [Our Practice]Collection Population Post-Validation Best
Practice


> Even we had a similar problem in our application:
>
> Agree that making the ActionForm scope to be "session" may cause problems,
> but storing the information in request scope and copying all that
> information in html and then sending it back to the server again may cause
> extra network traffic.
>
> We adopted following workaround for this.
>
> 1.  Make most of the ActionForm scope as "session", and write a cleaning
> mechanism which could keep cleaning up the HTTP session on some basis.
>   What we adopted was "as soon as the user shall operate on the top drop
> down menu of the application, it shall remove any ActionForms more than
last
> 5.(This "5" was configurable). This keeps the HTTP session lighter.
>
> 2. For the screens that have ActionForm scope defined as "request", some
> information was stored in HTML hidden variables but there was special
> mechanism for collection objects. For every such screen one object was
> stored in HTTP session and this object stored all collection objects.
>
> Hope you too find this solution good for your application.
>
> Regards
> Puneet
>
> - Original Message -
> From: "Phase Web and Multimedia" <[EMAIL PROTECTED]>
> To: "Struts User List" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 14, 2003 12:31 AM
> Subject: Collection Population Post-Validation Best Practice
>
>
> > In the past I have not done any validation in my ActionForm so I have
> never
> > ran across this problem. I read a post from a while back regarding this
> but
> > the feedback was fairly obscure. I also read in "Struts In Action"
> regarding
> > this problem. But, the solutions were a little vague. So, I am looking
for
> > some creative specificity.
> >
> > Problem:
> >
> > I prepopulate some collections in an ActionForm through an Action class
> > before I display the jsp form. I use the collections that I populate in
> the
> > form to create the drop down (). Upon
> > submittal of the jsp form and a failed validate in my ActionForm i
return
> > back to the jsp page and my collections are not available/null (of
course)
> > because my form is set in request scope. Following are a few possible
> > solutions ,that came to mind, for re-populating my collections prior to
> > being sent back to ActionMapping's input. I am just wondering which is
the
> > best or if there are some better solutions.
> >
> > 1) Specify the form as a session scope - I don't really want to do this
> > because I am concerned that as the usage volume goes up I am potenially
> > going to be passing around large complex objects in the session. I
prefer
> to
> > keep it in the request.
> >
> > 2) Call my logic classes that populate the collections set the values
> > (setXXX(), getXXX())from within the validate method prior to returning
the
> > ActionErrors. - I am not sure how this would work using Validator. Can I
> > override validate when extending ValidatorActionForm and call super() to
> > make sure that the Validator validation is called and then run my logic
> > classes to repopulate the form?
> >
> > 3) Set my ActionMapping's input to go to the Action url rather than the
> jsp
> > (This was a suggestion in "Struts In Action") - I tried this but I get
> some
> > looping and ultimately a Sta

Re: Compiled JSPs are different on windows and Solaris

2002-12-19 Thread Karim Saloojee
> Write once, debug everywhere. Love Java, but going from one platform to
another usually involves some effort.

Write once, debug everywhere usually happens when you use different makes of
JDK across different platforms eg IBM & SUN. But I love Java anyways!

~Karim


> What kind of errors are you getting? Hard to answer this question without
knowing at least that much.

> -= J

> -Original Message-
> From: Beeson, Ashley [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 19, 2002 9:06 AM
> To: '[EMAIL PROTECTED]'
> Subject: Compiled JSPs are different on windows and Solaris
>
>
> Hello
>
> We have a problem with deploying our struts application. We develop on
> Windows2000 machines running tomcat 4.0.4 and yet when we
> deploy our war on
> our Solaris 8 box we are getting errors which do not appear
> when we test on
> our windows boxes.
>
> We know this isn't a data issue as we are using the same
> database/data. When
> looking at the java files created by tomcat in the
> /work/Standalone/localhost/blah/ directories they are
> radically different
> despite using the same version of Java (1.4.0.0_01) on both
> windows and
> Solaris
>
> We have managed to fix a few of the problems we were having
> by upgrading
> from Tomcat 4.0.4 to Tomcat 4.1.17 on our Solaris box but we are still
> getting errors which we do not get on Windows (with Tomcat 4.0.4).
>
> Any ideas people?
>
> Thanks in Advance
>
> Ash Beeson
> 
> Ash Beeson - IT Consultant
>
>
>
> This e-mail and any attachment is for authorised use by the
> intended recipient(s) only.  It may contain proprietary
> material, confidential information and/or be subject to legal
> privilege.  It should not be copied, disclosed to, retained
> or used by, any other party.  If you are not an intended
> recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender.  Thank you.
>

--
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: Initialization of DynaValidatorForm

2002-11-19 Thread Karim Saloojee
Taken from James Turner's mail:

ApplicationConfig appConfig =
 (ApplicationConfig)request.getAttribute(Action.APPLICATION_KEY);

FormBeanConfig formBeanConfig =
  appConfig.findFormBeanConfig("myDynaActionForm");

String beanType = formBeanConfig.getType();

DynaActionForm bean;

DynaActionFormClass formClass =
  DynaActionFormClass.createDynaActionFormClass(formBeanConfig);

bean = (DynaActionForm) formClass.newInstance();

request.setAttribute("myDynaActionForm", bean);

- Original Message -
From: "Gemes Tibor" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 11:33 AM
Subject: Re: Initialization of DynaValidatorForm


2002. november 19. 10:25 dátummal Bas Passon ezt írtad:
> Hi,
>
> Does anyone know how to retrieve a dyna form bean before the request to
> the corresponding action is made. I would like to set some initial values
> for the form. I noticed it can be done from the struts-config.xml, but
> that option is not flexible enough since the initial values depend on the
> requests a user made already.
>
> Anyone got a solution for this problem which uses dyna form beans, or is
> the only option to create custom formbeans?

Hey man, it's in the docs. Create an action wich prepopulates your form.

hth,

Tib

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




Re: Button Tag

2002-11-14 Thread Karim Saloojee
Oops

I meant the DispatchAction not the RequestDispatcher. Sorry - need more
sleep!

Take a look at Chapter 5 in Chucks book, the heading in ch 5 is "The
org.apache.struts.actions.DispatchAction"

Regards,
Karim

- Original Message -----
From: "Karim Saloojee" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 11:10 AM
Subject: Re: Button Tag


> Take a look at the RequestDispatcher. A good example can be found in
Chucks
> book at theserverside.com
>
>
> - Original Message -
> From: "Savantraj, Chennamakal Subramanian" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Thursday, November 14, 2002 10:57 AM
> Subject: Button Tag
>
>
> > Hi,
> > Which Tag should be used to create a  in STRUTS?
> > My requirement is I want to call different actions based on different
> Button
> > click.
> > Rgds
> >
> > ---
> > This email is confidential and intended only for the use of the
individual
> > or entity named above and may contain information that is privileged. If
> you
> > are not the intended recipient, you are notified that any dissemination,
> > distribution or copying of this email is strictly prohibited. If you
have
> > received this email in error, please notify us immediately by return
email
> > or telephone and destroy the original message. Thank you. - This mail is
> > sent via Sony Asia Pacific Mail Gateway.
> > ---
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@;jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: Button Tag

2002-11-14 Thread Karim Saloojee
Take a look at the RequestDispatcher. A good example can be found in Chucks
book at theserverside.com


- Original Message -
From: "Savantraj, Chennamakal Subramanian" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 10:57 AM
Subject: Button Tag


> Hi,
> Which Tag should be used to create a  in STRUTS?
> My requirement is I want to call different actions based on different
Button
> click.
> Rgds
>
> ---
> This email is confidential and intended only for the use of the individual
> or entity named above and may contain information that is privileged. If
you
> are not the intended recipient, you are notified that any dissemination,
> distribution or copying of this email is strictly prohibited. If you have
> received this email in error, please notify us immediately by return email
> or telephone and destroy the original message. Thank you. - This mail is
> sent via Sony Asia Pacific Mail Gateway.
> ---
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




Re: Problem in submitting form in Struts 1.0.2

2002-11-01 Thread Karim Saloojee
I do not think it is possible to submit a form from an href without using
javascript. Either use a button or javascript.

- Original Message -
From: "Mondkar,Paresh" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 11:03 AM
Subject: Problem in submitting form in Struts 1.0.2


> Hi,
>I would appreciate if someone can help me out in the following
> problem.
>
> The problem is that initially I was using javascript functions
>
> function go(){
>document.form.action = "/TrialServlet";
>document.form.parameter.value = "go";
>document.form.submit();
> }
> and calling the above function in html as shown below
> 
>
> Note that value is a hidden parameter in the html. Which helps me to
> identify what action to take.
>
> In the above case I am submitting my form to same TrialServletand
> in the servlet I am checking for request.getParameter("value")
> if it "go" then some action is performed else (say save)
> different action is performed.
>
> Now i want to do the same thing in struts 1.0.2 and without using
> javascript.
> I have used the DispatchAction class
> so I also have to specify the method parameter.
>
> Currently I have used,
>  property="value" value="go"/>
>
> the above tags are not working and form does not get submitted to that
> servlet mentioned in the action attribute of the form tag. Due to this all
> the form parameters are not available in the Action class.
> I also tried using the below given 3 methods: -
>
> 
>  value="go"/>
>
> 
>  value="go"/>
>
>  value="go"/>
>
> Can anyone help me out..I would appreciate the help.
>
>
> Regards,
> Paresh.P.Mondkar
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




Setting the input from within the ActionForm in Struts 1.1 no longer allowed?

2002-10-03 Thread Karim Saloojee

Hi

Using 1.0 I had a situation where I used to dynamically set the input from within my 
ActionForm. In 1.1 (b2) this is no longer possible, since the configuration of the 
object is "frozen". An IllegalStateException is thrown and my app no longer works as 
required.

What is the suggested way to get around this? Should I reconfigure my app so I don't 
dynamically set the input, or is there another way in Struts 1.1 to dynamically set 
the input?

TIA,
Karim



Re: How to configure multiple Message Resources in Struts 1.0

2002-09-26 Thread Karim Saloojee

Yep

I could customise the source to make pizza as well ; )

What I want to know is can the source make pizza currently and how do I
configure multiple flavours of pizza?

Substitute pizza with message resource bundles.

TIA



- Original Message -
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 3:55 PM
Subject: RE: How to configure multiple Message Resources in Struts 1.0


> Or you could just take the 1.0 version and customize the source to do what
> you want.  That's one of the perks with having the source code ;)
>
> Hava a good one!!
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://www.open-tools.org/struts-atlanta
>
>
>
>
> > -Original Message-
> > From: Karim Saloojee [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 26, 2002 5:59 AM
> > To: [EMAIL PROTECTED]
> > Subject: How to configure multiple Message Resources in Struts 1.0
> >
> >
> > Hi
> >
> > Is it possible to setup another message resources file in Struts
> > 1.0? I need this because I want to display errors in a different
> > way for a certain part of the application.
> > Basically I do not want the "Validation errors: Please correct
> > the ff..." heading.
> >
> > Since this is displayed automatically, the only way to get around
> > this issues is use another message resources properties (at least
> > that what it looks like to me).
> >
> > Now how do I setup another message resources and how to I go
> > about accessing it in my form bean?
> >
> > Thanks in advance,
> > Karim
> >
> >
> >
> >
> >
>
>
> --
> 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 to configure multiple Message Resources in Struts 1.0

2002-09-26 Thread Karim Saloojee

Hi

Is it possible to setup another message resources file in Struts 1.0? I need this 
because I want to display errors in a different way for a certain part of the 
application.
Basically I do not want the "Validation errors: Please correct the ff..." heading.

Since this is displayed automatically, the only way to get around this issues is use 
another message resources properties (at least that what it looks like to me).

Now how do I setup another message resources and how to I go about accessing it in my 
form bean?

Thanks in advance,
Karim







Re: Help needed with ActionForm Bean

2002-09-25 Thread Karim Saloojee

Try pre-populating the form i.e create the form, set its variables, put it
into the request, forward to the JSP.
For instance you have:

PageA.jsp
ProcessPageA_Action.java
ActionFormA.java

In the Action before you display PageA.jsp, create an instance of the
ActionFormA class, set the select box variable and whatever else you need.
Then put the ActionFormA object into the session/request under the key you
specified in the struts-config.xml. When PageA.jsp loads, Struts will find
the FormBean in the session/request using the key in the struts-config.xml
and populate the JSP from those values.





- Original Message -
From: "Vincent Berruchon" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 12:02 PM
Subject: Re: Help needed with ActionForm Bean


> thanks for your reply, perhaps there's something I've haven't understand:
>
> I'd like to display  in my select dropdown data that come from a
> database... where should I get this data from the DB this should be done
> before the call of the getXXX method of the ActionForm when.
>
> Should I use an action where I get data from the DB and forward it to
> the action associated with the jsp page containing the form?? is it the
> way to do it?
>
>
> Vincent
>
> Galbreath, Mark wrote:
> > It's magic.
> >
> >
> > Seriously, your getters and setters in your ActionForm bean correspond
to
> > the HTML input fields in your JSP.  So if you have a select dropdown in
the
> > JSP called "state," in some HTML form for collecting personal
information
> > you could have
> >
> >   private state = "";
> >
> >   public void setState( String state) {
> > this.state = state;
> >   }
> >
> >   public String getState() {
> > return state;
> >   }
> >
> > in your Action form.  In order to make Struts aware of this bean, you
must
> > declare in your struts-config.xml file and have an action path mapped
from
> > your JSP to an Action class that will manipulate the bean values that
are
> > set by Struts:
> >
> >  > type="com.whatever.PersonInfoForm" />
> >
> >  > type="com.whatever.GetPersonalInfoAction"
> > name="PersonalInfoForm"
> > scope="session"
> >   validate="true"
> >   parameter="isNew">
> >   
> >   
> > 
> >
> > So this associates your bean with your JSP and your ActionClass.  When
your
> > user goes to http://yoursite/personalInfo.do (depending on the mapping
in
> > your web.xml), personalInfo.jsp will be invoked and the rendered HTML
> > displayed.  After the user fills out the form and submits (for example,
the
> > form action is /reviewPersonalInfo which will display everything the
user
> > just entered), the following action path is invoked:
> >
> >  > type="com.whatever.SavePersonalInfoAction"
> > name="PersonalInfoForm"
> > input="/PersonalInfo.jsp"
> > scope="session"
> >   validate="true"
> >   parameter="isError">
> >   
> >   
> > 
> >
> > and reviewPersonalInfo.jsp will appear to display the information
contained
> > in your bean through the use of Struts tags. At this point you can also
> > access the bean's state in your Action class through the form object to
save
> > it to a database or whatever.
> >
> > Okay?
> >
> > Mark
> >
> > (That should have earned me a few [OT/FRIDAY] msgs, eh?)
> >
> >
> > -Original Message-
> > From: Vincent Berruchon [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, September 24, 2002 11:19 AM
> >
> >   Hi, I'm still newie and really confused on how to get HTML form filled
> > with struts...
> > I want to fill a select input in a form in one of my JSP.
> > So I've write an ActionForm Bean with the get and set methods for each
> > properties corresponding to an input on the form.
> > But I don't know where these "set" methods are (or should) be called to
> > fill actionForm properties before the calls to the get methods?
> >
> > Can someone help us?
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

> >
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




Re: Indemnification & copyright

2002-09-23 Thread Karim Saloojee

I also agree, the Struts coders would never be adding what amounts to
"stolen" code.

However if they did, it makes sense that Apache would be responsible not
company XYZ running struts 1.0

Why does your boss think this problem applies to OS projects only? You guys
surely have bought other "closed" software, what happens if your "closed"
software has violated some patent/copyright? What makes you so sure the
holders of the copyright wont sue your company for damages even if the
software was built by some other commercial entity and sold to you? The
situation would boil down to the same thing eventually.

Use Struts and dont worry, Apache will pay for everything. Worst case
scenario is that Apache will sell their URL to Larry Flynt and use the
proceeds to pay a couple of patent holders.

- Original Message -
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, September 23, 2002 2:27 PM
Subject: RE: Indemnification & copyright


> Have to agree with you there.
> I can't imagine for an instance the struts contributors would ever be
adding
> dodgy code, way I see it, its purely a hypothetical question as far as
> struts is concerned.
> You would need to be quite paranoid to let such a worry about struts put
you
> off using it. Indeed from what I gather its the proprietary stuff where
this
> becomes a problem as the source is not open to review.
> I would still be interested to know the legal position on such a issue
> however as a theoretical curiosity...
>
> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 23, 2002 20:15
> To: 'Struts Users Mailing List'
> Subject: RE: Indemnification & copyright
>
>
> I think that's a bit of a stretch.  I have no doubt in my mind that the
guys
> producing the nightly builds have more professional integrity than to
> incorporate code of questionable origins or legality into Struts.  I mean,
> how dumb would that be?  It's open-source and doing something like that
> would ruin your career.
>
> I'd say to his employer to take a look at all the commercial applications
> now using Struts and ask him if he's not being just a wee bit paranoid
>
>
> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 23, 2002 7:45 AM
> To: Struts Users Mailing List
> Subject: RE: Indemnification & copyright
>
>
> His employer is worried that one of the struts contributers could include
> some code that someone else has rights to and that as a user of struts his
> employer would be then be legally liable for such an infringement.
>
> In this event the Apache licence would not really be relevant as the dodgy
> chunk of code involved wouldnt be Apaches to license in the first place.
> (ie: would mean as much as a handwritten certificate of authority from the
> guy down the pub who sold you a cheap car stereo)
>
> The question in this case is what happens to folk using struts in regards
to
> their legal liabilty regarding any such dodgy code distributed with
struts.
> I dont know the answer to this one but would be rather curious to know.
>
> Common sense would suggest that having used struts 'in good faith' we
> wouldnt be liable, but since this is a legal issue any conclusion reached
by
> using common sense is almost certainly completely invalid...
>
> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 23, 2002 19:27
> To: 'Struts Users Mailing List'
> Subject: RE: Indemnification & copyright
>
>
> There is no liability issue as long as you abide by the license, which
> merely requires that credit is given to Apache for redistributed software
> containing ASF code.
>
> http://jakarta.apache.org/turbine/common/license.html
>
> Mark
>
> -Original Message-
> From: Malcolm Davis [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 22, 2002 8:02 PM
>
> I am presently in a predicament on my present contract.  I
> am not allowed to use STRUTS unless my employer can be
> indemnified from copyright or patent infringement.
> 1.  Is there anyway my employer can be indemnified from
> copyright or patent infringement with Struts?
> 2.  Is there a company that provides this service?
> 3.  Is this really an issue with Struts?
>
> The liability extends from the use of intellectual property.
> A developer knowingly or unknowingly contributes a piece of
> software to the Open Source community that contains
> intellectual property.  I then use that piece of open source
> software.
>
> Thanks for any comments,
> malcolm
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

Re: Problems with Checkbox

2002-08-22 Thread Karim Saloojee

Hi

Since you say it works with multiple checkboxes but not one it might be
related to the way Javascript treats a single checkbox. I don't think you
can treat one checkbox as an array and test it as such. Print out the value
of "cartonquery.cartonselect.length" with one checkbox and you will see what
I mean.

~Karim

- Original Message -
From: "Karr, David" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, August 22, 2002 1:44 AM
Subject: RE: Problems with Checkbox


> > -Original Message-
> > From: Susmita Pati [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 21, 2002 2:26 PM
> > To: 'Struts Users Mailing List'
> > Subject: Problems with Checkbox
> >
> >
> >
> > Hi All
> > i am doing this check to see if any check boxes have been
> > selected or not
> > before the user hits on the submit button.
> > It works fine if there are more then 1 row displayed on my page..If no
> > selections have been made then the alert box comes up with
> > "Please make a
> > selections."
> >
> > But if theres only one row displayed this fails..
> >
> > Any suggestion where am going wrong???
> >
> > function checker() {
> > var choices = 0;
> > var type = confirm("Are you sure you want to preview the
> > Carton Details?");
> > if (type) {
> > for (counter = 0; counter <
> > cartonquery.cartonselect.length;
> > counter++){
> > if (cartonquery.cartonselect[counter].checked){
> > choices = choices + 1; }
> > }
> >
> > if (radio_choices < 1 ) {
> > alert("Please make a selections. \n")
> > return (false);
>
> You're incrementing the "choices" variable, but referencing the
> "radio_choices" variable.  Run this sort of thing in a javascript debugger
> and you'll catch these simple 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: off topic !! please help

2002-08-02 Thread Karim Saloojee

The only way I can think of without making a server call is through
JavaScript.

When  the main text box value changes, (onChange event)  you can call a
Javascript function that would have 1 or more arrays. Based on the value of
the text box, you could find the corresponding location and machine no in
another array.

Using the values from the other array(s) you could set your other textboxes.

If you are having trouble with the Javascript, download a trial copy of
Dreamweaver MX, it comes with the Oreilly JavaScript guide.

~Karim




- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, August 02, 2002 8:10 AM
Subject: off topic !! please help


>
> hello everybody,
> i have a small problem and i need your help , i have a drop down combo in
> which i read values of machines from a database (there are around 60 of
> them ),
> what i want is when the user selects a machine  (i.e the combo box value )
> the corresponding machine number and location should be displayed in two
> text boxes below respectively.
> can some one please suggest a way out please,
>
> regards,
> amit malhotra
>
>
>
>
> --
> 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: I am using Linux w/ JRun 3.1 and PoolMan 2.0.4 with Xerces...

2002-07-31 Thread Karim Saloojee

Have you tried a different JDK on Linux?

- Original Message -
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 12:49 PM
Subject: RE: I am using Linux w/ JRun 3.1 and PoolMan 2.0.4 with Xerces...


> Struts is a great framework, but I fear that even it may not be able to
help
> you with this one.
>
> -Original Message-
> From: Ferran Parra [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 31, 2002 16:59
> To: Struts Users Mailing List; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: I am using Linux w/ JRun 3.1 and PoolMan 2.0.4 with Xerces...
>
>
> Hello.
>
> I am using Linux w/ JRun 3.1 and PoolMan 2.0.4 with Xerces. (The version
> that comes with PoolMan)
> I have made the necessary changes in the classpath and restart JRun, and
> when PoolMan tries to read its
> configuration from poolman.xml a 'segment fault' is created in the JVM and
> my JRun server dies. (All servers,
> all applications.) This same setup in Windows works fine. I have tried
> "killing" it in windows by installing
> the same version of the JVM that I have on the Linux box (1.31_04. Before
> that I was working with 1.31_03 in
> Windows ...) and everything works fine in windows.
>
> What the heck could be the problem? Should I try changing the parser?
Xerces
> is the "standard", no?
>
> Any help for a very frustrated geek much appreciated.
>
> Thanks,
> Ferran
> ---
> Ferran Parra
> [EMAIL PROTECTED]
> http://www.mubimedia.com
> MUBIMEDIA S.L.
> C/ Mallorca, 275, 1r 2a 08008 BCN
> Tel: 93 215 21 91 / Fax: 93 215 41 21
> ---
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




Should I move to Struts 1.1 beta? How and why?

2002-07-05 Thread Karim Saloojee

Hi

I am fairly new to Struts and have been working on Struts 1.0. We have
started a new project and have done some (about 10%) of the work in Struts
1.0.

Struts 1.1 seems to have a lot of new functionality that would make our
lives much simpler, particularly ActionForms. The questions I have are:

1. Would it be feasable to move at this stage to 1.1, is the learning curve
steep and is it fairly backward compatible.
2. Is 1.1 beta being used in production systems, are there any stability
issues, can I be confident using it in a banking environment?
3. What are the best resources to find functionality, development tools and
best practises for 1.1.
4. How should I go about moving to 1.1 beta

Thanks in advance,
Karim





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




How to pre-populate forms without being able to get direct access to their names or scope. Am I missing something?

2002-07-02 Thread Karim Saloojee

Hi

I am having a bit of a problem understanding how exactly to pre-populate a
form bean. It seems there is no way to get the name of the formbean of my
next JSP or the session it is likely to be in.

I know that I could do it like this:
TestActionForm tf = new TestActionForm();
tf.setEmployeeNo("55525");
tf.setName("compaq");
request.setAttribute("testactionform", tf);

This would prepopulate my next JSP with no problems. However any changes to
bean names/scope in my struts-config.xml would require a change in my
classes where the above code would be.

This feels a bit strange, am I doing something wrong or not following the
best practice?

TIA,
Karim



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




Does Struts have a taglib for masking dates/currency amounts

2002-06-25 Thread Karim Saloojee

Hi

Does Struts have a masking facility for dates / currency amounts.

I need this because I need to display dates in a particular format
consistently and flexibly throughout the site. For instance the dates are
displayed as dd-mm-yy currently. I might be required to change the format to
/mm/dd across the whole site immediately.

I was going to write a custom taglib for this but I thought I would check to
see if Struts had some of this functionality built in.

Any pointers would be appreciated.

TIA,
Karim



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




Building a dynamic list of html (href) links from a Map

2002-06-25 Thread Karim Saloojee

Hi

I am trying to build a dynamic list of links (href's) from a map that has
been created in my Action class and put into the request for the JSP.

My map looks something like this:
key: Log On
Value: /logon.do
key: Display Users
value: /displayusers.do

Is there a way to use the  tag to build these links so that I
would get something like:
Log On 
Display Users

Is this possible or should I just use plain HTML to build the list of links?

TIA,
Karim



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




Value of using one action per use-case?

2002-06-12 Thread Karim D. Saloojee

Hi

At a Java Conference it was suggested that when building web applications
with Struts it might be a good idea to use one action per use case.

In the action we have a number of different methods that would would be
executed depending on the parameters passed by the browser. The methods
would be automatically invoked by reflection.

Other than the "slight" performance hit due to reflection, would this be a
good idea? Why or why not?

TIA
Karim


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




Struts throws ServletException when parsing in Borland Enterprise Server 5.0 - works great in Tomcat

2002-05-14 Thread Karim D. Saloojee

Hi

This is the exception that is written out when I migrate my app from Tomcat
4 to BES 5.

The struts-config.xml file is ok cause I  test my app in standalone Tomcat
and it works. Only the controller servlet will not come up in BES, which btw
also uses Tomcat.

TIA,
Karim

[Mon May 13 16:36:35 CAT 2002] stdout:  resolveEntity('-//Apache Software
Foundation//DTD Struts Configuration 1.0//EN',
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
[Mon May 13 16:36:35 CAT 2002] stdout:   Resolving to alternate DTD
'besjar:C|\BorlandEnterpriseServer\var\servers\ChrisN\partitions\standard\tm
p\tmpbes_61182struts.jar#org/apache/struts/resources/struts-config_1_0.dtd'
[Mon May 13 16:36:35 CAT 2002] stdout:  StandardContext[/struts1]: Servlet
/struts1 threw load() exception: javax.servlet.ServletException: Parsing
error processing resource path /WEB-INF/struts-config.xml
[Mon May 13 16:36:35 CAT 2002] stdout:  javax.servlet.ServletException:
Parsing error processing resource path /WEB-INF/struts-config.xml
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1337)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServlet.j
ava:52)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:911)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3336)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3495)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:466)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.core.StandardHost.install(StandardHost.java:678)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.startup.Catalina.deploy(Catalina.java:333)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.startup.Catalina.load(Catalina.java:237)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
org.apache.catalina.startup.Catalina.load(Catalina.java:265)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.borland.enterprise.server.services.tomcat4.TomcatService.load(TomcatServ
ice.java:344)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.sun.server.ServiceManager.loadModule(ServiceManager.java:1895)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.borland.enterprise.server.PartitionModules.loadModule(PartitionModules.j
ava:170)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.sun.server.ServiceManager.loadThisModule(ServiceManager.java:1821)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.borland.enterprise.management.agent.PartitionAgentImpl.loadEar(Partition
AgentImpl.java:113)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.borland.enterprise.idl.Server.PartitionAgentPOATie.loadEar(PartitionAgen
tPOATie.java:121)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.borland.enterprise.idl.Server.PartitionAgentPOA._invoke(PartitionAgentPO
A.java:167)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.borland.enterprise.idl.Server.PartitionAgentPOA._invoke(PartitionAgentPO
A.java:72)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2616)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:108)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInte
rceptorManager.java:111)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.j
ava:621)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapt
er.java:68)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAda
pter.java:847)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.j
ava:99)
[Mon May 13 16:36:35 CAT 2002] stdout:  at
com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)


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




DTD's not found in BES 5.0

2002-05-14 Thread Karim D. Saloojee

Hi

I am running Struts with Borland Enterprises Server (BES), version 5.0. I
have migrated an application that was deployed on Tomcat 4 standalone to
BES.

BES will not run the app, printing a parser error on startup about not being
able to find the dtd's for the struts-config.xml file. This stops the
servlet engine from coming up and thus my app refuses to work.

The struts jar is in the webapp, as well as any other required jars.

My understanding is that the ActionServlet re-directs the parser to the
srtuts jar for dtd's. What could be causing BES not to find the DTD's?

Regards,
Karim



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




Cannot remove attributes from request scope???

2002-05-06 Thread Karim Qazi

I am getting this error when running struts on enhydra.
I do not get these errors when running Tomcat 4.0.

Any help is greatly appreciated!


Error: 500
Location: /struts-example/logon.jsp
Internal Servlet Error:


javax.servlet.ServletException: cant remove Attributes from request scope
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:386)
at 
_0002flogon_0002ejsplogon_jsp_0._jspService(_0002flogon_0002ejsplogon_jsp_0.
java:393)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:479)

Root cause: 


java.lang.IllegalArgumentException: cant remove Attributes from request
scope
at 
org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.ja
va:236)
at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:591)
at 
_0002flogon_0002ejsplogon_jsp_0._jspService(_0002flogon_0002ejsplogon_jsp_0.
java:368)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:479)



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




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:   
For additional commands, e-mail: 




Exception display (using Tiles)

2002-04-23 Thread Karim D. Saloojee

Hi

I have a question on how Tiles and Struts propogate exceptions. If for
instance, I have a an exception in my body jsp, unless I declare a JSP error
page in that body, my error page will not display.

Is there a way to declare a JSP error page in the layout and then have all
the pages which use that layout use the same JSP error page?

Could someone clarify this behaviour? I have a hunch on how it works but I
would like to be certain.

Thanks
Karim


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




RE: Struts vs Turbine

2002-04-10 Thread Karim D. Saloojee

I think look at the Struts kickstart faq. There are links to a couple of
articles, one by Ted Husted and another by Jon Stevens.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2002 15:57
To: [EMAIL PROTECTED]
Subject: Struts vs Turbine


hi,
does any one have any idea abt turbine. and how its different from struts
?

thanx

-radhika


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: storing data beyond single page scope without commiting to database

2002-04-03 Thread Karim D. Saloojee

Hi

Note, I am a newbie.

Nonetheless, have you tried storing the form-bean for Object A in the
session (struts-config)? Then in another action say ten screens down the
line you can retrieve it from the session and work with it there.  Once you
are finished, you can remove it from the session if you want.

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: 03 April 2002 16:55
To: [EMAIL PROTECTED]
Subject: storing data beyond single page scope without commiting to
database


Subject: storing data beyond single page scope without commiting to database
From: Simon Kirk <[EMAIL PROTECTED]>
 ===
Hello all,
I have a system where I am creating an object with a certain amount of
data, let's call it object A. It references to one or more object Bs that
can be said to 'belong' to it. Let's say that there are not any object Bs
that fit the criteria of what I want, so in my form to input an object A, I
have a button to add an object B to go with it.

What I could do is when I click the button to create a new
object B, I submit the data so far entered for object A and store the data
in a database. I then enter my data for object B, submit, and get taken
back to object A where my form entries are restored, together with the new
object B in, say, a drop down list. However this raises the problem that
the data for the incomplete object A could become available to other users
unless I put in an 'active' flag or something like it so that until I
finally submit the data for object A other users can't see it.

What I would *like* to do is store the data for object A in the form bean
for it and retrieve it later on after creating object B. This seems to be
an issue of scope. I feel this is probably something people have done a lot
before, but I can't find anything that concisely and clearly explains it on
the struts website. Can anybody suggest something, or point me in the
direction of things to read?

Incidentally, I suppose one way around it would be to maintain a database
connection and only commit my changes for the object A on completion of
submission for both A and B, but I'm using a database connection pool
anyway which would negate this, no?

Many thanks for any help.
Simon

--
Simon Kirk
perception|be.developer(java)
t. +44 (0) 20 7689 1200

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




ActionServlet - thread safe instance variables

2002-03-25 Thread Karim D. Saloojee

Hi

As a newbie to Struts (coming from a Turbine background) I was hoping
someone would clarify the design issues with having instance variables in
the controller servlet.

Does this not pose thread safety issues? If so, how does one deal with them?

Turbine took the easy way out and declared only local (method) variables,
thus ensuring a thread safe controller servlet.

Is the reason why ActionServlet uses instance variables because in theory
one could have two ActionServlet instances with different url patterns in
the same webapp? Is this a common practice or is it not recommended?

I have not had any luck finding answers to this question in the mailing list
archives.

Could someone point me to a resource where I could find the information I
need or even give me a brief explanation.

Thanks in advance
Karim


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




Re: Stress Testing

2002-03-19 Thread karim



[EMAIL PROTECTED] wrote:

> We've used Jmeter and it worked for us even though it is rough around the 
> edges.  You can get Jmeter from http://jakarta.apache.org/
> 
> Microsoft had a free one that integrated with their Visual Studio.   From 
> what I read, it was much more powerful than jmeter, but I don't have the 
> article anymore and this was pre-.net, so who knows if it still exists or 
> if it's still free or if you can test web applications that you developed 
> with non-Microsoft tools.


it still is free for you to download;  http://webtool.rte.microsoft.com/


> 
> If someone knows the answers to these questions, I'd be interested in 
> hearing them.
> 
> Jay
> 
> On Tue, 19 Mar 2002 [EMAIL PROTECTED] wrote:
> 
> 
>>
>>Can anyone recommend a stress test tool that works well with Struts?
>>
>>Cheers,
>>
>>Dave
>>
>>
>>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



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




Re: mapping not found?

2002-01-15 Thread karim

sorry, it is my typo



[EMAIL PROTECTED] wrote:

> have this in my struts-config.xml:
> 
> 
> 
> 
> 
> 
> so thats covered.. 
> is there a reason for you to write DC instead of CD? (maybe i made a typo somewhere?)
> 
> tnx
> 
> 
> On Tue, Jan 15, 2002 at 02:25:39PM +, karim wrote:
> 
>>your listCDForm needs a Form Bean Definition in the struts-config.xml file.
>>
>>should look something like this:
>>
>>
>> 
>> > type="nl.kern.j2ee.sample.struts.ListDCForm"/>
>> 
>>
>>
>>[EMAIL PROTECTED] wrote:
>>
>>
>>>Hi again
>>>
>>>My catalina tells me that it cant find the mapping for /listcd
>>>
>>>log:
>>>[INFO,EmbeddedCatalinaServiceSX] action: Process servletName=action, urlPattern=*.do
>>>[INFO,EmbeddedCatalinaServiceSX] action: Mapping for servlet 'action' = '*.do'
>>>
>>>javax.servlet.ServletException: Cannot retrieve mapping for action /listcd
>>>
>>>web.xml:
>>>  
>>>action
>>>*.do
>>>  
>>>
>>>struts-config.xml:
>>>>>type="nl.kern.j2ee.sample.struts.ListCDAction"
>>>name="listCDForm"
>>>scope="request"
>>>input="/ListCD.jsp"
>>>validate="false">
>>>
>>>   
>>>
>>>ListCD.jsp:
>>>
>>>
>>>anyone?
>>>or should i start to look for a hammer again?
>>>
>>>--
>>>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: mapping not found?

2002-01-15 Thread karim

your listCDForm needs a Form Bean Definition in the struts-config.xml file.

should look something like this:


 
 
 


[EMAIL PROTECTED] wrote:

> Hi again
> 
> My catalina tells me that it cant find the mapping for /listcd
> 
> log:
> [INFO,EmbeddedCatalinaServiceSX] action: Process servletName=action, urlPattern=*.do
> [INFO,EmbeddedCatalinaServiceSX] action: Mapping for servlet 'action' = '*.do'
> 
> javax.servlet.ServletException: Cannot retrieve mapping for action /listcd
> 
> web.xml:
>   
> action
> *.do
>   
> 
> struts-config.xml:
>  type="nl.kern.j2ee.sample.struts.ListCDAction"
> name="listCDForm"
> scope="request"
> input="/ListCD.jsp"
> validate="false">
> 
>
> 
> ListCD.jsp:
> 
> 
> anyone?
> or should i start to look for a hammer again?
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



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




Cannot find message resources under key org.apache.struts.action.MESSAGE

2002-01-08 Thread karim chorfi

Hi,

I'm new to struts
I installed tomcat4.0-b6(.exe) on windows98
I downloaded jakarta-struts-1.0.zip 
I deployed the struts-example.war under webapps
I started the tomcat server with http://localhost:8080/struts-example/

the following message appear : 
A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
...

I think that ther's a problem with a path.

What is the solution?
Can someone help me!