Status of validator & Struts 1.1

2001-09-07 Thread dion

I checked out the struts code from CVS recently and didn't see the
validator code.

Is this being integrated into Struts 1.1? Or should I send feedback to
David Winterfeld?
--
dIon Gillard, Multitask Consulting
Work:  http://www.multitask.com.au
JavaNews: http://www.multitask.com.au/JavaNews




Does anyone know how to get the parents BeanInfo ?

2001-09-07 Thread Trieu, Danny

I know this a litle out of scope, but I need this info to extend the Struts
existing tag.  That is I want to write a tag that will print out all of the
given bean properties as hidden tags inside a from.  These properties
includes the properties of its parent classes.

appreciate your helps ...




Guide for Installing/Configuring Struts in VAJ 4.0 using WTE and WAS 4.0

2001-09-07 Thread SLBrand
Hi folks,

As promised earlier on the boards, enclose are the directions I've come up 
with for installing and configuring struts to run in VAJ/WTE 4.0 and WAS 4.0.

Claim:
  - I had 2 other people that I work with use these instructions, and 
both where able to get up and running in under an hour.

Disclaimers:
  - This work is definitely not all of my own.  I am indebted to the 
gracious of folks on this board who freely shared their experiences.  THANKS 
TO ALL OF YOU!!!
  - There may be instructions here where folks disagree with my methods. 
Fair enough... but if you follow these instruction you will get struts to 
work.  I would be more than happy to make corrections/addtions for anything 
that others find work better/more correctly.  In fact, I'd love it if someone 
would shine more light on anything I did "incorrectly" here, as then I could 
learn the "right" way to do (if there is such a thing...).
   - This is my second attempt to post this, the mailer won't allow 
me to post my .war file (listed in the instructions), as it says it's too 
big.  I'll be happy to send it directly to whoever would like it, or if 
someone wants to give it a home, I'll gladly send it to them.

Lastly:
  If someone wants to post this on their site for others to see, please 
do so, but please add this note and leave the instructions as is.

Here to help,
Stephen :-{)

Stephen Brand
[EMAIL PROTECTED]
 Installing Struts.zip


Re: AW: Struts vs. JADE (from IBM) - feature and usability comparison - n...

2001-09-07 Thread SLBrand
Not to mention that they built the new Administration Console in struts... go 
figure...


RE: display error messages for errors found in an Action

2001-09-07 Thread Brian Grant - SilverStream
Title: RE: display error messages for errors found in an Action







-Original Message-
From: Bill Clinton [mailto:[EMAIL PROTECTED]]
Sent: 4. september 2001 22:27
To: [EMAIL PROTECTED]
Subject: Re: display error messages for errors found in an Action



Hi Brian,
 yes, you can do this.  If you have a message in your 
ApplicationResources file called my.test.error, you can add an error 
like this:


errors.add("myTestField", new ActionError("my.test.error"));


where the string  "myTestField" is the field that caused the error. 
 Look at the constructor for org.apache.struts.action.ActionError for 
more details.


Bill


Brian K. Buckley wrote:


>Hi,  I'm a relative struts newbie, seeking advise.
>
>I have a class MyForm and in the validate() method of MyForm I check for
>input errors and add them to the ActionErrors object which gets returned.
>
>Later in my MyAction action, I check for additional business logic type
>input errors.  If I find errors, I want to put them into to the same error
>list that the form's ActionErrors creates, so that  in my jsp
>pages can display them the same way.
>
>Is there a way to do this?
>
>-Brian
>
>
>.
>





RE: Personalisation Best Practice

2001-09-07 Thread Flying Cloud

snip
> I'm in the middle of working out a
> design for portal-like applications using Tiles and the very cool RSS
> Channel bean from the Commons-Digester. I'd love to add personalization
> to this as well.

A design for portal-like applications is of high interest to me. I would
love to hear as soon as you have this design (or draft) published. I could
see many instances where personalization is almost a necessity.

> While keeping this in a database is a good option, Jetspeed creates a
> folder for each user and stores the configurations there in XML. So
> that's something to think about too. I'm looking at Sixbs by Tagtraum
> (http://www.tagtraum.com/sixbs.html) to store user configurations this
> way. You can probably do the same thing with Castor, but this looks
> simplier to use.

I realize this is still a bit early but what is the interest for integrating
Struts/Tiles and the Jetspeed Portlet API?  It's of high interest on my end.

It looks like this would offer performance with a solution based upon this
and background XML compilation. Take all the xml feeds, pre-compile them
into html / jsp fragments, and then all this would have to happen at request
time, is that the engine would assemble all the fragments that were already
precompiled. Is this what you were envisioning?

The things that are waiting technology-wise might be - is this a standstill
until this is done?:
1 - Completed integration of struts and tiles.  May be a few months?
2 - Jetspeed implementation of the Portlet-API: not been fully integrated
into the main branch, and then some testing.

What are your thoughts?







newbie question

2001-09-07 Thread Thinh Doan

Please explain these lines from struts example (index.jsp):


  
ERROR:  Application resources not loaded -- check servlet container
logs for error messages.
  


Thanks.




Re: Nesting Tags (Again)

2001-09-07 Thread John Raley

You're almost there.  The content is in your page context;  the problem 
is your tag doesn't declare a scripting variable. You have three choices:
1) Write a TagExtraInfo class for your eval tag that declares the 
variable.  Don't forget the  element in your .tld!
2) Use the struts bean:define tag to declare the variable.
3)  Change your code to:

<%String fullUrl="viewcontext.do?name="+pageContext.getAttribute("contextName");%>

I'd go with 2.

Clay Graham wrote:

>John,
>
>So I tried your cool eval approach but the JSP page seems to no be able to 
>find the string once I have placed it in the page context using the eval 
>tag.
>
>Here's my implementation of the eval tag...
>
>public class EvalBody extends BodyTagSupport {
>private String id;
>
>  /* 1) At the end of the tag this function gets called. */
>public int doEndTag() throws JspTagException
>{
>try
>{   /* 2) Get the text within the tag. */
>BodyContent l_tagbody = getBodyContent();
>String ls_output = "";
>
>/* 3) If text was in the tag body then process it. */
>if(l_tagbody != null)
>{
>String ls_html_text = l_tagbody.getString();
>pageContext.setAttribute(id, ls_html_text);
>
>   //this is to verify that I am setting the property...
>ls_output="body text:"+ls_html_text+" id:"+id;
>}
>/* 4) Write the result back to output stream */
>pageContext.getOut().write(ls_output.trim());
>}
>catch (IOException e)
>{
>throw new JspTagException("Tag Error:" + e.toString());
>}
>
>/* Have the JSP Container continue the JSP page as normal. */
>return EVAL_PAGE;
>}
>
>public void setId(String as_id)
>{
>   id=as_id;
>}
>
>}
>
>
>here's my JSP page code...
>
>   
>property="contexts">
>  
>property="name"/>
>property="description"/>
>
>name="contextBean" property="name"/>
><%String fullUrl="viewcontext.do?name="+contextName;%>
>goto 
>context
>
>  
>
>
>and it fails to find the attribute on the page, here's the error...
>
>org.apache.jasper.JasperException: Unable to compile class for 
>JSPC:\tc3.2.3\work\localhost_8080%2Fcontextuon\_0002fcontextmgr_0002ejsp  
>contextmgr_jsp_58.java:525: Undefined variable: contextName String 
>fullUrl="viewcontext.do?name="+contextName;
>
>ok so it can't find the attribute even though I put it in the 
>pageContext...
>
>wassup?
>
>Clay
>





RE: Help Error run Struts in VAJ 4 "cant remove Attributes from request scope" remain

2001-09-07 Thread Assenza, Chris

The correct Jar is also available on the Ted's site and
http://www.enfused.com/struts.jar

Chris

Christopher Assenza
Phone:  412.201.6026
Fax: 412.201.6060
Email:  [EMAIL PROTECTED]
ACCESSDATA
Moving Your Business from Point A to Point e.SM
http://www.accessdc.com/



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 2:50 PM
To: [EMAIL PROTECTED]
Subject: Re: Help Error run Struts in VAJ 4 "cant remove Attributes from
request scope" remain



Julia,

I had the same problem with VAJ 3.5.3, but I presume this will work with
4.0.  You need to make sure you are changing the code in the correct place.
There are two FormTag classes - one in the base taglib package and one in
the taglib.html package.  In
order to get the application to work with VAJ, you need to change it in the
html package.

Eric Stievater
Distributed Application Development
201.418.5663



 

"Julia Yang"



n.com>   cc:

 Subject: Help  Error run Struts
in VAJ 4 "cant remove Attributes from request scope"  
09/07/01 02:36remain

PM

Please respond

to struts-user

 

 





Hi, Geoff and Mark and all

Thank you for answer my question on how to use struts in VAJ
I got it run but with a error
Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope
I followed the e-mail Geoff sent out on 8/21/2001 with

Replace the following lines in the doEndTag() method in the FormTag
class:

 pageContext.removeAttribute(Constants.BEAN_KEY,
PageContext.REQUEST_SCOPE);
 pageContext.removeAttribute(Constants.FORM_KEY,
PageContext.REQUEST_SCOPE);

with the following:

 pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
 pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

The problem remains, is there anything else I need do ?

Julia







*** IMPORTANT NOTE *
The opinions expressed in this message and/or any attachments are
those of the author and not necessarily those of Brown Brothers
Harriman & Co., its subsidiaries and affiliates ("BBH").  There is no
guarantee that this message is either private or confidential, and it
may have been altered by unauthorized sources without your or our
knowledge.  Nothing in the message is capable or intended to create
any legally binding obligations on either party and it is not intended
to provide legal advice.  BBH accepts no responsibility for loss or
damage from its use, including damage from virus.




RE: Help Error run Struts in VAJ 4 "cant remove Attributes from requestscope" remain

2001-09-07 Thread Julia Yang

Thank you Eric. It is working now 

Julia

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 07, 2001 11:50 AM
To: [EMAIL PROTECTED]
Subject: Re: Help Error run Struts in VAJ 4 "cant remove Attributes from
requestscope" remain


Julia,

I had the same problem with VAJ 3.5.3, but I presume this will work with
4.0.  You need to make sure you are changing the code in the correct
place.   There are two FormTag classes - one in the base taglib package
and one in the taglib.html package.  In
order to get the application to work with VAJ, you need to change it in
the html package.

Eric Stievater
Distributed Application Development
201.418.5663



 

"Julia Yang"



n.com>   cc:

 Subject: Help  Error run
Struts in VAJ 4 "cant remove Attributes from request scope"  
09/07/01 02:36remain

PM

Please respond

to struts-user

 

 





Hi, Geoff and Mark and all

Thank you for answer my question on how to use struts in VAJ
I got it run but with a error
Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope
I followed the e-mail Geoff sent out on 8/21/2001 with

Replace the following lines in the doEndTag() method in the FormTag
class:

 pageContext.removeAttribute(Constants.BEAN_KEY,
PageContext.REQUEST_SCOPE);
 pageContext.removeAttribute(Constants.FORM_KEY,
PageContext.REQUEST_SCOPE);

with the following:

 pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
 pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

The problem remains, is there anything else I need do ?

Julia







*** IMPORTANT NOTE *
The opinions expressed in this message and/or any attachments are
those of the author and not necessarily those of Brown Brothers
Harriman & Co., its subsidiaries and affiliates ("BBH").  There is no
guarantee that this message is either private or confidential, and it
may have been altered by unauthorized sources without your or our
knowledge.  Nothing in the message is capable or intended to create
any legally binding obligations on either party and it is not intended
to provide legal advice.  BBH accepts no responsibility for loss or
damage from its use, including damage from virus.





RE: AW: Struts vs. JADE (from IBM) - feature and usability comparison - need help!

2001-09-07 Thread Brugge, John

Two points to consider:

1. The WAS 4.0 admin tool is based on Struts 0.5, which is quite antiquated.
That's not a hearty endorsement for Struts 1.0.
2. IBM is a *big* organization. The fact that the consulting group may be
pushing something besides Struts while the WAS group is using Struts is not
that odd. I don't know that either recommendation would be considered an
endorsement of the whole company, but simply the current favorite of that
group.

I'm also curious to hear of other JADE experiences, since it seems to be
cropping up in a number of companies all of a sudden.

John

> -Original Message-
> From: Doug Smith [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, September 07, 2001 10:16 AM
> To:   [EMAIL PROTECTED]
> Subject:  Re: AW: Struts vs. JADE (from IBM)  - feature and usability
> comparison -  need help!
> 
> 
> Also, Struts is bundled with WAS 4.0 and used to build their
> web-based admin tools.  I'd say that's quite an endorsement
> from Big Blue.
> 
> Doug
> 
> 
> 
> 
>  
> 
> "D. Veniseleas"
> 
>  "'[EMAIL PROTECTED]'" 
> eldorf.de>
> <[EMAIL PROTECTED]>  
>   cc:
> 
> 09/07/2001 01:05 AM   Subject: AW: Struts vs.
> JADE (from IBM)  - 
> Please respond to  feature and usability
> comparison -need help!  
> struts-user
> 
>  
> 
>  
> 
> 
> 
> 
> 
> Hi,
> in their Redbook for the Websphere Appl-Server they describe struts in
> detail.
> I had the impression, they liked struts.
> 
> Dimitris
> 
> > -Ursprüngliche Nachricht-
> > Von:  Esterkin, Alex [SMTP:[EMAIL PROTECTED]]
> > Gesendet am:   Donnerstag, 6. September 2001 19:49
> > An:   [EMAIL PROTECTED]
> > Betreff:   Struts vs. JADE (from IBM)  - feature and usability
> comparison - need help!
> > Wichtigkeit:   Hoch
> >
> > Hello,
> >
> > There has emerged a new proprietary MVC framework called JADE and
> developed
> > and promoted by IBM Consulting National Practice people.  I sense it is
> > inferior in comparison to Struts, but I don't have enough information
> about
> > JADE, and IBM is liked very much at my firm.   I need to quickly prepare
> a
> > detailed feature for feature technical comparison.
> >
> > I wonder whether there are people on this discussion board, who are
> familiar
> > with JADE, and who could share their opinions or insights in this
> regards.
> >
> > Thanks!!!
> >
> > Best regards,
> > 
> >Alex Esterkin
> >   Fidelity Investments
> >  E-mail:  [EMAIL PROTECTED]
> >
> > =
> >
> 
> 
> 



Re: Help Error run Struts in VAJ 4 "cant remove Attributes from requestscope" remain

2001-09-07 Thread Eric . Stievater


Julia,

I had the same problem with VAJ 3.5.3, but I presume this will work with 4.0.  You 
need to make sure you are changing the code in the correct place.   There are two 
FormTag classes - one in the base taglib package and one in the taglib.html package.  
In
order to get the application to work with VAJ, you need to change it in the html 
package.

Eric Stievater
Distributed Application Development
201.418.5663



   

"Julia Yang"   

  

n.com>   cc:   

 Subject: Help  Error run Struts in VAJ 4 
"cant remove Attributes from request scope"  
09/07/01 02:36remain   

PM 

Please respond 

to struts-user 

   

   





Hi, Geoff and Mark and all

Thank you for answer my question on how to use struts in VAJ
I got it run but with a error
Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope
I followed the e-mail Geoff sent out on 8/21/2001 with

Replace the following lines in the doEndTag() method in the FormTag
class:

 pageContext.removeAttribute(Constants.BEAN_KEY,
PageContext.REQUEST_SCOPE);
 pageContext.removeAttribute(Constants.FORM_KEY,
PageContext.REQUEST_SCOPE);

with the following:

 pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
 pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

The problem remains, is there anything else I need do ?

Julia







*** IMPORTANT NOTE *
The opinions expressed in this message and/or any attachments are
those of the author and not necessarily those of Brown Brothers
Harriman & Co., its subsidiaries and affiliates ("BBH").  There is no
guarantee that this message is either private or confidential, and it
may have been altered by unauthorized sources without your or our
knowledge.  Nothing in the message is capable or intended to create
any legally binding obligations on either party and it is not intended
to provide legal advice.  BBH accepts no responsibility for loss or
damage from its use, including damage from virus.




RE: [NEW-USER] WebLogic 5.1 sp9 deployment issue

2001-09-07 Thread Jason Chaffee
Title: RE: [NEW-USER] WebLogic 5.1 sp9 deployment issue





Mark, I ran into session problems as well with sp9.  We found sp9 to be quite buggy and decided to use sp8 until sp10 was released.  You could try to contact BEA and get a custom fix, but by then sp10 should be released.  Sorry, but I don't have a solution specific to sp9.

-Original Message-
From: Schwartz, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 11:38 AM
To: '[EMAIL PROTECTED]'
Subject: FW: [NEW-USER] WebLogic 5.1 sp9 deployment issue





-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 2:10 PM
To: [EMAIL PROTECTED]
Subject: Re: [NEW-USER] WebLogic 5.1 sp9 deployment issue



The best place to ask this question would be the Struts User list.


"Schwartz, Mark" wrote:
> 
> Sorry to send this to the mailing list as I would have expected to see it
> covered in a FAQ somewhere.
> 
> I am trying to deploy struts-example.war and am having a problem which
> appears to be related to the way WebLogic handles session management.  I
got
> through the "ApplicationResources.properties" issue and can view the
startup
> page and the login page.  When I try to log in using "user:pass" I am
> getting the following error in the logs:
> 
> weblogic.servlet.jsp.JspException: (line 16): user is not defined as bean
> 
> I have renamed the WebLogic cookie to "JSESSIONID" and I am using cookies
to
> manage session on my browser (Netscape 6).  The cookie is being set, but
the
> cookie information is also being appended as a parameter to the "GET"
> request URL.  I also tried renaming it to "jsessionid" which was supposed
to
> work for URL based session management and still no success.  The login
> appears to be successful according to the logs, but it just can't get a
> reference to the "user" bean I suspect.
> 
> I am using all the tricks at:
> http://jakarta.apache.org/struts/installation-wls.html which pertains to
> sp8, but I am on sp9 and rapidly moving toward sp10.
> 
> Has anyone succesfully solved this problem?
> 
> Also, can someone point me to list archives if this has been answered?
> 
> Thanks,
> 
> Mark C. Schwartz
> eTechnology group, eBusiness
> MassMutual Financial Group
> 413.744.2782


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/





FW: [NEW-USER] WebLogic 5.1 sp9 deployment issue

2001-09-07 Thread Schwartz, Mark



-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 2:10 PM
To: [EMAIL PROTECTED]
Subject: Re: [NEW-USER] WebLogic 5.1 sp9 deployment issue


The best place to ask this question would be the Struts User list.

"Schwartz, Mark" wrote:
> 
> Sorry to send this to the mailing list as I would have expected to see it
> covered in a FAQ somewhere.
> 
> I am trying to deploy struts-example.war and am having a problem which
> appears to be related to the way WebLogic handles session management.  I
got
> through the "ApplicationResources.properties" issue and can view the
startup
> page and the login page.  When I try to log in using "user:pass" I am
> getting the following error in the logs:
> 
> weblogic.servlet.jsp.JspException: (line 16): user is not defined as bean
> 
> I have renamed the WebLogic cookie to "JSESSIONID" and I am using cookies
to
> manage session on my browser (Netscape 6).  The cookie is being set, but
the
> cookie information is also being appended as a parameter to the "GET"
> request URL.  I also tried renaming it to "jsessionid" which was supposed
to
> work for URL based session management and still no success.  The login
> appears to be successful according to the logs, but it just can't get a
> reference to the "user" bean I suspect.
> 
> I am using all the tricks at:
> http://jakarta.apache.org/struts/installation-wls.html which pertains to
> sp8, but I am on sp9 and rapidly moving toward sp10.
> 
> Has anyone succesfully solved this problem?
> 
> Also, can someone point me to list archives if this has been answered?
> 
> Thanks,
> 
> Mark C. Schwartz
> eTechnology group, eBusiness
> MassMutual Financial Group
> 413.744.2782

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/




Help Error run Struts in VAJ 4 "cant remove Attributes from request scope" remain

2001-09-07 Thread Julia Yang

Hi, Geoff and Mark and all

Thank you for answer my question on how to use struts in VAJ 
I got it run but with a error
Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope
I followed the e-mail Geoff sent out on 8/21/2001 with

Replace the following lines in the doEndTag() method in the FormTag
class:

 pageContext.removeAttribute(Constants.BEAN_KEY,
PageContext.REQUEST_SCOPE);
 pageContext.removeAttribute(Constants.FORM_KEY,
PageContext.REQUEST_SCOPE);

with the following:

 pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
 pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

The problem remains, is there anything else I need do ? 

Julia



-Original Message-
From: David Corbin [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 07, 2001 9:26 AM
To: [EMAIL PROTECTED]
Subject: Re: bean:define, bean:write

For the record, my mistake was in use the "scope" attribute instead of
the
"toScope" attribute.


- Original Message -
From: "Keith Bacon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 1:38 PM
Subject: Re: bean:define, bean:write


> My guess is that jsp:define creates it if not there
> but struts bean:define doesn't.
>
>
> --- David Corbin <[EMAIL PROTECTED]> wrote:
> > I thought that bean:define takes care of that
> > - Original Message -
> > From: "Keith Bacon" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, September 06, 2001 11:18 AM
> > Subject: Re: bean:define, bean:write
> >
> >
> > > Is it because you haven't done a
> > >
> > > request.putAttribute("pageTitle", yourObject);
> > >
> > > in your ActionForm?
> > >
> > > Keith.
> > >
> > >
> > > --- David Corbin <[EMAIL PROTECTED]> wrote:
> > > > Why does this jsp fragment generate an exception
> > > >
> > > > javax.servlet.jsp.JspException: Cannot find bean pageTitle in
> > scope
> > > > request
> > > >
> > > > --cut--
> > > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > > > 
> > > >
> > > > 
> > > > 
> > > >   > > > scope="request"/>
> > > > 
> > > > . . .
> > > >
> > > > --cut--
> > > >
> > > > Thanks
> > > > David Corbin
> > > >
> > >
> > >
> > > __
> > > Do You Yahoo!?
> > > Get email alerts & NEW webcam video instant messaging with Yahoo!
> > Messenger
> > > http://im.yahoo.com
> > >
> > >
> >
>
>
> __
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger
> http://im.yahoo.com
>
>




Re: bean:define, bean:write

2001-09-07 Thread David Corbin

For the record, my mistake was in use the "scope" attribute instead of the
"toScope" attribute.


- Original Message -
From: "Keith Bacon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 1:38 PM
Subject: Re: bean:define, bean:write


> My guess is that jsp:define creates it if not there
> but struts bean:define doesn't.
>
>
> --- David Corbin <[EMAIL PROTECTED]> wrote:
> > I thought that bean:define takes care of that
> > - Original Message -
> > From: "Keith Bacon" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, September 06, 2001 11:18 AM
> > Subject: Re: bean:define, bean:write
> >
> >
> > > Is it because you haven't done a
> > >
> > > request.putAttribute("pageTitle", yourObject);
> > >
> > > in your ActionForm?
> > >
> > > Keith.
> > >
> > >
> > > --- David Corbin <[EMAIL PROTECTED]> wrote:
> > > > Why does this jsp fragment generate an exception
> > > >
> > > > javax.servlet.jsp.JspException: Cannot find bean pageTitle in
> > scope
> > > > request
> > > >
> > > > --cut--
> > > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > > > 
> > > >
> > > > 
> > > > 
> > > >   > > > scope="request"/>
> > > > 
> > > > . . .
> > > >
> > > > --cut--
> > > >
> > > > Thanks
> > > > David Corbin
> > > >
> > >
> > >
> > > __
> > > Do You Yahoo!?
> > > Get email alerts & NEW webcam video instant messaging with Yahoo!
> > Messenger
> > > http://im.yahoo.com
> > >
> > >
> >
>
>
> __
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger
> http://im.yahoo.com
>
>




struts-user@jakarta.apache.org

2001-09-07 Thread David Corbin

The  tag doesn't seem to support a way to generate the "main
path" from an attribute.  Is this correct?

In other words, I want a link to be yadda yadda yadda,
but I want the value foobar to come from an attribute in the request scope.

Any ideas?
Thanks.




Re: Examples anyone?

2001-09-07 Thread Bill Clinton

Aaron,
  Glad i could help out.  Its always the damn simple things.  :)

Bill


Aaron O'Hara wrote:

>YOU 'DA MAN!
>
>I forgot something so *&@# simple!  As soon as I added the taglib directive,
>I was able to successfully iterate.
>
>Thanks so much for hanging on and helping me out..
>
>Aaron
>
>-Original Message-
>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 07, 2001 8:06 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Examples anyone?
>
>
>Aaron,
>
> Lets go back to your second error, the 
>"javax.servlet.ServletException: Cannot find bean task in scope null". 
> I can simulate this if, in one of the pages where I use an iteration in 
>this manner, I remove or modify the tag definition.   Are you absolutely 
>sure that you have the
>
><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
>tag definition in your page?  and that the prefix "logic" is the same in 
>the tag definition?  This would account for "workman" being printed only 
>once and getting a null pointer when you refered to the "task" iteration id.
>
>Bill
>
>
>
>Aaron O'Hara wrote:
>
>>The following is my code in the  tags:
>>
>>The tasks for me:
>><%=general.getTasks().size() %>
>>
>> workman! 
>>
>>
>>The scriptlet asking for size returns 3, but the text "workman!" appears
>>only once.
>>
>>Any other ideas?
>>
>>Aaron
>>
>>-Original Message-
>>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>>Sent: Friday, September 07, 2001 7:15 AM
>>To: [EMAIL PROTECTED]
>>Subject: Re: Examples anyone?
>>
>>
>>Aaron,
>>I am not sure why you are getting that error.  I have never needed 
>>to use a "bean:define" or "jsp:useBean"  to define the object being 
>>iterated over.   It seems your collection (getTasks()) is being found, 
>>or you would get an error like this:
>>
>>javax.servlet.jsp.JspException: No collection found
>>
>>Here is what I would try: remove the "bean:write" and put in something 
>>like "hello". Does this get printed x number of times (x being the 
>>number of task objects in your iteration)?  If so, try putting <%= task 
>>%> inside your iteration.  Does it print out something like : 
>>com.razorfront.corporate.task.Task@2b835a , x number of times?
>>
>>Bill
>>
>>
>>Keith Bacon wrote:
>>
>>>Maybe you need to use the struts tag 
>
>>>not 
>
>>>Keith,
>>>
>>>
>>>--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
>>>
If I take out the useBean for task I get the following error:

javax.servlet.ServletException: Cannot find bean task in scope null

Any suggestions?

Aaron

-Original Message-
From: Bill Clinton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 2:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Examples anyone?


Aaron,
I believe the code you have should be accurate, but leave out
the 
usebean directive for task (which isn't necessary and I think is 
interfering with your iteration id because it has the same id):

>>>class="com.razorfront.corporate.global.General"/> 


 


this is assuming:
1) the method in General that returns the Arraylist is getTasks().
2) there is a method in Task called getSubject()

Hope that helps,
Bill



Aaron O'Hara wrote:

>All,
>
>Would somebody be able to point me to an example of iteration with
>
the

>following environmental "restrictions"?  I've looked at sample
>
code, but

>nothing seems to meet 100% what I'm trying to do and I'm still
>
tearing my

>head out trying get get it to work.
>
>I have an application scope bean with a getMethod() that returns a
>
List

>which is actually an ArrayList of "Task" objects.  I want to
>
iterate
through

>this List and display properties of the Task object using the
>
getter

>methods.
>
>In an unsuccessful attempt, I've tried:
>
>class="com.razorfront.corporate.global.General"/>
>class="com.razorfront.corporate.task.Task"/>
>
>
> 
>
>
>(I've omitted the taglib statements for brevity)
>
>I've seen examples using HaspMaps and Lists of numbers, but not a
>
List of

>Objects.  Any assistance would be greatly appreciated!
>
>Aaron
>
>.
>
>>>__
>>>Do You Yahoo!?
>>>Get email alerts & NEW webcam video instant messaging with Yahoo!
>>>
>Messenger
>
>>>http://im.yahoo.com
>>>
>>>.
>>>
>>
>>.
>>
>
>
>.
>





Nesting Tags (Again)

2001-09-07 Thread Clay Graham

John,

So I tried your cool eval approach but the JSP page seems to no be able to 
find the string once I have placed it in the page context using the eval 
tag.

Here's my implementation of the eval tag...

public class EvalBody extends BodyTagSupport {
private String id;

  /* 1) At the end of the tag this function gets called. */
public int doEndTag() throws JspTagException
{
try
{   /* 2) Get the text within the tag. */
BodyContent l_tagbody = getBodyContent();
String ls_output = "";

/* 3) If text was in the tag body then process it. */
if(l_tagbody != null)
{
String ls_html_text = l_tagbody.getString();
pageContext.setAttribute(id, ls_html_text);

//this is to verify that I am setting the property...
ls_output="body text:"+ls_html_text+" id:"+id;
}
/* 4) Write the result back to output stream */
pageContext.getOut().write(ls_output.trim());
}
catch (IOException e)
{
throw new JspTagException("Tag Error:" + e.toString());
}

/* Have the JSP Container continue the JSP page as normal. */
return EVAL_PAGE;
}

public void setId(String as_id)
{
   id=as_id;
}

}


here's my JSP page code...

   

  




<%String fullUrl="viewcontext.do?name="+contextName;%>
goto 
context

  


and it fails to find the attribute on the page, here's the error...

org.apache.jasper.JasperException: Unable to compile class for 
JSPC:\tc3.2.3\work\localhost_8080%2Fcontextuon\_0002fcontextmgr_0002ejsp  
contextmgr_jsp_58.java:525: Undefined variable: contextName String 
fullUrl="viewcontext.do?name="+contextName;

ok so it can't find the attribute even though I put it in the 
pageContext...

wassup?

Clay



-Original Message-
From:   John Raley [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, September 05, 2001 2:11 PM
To: [EMAIL PROTECTED]
Subject:Re: Quick question (nesting tags)

Check out
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14326.html

Clay Graham wrote:

>can you give a more verbose example of how you would do this?
>
>I would like to do this too.
>
>the exact syntax is important, I cant seem to make it work.
>
>-Original Message-
>From:  John Raley [SMTP:[EMAIL PROTECTED]]
>Sent:  Wednesday, September 05, 2001 12:08 PM
>To:[EMAIL PROTECTED]
>Subject:   Re: Quick question (nesting tags)
>
>Everyone wants to do this.  Unfortunately JSP syntax doesn't allow it.
> The best you can do in a tag attribute is a scriptlet (<%= ... %>).
>
>Greg Lehane wrote:
>
>>Hello all,
>>
>>
>> In my JSP I'm iterating through a vector I've stored in my ActionForm
>>bean, I write out information from the vector to the JSP and the end
>>result is a populated table on the JSP. What I would like to do is add a
>>form to each row on the table (as I iterate through), however, I need to
>>grab info from the form in order to populate the action= part of the
>> tag.
>>
>> So, I attempt to write something like this for each iteration:
>>
>>   "> >property="submit" value="open"/>
>>
>> However, compilation throws up a "Non matching extension tags error"
>>on the JSP. Presumably because have the nested  tag.
>>
>> I know that this nesting works using regular HTML, but I would rather
>>use the custom tags. Hopefully this simply involves adding commas or
>>something!
>>
>> Thanks,
>>
>>- Greg
>>
>>--
>>Greg Lehane
>>Software Developer
>>H5 Technologies Inc.
>>520 3rd St. No 17
>>San Francisco, CA 94107
>>415.625.6701 ext. 610 (direct)
>>415.625.6799 (fax)
>>[EMAIL PROTECTED]
>>
>>
>
>
>
>






RE: "indexed" option does not work with html:checkbox

2001-09-07 Thread dhay



Hi Oswald,

Sorry, didn't catch that you can't use the nightly build...

In that case, you have to use scriptlets to set the index yourself...look at the
archive for messages

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg08160.html
or
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg08161.html

Cheers,

Dave





"Campesato, Oswald" <[EMAIL PROTECTED]> on 09/07/2001
12:41:09 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: "indexed" option does not work with html:checkbox



David:  yes, that's exactly what I wanted to do, but we
have the Struts 'jar' files from several months ago, and
at that point in time "indexed=true" was not supported.
I verified this by checking struts-html.tld (as suggested
by Marcelo).  Since I cannot use the latest build, I
need to find a workaround using our current 'jar' files.

I can pre-determine the size of the list from the back-end
code, but I don't see a way of setting a counter in the
'iterate' tag in order to serially increment the counter
and append its new value to a fixed string.  Undoubtedly
the solution is easy, but I haven't found it yet:)

This scenario is common when displaying a list of items
and selecting one for "drill down" or deletion, so I'm
sure someone has solved this problem.  As I mentioned
before, I need this code for several pages, so I would
really appreciate your help!

Cordially,

Oswald




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 9:31 AM
To: [EMAIL PROTECTED]
Subject: RE: "indexed" option does not work with html:checkbox




Hi.  Not sure I follow...

If you add indexed="true" to the checkbox tag, it will produce unique
indexed
names which should set the value in the appropriate deleteCheckbox - you can
then check which deleteCheckbox was set.

Let me know if this isn't what you want!

Cheers,

Dave





"Campesato, Oswald" <[EMAIL PROTECTED]> on
09/06/2001
06:15:53 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: "indexed" option does not work with html:checkbox



David + Marcelo:  thank you both -- I'm now in a position
where I must use the struts 'jar' files from several months
ago instead of the nightly build (alas!).

The problem is fairly straightforward:  I'm displaying a
dynamic list of checkboxes inside an 'iterate' tag.  How
do I specify the name of each checkbox based on an attribute
of the iterated list?  When the page is submitted, I can
then use the name of the checkbox to determine which of the
checkboxes were clicked (if any).  As has been pointed out
by other people, nested tags do not work (with or without
escaping quote marks).

Here's the code fragment where the four lines with ">" are
my attempt at specifying a unique name for each checkbox:

x
  
  

> property="deleteCheckbox"
>value="
property=\"repositoryName\"/>"/>

.
  
  
x

I'll be re-using the correct code fragment in many
places, so a solution would be really appreciated:)

Cordially,

Oswald


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 9:02 AM
To: [EMAIL PROTECTED]
Subject: Re: "indexed" option does not work with html:checkbox




To use the indexed option you need to be using the nightly build.

Dave





"Campesato, Oswald" <[EMAIL PROTECTED]> on
09/04/2001
04:01:26 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  "indexed" option does not work with html:checkbox



The following tag:



generates the following error message:

indexed is not a valid attribute for tag html:checkbox

I've also tried "index" instead of "indexed" and "true" instead of "yes".
Other options (onchange, onclick, disabled) work correctly with this tag,
so why doesn't "indexed" work?  Suggestions welcome

Cordially,

Oswald





















Error upgrading to latest struts build

2001-09-07 Thread Larry Maturo

I'm trying to upgrade from struts 1.0 to the latest nightly
build.  I'm using Forte, and I get the following error in
my output:

2001-09-07 11:32:23 - Ctx(  ): Error in actioninit(), error happened at
999880230498 wait -113171 : Missing configuration resource for path
/WEB-INF/struts-config.xml - javax.servlet.UnavailableException: Missing
configuration resource for path /WEB-INF/struts-config.xml
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1262)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:460)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
at org.apache.tomcat.core.Handler.init(Handler.java:215)
at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:130)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:443)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:403)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:197)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:237)
at
org.netbeans.modules.web.core.execution.WebAppMain.main(WebAppMain.java:37)

My web page displays the message:
Error: 503
Location:/EvaluationsHome.do
Missing configuration resource for path /WEB-INF/struts-config.xml

My actual actions was as follows:

I unziped the build.
I deleted struts-session.tld from my WEB-INF folder.
I copied struts-bean.tld, struts-html.tld,
   struts-logic.tld, and struts-template.tld from the
   build to my WEB-INF folder.
I copied struts.jar to my lib directory.
I edited by web.xml file to replace struts-session.tld with
  struts-template.tld.
I did a clean all.
I did a build all.

Any help would be appreciated.

-- Larry Maturo














RE: "indexed" option does not work with html:checkbox

2001-09-07 Thread Campesato, Oswald

David:  yes, that's exactly what I wanted to do, but we
have the Struts 'jar' files from several months ago, and
at that point in time "indexed=true" was not supported.
I verified this by checking struts-html.tld (as suggested
by Marcelo).  Since I cannot use the latest build, I 
need to find a workaround using our current 'jar' files.

I can pre-determine the size of the list from the back-end
code, but I don't see a way of setting a counter in the
'iterate' tag in order to serially increment the counter
and append its new value to a fixed string.  Undoubtedly
the solution is easy, but I haven't found it yet:)

This scenario is common when displaying a list of items
and selecting one for "drill down" or deletion, so I'm
sure someone has solved this problem.  As I mentioned
before, I need this code for several pages, so I would
really appreciate your help!

Cordially,

Oswald




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 9:31 AM
To: [EMAIL PROTECTED]
Subject: RE: "indexed" option does not work with html:checkbox




Hi.  Not sure I follow...

If you add indexed="true" to the checkbox tag, it will produce unique
indexed
names which should set the value in the appropriate deleteCheckbox - you can
then check which deleteCheckbox was set.

Let me know if this isn't what you want!

Cheers,

Dave





"Campesato, Oswald" <[EMAIL PROTECTED]> on
09/06/2001
06:15:53 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: "indexed" option does not work with html:checkbox



David + Marcelo:  thank you both -- I'm now in a position
where I must use the struts 'jar' files from several months
ago instead of the nightly build (alas!).

The problem is fairly straightforward:  I'm displaying a
dynamic list of checkboxes inside an 'iterate' tag.  How
do I specify the name of each checkbox based on an attribute
of the iterated list?  When the page is submitted, I can
then use the name of the checkbox to determine which of the
checkboxes were clicked (if any).  As has been pointed out
by other people, nested tags do not work (with or without
escaping quote marks).

Here's the code fragment where the four lines with ">" are
my attempt at specifying a unique name for each checkbox:

x
  
  

> property="deleteCheckbox"
>value="
property=\"repositoryName\"/>"/>

.
  
  
x

I'll be re-using the correct code fragment in many
places, so a solution would be really appreciated:)

Cordially,

Oswald


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 9:02 AM
To: [EMAIL PROTECTED]
Subject: Re: "indexed" option does not work with html:checkbox




To use the indexed option you need to be using the nightly build.

Dave





"Campesato, Oswald" <[EMAIL PROTECTED]> on
09/04/2001
04:01:26 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  "indexed" option does not work with html:checkbox



The following tag:



generates the following error message:

indexed is not a valid attribute for tag html:checkbox

I've also tried "index" instead of "indexed" and "true" instead of "yes".
Other options (onchange, onclick, disabled) work correctly with this tag,
so why doesn't "indexed" work?  Suggestions welcome

Cordially,

Oswald















RE: "indexed" option does not work with html:checkbox

2001-09-07 Thread dhay



Hi.  Not sure I follow...

If you add indexed="true" to the checkbox tag, it will produce unique indexed
names which should set the value in the appropriate deleteCheckbox - you can
then check which deleteCheckbox was set.

Let me know if this isn't what you want!

Cheers,

Dave





"Campesato, Oswald" <[EMAIL PROTECTED]> on 09/06/2001
06:15:53 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: "indexed" option does not work with html:checkbox



David + Marcelo:  thank you both -- I'm now in a position
where I must use the struts 'jar' files from several months
ago instead of the nightly build (alas!).

The problem is fairly straightforward:  I'm displaying a
dynamic list of checkboxes inside an 'iterate' tag.  How
do I specify the name of each checkbox based on an attribute
of the iterated list?  When the page is submitted, I can
then use the name of the checkbox to determine which of the
checkboxes were clicked (if any).  As has been pointed out
by other people, nested tags do not work (with or without
escaping quote marks).

Here's the code fragment where the four lines with ">" are
my attempt at specifying a unique name for each checkbox:

x
  
  

> property="deleteCheckbox"
>value="
property=\"repositoryName\"/>"/>

.
  
  
x

I'll be re-using the correct code fragment in many
places, so a solution would be really appreciated:)

Cordially,

Oswald


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 9:02 AM
To: [EMAIL PROTECTED]
Subject: Re: "indexed" option does not work with html:checkbox




To use the indexed option you need to be using the nightly build.

Dave





"Campesato, Oswald" <[EMAIL PROTECTED]> on
09/04/2001
04:01:26 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  "indexed" option does not work with html:checkbox



The following tag:



generates the following error message:

indexed is not a valid attribute for tag html:checkbox

I've also tried "index" instead of "indexed" and "true" instead of "yes".
Other options (onchange, onclick, disabled) work correctly with this tag,
so why doesn't "indexed" work?  Suggestions welcome

Cordially,

Oswald
















RE: DataBase Controller in Struts

2001-09-07 Thread Flying Cloud

> Expresso  has many of the features you have mentioned needing,
> and many more
> as well. As a community, it is neither as large or as well
> documented as the
> Struts community,

Expresso's listserv while large at 3700 does not share the activity that the
Struts lists has (even considering the Expresso forum activity). Though
Struts and Expresso comprise the largest framework communities by far and
its terrific that they complement. We are seeing a tremendous community
response to the Struts/Expresso integration and many downloads.

Expresso 4.0ea (early access) is available now, 4.0 is not yet released
until testing is complete. Early access versions are available to registered
users. For those Struts users starting with 4.0ea you might have a look at:
http://www.jcorporate.com/html/products/expresso/struts_integration.html

Pete's point about documentation is well taken. One area I've initiated to
work on is to create documentation specifically for Struts Users Getting
Started with Expresso to include commonly asked Q and A as well as other
resources and information. And questions you have or suggestions will
certainly help the other Struts users that follow. Anyone that wants to help
in creating this documentation for Struts users getting familiar with
Expresso just let me know. It can be as simple of tracking your notes and
progress and letting us know where you got hung up.

I just created a thread called "Struts Users Getting Started with Expresso
4.0ea" on the Expresso Users forum if this helps.

Sandra Cann
[EMAIL PROTECTED]





Re-populating ActionForm

2001-09-07 Thread Mauro Mellino

Hi,

I'm writing my first struts app but have encountered some trouble.
Basically I have a jsp page with a drop down list populated from an 
actionForm. Based on the selection from the drop-down list the same 
actionForm (and jsp) is repopulated via a query to a database from the 
actionForm.

The first time this jsp is loaded everything is ok, however when I re-submit 
with a selection from the drop-down I get a:

BeanUtils.populate
java.lang.IllegalArgumentException: argument type mismatch at 
java.lang.reflect.Method.invoke(Native Method) at 
org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java, 
Compiled Code) at 
org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java, 
Compiled Code)

I am not sure where the error could be...
Any help appreciated...

Regards,
Mauro

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Re: role-based Actions and page not found error

2001-09-07 Thread Matt Raible

I got this figured out - the SC_FORBIDDEN works GREAT!!  

Without the entry in my web.xml - I get an error message from the server (or
browser if using IE 6).

I changed the entry in my web.xml to have a leading slash ("/") and it works
great!


 403
 /accessDenied.jsp


+1 for adding this to struts 1.1!

--- Matt Raible <[EMAIL PROTECTED]> wrote:
> Nic,
> 
> I changed your ActionServlet (line 1573) to return SC_FORBIDDEN in the
> following code block:
> 
> if (debug >= 1)
>  log(" Access denied to mapping for path " + path);
> 
> response.sendError(HttpServletResponse.SC_FORBIDDEN,
> internal.getMessage("processAccessDenied", path));
> 
> added this to my web.xml:
> 
>   
>   403
>   accessDenied.jsp
>   
> 
> And now I'm getting the error below - any ideas?
> 
> [07/Sep/2001 09:23:23:3] info: --
> [07/Sep/2001 09:23:23:3] info: action:  Access denied to mapping for path
> /searchHolidayMonth
> [07/Sep/2001 09:23:23:3] info: --
> [07/Sep/2001 09:23:23:3] error: Exception: SERVLET-run_failed: Failed in
> running template: [App = timetracker, Servlet = action], java.lang.Strin
> gIndexOutOfBoundsException: String index out of range: -1
> Exception Stack Trace:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1492)
> at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletRequest.getRequestDispatcher(Unknown
> Source)
> at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.sendError(Unknown
> Source)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1573)
> at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> at
> com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown Source)
> at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri(Unknown
> Source)
> at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUriRestrictOutput(Unknown
> Source)
> at
>
com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(Unknown
> Source)
> at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.sendError(Unknown
> Source)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1573)
> at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> at
> com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown Source)
> at
> com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
> Source)
> at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
> at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
> at com.kivasoft.thread.ThreadBasic.run(Native Method)
> at java.lang.Thread.run(Thread.java:479)
> 
> --- Nic Hobbs <[EMAIL PROTECTED]> wrote:
> > Hi Matt, All,
> > 
> > 
> > Firstly let me apologise for my absence for the last few weeks ( I seem to 
> > end up doing this at the top of every posting I make ;) but I had a nasty
> and
> > 
> > artistic bout of Food Poisoning and then a holiday to contend with. Since I
> 
> > have been trying to catch up on the several thousand mails that seem to
> have 
> > been sent whilst I was away!
> > 
> > On to the real message though. In my original posting (referenced in your 
> > mail) I outlined this as the current functionality, and asked for
> suggestions
> > 
> > as to what it _should_ do instead. Yours is the first comment I have had
> back
> > 
> > on this, as I think you are one of the first to look at it in any depth.
> Many
> > 
> > thanks.
> > 
> > I think you are probably right that we should return a 403 (Forbidden) as
> the
> > 
> > default. I would like this to be configurable though so people can choose.
> I 
> > can't remember exactly how the code was written now (well, it was a month
> or 
> > so ago) and if this is possible, and sadly our network went down for
> routine 
> > maintenance today and died in the process so I can't even look at the code
> at
> > 
> > the moment, let alone test some changes! I will do asap though. Do you
> still 
> > want a demo webapp or are you happy with how it works now? It sounds like
> you
> > 
> > have it working ok.
> > 
> > Incidently, things have been quiet on the workflow front recently, can
> anyone
> > 
> > update me with what the latest is? Ta.
> > 
> > In the next few weeks I have (another) holiday and am quite busy as I have 
> > some bits to clear up before I get sent out to the US 

request object

2001-09-07 Thread chiji nwankwo

Hi,
When forwarding from one action to another, is the same request object used?  For example, is this legal?
Action subclass 1 (perform method) :
Test test = new Test();
// initialize test
request.setAttribute( "test", test )
return (mapping.findForward( "Action subclass 2" ))
Action subclass 2 (perform method):
Test newTest = (Test)request.getAttribute("test")
// try to use newly created newTest object
I seem to be getting an error when I try to do this, it will appear that the newTest Object is null.
ThanksChiji


 Get your FREE download of MSN Explorer at http://explorer.msn.com


RE: Examples anyone?

2001-09-07 Thread Aaron O'Hara

YOU 'DA MAN!

I forgot something so *&@# simple!  As soon as I added the taglib directive,
I was able to successfully iterate.

Thanks so much for hanging on and helping me out..

Aaron

-Original Message-
From: Bill Clinton [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 8:06 AM
To: [EMAIL PROTECTED]
Subject: Re: Examples anyone?


Aaron,

 Lets go back to your second error, the 
"javax.servlet.ServletException: Cannot find bean task in scope null". 
 I can simulate this if, in one of the pages where I use an iteration in 
this manner, I remove or modify the tag definition.   Are you absolutely 
sure that you have the

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

tag definition in your page?  and that the prefix "logic" is the same in 
the tag definition?  This would account for "workman" being printed only 
once and getting a null pointer when you refered to the "task" iteration id.

Bill



Aaron O'Hara wrote:

>The following is my code in the  tags:
>
>The tasks for me:
><%=general.getTasks().size() %>
>
>  workman! 
>
>
>The scriptlet asking for size returns 3, but the text "workman!" appears
>only once.
>
>Any other ideas?
>
>Aaron
>
>-Original Message-
>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 07, 2001 7:15 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Examples anyone?
>
>
>Aaron,
> I am not sure why you are getting that error.  I have never needed 
>to use a "bean:define" or "jsp:useBean"  to define the object being 
>iterated over.   It seems your collection (getTasks()) is being found, 
>or you would get an error like this:
>
>javax.servlet.jsp.JspException: No collection found
>
>Here is what I would try: remove the "bean:write" and put in something 
>like "hello". Does this get printed x number of times (x being the 
>number of task objects in your iteration)?  If so, try putting <%= task 
>%> inside your iteration.  Does it print out something like : 
>com.razorfront.corporate.task.Task@2b835a , x number of times?
>
>Bill
>
>
>Keith Bacon wrote:
>
>>Maybe you need to use the struts tag 
>>>
>>not 
>>>
>>Keith,
>>
>>
>>--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
>>
>>>If I take out the useBean for task I get the following error:
>>>
>>>javax.servlet.ServletException: Cannot find bean task in scope null
>>>
>>>Any suggestions?
>>>
>>>Aaron
>>>
>>>-Original Message-
>>>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>>>Sent: Thursday, September 06, 2001 2:53 PM
>>>To: [EMAIL PROTECTED]
>>>Subject: Re: Examples anyone?
>>>
>>>
>>>Aaron,
>>> I believe the code you have should be accurate, but leave out
>>>the 
>>>usebean directive for task (which isn't necessary and I think is 
>>>interfering with your iteration id because it has the same id):
>>>
>class="com.razorfront.corporate.global.General"/> 
>>>
>>>
>>>  
>>>
>>>
>>>this is assuming:
>>>1) the method in General that returns the Arraylist is getTasks().
>>>2) there is a method in Task called getSubject()
>>>
>>>Hope that helps,
>>>Bill
>>>
>>>
>>>
>>>Aaron O'Hara wrote:
>>>
All,

Would somebody be able to point me to an example of iteration with

>>>the
>>>
following environmental "restrictions"?  I've looked at sample

>>>code, but
>>>
nothing seems to meet 100% what I'm trying to do and I'm still

>>>tearing my
>>>
head out trying get get it to work.

I have an application scope bean with a getMethod() that returns a

>>>List
>>>
which is actually an ArrayList of "Task" objects.  I want to

>>>iterate
>>>through
>>>
this List and display properties of the Task object using the

>>>getter
>>>
methods.

In an unsuccessful attempt, I've tried:

>>>class="com.razorfront.corporate.global.General"/>
>>>class="com.razorfront.corporate.task.Task"/>


 


(I've omitted the taglib statements for brevity)

I've seen examples using HaspMaps and Lists of numbers, but not a

>>>List of
>>>
Objects.  Any assistance would be greatly appreciated!

Aaron

.

>>
>>__
>>Do You Yahoo!?
>>Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger
>>http://im.yahoo.com
>>
>>.
>>
>
>
>.
>




RE: Run Struts in Entry Editon Visual Age for Java 4.0?

2001-09-07 Thread Julia Yang

Sorry bother you all again
 
Guys,
 
Can you share how to run struts in VAJ4 ?. Any instructions? What
version of struts do you use ? how do you solve the XML Parser problem ?
I follow up the article of Apache Struts and VAJ part 2: Using Struts in
VAJ 3.5.3 from IBM Kyle Brown. 
 
What I did
Import struts1.0-b2
Import struts example
Import Javax.xml.parsers.SAXParser, SAXParserFactory,
ParserConfigurationException from JAXP.jar. There is no error in soure,
but if I start to run the WTE it gives the following error.
 
ServletInstan X Uncaught init() exception thrown by servlet {0}: {1}
 "action"
 javax.servlet.ServletException:
javax.xml.parsers.FactoryConfigurationError
 
 
Either use Tomcat or WTE is fine for me, as along as I can run struts in
VAJ and debug my xxxacton or xxxform class
 
Thanks very much
 
Julia
 
 
-Original Message-
From: VIAUD Cédric [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 07, 2001 1:33 AM
To: [EMAIL PROTECTED]
Subject: RE: Run Struts in Entry Editon Visual Age for Java 4.0?
 
Can you explicite your probleme. 
I am actually using VAJ 3.5 and WAS 3.5.3, and everything is OK. 
A+ Cédric 
-Message d'origine- 
De : Julia Yang [ mailto:[EMAIL PROTECTED]] 
Envoyé : vendredi 7 septembre 2001 00:36 
À : [EMAIL PROTECTED] 
Objet : Run Struts in Entry Editon Visual Age for Java 4.0? 
 
Does anyone know how to run Run Struts in Entry Editon Visual Age for 
Java 4.0? Any articles, tricks ? 
I followed the instruction of Apache Struts and VAJ part 2: Using Struts

in VAJ 3.5.3 from IBM Kyle Brown. It gives me exception 
Any suggestion appreciated 
Julia 



Re: role-based Actions and page not found error

2001-09-07 Thread Matt Raible

Nic,

I changed your ActionServlet (line 1573) to return SC_FORBIDDEN in the
following code block:

if (debug >= 1)
 log(" Access denied to mapping for path " + path);

response.sendError(HttpServletResponse.SC_FORBIDDEN,
internal.getMessage("processAccessDenied", path));

added this to my web.xml:

  
403
accessDenied.jsp
  

And now I'm getting the error below - any ideas?

[07/Sep/2001 09:23:23:3] info: --
[07/Sep/2001 09:23:23:3] info: action:  Access denied to mapping for path
/searchHolidayMonth
[07/Sep/2001 09:23:23:3] info: --
[07/Sep/2001 09:23:23:3] error: Exception: SERVLET-run_failed: Failed in
running template: [App = timetracker, Servlet = action], java.lang.Strin
gIndexOutOfBoundsException: String index out of range: -1
Exception Stack Trace:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1492)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletRequest.getRequestDispatcher(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.sendError(Unknown
Source)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1573)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUriRestrictOutput(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.sendError(Unknown
Source)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1573)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)

--- Nic Hobbs <[EMAIL PROTECTED]> wrote:
> Hi Matt, All,
> 
> 
> Firstly let me apologise for my absence for the last few weeks ( I seem to 
> end up doing this at the top of every posting I make ;) but I had a nasty and
> 
> artistic bout of Food Poisoning and then a holiday to contend with. Since I 
> have been trying to catch up on the several thousand mails that seem to have 
> been sent whilst I was away!
> 
> On to the real message though. In my original posting (referenced in your 
> mail) I outlined this as the current functionality, and asked for suggestions
> 
> as to what it _should_ do instead. Yours is the first comment I have had back
> 
> on this, as I think you are one of the first to look at it in any depth. Many
> 
> thanks.
> 
> I think you are probably right that we should return a 403 (Forbidden) as the
> 
> default. I would like this to be configurable though so people can choose. I 
> can't remember exactly how the code was written now (well, it was a month or 
> so ago) and if this is possible, and sadly our network went down for routine 
> maintenance today and died in the process so I can't even look at the code at
> 
> the moment, let alone test some changes! I will do asap though. Do you still 
> want a demo webapp or are you happy with how it works now? It sounds like you
> 
> have it working ok.
> 
> Incidently, things have been quiet on the workflow front recently, can anyone
> 
> update me with what the latest is? Ta.
> 
> In the next few weeks I have (another) holiday and am quite busy as I have 
> some bits to clear up before I get sent out to the US for a couple of months 
> (I'll be down in Tampa, FL if anyone is interested, or if anyone is heading 
> down there for OOPSLA...? Although I'll not be at OOPSLA myself 
> unfortunately...so near yet so far...). But when I get out there I hope to 
> have a little more free time to get more involved. I think I keep saying that
> 
> too...
> 
> 
> Regards,
> 
> Nic
> 
> 
> 
> 
> 
> 
> On Friday 07 September 2001  2:23 pm, you wrote:
> > Nic,
> >
> > I think the best thing to handle the situation below would be to direct the
> > user to a return a 403 error (forbidden).  Then in the web.xml, it migh

Re: AW: Struts vs. JADE (from IBM) - feature and usability comparison- need help!

2001-09-07 Thread Doug Smith


Also, Struts is bundled with WAS 4.0 and used to build their
web-based admin tools.  I'd say that's quite an endorsement
from Big Blue.

Doug




   
  
"D. Veniseleas"
  
 <[EMAIL PROTECTED]>
  
  cc:  
  
09/07/2001 01:05 AM   Subject: AW: Struts vs. JADE (from 
IBM)  - 
Please respond to  feature and usability comparison -
need help!  
struts-user
  
   
  
   
  




Hi,
in their Redbook for the Websphere Appl-Server they describe struts in
detail.
I had the impression, they liked struts.

Dimitris

> -Ursprüngliche Nachricht-
> Von:  Esterkin, Alex [SMTP:[EMAIL PROTECTED]]
> Gesendet am:   Donnerstag, 6. September 2001 19:49
> An:   [EMAIL PROTECTED]
> Betreff:   Struts vs. JADE (from IBM)  - feature and usability
comparison - need help!
> Wichtigkeit:   Hoch
>
> Hello,
>
> There has emerged a new proprietary MVC framework called JADE and
developed
> and promoted by IBM Consulting National Practice people.  I sense it is
> inferior in comparison to Struts, but I don't have enough information
about
> JADE, and IBM is liked very much at my firm.   I need to quickly prepare
a
> detailed feature for feature technical comparison.
>
> I wonder whether there are people on this discussion board, who are
familiar
> with JADE, and who could share their opinions or insights in this
regards.
>
> Thanks!!!
>
> Best regards,
> 
>Alex Esterkin
>   Fidelity Investments
>  E-mail:  [EMAIL PROTECTED]
>
> =
>







Re: role-based Actions and page not found error

2001-09-07 Thread Nic Hobbs

Hi Matt, All,


Firstly let me apologise for my absence for the last few weeks ( I seem to 
end up doing this at the top of every posting I make ;) but I had a nasty and 
artistic bout of Food Poisoning and then a holiday to contend with. Since I 
have been trying to catch up on the several thousand mails that seem to have 
been sent whilst I was away!

On to the real message though. In my original posting (referenced in your 
mail) I outlined this as the current functionality, and asked for suggestions 
as to what it _should_ do instead. Yours is the first comment I have had back 
on this, as I think you are one of the first to look at it in any depth. Many 
thanks.

I think you are probably right that we should return a 403 (Forbidden) as the 
default. I would like this to be configurable though so people can choose. I 
can't remember exactly how the code was written now (well, it was a month or 
so ago) and if this is possible, and sadly our network went down for routine 
maintenance today and died in the process so I can't even look at the code at 
the moment, let alone test some changes! I will do asap though. Do you still 
want a demo webapp or are you happy with how it works now? It sounds like you 
have it working ok.

Incidently, things have been quiet on the workflow front recently, can anyone 
update me with what the latest is? Ta.

In the next few weeks I have (another) holiday and am quite busy as I have 
some bits to clear up before I get sent out to the US for a couple of months 
(I'll be down in Tampa, FL if anyone is interested, or if anyone is heading 
down there for OOPSLA...? Although I'll not be at OOPSLA myself 
unfortunately...so near yet so far...). But when I get out there I hope to 
have a little more free time to get more involved. I think I keep saying that 
too...


Regards,

Nic






On Friday 07 September 2001  2:23 pm, you wrote:
> Nic,
>
> I think the best thing to handle the situation below would be to direct the
> user to a return a 403 error (forbidden).  Then in the web.xml, it might be
> possible to direct your server to route 403 errors to a specific page.  Is
> there anywhere that you specify returning a 404 error?
>
> This is a comment to the following message at:
> http://husted.com/about/struts/struts-security.htm
>
> But what happens when the user is found to not be in the correct role? At
> the moment the user just gets a page not found at the browser level which
> is good in one way in that if a user went to the URL directly they wouldn't
> know if the URL is correct or not but we may want it to go to a specific
> (configurable) 'illegal access' page or something similar. Comments?
>
> Thanks,
>
> Matt
>
>
> __
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> http://im.yahoo.com

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




problem using custom tags nested inside template tags

2001-09-07 Thread Venkatraman, Shanthi



> I am encountering a problem in using  template tag
> 
> Here is the samle jsp
> 
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
> <%@ taglib uri="/WEB-INF/tlds/shan-taglib.tld" prefix="shan" %>
> <%@ taglib uri="/WEB-INF/tlds/struts-template.tld" prefix="template" %>
> 
> 
>  type="com.application.util.PageTemplate"/>
> 
> 
>   
>   
>   
>   
> 
> 
> 
> For putting the mainbody's content, it works with a scriplet.
> But when I do the above (i.e. let the taglib decide the page name,
> Tag lib does get executed and does print out the correct name)
> however in the html generated, It skips the mainbody block.
> 
> Can anyone help me out in this issue ?
> 
> Thanks
> Shanthi



Re: Examples anyone?

2001-09-07 Thread Bill Clinton

Aaron,

 Lets go back to your second error, the 
"javax.servlet.ServletException: Cannot find bean task in scope null". 
 I can simulate this if, in one of the pages where I use an iteration in 
this manner, I remove or modify the tag definition.   Are you absolutely 
sure that you have the

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

tag definition in your page?  and that the prefix "logic" is the same in 
the tag definition?  This would account for "workman" being printed only 
once and getting a null pointer when you refered to the "task" iteration id.

Bill



Aaron O'Hara wrote:

>The following is my code in the  tags:
>
>The tasks for me:
><%=general.getTasks().size() %>
>
>  workman! 
>
>
>The scriptlet asking for size returns 3, but the text "workman!" appears
>only once.
>
>Any other ideas?
>
>Aaron
>
>-Original Message-
>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 07, 2001 7:15 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Examples anyone?
>
>
>Aaron,
> I am not sure why you are getting that error.  I have never needed 
>to use a "bean:define" or "jsp:useBean"  to define the object being 
>iterated over.   It seems your collection (getTasks()) is being found, 
>or you would get an error like this:
>
>javax.servlet.jsp.JspException: No collection found
>
>Here is what I would try: remove the "bean:write" and put in something 
>like "hello". Does this get printed x number of times (x being the 
>number of task objects in your iteration)?  If so, try putting <%= task 
>%> inside your iteration.  Does it print out something like : 
>com.razorfront.corporate.task.Task@2b835a , x number of times?
>
>Bill
>
>
>Keith Bacon wrote:
>
>>Maybe you need to use the struts tag 
>>>
>>not 
>>>
>>Keith,
>>
>>
>>--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
>>
>>>If I take out the useBean for task I get the following error:
>>>
>>>javax.servlet.ServletException: Cannot find bean task in scope null
>>>
>>>Any suggestions?
>>>
>>>Aaron
>>>
>>>-Original Message-
>>>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>>>Sent: Thursday, September 06, 2001 2:53 PM
>>>To: [EMAIL PROTECTED]
>>>Subject: Re: Examples anyone?
>>>
>>>
>>>Aaron,
>>> I believe the code you have should be accurate, but leave out
>>>the 
>>>usebean directive for task (which isn't necessary and I think is 
>>>interfering with your iteration id because it has the same id):
>>>
>class="com.razorfront.corporate.global.General"/> 
>>>
>>>
>>>  
>>>
>>>
>>>this is assuming:
>>>1) the method in General that returns the Arraylist is getTasks().
>>>2) there is a method in Task called getSubject()
>>>
>>>Hope that helps,
>>>Bill
>>>
>>>
>>>
>>>Aaron O'Hara wrote:
>>>
All,

Would somebody be able to point me to an example of iteration with

>>>the
>>>
following environmental "restrictions"?  I've looked at sample

>>>code, but
>>>
nothing seems to meet 100% what I'm trying to do and I'm still

>>>tearing my
>>>
head out trying get get it to work.

I have an application scope bean with a getMethod() that returns a

>>>List
>>>
which is actually an ArrayList of "Task" objects.  I want to

>>>iterate
>>>through
>>>
this List and display properties of the Task object using the

>>>getter
>>>
methods.

In an unsuccessful attempt, I've tried:

>>>class="com.razorfront.corporate.global.General"/>
>>>class="com.razorfront.corporate.task.Task"/>


 


(I've omitted the taglib statements for brevity)

I've seen examples using HaspMaps and Lists of numbers, but not a

>>>List of
>>>
Objects.  Any assistance would be greatly appreciated!

Aaron

.

>>
>>__
>>Do You Yahoo!?
>>Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
>>http://im.yahoo.com
>>
>>.
>>
>
>
>.
>





POST and session-timeout

2001-09-07 Thread Ralph vd Houdt

Hi All,

I have a secured area in with FORM authentication, when I -POST- a Form
after the session has timed out and re-login, the information on the Form
isn't submitted anymore. The parameters are lost. Is there a possibility te
have the parameters still in the request? Getting the form isn't an option
because there is too much information in the request. It also isn't possible
to post an multipart form.

Greetings Ralph





RE: Examples anyone?

2001-09-07 Thread Keith Bacon

Aaron,
Another guess (my last advice was no good sorry).
Maybe you have a collection size of 3 but 2 entries are null?
Keith.



--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
> The following is my code in the  tags:
> 
> The tasks for me:
> <%=general.getTasks().size() %>
> 
>   workman! 
> 
> 
> The scriptlet asking for size returns 3, but the text "workman!"
> appears
> only once.
> 
> Any other ideas?
> 
> Aaron
> 
> -Original Message-
> From: Bill Clinton [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 07, 2001 7:15 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Examples anyone?
> 
> 
> Aaron,
>  I am not sure why you are getting that error.  I have never
> needed 
> to use a "bean:define" or "jsp:useBean"  to define the object being
> 
> iterated over.   It seems your collection (getTasks()) is being
> found, 
> or you would get an error like this:
> 
> javax.servlet.jsp.JspException: No collection found
> 
> Here is what I would try: remove the "bean:write" and put in
> something 
> like "hello". Does this get printed x number of times (x being the 
> number of task objects in your iteration)?  If so, try putting <%=
> task 
> %> inside your iteration.  Does it print out something like : 
> com.razorfront.corporate.task.Task@2b835a , x number of times?
> 
> Bill
> 
> 
> Keith Bacon wrote:
> 
> >Maybe you need to use the struts tag 
> > >
> >not 
> > >
> >Keith,
> >
> > 
> >--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
> >
> >>If I take out the useBean for task I get the following error:
> >>
> >>javax.servlet.ServletException: Cannot find bean task in scope
> null
> >>
> >>Any suggestions?
> >>
> >>Aaron
> >>
> >>-Original Message-
> >>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
> >>Sent: Thursday, September 06, 2001 2:53 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: Examples anyone?
> >>
> >>
> >>Aaron,
> >>  I believe the code you have should be accurate, but leave
> out
> >>the 
> >>usebean directive for task (which isn't necessary and I think is 
> >>interfering with your iteration id because it has the same id):
> >>
> >> >>class="com.razorfront.corporate.global.General"/> 
> >>
> >>
> >>   
> >>
> >>
> >>this is assuming:
> >>1) the method in General that returns the Arraylist is
> getTasks().
> >>2) there is a method in Task called getSubject()
> >>
> >>Hope that helps,
> >>Bill
> >>
> >>
> >>
> >>Aaron O'Hara wrote:
> >>
> >>>All,
> >>>
> >>>Would somebody be able to point me to an example of iteration
> with
> >>>
> >>the
> >>
> >>>following environmental "restrictions"?  I've looked at sample
> >>>
> >>code, but
> >>
> >>>nothing seems to meet 100% what I'm trying to do and I'm still
> >>>
> >>tearing my
> >>
> >>>head out trying get get it to work.
> >>>
> >>>I have an application scope bean with a getMethod() that returns
> a
> >>>
> >>List
> >>
> >>>which is actually an ArrayList of "Task" objects.  I want to
> >>>
> >>iterate
> >>through
> >>
> >>>this List and display properties of the Task object using the
> >>>
> >>getter
> >>
> >>>methods.
> >>>
> >>>In an unsuccessful attempt, I've tried:
> >>>
> >>> >>>class="com.razorfront.corporate.global.General"/>
> >>> >>>class="com.razorfront.corporate.task.Task"/>
> >>>
> >>>
> >>>  
> >>>
> >>>
> >>>(I've omitted the taglib statements for brevity)
> >>>
> >>>I've seen examples using HaspMaps and Lists of numbers, but not
> a
> >>>
> >>List of
> >>
> >>>Objects.  Any assistance would be greatly appreciated!
> >>>
> >>>Aaron
> >>>
> >>>.
> >>>
> >
> >
> >__
> >Do You Yahoo!?
> >Get email alerts & NEW webcam video instant messaging with Yahoo!
> Messenger
> >http://im.yahoo.com
> >
> >.
> >
> 


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



Re: Tabs on JSPs

2001-09-07 Thread Ted Husted

Struts is a server-side framework, and doesn't address these types of
client-side issues. 

But whatever would work without Struts in this regard, should work the
same with Struts. 

I can't recommend anything off-hand, but any JSP GUI framework that did
these things would probably work well with Struts. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/


[EMAIL PROTECTED] wrote:
> 
> Hello!
> 
> I'm new to struts, JSP, VAJ, etc.
> 
> Is there any way to simulate the appearance of GUI tabs on a web page using
> struts?
> 
> I know I can do it with frames, javaScript and layering ... but I'm hoping I
> won't have to get into that.
> 
> I searched the struts-user archive for this and found very little.
> 
> Thanks in advance
> 
> Allan



Re: Tabs on JSPs

2001-09-07 Thread Matt Raible

JSP's only create HTML - when it gets to the browser it's the same as if you
wrote it statically.  

Therefore, tabs would be created the same way you would on a static HTML page.

Matt

--- [EMAIL PROTECTED] wrote:
> Hello!
> 
> I'm new to struts, JSP, VAJ, etc.  
> 
> Is there any way to simulate the appearance of GUI tabs on a web page using
> struts?
> 
> I know I can do it with frames, javaScript and layering ... but I'm hoping I
> won't have to get into that.
> 
> I searched the struts-user archive for this and found very little.
> 
> Thanks in advance
> 
> Allan


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



Tabs on JSPs

2001-09-07 Thread Allan . Pomeroy

Hello!

I'm new to struts, JSP, VAJ, etc.  

Is there any way to simulate the appearance of GUI tabs on a web page using
struts?

I know I can do it with frames, javaScript and layering ... but I'm hoping I
won't have to get into that.

I searched the struts-user archive for this and found very little.

Thanks in advance

Allan



RE: Examples anyone?

2001-09-07 Thread Aaron O'Hara

The following is my code in the  tags:

The tasks for me:
<%=general.getTasks().size() %>

  workman! 


The scriptlet asking for size returns 3, but the text "workman!" appears
only once.

Any other ideas?

Aaron

-Original Message-
From: Bill Clinton [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 7:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Examples anyone?


Aaron,
 I am not sure why you are getting that error.  I have never needed 
to use a "bean:define" or "jsp:useBean"  to define the object being 
iterated over.   It seems your collection (getTasks()) is being found, 
or you would get an error like this:

javax.servlet.jsp.JspException: No collection found

Here is what I would try: remove the "bean:write" and put in something 
like "hello". Does this get printed x number of times (x being the 
number of task objects in your iteration)?  If so, try putting <%= task 
%> inside your iteration.  Does it print out something like : 
com.razorfront.corporate.task.Task@2b835a , x number of times?

Bill


Keith Bacon wrote:

>Maybe you need to use the struts tag 
>
>not 
>
>Keith,
>
> 
>--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
>
>>If I take out the useBean for task I get the following error:
>>
>>javax.servlet.ServletException: Cannot find bean task in scope null
>>
>>Any suggestions?
>>
>>Aaron
>>
>>-Original Message-
>>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, September 06, 2001 2:53 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: Examples anyone?
>>
>>
>>Aaron,
>>  I believe the code you have should be accurate, but leave out
>>the 
>>usebean directive for task (which isn't necessary and I think is 
>>interfering with your iteration id because it has the same id):
>>
>>>class="com.razorfront.corporate.global.General"/> 
>>
>>
>>   
>>
>>
>>this is assuming:
>>1) the method in General that returns the Arraylist is getTasks().
>>2) there is a method in Task called getSubject()
>>
>>Hope that helps,
>>Bill
>>
>>
>>
>>Aaron O'Hara wrote:
>>
>>>All,
>>>
>>>Would somebody be able to point me to an example of iteration with
>>>
>>the
>>
>>>following environmental "restrictions"?  I've looked at sample
>>>
>>code, but
>>
>>>nothing seems to meet 100% what I'm trying to do and I'm still
>>>
>>tearing my
>>
>>>head out trying get get it to work.
>>>
>>>I have an application scope bean with a getMethod() that returns a
>>>
>>List
>>
>>>which is actually an ArrayList of "Task" objects.  I want to
>>>
>>iterate
>>through
>>
>>>this List and display properties of the Task object using the
>>>
>>getter
>>
>>>methods.
>>>
>>>In an unsuccessful attempt, I've tried:
>>>
>class="com.razorfront.corporate.global.General"/>
>class="com.razorfront.corporate.task.Task"/>
>>>
>>>
>>>  
>>>
>>>
>>>(I've omitted the taglib statements for brevity)
>>>
>>>I've seen examples using HaspMaps and Lists of numbers, but not a
>>>
>>List of
>>
>>>Objects.  Any assistance would be greatly appreciated!
>>>
>>>Aaron
>>>
>>>.
>>>
>
>
>__
>Do You Yahoo!?
>Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
>http://im.yahoo.com
>
>.
>




role-based Actions and page not found error

2001-09-07 Thread Matt Raible

Nic,

I think the best thing to handle the situation below would be to direct the
user to a return a 403 error (forbidden).  Then in the web.xml, it might be
possible to direct your server to route 403 errors to a specific page.  Is
there anywhere that you specify returning a 404 error?

This is a comment to the following message at:
http://husted.com/about/struts/struts-security.htm

But what happens when the user is found to not be in the correct role? At the
moment the user just gets a page not found at the browser level which is good
in one way in that if a user went to the URL directly they wouldn't know if the
URL is correct or not but we may want it to go to a specific (configurable)
'illegal access' page or something similar. Comments?

Thanks,

Matt


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



Re: Examples anyone?

2001-09-07 Thread Bill Clinton

Aaron,
 I am not sure why you are getting that error.  I have never needed 
to use a "bean:define" or "jsp:useBean"  to define the object being 
iterated over.   It seems your collection (getTasks()) is being found, 
or you would get an error like this:

javax.servlet.jsp.JspException: No collection found

Here is what I would try: remove the "bean:write" and put in something 
like "hello". Does this get printed x number of times (x being the 
number of task objects in your iteration)?  If so, try putting <%= task 
%> inside your iteration.  Does it print out something like : 
com.razorfront.corporate.task.Task@2b835a , x number of times?

Bill


Keith Bacon wrote:

>Maybe you need to use the struts tag 
>
>not 
>
>Keith,
>
> 
>--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
>
>>If I take out the useBean for task I get the following error:
>>
>>javax.servlet.ServletException: Cannot find bean task in scope null
>>
>>Any suggestions?
>>
>>Aaron
>>
>>-Original Message-
>>From: Bill Clinton [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, September 06, 2001 2:53 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: Examples anyone?
>>
>>
>>Aaron,
>>  I believe the code you have should be accurate, but leave out
>>the 
>>usebean directive for task (which isn't necessary and I think is 
>>interfering with your iteration id because it has the same id):
>>
>>>class="com.razorfront.corporate.global.General"/> 
>>
>>
>>   
>>
>>
>>this is assuming:
>>1) the method in General that returns the Arraylist is getTasks().
>>2) there is a method in Task called getSubject()
>>
>>Hope that helps,
>>Bill
>>
>>
>>
>>Aaron O'Hara wrote:
>>
>>>All,
>>>
>>>Would somebody be able to point me to an example of iteration with
>>>
>>the
>>
>>>following environmental "restrictions"?  I've looked at sample
>>>
>>code, but
>>
>>>nothing seems to meet 100% what I'm trying to do and I'm still
>>>
>>tearing my
>>
>>>head out trying get get it to work.
>>>
>>>I have an application scope bean with a getMethod() that returns a
>>>
>>List
>>
>>>which is actually an ArrayList of "Task" objects.  I want to
>>>
>>iterate
>>through
>>
>>>this List and display properties of the Task object using the
>>>
>>getter
>>
>>>methods.
>>>
>>>In an unsuccessful attempt, I've tried:
>>>
>class="com.razorfront.corporate.global.General"/>
>class="com.razorfront.corporate.task.Task"/>
>>>
>>>
>>>  
>>>
>>>
>>>(I've omitted the taglib statements for brevity)
>>>
>>>I've seen examples using HaspMaps and Lists of numbers, but not a
>>>
>>List of
>>
>>>Objects.  Any assistance would be greatly appreciated!
>>>
>>>Aaron
>>>
>>>.
>>>
>
>
>__
>Do You Yahoo!?
>Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
>http://im.yahoo.com
>
>.
>





RE: Examples anyone?

2001-09-07 Thread Aaron O'Hara

I tried adding:



any got:

java.lang.NullPointerException  at
java.util.Hashtable.get(Hashtable.java:320)

Any other suggestions?

Aaron

-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 1:10 AM
To: [EMAIL PROTECTED]
Subject: RE: Examples anyone?


Maybe you need to use the struts tag 
 wrote:
> If I take out the useBean for task I get the following error:
> 
> javax.servlet.ServletException: Cannot find bean task in scope null
> 
> Any suggestions?
> 
> Aaron
> 
> -Original Message-
> From: Bill Clinton [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 06, 2001 2:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Examples anyone?
> 
> 
> Aaron,
>   I believe the code you have should be accurate, but leave out
> the 
> usebean directive for task (which isn't necessary and I think is 
> interfering with your iteration id because it has the same id):
> 
>  class="com.razorfront.corporate.global.General"/> 
> 
> 
>
> 
> 
> this is assuming:
> 1) the method in General that returns the Arraylist is getTasks().
> 2) there is a method in Task called getSubject()
> 
> Hope that helps,
> Bill
> 
> 
> 
> Aaron O'Hara wrote:
> 
> >All,
> >
> >Would somebody be able to point me to an example of iteration with
> the
> >following environmental "restrictions"?  I've looked at sample
> code, but
> >nothing seems to meet 100% what I'm trying to do and I'm still
> tearing my
> >head out trying get get it to work.
> >
> >I have an application scope bean with a getMethod() that returns a
> List
> >which is actually an ArrayList of "Task" objects.  I want to
> iterate
> through
> >this List and display properties of the Task object using the
> getter
> >methods.
> >
> >In an unsuccessful attempt, I've tried:
> >
> > >class="com.razorfront.corporate.global.General"/>
> > >class="com.razorfront.corporate.task.Task"/>
> >
> >
> >   
> >
> >
> >(I've omitted the taglib statements for brevity)
> >
> >I've seen examples using HaspMaps and Lists of numbers, but not a
> List of
> >Objects.  Any assistance would be greatly appreciated!
> >
> >Aaron
> >
> >.
> >
> 


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



Re: Personalisation Best Practice

2001-09-07 Thread Peter Pilgrim


Ah ha! but you are forgetting that JSP can also include (statically) or (dynamically) 
content
You can  a personalisation stylesheet.
You can also have more than one stylesheet two.

<%@ page include  file="personalisation.css" %>


You dont have to wrote about the issue then

Also rather than storing the style definitions in the database it might be better
to store just the "class" name themselves associated with each HTML Element
and then define the style as normal in the CSS internal or external
--
Peter Pilgrim  |  |++44 (0)207-545-9923
 \  \  ___   /  / ... .
-     ( * )  ---   --
_Cafe_Savannah,_San Antonio,Ibiza__



 Message History 



From: "Max Cooper" <[EMAIL PROTECTED]> on 07/09/2001 05:19 MST

Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:
Subject:  Re: Personalisation Best Practice


Watch out for browser caching issues with a JSP stylesheet. It may be slow
to adopt new preferences because the browser is using a cached copy. Turning
caching off might hurt the performance of both the server (having to
regenerate the stylesheet for each page view) and browser (having to
download the stylesheet for each page view).






--

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.





RE: Line of Code Counter?

2001-09-07 Thread Brugge, John

Check out JavaNCSS (NCSS = "non-commenting source statements"). In addition
to simple lines of code in your application, it counts lines per method,
methods per class, and classes per package, to name just a few metrics. The
output is in a nice tabular format, easy to read and easy to analyze.

http://www.kclee.com/clemens/java/javancss/

It only counts Java code, though, not C++.

John

> -Original Message-
> From: Lou Farho [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, September 06, 2001 10:11 AM
> To:   Struts user
> Subject:  Line of Code Counter?
> 
> Can anyone point me to a good utility for performing line of code counter
> for Java and C++?
> The counter needs to count statements.
> 
> 
> Thanks!
> Lou



Re: Personalisation Best Practice

2001-09-07 Thread Ted Husted

Peter Pilgrim wrote:
> I will think about this a bit more, still fuzzy ...

Be sure to keep us posted, Peter! I'm in the middle of working out a
design for portal-like applications using Tiles and the very cool RSS
Channel bean from the Commons-Digester. I'd love to add personalization
to this as well.

While keeping this in a database is a good option, Jetspeed creates a
folder for each user and stores the configurations there in XML. So
that's something to think about too. I'm looking at Sixbs by Tagtraum 
(http://www.tagtraum.com/sixbs.html) to store user configurations this
way. You can probably do the same thing with Castor, but this looks
simplier to use. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/



Re: Personalisation Best Practice

2001-09-07 Thread Max Cooper

Watch out for browser caching issues with a JSP stylesheet. It may be slow
to adopt new preferences because the browser is using a cached copy. Turning
caching off might hurt the performance of both the server (having to
regenerate the stylesheet for each page view) and browser (having to
download the stylesheet for each page view).

Perhaps you could keep track of when the preferences change (e.g. save the
current time in millis as a bean attribute) and pass that on the query
string to the stylesheet JSP. The stylesheet JSP would totally ignore the
parameter, but the browser would know when it needs to get a new copy of the
stylesheet because the query string would be different.

So, if you used:



To the browser, the URL would be:

stylesheet.jsp?u=67463286042323 - never seen this URL before, make request
stylesheet.jsp?u=67463286042323 - use cached copy
stylesheet.jsp?u=67463286042323 - use cached copy
stylesheet.jsp?u=67463286042323 - use cached copy
stylesheet.jsp?u=75837537598378 - never seen this URL before, make request
stylesheet.jsp?u=75837537598378 - use cached copy
stylesheet.jsp?u=75837537598378 - use cached copy
stylesheet.jsp?u=75837537598378 - use cached copy
stylesheet.jsp?u=75837537598378 - use cached copy
stylesheet.jsp?u=75837537598378 - use cached copy
...

-Max

- Original Message -
From: "Peter Pilgrim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 5:20 AM
Subject: Re: Personalisation Best Practice


>
> Thanks guys you given me an idea. To store perhaps the actual
personalisation
> in database table.
>
> stylesheet.jsp:
>
> <% response.setContentType("text/css"); %>
>
> h1 {
>  
> }
>
> Where I could create a table CSSDEF
>
> Element ,  Name, Defn
>
> "h1" | "red" | "color:#FF ;"
> "h1" | "green" | "color:#00FF00 ; "
> "h1" | "blue" | "color:#FF; "
>
> select  Element , Defn from CSSDEF where Name="Red" and Element="h1"
>
> I will think about this a bit more, still fuzzy ...
>
> --
> Peter Pilgrim  |  |++44 (0)207-545-9923
>  \  \  ___   /  / ... .
> -     ( * )  ---   --
> _Cafe_Savannah,_San Antonio,Ibiza__
>
>
>
>  Message
History 
>
>
> From: "Gregor Rayman" <[EMAIL PROTECTED]> on 07/09/2001 12:37 ZE2
>
> Please respond to [EMAIL PROTECTED]
>
> To:   <[EMAIL PROTECTED]>
> cc:
> Subject:  Re: Personalisation Best Practice
>
>
> "Peter Pilgrim" <[EMAIL PROTECTED]>
>
>
>
> > How do I get a  "*.css" file recognised as valid Java Server Page?
> > --
> > Peter Pilgrim  |  |++44 (0)207-545-9923
> >  \  \  ___   /  / ... .
> > -     ( * )  ---   --
> > _Cafe_Savannah,_San Antonio,Ibiza__
>
> You do not need that.
>
> You can do something like this:
>
> in your html.jsp:
>
>
>TYPE="text/css"
>   HREF='<%= response.encodeURL("stylesheet.jsp") %>'>
>
>
> and stylesheet.jsp would produce the generated stylesheet, something
> like this:
>
> stylesheet.jsp:
>
> <% response.setContentType("text/css"); %>
>
> h1 {
>   <% if (likeItRed) { %>
> color: red;
>   <% } else { %>
> color: blue;
>   <% } %>
> }
>
>
> (better use the  tags)
>
> --
> gR
>
>
>
>
>
>
>
> --
>
> 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.
>
>
>




Re: DataBase Controller in Struts

2001-09-07 Thread Pete Carapetyan

Bruno, regarding the features you speak of, one of Struts most enthusiastic
user groups is the Expresso community, a framework which has adopted the
lightweight Struts framework within it's more heavyweight, database centric
approach.

Expresso  has many of the features you have mentioned needing, and many more
as well. As a community, it is neither as large or as well documented as the
Struts community, but I have been using it for a year and it is pretty cool,
It is so cool, in fact, that many people dismiss it as simply being too good
to be true, which is unfortunate for those of us who use it every day, and
would enjoy a deeper corporate user base.

The Struts integration into Expresso is still on a .ea release, so it may be a
few more weeks before you consider it production ready in this form.

http://jcorporate.com is where you learn more about it.

Please excuse if this comes accross as spam or evangelizing.

[EMAIL PROTECTED] wrote:

> Hi all,
>
> I'm new to J2EE application design. I would like to get advices on how to
> best get access to DB in struts&J2EE applications (through datasource).
> I don't want to code JDBC access in all struts action classes that need to
> access database. What would be the best way to access database ?
> Would it be possible from action classes to give control to a DataBase
> Controller that would be in charge of accessing database ? How does this
> controller may look like ?
> Any suggestion, advices, experience feedback would be greatly appreciated.
>
> Regards
>
> Bruno
>
> This message and any attachments (the "message") is
> intended solely for the addressees and is confidential.
> If you receive this message in error, please delete it and
> immediately notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not
> therefore be liable for the message if modified.
>
> -
>
> Ce message et toutes les pieces jointes (ci-apres le
> "message") sont etablis a l'intention exclusive de ses
> destinataires et sont confidentiels. Si vous recevez ce
> message par erreur, merci de le detruire et d'en avertir
> immediatement l'expediteur. Toute utilisation de ce
> message non conforme a sa destination, toute diffusion
> ou toute publication, totale ou partielle, est interdite, sauf
> autorisation expresse. L'internet ne permettant pas
> d'assurer l'integrite de ce message, BNP PARIBAS (et ses
> filiales) decline(nt) toute responsabilite au titre de ce
> message, dans l'hypothese ou il aurait ete modifie.

--
Pete Carapetyan
http://datafundamentals.com
Java Development Services

Open standards technology for commercial profitability





Re: Personalisation Best Practice

2001-09-07 Thread Max Cooper

Hi Peter,

I think you might have trouble with having too many JSP tags in the page if
you employed a scheme like that. Yes, it seems a little crazy, but we have
had trouble when a page has many JSP tags (Struts or otherwise) in it. The
server would throw a cryptic exception - class verify error or something
like that. But there are some alternatives...

One alternative that would be really easy to implement is to create a couple
of different style sheets; one for each of the different color schemes (or
"themes") you wanted to support. Then you could just store a single
preference value (the name of the style sheet) and use that to select one of
the style sheets.

STYLE SHEETS (3 different files):
=
apple-theme.css
---
tr.datarow { background: #00FF00 }

orange-theme.css

tr.datarow { background: #FF9900 }

seablue-theme.css
-
tr.datarow { background: #0066CC }


JSP PAGE:
=

"
type="text/css">



   
...
   


So, that would be easy to do but would allow the user only to select a whole
"theme" rather than choosing colors for individual elements. I suspect that
more flexibility could be afforded by having more style sheets to represent
more combinations, or it seems likely to me that there is some CSS facility
that would help support such fine-grained preferences. I am not a CSS
expert, so I don't have any specific suggestions there.

Ultimately, I think you want to have named styles hardcoded into the HTML
tags and then dynamically select (by choosing which style sheet(s) to link
to, etc.) what attribute values get associated with those style names (e.g.
the name "datarow" could have a green, orange, or blue background depending
on the user's preference). This strategy also has the nice feature of
letting you postpone the implementation of personalization until you have
time to do it. With those future plans in mind, however, it would seem wise
to choose style names that represent the meaning of the style (e.g.
"altrow") rather than a particular style attribute value itself (e.g.
"lightgrayrow").

Stuff that isn't so great about my example:
- I didn't try it, so it might need tweaking -- in particular, the quoting
might be faulty (we had some messages on that today)
- You might want to store a symbolic name rather than the CSS filename
itself as the preference value, or at least avoid storing the context path
with the name in the database. For example, you might construct the name
like this:

  linkHREF = request.getContextPath() + "/styles/" + storedPrefValue +
".css";

which might evaluate to something like:

  /myApp/styles/apple-theme.css

Using a bean to store this value in the session (as opposed to just storing
the preference value itself) is probably a good idea if you wish to switch
to a more complicated scheme in the future. That way, you can add bean
attributes without disrupting the code that manages the bean itself.
Creating your own custom tag to write out the  tag(s) could be a
useful technique as well. Initially, you might just have the tag write out a
 tag with a hardcoded href value. Then, if you implement theme-based
personalization, you can rewrite the tag to look for the prefs bean in the
session and transform the attribute into an href value for the  (which
also avoids duplication of the transform code). And eventually, you might
need to write out several  and/or 

Re: Personalisation Best Practice

2001-09-07 Thread Peter Pilgrim


Thanks guys you given me an idea. To store perhaps the actual personalisation
in database table.

stylesheet.jsp:

<% response.setContentType("text/css"); %>

h1 {
 
}

Where I could create a table CSSDEF

Element ,  Name, Defn

"h1" | "red" | "color:#FF ;"
"h1" | "green" | "color:#00FF00 ; "
"h1" | "blue" | "color:#FF; "

select  Element , Defn from CSSDEF where Name="Red" and Element="h1"

I will think about this a bit more, still fuzzy ...

--
Peter Pilgrim  |  |++44 (0)207-545-9923
 \  \  ___   /  / ... .
-     ( * )  ---   --
_Cafe_Savannah,_San Antonio,Ibiza__



 Message History 



From: "Gregor Rayman" <[EMAIL PROTECTED]> on 07/09/2001 12:37 ZE2

Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:
Subject:  Re: Personalisation Best Practice


"Peter Pilgrim" <[EMAIL PROTECTED]>



> How do I get a  "*.css" file recognised as valid Java Server Page?
> --
> Peter Pilgrim  |  |++44 (0)207-545-9923
>  \  \  ___   /  / ... .
> -     ( * )  ---   --
> _Cafe_Savannah,_San Antonio,Ibiza__

You do not need that.

You can do something like this:

in your html.jsp:





and stylesheet.jsp would produce the generated stylesheet, something
like this:

stylesheet.jsp:

<% response.setContentType("text/css"); %>

h1 {
  <% if (likeItRed) { %>
color: red;
  <% } else { %>
color: blue;
  <% } %>
}


(better use the  tags)

--
gR







--

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.





Re: DataBase Controller in Struts

2001-09-07 Thread Ted Husted

In general, you would might want to write a helper class to handle the
database access. Struts doesn't need to know where the data comes from
or goes to. This isn't easy to do with the GenericDataSource in the
Struts package, since it is tied to the Servletcontext, so I use PoolMan
(www.codestudio.com) instead. 

Basically, I might have a method like 

Data.articleUpdate(thisForm.get("article"),
thisForm.get("contributor"),
thisForm.get("creator"),
thisForm.get("title"),
thisForm.get("content")
);

Where Data is a helper with no links to the HTTP layer that handles all
the data access. This is the most the Action sees regarding data access.

For larger datasets, I might have a method on Data that takes a Map, and
retrieves the properties that way. Most of my objects can create Maps of
themselves these days, since that plays well with BeanUtils.populate().
Another way to go might be to create a bean that represented the
ResultSet (or equivalent), which you could populate and pass to a helper
calss.

To attach to the database, I use another helper method that returns the
connection to Data (so that class doesn't actually know where the
resource layer is either). 

public final class ConnectionPool {

/**
 * An exception message to throw if datasource is null.
 */
public static final String DATASOURCE_ERROR = "Connection pool " +
"not available. Check your poolman.xml config, and be sure " +
" you are using a valid dbname parameter (use dbname, not
jndiName)";

/**
 * The application scope attribute under which our JNDI datasource
 * context is stored.
 */
public static final String JNDI_CONTEXT_KEY = "java:comp/env";

/**
 * The application scope attribute under which our JNDI datasource
 * is stored.
 */
// public static final String JNDI_DATASOURCE_KEY = "jdbc/artimus";
public static final String JNDI_DATASOURCE_KEY = "artimus";

/**
 * The application scope JNDI path under which our datasource
 * is stored.
 */
public static final String JNDI_NAME_KEY =
"java:comp/env/jdbc/artimus";

/**
 * Returns a JDBC connection from a connection pool or other
 * resource, to be used and closed promptly.
 * 
 * @returns JDBC connection from resource layer.
 * @exception SQLException on SQL or other errors. May wrap other
 * exceptions depending on implementation. Will not return null.
 */
public static final Connection getConnection() throws SQLException {
DataSource ds = PoolMan.findDataSource(JNDI_DATASOURCE_KEY);
if (ds==null)
throw new SQLException(DATASOURCE_ERROR);
return(ds.getConnection());
}
}

On the return trip, I use a BeanUtils.populate() derivative to move the
ResultSet into an arbitrary bean or collection of beans. These could be
ActionForm beans or any other. The method doesn't care. See 

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14397.html

for more on that.

If you are new tp J2EE application design, be sure to absorb the
BluePrints, 

http://java.sun.com/j2ee/blueprints/

and consider investing in tthe Core J2EE Patterns book.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/


[EMAIL PROTECTED] wrote:
> 
> Hi all,
> 
> I'm new to J2EE application design. I would like to get advices on how to
> best get access to DB in struts&J2EE applications (through datasource).
> I don't want to code JDBC access in all struts action classes that need to
> access database. What would be the best way to access database ?
> Would it be possible from action classes to give control to a DataBase
> Controller that would be in charge of accessing database ? How does this
> controller may look like ?
> Any suggestion, advices, experience feedback would be greatly appreciated.
> 
> Regards
> 
> Bruno



Re: Personalisation Best Practice

2001-09-07 Thread Gregor Rayman

"Peter Pilgrim" <[EMAIL PROTECTED]>



> How do I get a  "*.css" file recognised as valid Java Server Page?
> --
> Peter Pilgrim  |  |++44 (0)207-545-9923
>  \  \  ___   /  / ... .
> -     ( * )  ---   --
> _Cafe_Savannah,_San Antonio,Ibiza__

You do not need that.

You can do something like this:

in your html.jsp:





and stylesheet.jsp would produce the generated stylesheet, something 
like this:

stylesheet.jsp:

<% response.setContentType("text/css"); %>

h1 {
  <% if (likeItRed) { %>
color: red;
  <% } else { %>
color: blue;
  <% } %>
}


(better use the  tags)

--
gR





Re: Personalisation Best Practice

2001-09-07 Thread Torgeir Veimo

Peter Pilgrim wrote:
> 
> How do I get a  "*.css" file recognised as valid Java Server Page?

Have you tried;



and in the jsp;

<%@page contentType="text/css"%>


-- 
- Torgeir



Re: Personalisation Best Practice

2001-09-07 Thread Peter Pilgrim


How do I get a  "*.css" file recognised as valid Java Server Page?
--
Peter Pilgrim  |  |++44 (0)207-545-9923
 \  \  ___   /  / ... .
-     ( * )  ---   --
_Cafe_Savannah,_San Antonio,Ibiza__



 Message History 



From: "Gregor Rayman" <[EMAIL PROTECTED]> on 07/09/2001 11:58 ZE2



"Peter Pilgrim" <[EMAIL PROTECTED]> wrote:

> What is a good way of using Struts and personalisation ?
>
> I would like to write a JavaBean with some personalisation getter and
setter.



>
> 
> "
>
> ...
>
> 
>
> Thoughts on this cheap and nasty __personalisation__ strategy.


Why not use a JSP which returns dynamic CSS?





--

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.





Re: Personalisation Best Practice

2001-09-07 Thread Gregor Rayman

"Peter Pilgrim" <[EMAIL PROTECTED]> wrote:

> What is a good way of using Struts and personalisation ?
>
> I would like to write a JavaBean with some personalisation getter and
setter.
> It would probably pick up the details from the database
> I would like to write method to change the background colours of table rows
> for example in a trading application in conjunction with HTML
> Cascading Style Sheet. Suppose I have in my external CSS
>
>
> .tr-apple: { background: #00FF00 }
> .tr-orange:{ background: #FF9900 }
> .tr-seablue:   { background: #0066CC }
>
> In the my JSP I could have a StyleBean
>
> class StyleBean { ...
>  String tr_bgcolor = "tr-apple"; // DEFAULT setting
>  String getTableRowBackgroundHTML() {
>   return "background=\""+tr_bgcolor+"\" ";
>  }
>  String setTableRowBackground( String htmlColor ) {
>   this.tr_bgcolor = htmlColor;
>  }
> ... }
>
> In the JSP it self
>
> 
> "
>
> ...
>
> 
>
> Thoughts on this cheap and nasty __personalisation__ strategy.


Why not use a JSP which returns dynamic CSS?

--
gR




Personalisation Best Practice

2001-09-07 Thread Peter Pilgrim


What is a good way of using Struts and personalisation ?

I would like to write a JavaBean with some personalisation getter and setter.
It would probably pick up the details from the database
I would like to write method to change the background colours of table rows
for example in a trading application in conjunction with HTML
Cascading Style Sheet. Suppose I have in my external CSS


.tr-apple: { background: #00FF00 }
.tr-orange:{ background: #FF9900 }
.tr-seablue:   { background: #0066CC }

In the my JSP I could have a StyleBean

class StyleBean { ...
 String tr_bgcolor = "tr-apple"; // DEFAULT setting
 String getTableRowBackgroundHTML() {
  return "background=\""+tr_bgcolor+"\" ";
 }
 String setTableRowBackground( String htmlColor ) {
  this.tr_bgcolor = htmlColor;
 }
... }

In the JSP it self


" >
...
   


Thoughts on this cheap and nasty __personalisation__ strategy.

--
Peter Pilgrim  |  |++44 (0)207-545-9923
 \  \  ___   /  / ... .
-     ( * )  ---   --
_Cafe_Savannah,_San Antonio,Ibiza__



--

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.





Ask about ActionForward

2001-09-07 Thread Antonio Weber

I have code in a Action looking like this

public ActionForward perfom 


  else {
String forward = "LookupKeyUpdate.jsp?PK_LookupKey=" +
 PK + "&Key=" + Key + "&OrderId=" + OrderId +
 "&ValidFrom=" + ValidFrom + "&ValidTo=" +
ValidTo;
System.out.println("Forward: " + forward);
ActionForward ret = new ActionForward();
ret.setPath(forward);
System.out.println("Path: " + ret.getPath());
System.out.println("ActionForward: " + ret);
return (ret);
  }

the output is:

Forward:
LookupKeyUpdate.jsp?PK_LookupKey=102.0&Key=1&OrderId=2.0&ValidFrom=2001-02-1
2&ValidTo=2003-04-23
Path:
LookupKeyUpdate.jsp?PK_LookupKey=102.0&Key=1&OrderId=2.0&ValidFrom=2001-02-1
2&ValidTo=2003-04-23
ActionForward: ActionForward[null]
<07.09.2001 11:41:34 CEST>  
<[WebAppServletContext(6979480,Lookups,/Lookups)] Servlet failed with
Exception
java.lang.NullPointerException

where is the fault !!!
can you help me please !!



RE: state dependent look&feel of HTML elements in struts/JSP

2001-09-07 Thread VIAUD Cédric
Title: RE: state dependent look&feel of HTML elements in struts/JSP





i think you can do this by using à bean in wich you use somes attributes to describe the state of your JSP.


Then , you test the values of this bean in your JSP to make conditional section. Struts Tags allow this kind of things.


A+ Cédric


-Message d'origine-
De : Roland Berger [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 7 septembre 2001 02:44
À : Struts Mailinglist
Objet : state dependent look&feel of HTML elements in struts/JSP



Hi all


Offten one need severel JSP pages which looks almost the same. The only
difference could be that a field in one page is visible in the other not or
a link is activ in one page not in the other. Since I don't wont to write
two different JSP pages with that little difference I wonder if there is a
mechanism or framework which can do that for me.
Example:
Assumed I have a button which is activ in one JSP page which has to be set
to inactiv because the state of the datamodel (or whatever) has changed. One
solution would be to write a tag that checks the state of the datamodel and
set's the property of the button either to activ or inactiv.


Now it would be very nice if there is a framework where I can store the
state (activ/inactiv, visible/invisible, colors, etc.) of any HTML Element
(Buttons, Links, etc). Whenever I have to display the same JSP page the HTML
Element should check itself if his own state is activ/inactiv,
visible/invisible, blue/green . The state of a HTML Element could be
stored in an Object or even stored to a database.


Does somebody know procedures, tag libraries, framework  which
simplifies creation of state dependent look&feel HTML Element's.
Since I'm quite new to JSP this might be a stupid question. If it is, plese
answer anyway.


Kind regards
Roland Berger





state dependent look&feel of HTML elements in struts/JSP

2001-09-07 Thread Roland Berger

Hi all

Offten one need severel JSP pages which looks almost the same. The only
difference could be that a field in one page is visible in the other not or
a link is activ in one page not in the other. Since I don't wont to write
two different JSP pages with that little difference I wonder if there is a
mechanism or framework which can do that for me.
Example:
Assumed I have a button which is activ in one JSP page which has to be set
to inactiv because the state of the datamodel (or whatever) has changed. One
solution would be to write a tag that checks the state of the datamodel and
set's the property of the button either to activ or inactiv.

Now it would be very nice if there is a framework where I can store the
state (activ/inactiv, visible/invisible, colors, etc.) of any HTML Element
(Buttons, Links, etc). Whenever I have to display the same JSP page the HTML
Element should check itself if his own state is activ/inactiv,
visible/invisible, blue/green . The state of a HTML Element could be
stored in an Object or even stored to a database.

Does somebody know procedures, tag libraries, framework  which
simplifies creation of state dependent look&feel HTML Element's.
Since I'm quite new to JSP this might be a stupid question. If it is, plese
answer anyway.

Kind regards
Roland Berger




DataBase Controller in Struts

2001-09-07 Thread bruno . o . faure


Hi all,

I'm new to J2EE application design. I would like to get advices on how to
best get access to DB in struts&J2EE applications (through datasource).
I don't want to code JDBC access in all struts action classes that need to
access database. What would be the best way to access database ?
Would it be possible from action classes to give control to a DataBase
Controller that would be in charge of accessing database ? How does this
controller may look like ?
Any suggestion, advices, experience feedback would be greatly appreciated.

Regards

Bruno



This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

-

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.



Struts I18N doesn't work in Windwos 2000 environment

2001-09-07 Thread 林志鵬 Vincent Lin

Hi,

I run struts in weblogic in Win2k (tratitional Chinese version) platform. But 
 tags always display Chinese message no matter what locale I set to the 
session with key org.apache.struts.action.Action.LOCALE_KEY. But the same code worked 
correctly on Linux platform. Has anyone encountered this problem?

Regards,
Vincent Lin


RE: Stability of Struts

2001-09-07 Thread Chandana Perera
Title: RE: Stability of Struts



Hi 

 
Do not 
worry about the stability of the strut technology. All the software Giants use 
struts in USA. 
 
we did 
a very good project for the one of the leading software company in the USA, I do 
not want to the mentioned the name but that company
is the 
one of the competitors of Microsoft.this project completed successfully. 

 
we 
have several projects on STRUTS,for US market
 
so master you struts, 
 
Thanks 
& Regards
 
Chandana
 

  -Original Message-From: VIAUD Cédric 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, September 07, 2001 2:09 
  PMTo: [EMAIL PROTECTED]Subject: RE: 
  Stability of Struts
  My company is evaluating Struts in an internal project. 
  We use it in a full J2EE environment. We develop with 
  VisualAge for Java, and the target application server is WebSphere. There is 
  no particular problem on deployment.
  Struts seems to work well, and greatly facilitate 
  develpment. 
  In other ways, i know many big company which are making the 
  struts choice after intensive evaluation. 
  Maybe Struts is not the best choice (who knows ;-), but it 
  can't be a bad choice. 
  A+ Cédric 
  -Message d'origine- De : Matt 
  Raible [mailto:[EMAIL PROTECTED]] 
  Envoyé : vendredi 7 septembre 2001 04:07 À : [EMAIL PROTECTED] Objet : Re: 
  Stability of Struts 
  In my opinion, this is a very stable infrastructure.  It 
  really depends on your application server to whether 
  there are a lot of "workarounds" or not.  It seems that Struts is very stable, but some appservers are not correct 
  in their implementation of J2EE, and struts makes 
  those very apparent. 
  The good news is that this mailing list is very active and I 
  think there probably is someone on this list that has 
  a particular appservers "quirks" figured out. 
  
  Hope this helps, 
  Matt 
  --- Angela Saval <[EMAIL PROTECTED]> wrote: 
  > Hello, > > My company is considering using struts in our web 
  application.  What has > been your overall 
  experience with the infrastructure?  Do you find that you 
  > have to work around a lot of bugs? > > Thanks for your input. 
  > > Angela 
  __ 
  Do You Yahoo!? Get email alerts & 
  NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com 


RE: Stability of Struts

2001-09-07 Thread VIAUD Cédric
Title: RE: Stability of Struts





My company is evaluating Struts in an internal project.
We use it in a full J2EE environment. We develop with VisualAge for Java, and the target application server is WebSphere. There is no particular problem on deployment.

Struts seems to work well, and greatly facilitate develpment.


In other ways, i know many big company which are making the struts choice after intensive evaluation.


Maybe Struts is not the best choice (who knows ;-), but it can't be a bad choice.


A+ Cédric


-Message d'origine-
De : Matt Raible [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 7 septembre 2001 04:07
À : [EMAIL PROTECTED]
Objet : Re: Stability of Struts



In my opinion, this is a very stable infrastructure.  It really depends on your
application server to whether there are a lot of "workarounds" or not.  It
seems that Struts is very stable, but some appservers are not correct in their
implementation of J2EE, and struts makes those very apparent.


The good news is that this mailing list is very active and I think there
probably is someone on this list that has a particular appservers "quirks"
figured out.


Hope this helps,


Matt


--- Angela Saval <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> My company is considering using struts in our web application.  What has
> been your overall experience with the infrastructure?  Do you find that you
> have to work around a lot of bugs?
> 
> Thanks for your input.
> 
> Angela



__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com





RE: Run Struts in Entry Editon Visual Age for Java 4.0?

2001-09-07 Thread VIAUD Cédric
Title: RE: Run Struts in Entry Editon Visual Age for Java 4.0?





Can you explicite your probleme.
I am actually using VAJ 3.5 and WAS 3.5.3, and everything is OK.


A+ Cédric


-Message d'origine-
De : Julia Yang [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 7 septembre 2001 00:36
À : [EMAIL PROTECTED]
Objet : Run Struts in Entry Editon Visual Age for Java 4.0?




Does anyone know how to run Run Struts in Entry Editon Visual Age for
Java 4.0? Any articles, tricks ?
I followed the instruction of Apache Struts and VAJ part 2: Using Struts
in VAJ 3.5.3 from IBM Kyle Brown. It gives me exception 


Any suggestion appreciated


Julia





RE: Examples anyone?

2001-09-07 Thread Keith Bacon

Maybe you need to use the struts tag 
 wrote:
> If I take out the useBean for task I get the following error:
> 
> javax.servlet.ServletException: Cannot find bean task in scope null
> 
> Any suggestions?
> 
> Aaron
> 
> -Original Message-
> From: Bill Clinton [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 06, 2001 2:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Examples anyone?
> 
> 
> Aaron,
>   I believe the code you have should be accurate, but leave out
> the 
> usebean directive for task (which isn't necessary and I think is 
> interfering with your iteration id because it has the same id):
> 
>  class="com.razorfront.corporate.global.General"/> 
> 
> 
>
> 
> 
> this is assuming:
> 1) the method in General that returns the Arraylist is getTasks().
> 2) there is a method in Task called getSubject()
> 
> Hope that helps,
> Bill
> 
> 
> 
> Aaron O'Hara wrote:
> 
> >All,
> >
> >Would somebody be able to point me to an example of iteration with
> the
> >following environmental "restrictions"?  I've looked at sample
> code, but
> >nothing seems to meet 100% what I'm trying to do and I'm still
> tearing my
> >head out trying get get it to work.
> >
> >I have an application scope bean with a getMethod() that returns a
> List
> >which is actually an ArrayList of "Task" objects.  I want to
> iterate
> through
> >this List and display properties of the Task object using the
> getter
> >methods.
> >
> >In an unsuccessful attempt, I've tried:
> >
> > >class="com.razorfront.corporate.global.General"/>
> > >class="com.razorfront.corporate.task.Task"/>
> >
> >
> >   
> >
> >
> >(I've omitted the taglib statements for brevity)
> >
> >I've seen examples using HaspMaps and Lists of numbers, but not a
> List of
> >Objects.  Any assistance would be greatly appreciated!
> >
> >Aaron
> >
> >.
> >
> 


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



AW: Struts vs. JADE (from IBM) - feature and usability comparison - need help!

2001-09-07 Thread D. Veniseleas

Hi,
in their Redbook for the Websphere Appl-Server they describe struts in detail.
I had the impression, they liked struts.

Dimitris

> -Ursprüngliche Nachricht-
> Von:  Esterkin, Alex [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Donnerstag, 6. September 2001 19:49
> An:   [EMAIL PROTECTED]
> Betreff:  Struts vs. JADE (from IBM)  - feature and usability comparison -   
> need help!
> Wichtigkeit:  Hoch
> 
> Hello,
> 
> There has emerged a new proprietary MVC framework called JADE and developed
> and promoted by IBM Consulting National Practice people.  I sense it is
> inferior in comparison to Struts, but I don't have enough information about
> JADE, and IBM is liked very much at my firm.   I need to quickly prepare a
> detailed feature for feature technical comparison.
> 
> I wonder whether there are people on this discussion board, who are familiar
> with JADE, and who could share their opinions or insights in this regards.
> 
> Thanks!!!
> 
> Best regards,
> 
>Alex Esterkin 
>   Fidelity Investments 
>   E-mail:  [EMAIL PROTECTED]
> 
> =
>



RE: Error 500--Internal Server Error

2001-09-07 Thread Chandana Perera

Hi Steven

Thank you very much indeed for the replay. I did not find any useful answer
form
the weblogic console.

I stuck with this problem more than two day, if you have any idea just let
me know.

Weblogic console displayed error is


  
<[WebAppServletContext(6591192,struct)] Root cause of ServletException
javax.servlet.jsp.JspException: Exception creating bean of class
com.jspinsider.struts.lesson1.logonform: java.lang.ClassNotFoundException:
com.jspinsider.struts.lesson1.logonform
at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:568)
at jsp_servlet._lesson1._logon._jspService(_logon.java:159)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1622)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

Thanks & Reagrds

Chandana




-Original Message-
From: Steven Leija [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 9:17 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Error 500--Internal Server Error


Hi Chandana, 

You might want to check the printstacktrace on the Weblogic console.  There
must be some other information provided to debug the situation.

Regards,

Steven

-Original Message-
From: Chandana Perera [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 06, 2001 9:16 PM
To: '[EMAIL PROTECTED]'
Subject: Error 500--Internal Server Error



Hi Every One

I tried to run my first Struts programme on the Weblogic 6, but I am getting
the below mentioned error.

"Error 500--Internal Server Error 

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

10.5.1 500 Internal Server Error

The server encountered an unexpected condition which
prevented it from fulfilling the request"
 

I showed this error message to one of our guys in the organisation, but
nobody could find answer to this.

I am running the basic and very common programme which in the
http://www.jspinsider.com/tutorials/jsp/struts/lesson1/l1b_struts.view
tutorial session, logon.jsp.

But JSP programme runs without any errors.


Directory structure of the application is as follow

\mydomain\applications\DevWebStruct\lesson1\*.jsp
\mydomain\applications\DevWebStruct\WEB-INF\classes\com\jspinsider\struts\le
sson1\*.class
\mydomain\applications\DevWebStruct\WEB-INF\*.xml
\mydomain\applications\DevWebStruct\WEB-INF\lib\struct.jar

Thanks & Regards

Chandana






WG: struts or tomcat 3.2.1 bug?

2001-09-07 Thread juraj Lenharcik

hello,

the stange thing is, when i get the bean with useBean then i can access all
elements and put them out. no problems perform.

then i put my iterate tag to the jsp. when i debug the jsp i can see that
the bean is correctly in the scope and CAN BE ACCESSED! the iterator runs
ONCE trought the bean writes and then the scope of the bean is suddenly
lost. then i get my meaningful jsp - exception. what could be the problem???


there should be no startup mistake.


thanks
juraj


 -Ursprüngliche Nachricht-
Von:juraj Lenharcik  
Gesendet:   Donnerstag, 6. September 2001 17:37
An: [EMAIL PROTECTED]
Betreff:struts or tomcat 3.2.1 bug?

does anyone knows about a bug in tomcat 3.2.1 with struts? i mean there was
a message few weeks ago, but i cant find it again. can someone give me a
tip?

the problem is, that i have an application under resin 2.0.2 running and
when i put it on tomcat 3.2.1 it doesnt run. i get an exception:
javax.servlet.ServletException: Cannot find bean data in scope session.


thanks
juraj




Off-topic: JSP documents (Was: nesting tags)

2001-09-07 Thread John Yu

This raises an interesting question.
"JSP documents", the XML verion of JSP, is defined in JSP spec
1.2 (Let's call them xJSP.) I think Tomcat 4.0 implements it.
In xJSP, expressions like <%= blah %> are represented as 
  blah
So, does a JSP 1.2 compliant JSP container handles an xJSP containing
something like:
  
which is equivalent to this in normal JSP:
  
Or, is there a different approach to acheive the same effect?
--
John

At 12:08 pm 05-09-2001 -0700, you wrote:
Everyone wants to do this. 
Unfortunately JSP syntax doesn't allow it. The best you can do in a tag
attribute is a scriptlet (<%= ... %>).
Greg Lehane wrote:
Hello all,

 In my JSP I'm iterating through a vector I've stored in my
ActionForm
bean, I write out information from the vector to the JSP and the 
end
result is a populated table on the JSP. What I would like to do is add
a
form to each row on the table (as I iterate through), however, I need
to
grab info from the form in order to populate the action= part of 
the
 tag.
 So, I attempt to write something like this for each
iteration:
   "> 
property="submit" value="open"/>
 However, compilation throws up a "Non matching extension tags
error"
on the JSP. Presumably because have the nested 
tag.
 I know that this nesting works using regular HTML, but I would
rather
use the custom tags. Hopefully this simply involves adding commas 
or
something!
 Thanks,
- Greg
--
Greg Lehane
Software Developer
H5 Technologies Inc.
520 3rd St. No 17
San Francisco, CA 94107
415.625.6701 ext. 610 (direct)
415.625.6799 (fax)
[EMAIL PROTECTED]



-- 
John
Yu  
Scioworks Technologies 
e: [EMAIL PROTECTED] w:
+(65) 873 5989
w:
http://www.scioworks.com 
 m: +(65) 9782 9610