Re: Struts Design question

2001-12-07 Thread Brian . Duchouquette


Let me try to venture a few responses...

> But my beans already contain the validation! Besides, performing the
validation in the ActionForm is effectively tying business logic (data
validation) to the web framework dontya think?

Well, I put data type and required field validation only in the bean.
Validation that is more advanced than that, or based on business rules
should be in your app server (if you have one), or in the action object.

>I need to retrieve the object from the datastore (using the id) *before*
the ActionForm is populated with the request parameters.

You can populate your databean in your action object based on DB data since
the action object is called before the JSP page is generated.

>  the user never submits the form and goes to a different section of the
site. How would I get the bean out of the session?

All active databeans for a session are stored under the key:
org.apache.struts.action.FORM_BEANS.  You can get ahold of this collection
and clear it out (save the current bean for the page you are on).  This is
sort of a hack, so maybe there is another better way to do it..

Brian




   

Jon Wall   


o.com>   cc:   

 Subject: Struts Design question   

12/07/2001 

03:08 PM   

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





I've been lurking on this list for a while, and I
finally have time to look hard at Struts for a web
application that I'm working on. I have a coupla
questions.. 1. This first question I found reference
to in the archives
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg18281.html)
but couldn't find an answer. In the application I'm
working on the business logic is already written and
is being added to by another team (it's supporting
other applications besides the web). So I've got a
whole slew of JavaBeans (100+) already written for me,
but now I'm facing the task of wrapping them in
ActionForm subclasses, cursing under my breath that it
isn't an interface. I understand that the purpose of
the ActionForm is as a buffer..perform validation and
all that. But my beans already contain the validation!
Besides, performing the validation in the ActionForm
is effectively tying business logic (data validation)
to the web framework dontya think? Rules such as no
invoice numbers under 1000 (Ted's example) should be
handled by the business logic, and given my situation
(probably a common one), this logic needs to be shared
between applications. I can't go into the server
system and fit ActionForm into the class heirarchy,
but I sure could have thrown an interface in there.
Input on this is appreciated. 2. This has to have come
up before, but I couldn't find any references. All of
my JavaBeans map to persistent components, all of
which have id's. I've written some actions to display
lists of these components and the like and everything
works great. I also started to try the Add/Edit/Save
pattern, which occurs everywhere in the app, and I'm
having a problem with the Save action. The issue is
that I need to retrieve the object from the datastore
(using the id) *before* the ActionForm is populated
with the request parameters. What I'd like is to have
the bean populated from the database, and then any
parameters that are present on the request object set
on the bean, then persist. I can't figure out how to
initialize the bean to the datastore before it gets to
me in the Action. If I make the ActionForm session
scoped, it works great...is this the common practice?
If so, how is cleanup performed? IE, user clicks to
Edit Widget 137, my EditWidgetAction class populates
WidgetForm and sticks it in the session, the user
never submits the form and goes to a different section
of the site. How wo

Re: Best Struts Web Server

2001-12-07 Thread Brian . Duchouquette


Pete was right.. I needed to specify.  I'm looking for high-end, high-load.
1 million hits a day on a server that implements a lot of JSP tags.
Somehow I don't think Tomcat's going to do that (nor do I think my
management is going to like using a server that doesn't have technical
support :).

Brian




   
   
Pete Carapetyan
   

ntals.com>  cc:
   
Subject: Re: Best Struts Web Server
   
12/07/2001 10:27   
   
AM 
   
Please respond to  
   
"Struts Users  
   
Mailing List"  
   
   
   
   
   




> What is your experience with the Web server you are currently using to
run
> Struts?  Does it handle pages with a large number of tags well?   Have
you
> had to discard a certain server because of a problem in favor of another?
> Any comments appreciated...

You really need to qualify your market before asking the question.

If you are serving up a million hits a month, you might have one class of
best,
strictly because of the funds issue.

If you are serving up a million hits an hour, that would justify spending
thousands on an app server that worked well under a heavy load. But at ten,
twenty, or thirty thousand dollars, that app server would be total overkill
on my
little site,  even though it is definitely best.

One bencmarking organization addresses this by grouping in terms of total
cost
and/or number of transactions.
http://tpc.org/

--
Pete Carapetyan
http://webAppWriter.com


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






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




Best Struts Web Server

2001-12-07 Thread Brian . Duchouquette

All,

What is your experience with the Web server you are currently using to run
Struts?  Does it handle pages with a large number of tags well?   Have you
had to discard a certain server because of a problem in favor of another?
Any comments appreciated...

Thanks,
Brian


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




Re: If someone is interested

2001-11-15 Thread Brian . Duchouquette


Yuriy,

Yep, you have my interest.. Are you using multiple sets with different
Comparators (based on bean properties) to do that?

Thanks,
Brian



   

Yuriy Zubarev  

   cc:   

 Subject: If someone is interested 

11/15/2001 

03:45 PM   

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





Hello colleagues,

I've been developing a web app for myself and since
it's not the first app using Struts I attempted
to solve some general issues by providing some interfaces,
custom tag and generic actions. More specifically I'm talking
about tables, you know that questions about navigation,
sorting, formatting and so on...

To see what's done already, point your browser to
http://english.yuriy-zubarev.com

And if my work raises some interest among people,
I'll beautify the code (if there is no big load in the office)
and share it (with one of the purposes to get feedbacks
and criticism).

Best of luck,
Yuriy Zubarev




__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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






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




Re: Strategy for Checking Session Timing Out

2001-08-30 Thread Brian . Duchouquette


I would put that logic in the template instead at the top of each page (so
that the errorPage definition and login checking it is automatically
re-used among all pages).  That way you only have to make the change in one
place...

Brian




   
   
"SUPRIYA MISRA"
   
  cc:
   
Subject: Re: Strategy for Checking 
Session Timing Out 
08/30/2001 05:14   
   
PM 
   
Please respond to  
   
struts-user
   
   
   
   
   




This is what we use for JSP pages

session.setAttribute("login",OBJECT);
session.setMaxInactiveInterval(60*15);

Then in each JSP page
<%@ page errorPage="error.jsp"%>
Object userData =(UserLogin) session.getAttribute("login");

if session times out--an error occurs and forwarded to welcome page.

>From: [EMAIL PROTECTED]
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Strategy for Checking Session Timing Out
>Date: Thu, 30 Aug 2001 16:02:02 -0400
>
>If the user disables cookies so that every request coming into the
>server will create a new session (session.isNew()==true), what strategy
>could be used to check if their session has timed out?
>
>I assume that since every session is new, that using the
>session.getLastAccessedTime() method is also of little value.
>
>Dan
>
>


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








Re: How to handle an ActionForward to a page with an anchor?

2001-08-30 Thread Brian . Duchouquette


Martin,

I need to perform a submit in order for the server to see the new value
that the user entered on the form in order to add it to the bean.
 won't do that for me...

Brian




   

martin.cooper@tumb 

leweed.com   To: [EMAIL PROTECTED]

 cc:   

08/29/2001 05:31 Subject: Re: How to handle an 
ActionForward to a page with an anchor? 
PM 

Please respond to  

struts-user

   

   





Take a look at the 'anchor' attribute on the  tag. If you use
that for your Add link, I believe it will do what you want.

--
Martin Cooper


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 2:02 PM
Subject: How to handle an ActionForward to a page with an anchor?


> All,
>
> I have a page with a control which allows the user to add items to a
vector
> on a bean.  Basically it is a company form with an Add Subsidiary button.
> Each time the user presses "Add", the vector on the company formbean
> receives the new element.  However, when the page reloads, I want the
> browser to scroll to the subsidiaries region of the page.  In order to do
> this, I would like to place an anchor tag at that place on the page, then
> have Struts place the #subsidiary anchor in the URL.   If there is a
better
> way to do this, please let me know...
>
> Is there a Struts 1.0 feature that will help me do this?  If there is not
a
> Struts 1.0 feature that will help, is there a planned feature in the
Struts
> 1.1 release that will help?
>
> Thanks,
> Brian
>









How to handle an ActionForward to a page with an anchor?

2001-08-29 Thread Brian . Duchouquette

All,

I have a page with a control which allows the user to add items to a vector
on a bean.  Basically it is a company form with an Add Subsidiary button.
Each time the user presses "Add", the vector on the company formbean
receives the new element.  However, when the page reloads, I want the
browser to scroll to the subsidiaries region of the page.  In order to do
this, I would like to place an anchor tag at that place on the page, then
have Struts place the #subsidiary anchor in the URL.   If there is a better
way to do this, please let me know...

Is there a Struts 1.0 feature that will help me do this?  If there is not a
Struts 1.0 feature that will help, is there a planned feature in the Struts
1.1 release that will help?

Thanks,
Brian




Re: Running The Struts Example Application

2001-08-29 Thread Brian . Duchouquette


Try under Tomcat 3.2.3.   Otherwise, if you really want to get it to run
under Tomcat 4, research some of the older messages in this archive (you
need to replace the xml parsing jar files which come with Tomcat 4.




   

"Mark Bennett" 


a.ca>cc:   

 Subject: Running The Struts Example 
Application   
08/29/2001 

10:02 AM   

Please respond 

to struts-user 

   

   





Hi,
I am running Tomcat 4.0 and am trying to run the Struts 1.0 sample
application, struts-example.war.  I have moved this file into the Tomcat
webapp directory, however when I try to access it I get the following
error:

A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
   at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:452)

   at org.apache.jsp._0002findex_jsp._jspService
(_0002findex_jsp.java:453)
   at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)

   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
   at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)

   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1000)

   at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093)

   at java.lang.Thread.run(Thread.java:484)
Root Cause:
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
   at
org.apache.struts.util.RequestUtils.message(RequestUtils.java:568)
   at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
   at org.ap

Re: Really need you to get me out of a jam!!!!

2001-08-27 Thread Brian . Duchouquette


Alex,

First, I definitely would not use a nightly build for a major demo since I
have found them to be somewhat buggy in certain areas.  Our development
efforts are based solely on the 1.0 release which I augment with new &
tested functionality on an on-going basis (only as an extension layer).
That aside, does your ApplicationResources.properties have the
logon.title.bar key defined?

If you get in a real bind, I would omit the functionality from the demo
that is based on new/untested 1.1 features, and go back to the 1.0 release.

Brian



   

Alex Colic 

cc:   

 Subject: Really need you to get me out of 
a jam   
08/27/2001 

04:14 PM   

Please 

respond to 

struts-user

   

   





Hi,

Big problem. I have a major demo tommorow and I can't get my web apps to
work with struts. I am
using Tomcat 3.2 + the latest nightly build of struts. I needed the iterate
tag. All my apps work
within JBuilder but I cannot get them to work on there own. Every time I
access a page I get an
error that the message keys cannot be found.

eg:

exception javax.servlet.jsp.JspException: Missing message for key
logon.title.bar
Message Missing message for key logon.title.bar

Localized Message Missing message for key logon.title.bar

Stack trace javax.servlet.jsp.JspException: Missing message for key
logon.title.bar
   at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:298)
   at
_0002fpwEmpLogin_0002ejsppwEmpLogin_jsp_0._jspService
(_0002fpwEmpLogin_0002ejsppwEmpLogin_jsp_0.java:115)
   at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

In my web.xml file I have:


  
action

com.popware.rd.action.genericActionServlet

  application
  euApplicationResources


and the euApplicationResources file is in the class directory in web-inf. I
can read the struts
documentation but the struts-example gives me the same error.

I downloaded Tomcat 4 beta 7 and that did not help.

Can someone tell me exactly how to get the latest version of struts to work
with tomcat?

Any help is figuring this out is appreciated.

Alex








=
Regards

Alex Colic, HBA, B. Ed
PopWare Inc. "Driving down the cost of conversions!"
E-Mail: [EMAIL PROTECTED]
Tel: 1-905-777-8171 ext. 104
Fax: 1-905-777-0132

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/







Re: nesting bean:write inside of html:link

2001-08-27 Thread Brian . Duchouquette


Actually, struts-bean.tld has a define tag which does the same thing (no
custom eval tag necessary):


link
text



   

John Raley 

 cc:   

 Subject: Re: nesting bean:write inside of 
html:link   
08/27/2001 

03:49 PM   

Please 

respond to 

struts-user

   

   





As a workaround, I wrote an 'eval' tag that captures its content to a
bean.  You can bind the content to a scripting variable and use the
variable.  It's ugly but it works.

So, you'd do this:


link
text

The actual implementation of eval is very simple - just a body tag that
captures its content to a String and puts the String into the page context.

Tom Tibbetts wrote:

> I would then agree.  It's kind of a pain to create special tags to
> handle stuff like this
>
> At 12:03 PM 8/27/01 -0700, you wrote:
>
>> Sorry - nesting like this is not allowed in JSP (another of its
>> weaknesses IMO).
>>
>> Tom Tibbetts wrote:
>>
>>> Hi All.  Is it possible to nest a bean:write inside of html:link
>>> such as you have the following:
>>>
>>> " >link text
>>>
>>> When I do this I get an error that attribute somebean is not found,
>>> even though it does exist.  Thanks Tom
>>>
>>
>>
>
>










Re: building struts

2001-08-27 Thread Brian . Duchouquette


> Maybe these versions don't play well?

It is possible that the jar files that come from Tomcat might not be
compatible.  You still need to get JAXP 1.1 from the Sun Web site at:
http://java.sun.com/xml/download.html (I did not have any trouble).   Also,
it is not necessary to place the XML parser files in your classpath,
instead place crimson.jar, jaxp.jar, and xalan.jar from JAXP 1.1 in the lib
directory of ANT.

Brian




   

"Will Jaynes"  

  

aone.net>cc:   

 Subject: Re: building struts  

08/27/2001 

01:42 PM   

Please 

respond to 

struts-user

   

   





Brian,

Well I've got the jakarta-ant-1.3-optional.jar in the ANT/lib
directory.
I've got jaxp.jar, crimson.jar, and xalan.jar on my classpath, and they are
the
only thing on my classpath.

Perhaps I have some version problem? I couldn't use the jaxp, crimson, and
xalan
from the Sun Jaxp site ( some kind of packaging problem) so I took jaxp and
crimson from tomcat and xalan from the xml.apache.org site. Maybe these
versions
don't play well?

Where did you get each of your versions of jaxp, crimson, and xalan?

Sorry for the extented trouble. Regards, Will

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 2:26 PM
Subject: Re: building struts



Will,

If the [style] tag is still failing, you probably still need
jakarta-ant-1.3-optional.jar in the lib directory of ANT.

Brian





"Will Jaynes"

aone.net>cc:
 Subject: Re: building struts
08/27/2001
12:32 PM
Please
respond to
struts-user







Thanks, Brian. I do have jaxp, crimson, and xalan on my classpath.
Unfortunately, I still get the following  error message.  Still not sure
what I
need.

-
[style] Failed to read stylesheet stylesheets\tld.xsl

BUILD FAILED

c:\jakarta\jakarta-struts\build.xml:215:
javax.xml.transform.TransformerConfigur
ationException: javax.xml.transform.TransformerException:
org.xml.sax.SAXExcepti
on: Namespace not supported by SAXParser
--- Nested Exception ---


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 10:47 AM
Subject: Re: building struts



Will,

Here's Craig McClanahan's message from a while back which I think addresses
your problem:

I build Struts on both Linux and Windows.  Here is what I did:

* Download and install Ant 1.3 as an application (i.e. put
  $ANT_HOME/bin on your PATH variable so you can say "ant dist"
  and things like that)

* Copy the "optional.jar" file from the same place you downloaded
  Ant, and place it in $ANT_HOME/lib.  This code has the 

Re: building struts

2001-08-27 Thread Brian . Duchouquette


Will,

If the [style] tag is still failing, you probably still need
jakarta-ant-1.3-optional.jar in the lib directory of ANT.

Brian




   

"Will Jaynes"  

  

aone.net>cc:   

 Subject: Re: building struts  

08/27/2001 

12:32 PM   

Please 

respond to 

struts-user

   

   





Thanks, Brian. I do have jaxp, crimson, and xalan on my classpath.
Unfortunately, I still get the following  error message.  Still not sure
what I
need.

-
[style] Failed to read stylesheet stylesheets\tld.xsl

BUILD FAILED

c:\jakarta\jakarta-struts\build.xml:215:
javax.xml.transform.TransformerConfigur
ationException: javax.xml.transform.TransformerException:
org.xml.sax.SAXExcepti
on: Namespace not supported by SAXParser
--- Nested Exception ---


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 10:47 AM
Subject: Re: building struts



Will,

Here's Craig McClanahan's message from a while back which I think addresses
your problem:

I build Struts on both Linux and Windows.  Here is what I did:

* Download and install Ant 1.3 as an application (i.e. put
  $ANT_HOME/bin on your PATH variable so you can say "ant dist"
  and things like that)

* Copy the "optional.jar" file from the same place you downloaded
  Ant, and place it in $ANT_HOME/lib.  This code has the 

Re: Using Bean properties as MessageTag args

2001-08-27 Thread Brian . Duchouquette


Kat,

Use:




In this example, the variable is defaulting to page scope.  I would not
define the variable as session scope since you will most likely be sharing
your bean through the session across pages if that is necessary.  The cast
before using a page (or session scope) variable is necessary, so, using
your example below, you will need to cast the object to
com.foo.bar.ReportResult..

Brian



   

"Luna, 

Katherine"   To: "'[EMAIL PROTECTED]'"

  

rgis.com>cc:   

 Subject: Using Bean properties as 
MessageTag args 
08/27/2001 

09:54 AM   

Please 

respond to 

struts-user

   

   





Hi all,


I am trying to display a report heading that incorporates the properties
reportResult.startDate and reportResult.endDate into a custom bean:message
tag like this:





where arg0 is 
and arg1 is 


Ive searched the archives and I know that we can't nest tags, but none of
the solutions in the archives seems to work for me either.  I've tried:






and also




but both of the above give me errors.  Any suggestions?






Kat Luna
[EMAIL PROTECTED]










Re: building struts

2001-08-27 Thread Brian . Duchouquette


Will,

Here's Craig McClanahan's message from a while back which I think addresses
your problem:

I build Struts on both Linux and Windows.  Here is what I did:

* Download and install Ant 1.3 as an application (i.e. put
  $ANT_HOME/bin on your PATH variable so you can say "ant dist"
  and things like that)

* Copy the "optional.jar" file from the same place you downloaded
  Ant, and place it in $ANT_HOME/lib.  This code has the 

Re: FormBean Pre-popping?

2001-08-14 Thread Brian . Duchouquette


William,

The action does not directly know the next view or previous view. The
action object returns a generic ActionForward object with a  "success",
"failure", etc. or a more specific "contacts", "roles", etc if you have
sub-screens with that information.  The controller uses struts-config.xml
to find the location of the next page based on the actionforward object.
If your formbean contains all the fields in your views that it serves, then
you should not have a problem.  Note that in the case I am describing here
I would have a parent bean then child beans that are populated with user
data (contact, roles) as necessary.

If contact information appears in a different view, then I just re-use that
bean in a new parent formbean again.

This is the way I approached the multiple page / Tab page view problem.
Maybe someone else had a different approach...

Brian




   
   
William Lyvers 
   
  <[EMAIL PROTECTED]>   
   
cc:
   
08/14/2001 10:32Subject: FormBean Pre-popping? 
   
AM 
   
Please respond 
   
to struts-user 
   
   
   
   
   




Our company is considering adopting the Strut framework into our web
development.  One thing that has grabbed my attention is that the
pre-popping of FormBeans from MT objects occurs in an Action before
forwarding the page to the next View.  This seems to dictate that the each
action directly knows the next view as well as the previous view.
Consequently, the action classes are tied to particular flows throughout
the
website.  This seems somewhat awkward -- especially when a form can be
appear in multiple flows.  Am I missing something or is this the intended
design?

Thanks,
Billy







Re: Multi-page form bean persistence

2001-08-14 Thread Brian . Duchouquette


Richard,

I can think of 2 things that may cause the data structure to not persist.
1.  The framework might be calling an implemented reset() method on your
formbean.  To get multi-page formbeans to work, I had to avoid
implementation of this method (since it is called between requests).  2.
You may have code in your action class that is disposing of your formbean.

Brian




   

Richard

William Lake To: [EMAIL PROTECTED]

<[EMAIL PROTECTED]cc:   

n.ac.uk> Subject: Multi-page form bean persistence 

   

08/14/2001 

09:16 AM   

Please 

respond to 

struts-user

   

   





I have a multi-page form to manipulate a 2-level tree structure, so one of
the variables of my ActionForm specifies which branch of the tree is shown,
and I have no problem switching between branches to view the data. I'm
using another variable to define a cancel/commit status of the form, which
defines when the user has chosen to finish editing. If this status is not
set then the Action forwards to the Input form.

The form transfers properties between pages by using  tags.
The problem is that the data structure does not persist (it is a member
variable of the form class) between requests, even though it is only
created if the variable is null and it is not set in the reset method. I
have also tried using "session" scope for the form, with no noticeable
difference.

Perhaps there is somebody who can explain how to achieve form persistance
across pages (the view is the same for all "pages" in my case) or is this a
"grey-area" at the moment in this excellent framework?

I would also like to use multiple data sources for the benefits of
connection pooling. I couldn't find any mention of documentation describing
how to define this. Is there a property of the XML tag to give a database a
named reference?
* Actually, I couldn't find any documentation detailing the precise
structure and layout of the "struts-config.xml" file.

As a final point, it would be nice to see a "how-to" article section on the
Struts website with minimal examples of such scenarios or building blocks
if you like. I wonder if this has been discussed before?

Regards,
Richard







Re: book ??????????

2001-08-14 Thread Brian . Duchouquette


The server is doing that, not the messenger.  I had that happen to one of
my previous messages also...




   

Troy Hart  

<[EMAIL PROTECTED]To: [EMAIL PROTECTED]

et>  cc:   

 Subject: Re: book ??  

08/14/2001 

09:45 AM   

Please 

respond to 

struts-user

   

   





ENOUGH ALREADY!!!

On Friday 14 July 2000 12:59 am, you wrote:
> Hi everybody
>
> is there any book where i can find strut related material???
>
>
> praveen







Re: Tabs on a Struts Page

2001-08-09 Thread Brian . Duchouquette


Nevermind... Framework was calling reset on my bean.  I'm such a newbie...




   
  
Brian.Duchouquette@tran
  
splace.com To: 
[EMAIL PROTECTED]
   cc: 
  
08/09/2001 01:28 PMSubject: Tabs on a Struts Page  
  
Please respond to  
  
struts-user
  
   
  
   
  





This is a follow-up to my Wizard question...

If I have three tabs that are included at the top of each of the three body
pages by a template, then what is the best way to make sure information is
stored between requests for the different pages?  Even though all three
pages use the same ActionForm bean and Action class, I am running into the
problem where the formbean is loosing its data (even though I check for
submit in the reset() method).  Is there a better approach than doing this?

BTW, sorry about the multiple posts of some of my messages cluttering the
newsgroup... our Lotus Notes server went nuts over here.

Thanks,
Brian







Brian.Duchouquette@tran

splace.com To:
[EMAIL PROTECTED]
   cc:

08/09/2001 12:22 PMSubject: Wizard Form
Authoring..
Please respond to

struts-user








All,

What is the best design practice that you have found for creating Wizard
entry forms in the Struts framework?

Thanks,
Brian












Tabs on a Struts Page

2001-08-09 Thread Brian . Duchouquette


This is a follow-up to my Wizard question...

If I have three tabs that are included at the top of each of the three body
pages by a template, then what is the best way to make sure information is
stored between requests for the different pages?  Even though all three
pages use the same ActionForm bean and Action class, I am running into the
problem where the formbean is loosing its data (even though I check for
submit in the reset() method).  Is there a better approach than doing this?

BTW, sorry about the multiple posts of some of my messages cluttering the
newsgroup... our Lotus Notes server went nuts over here.

Thanks,
Brian






   
  
Brian.Duchouquette@tran
  
splace.com To: 
[EMAIL PROTECTED]
   cc: 
  
08/09/2001 12:22 PMSubject: Wizard Form 
Authoring..  
Please respond to  
  
struts-user
  
   
  
   
  





All,

What is the best design practice that you have found for creating Wizard
entry forms in the Struts framework?

Thanks,
Brian








Wizard Form Authoring..

2001-08-09 Thread Brian . Duchouquette


All,

What is the best design practice that you have found for creating Wizard
entry forms in the Struts framework?

Thanks,
Brian




Re: Construct context-relative URL in Javascript?

2001-08-08 Thread Brian . Duchouquette


Did you try ?




   

"Randall   

Parker"  To: "[EMAIL PROTECTED]" 
<[EMAIL PROTECTED]> 
Subject: Construct context-relative URL 
in Javascript?
   

08/08/2001 

05:23 PM   

Please 

respond to 

struts-user

   

   





I've seen Craig posted how something like
   
will get translated to
   

But I need to create a context-sensitive URL in Javascript. The reason for
this is that
there are multiple buttons on my form/page and in the action handler
function for
each button I need to set the form's action to the appropriate action for
that button
click before submitting the form.

So I think I want a way to do get at info in Javascript that is the
equivalent of what is
returned by javax.servlet.http.HttpServletRequest req.getContextPath()

So that something like this can be done in Javascript
   this.form.action = contextPath + "/graphs/fullgraph.jsp"

(or .do instead of .jsp or whatever)

So is there some way with a Struts tag to put the context path on the
generated
page using perhaps an invisible control that would be set to have the
context path as
its value? Then one could assign the invisible control's value for the the
context path
to a Javascript variable and use it in something like the code snippet
above.

I also need to do some other stuff in the Javacsript (eg set the target
attribute of the
form tag using a generated value as well). So I think I really need to use
Javascript to
do this.

Or am I approaching the problem in a way that is totally wrong?











Re: Can't get setter method(s) for indexed property right. Pleeze help

2001-08-08 Thread Brian . Duchouquette



Marcel,

I walked through code example submitted by Warwick Boote to get past
issues/concepts with setters for indexed properties.  The only change I
made was to add a second field to the form.  So, if your list is named
properties, you would have second field on the form called "property" also.
My property set method added an item to the properties vector (if it did
not already exist on the vector)...  I don't know if this is the best way
to do it, but it worked.

Brian


Here's the message Warwick posted:

Here is a hacked version of the code posted by David Hay previously.  The
code here will compile and run - a Vector is populated then displayed.
After a post, the vector is retrieved from the form and then System.out is
used to show its size.

This should help others that are having problems with indexed tags.  You'll
need to point your browser to somthing that looks like
http://localhost/struts/ShowParameters.do once you've copied all the files
into the correct locations.

There were two issues with the way i was trying to do it, firstly it seems
that unless the scope of the form is set to session (or not specified) it
doesn't work and secondly because i was using a different id for the name
in the logic:iterate / html:text tags (when i set them to
"parameter" it worked).


  





   


Waz.
=)

-Original Message-
From: Warwick Boote [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 14:09
To: [EMAIL PROTECTED]
Subject: what setters do i implement in an indexed tag ?


I've created a page using indexed tags (neat stuff!).
Here is what is currently working for me:
o If i populate the form's vector, values from that vector are displayed in
the jsp
Here is what it not working:
o when the form is posted back, the vector is null (in the struts perform()
method)
I suspect i haven't implemented some sort of setter within the form but i
can't find an example as to what method should be implemented.  I've tried
ArrayList and using parameterList instead with no different result.
Thanks,
Waz.
=)
Here are some code snippits for help:
---jsp---

 

---Form---
public class FieldsMapForm extends ActionForm {
private String fileColCount;
private java.util.Vector fieldMappings = new java.util.Vector();
private String action;
public String getFileColCount() {
return fileColCount;
}
public void setFileColCount(String newFileColCount) {
fileColCount = newFileColCount;
}
public void setFieldMappings(java.util.Vector newFieldMappings) {
fieldMappings = newFieldMappings;
}
public java.util.Vector getFieldMappings() {
return fieldMappings;
}
public FieldMapping getParameter(int index) {
return (FieldMapping)fieldMappings.elementAt(index);
}
public void setAction(String newAction) {
action = newAction;
}
public String getAction() {
return action;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
fileColCount = null;
fieldMappings = new java.util.Vector();
action = null;
}
}
---The vector contains these:---
public class FieldMapping implements Serializable {
private Integer fieldNumber;
private String attributeCode;
public void setFieldNumber(Integer newFieldNumber) {
fieldNumber = newFieldNumber;
}
public Integer getFieldNumber() {
return fieldNumber;
}
public void setAttributeCode(String newAttributeCode) {
attributeCode = newAttributeCode;
}
public String getAttributeCode() {
return attributeCode;
}
}
 <>

(See attached file: indexed_eg_rwb.zip)




   

Marcel Maré


emax.com>cc:   

 Subject: Can't get setter method(s) for 
indexed property right.   
08/08/2001   Pleeze help   

04:46 PM   

Please 

respond to 

struts-user

   

   





I'm having trouble getting the setter methods of an indexed property of my
formbean to work (despite some postings on this list). It's driving me
nuts.

So what I'm trying to do is use a String property of my formbean (actually
a
List of S

RE: Weblogic related question- javax.servlet.jsp.JspException: No get ter method for property...

2001-08-08 Thread Brian . Duchouquette


You're Bean class does not extend ActionForm..




   
 
[EMAIL PROTECTED] 
 
elheim.comTo: 
[EMAIL PROTECTED]
  cc:  
 
08/08/2001 03:56 PM   Subject: RE: Weblogic 
related question-   
Please respond to javax.servlet.jsp.JspException: 
No get ter method for property... 
struts-user
 
   
 
   
 





The Bean class does have a matching get method for the specified property.
This is why I don't understand why I am receiving this error...




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 4:45 PM
To: [EMAIL PROTECTED]
Subject: Re: Weblogic related question- javax.servlet.jsp.JspException:
No get ter method for property...



RequestUtils is using introspection on your form bean class to match the
name you placed in your 

Your form bean should have:  String getRequestDate()
   andvoid   setRequestDate(String)

Brian






[EMAIL PROTECTED]

elheim.comTo:
[EMAIL PROTECTED]
  cc:

08/08/2001 03:22 PM   Subject: Weblogic
related question- javax.servlet.jsp.JspException:
Please respond to No get ter method for
property...
struts-user










I am moving a Struts-based application from WebLogic 5.1 to 6.1 and I am
encountering some strange errors. Has anyone else seen this behavior
before,
or know what might be causing it?  I have a Collection of beans I am trying
to iterate through using the Struts iterate tag (works fine with WL5.1) but
now I am getting an error that there is no getter method. I have verified
with the debugger that at runtime the Collection exists and it is populated
with the expected objects. I am not really sure what is going on... The
only
thing I can think of is that this method does not exactly conform to the
JavaBean spec- it does not set/get the same type of object. When doing a
set, you pass it a TimeStamp but for the get it returns a formatted String
(see below). However, the naming conventions are followed correctly. Is
this
a problem?


 WL Exception #
note: the bean called "theFermentation" is a FermSummaryBean (see below)

javax.servlet.jsp.JspException: No getter method for property requestDate
of
bean theFermentation
at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517)
at
org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179)
at jsp_servlet._mainmenu._jspService(_mainmenu.java:385)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java


:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java


:302)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java


:200)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp


l.java:190)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja


va:1758)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java


:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java


:200)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp


l.java:190)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja


va:1758)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpSe

Re: Weblogic related question- javax.servlet.jsp.JspException: No get ter method for property...

2001-08-08 Thread Brian . Duchouquette


RequestUtils is using introspection on your form bean class to match the
name you placed in your 

Your form bean should have:  String getRequestDate()
   andvoid   setRequestDate(String)

Brian




   
 
[EMAIL PROTECTED] 
 
elheim.comTo: 
[EMAIL PROTECTED]
  cc:  
 
08/08/2001 03:22 PM   Subject: Weblogic related 
question- javax.servlet.jsp.JspException:   
Please respond to No get ter method for 
property... 
struts-user
 
   
 
   
 





I am moving a Struts-based application from WebLogic 5.1 to 6.1 and I am
encountering some strange errors. Has anyone else seen this behavior
before,
or know what might be causing it?  I have a Collection of beans I am trying
to iterate through using the Struts iterate tag (works fine with WL5.1) but
now I am getting an error that there is no getter method. I have verified
with the debugger that at runtime the Collection exists and it is populated
with the expected objects. I am not really sure what is going on... The
only
thing I can think of is that this method does not exactly conform to the
JavaBean spec- it does not set/get the same type of object. When doing a
set, you pass it a TimeStamp but for the get it returns a formatted String
(see below). However, the naming conventions are followed correctly. Is
this
a problem?


 WL Exception #
note: the bean called "theFermentation" is a FermSummaryBean (see below)

javax.servlet.jsp.JspException: No getter method for property requestDate
of
bean theFermentation
at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517)
at
org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179)
at jsp_servlet._mainmenu._jspService(_mainmenu.java:385)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:302)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:200)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp

l.java:190)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja

va:1758)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:200)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp

l.java:190)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja

va:1758)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo

ntext.java:2390)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java

:1959)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


# Snipet from the JSP 


.
.
.


  
  
  
  
  
  ">
View... 
">
Edit...  




##

Re: Why would jsessionid not appear?

2001-08-08 Thread Brian . Duchouquette


To follow up my last message:

jsessionid is now being passed from index.jsp to my next form:
CreateStakeholder.jsp. CreateStakeholder.jsp does not seem to recognize
jsessionid when it is sent, and does not re-write the link tags.
_

One important note: I am using a template to build createStakeholder.do
(CreateStakeholder.jsp):

The links in the template sub-forms are:



_

Menu.jsp and Stakeholder_Links.jsp both do not add jsession id correctly
into the 

Is it possible that the sub-pages on the template are not acquiring the
jsessionid request parameter correctly?  Is there something I need to do
with the template to make sure the html:link tag builds correctly?

Thanks,
Brian


p.s.

CreateStakeholder.jsp looks like this:

<%@ page language="java" %>

<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>


 
 
 
 
 
 






   
  
Brian.Duchouquette@tran
  
splace.com To: 
"'[EMAIL PROTECTED]'"
   <[EMAIL PROTECTED]>
  
08/08/2001 10:54 AMcc: 
  
Please respond to  Subject: Why would jsessionid 
not appear? 
struts-user
  
   
  
   
  




My link is:



it works, but the URL shows:

http://localhost:8080/dne-struts/createStakeholder.do?action=create

no jsessionid  :(

Any hints appreciated!

Thanks,
Brian



Here's my action-mapping for that page:

 
   input="/CreateStakeholder.jsp">
  
 








Why would jsessionid not appear?

2001-08-08 Thread Brian . Duchouquette

My link is:



it works, but the URL shows:

http://localhost:8080/dne-struts/createStakeholder.do?action=create

no jsessionid  :(

Any hints appreciated!

Thanks,
Brian



Here's my action-mapping for that page:

 
   input="/CreateStakeholder.jsp">
  
 




Presentation Questions

2001-08-07 Thread Brian . Duchouquette

All,

I have 2 questions:

1.  When I use , the following output is rendered:

  Last Name is required.  First Name is required.

  Is it possible to use the  tag to go through the list and
provide a break between the items?

2.  Validation already occurs when my input  form first appears (and error
messages appear without the user first submitting the form).  What is the
easiest
  way to avoid validation until the user submits the  form?

Thanks,
Brian




Re: Simple Login app on Husted.com + Tomcat 4.0 beta 6

2001-08-03 Thread Brian . Duchouquette


Nicky,

Try 2 things:

1.  Remove any XML parsers from your classpath.  A pre-existing xml parser
in your classpath may supercede the XML parser which comes with struts.
Struts will not work with just any XML parser...
2.  Try struts with Tomcat 3.2.3  (people seem to be having better luck
with it).

Brian




   

Nicky  

EshkenaziTo: [EMAIL PROTECTED]

   Subject: Simple Login app on Husted.com + 
Tomcat 4.0 beta 6   
   

08/03/2001 

03:15 PM   

Please 

respond to 

struts-user

   

   





Another clarification on this one...
I have noticed that the web.xml file that comes with the struts-logon.war
includes a reference for
the \WEB-INF\app.tld, however the app.tld file wasn't a part of the
extract...Can anybody shed some
light on this one? Any input will be appreciated?
I really would like to make this example work..

thanks,
Nicky


Nicky Eshkenazi wrote:

> I have attemped to take a look at the simple Login application available
for
> downlaod on husted.com. I am using Tomcat 4.0 beta 6. The was file was
> sucessfully unzipped and the index.jsp worked fine, however the logon.jsp
was
> referenced I got the following dump, any help would be appreciated:
>
> -
>
> A Servlet Exception Has Occurred
> Exception Report:
> javax.servlet.ServletException: Cannot retrieve ActionMappings under key
> "org.apache.struts.action.MAPPINGS"
>  at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:452)

>
>  at org.apache.jsp._0002flogon_jsp._jspService(_0002flogon_jsp.java:291)
>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:200)

>
>  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:456)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

>
>  at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

>
>  at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

>
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

>
>  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:219)

>
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

>
>  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2251)
>  at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

>
>  at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

>
>  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)

>
>  at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

>
>  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at org.apache.catalina.core.ContainerBase.invoke(Con

Struts Scalability in a Large Production Environment

2001-07-25 Thread Brian . Duchouquette

All,

I have been doing a lot of research into Struts recently.   My question is
about performance and scalability.  First the definitions:

Performance = good response time to users

Scalability = good response time to a large number of simultaneous users.
Usually this is a logarithmic curve that reaches a point where the server
has   difficulty sustaining the load.

Struts will only be used for presentation logic.  My Action classes in this
framework will access separate business objects that will then access a BEA
application server to perform the necessary business logic (EJB's) and
return the results.  This will be a large production environment with a
large number of simultaneous users if we decide to implement this way.  The
Web servers will be load balanced.   Even so, I don't want to implement a
framework which requires me to throw a bunch of hardware at it after all is
said and done.

Does someone have some practical experience of the performance and
scalability of the Struts framework with an overhead of 100 simultaneous
users?  What about 1000?

Is there any kind of advice that anyone can offer me before I head down
this path in relation to scalability?

Thanks,
Brian




Re: servlet error with struts 1.0 (release) and tomcat 4

2001-07-24 Thread Brian . Duchouquette


Jon,

I received that same error after I removed catalina.jar, but didn't have
xerces.jar in the classpath.

Brian




   

"Jon Brisbin"  


net> cc:   

 Subject: servlet error with struts 1.0 
(release) and tomcat 4 
07/24/2001 

11:40 AM   

Please 

respond to 

struts-user

   

   





i get the following with some (but not all) struts 1.0 webapps in tomcat
4...any help would be appreciated:

jb

A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
   at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876)
   at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

va:214)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja

va:219)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2251)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164

)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
   at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java

:163)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:

984)
   at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1074

)
   at java.lang.Thread.run(Thread.java:484)

Root Cause:
java.lang.LinkageError: loader constraints violated when linking
org/xml/sax/EntityResolver class
   at
org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:198)
   at
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa

che.java:165)
   at
org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:138)
   at
org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:324)
   at
org.apache.jasper.servlet.JspServlet.init(JspServlet.java:263)
   at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:857)
   at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

va:214)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.

HIT PAY DIRT! Re: Baisc q 2 Cannot find message resources u/key -

2001-07-24 Thread Brian . Duchouquette


Jon,

When you posted the version of the xerces compiler you were using ***xerces
1.3.1***, that solved my problem.

Here's the link guys:

http://xml.apache.org/dist/xerces-j/

Get xerces1.3.1.zip from the link above and do like Jon said in his
original message.  Remove the other XML parsers from your classpath (I had
JAXP mucking things up), then get xerces.jar out of the zip file that you
download, and place it in the Tomcat/lib directory.  Make sure to update
catalina.bat in Tomcat/bin to setup your runtime classpath.  Mine looks
like:

set CP=%CATALINA_HOME%\bin\bootstrap.jar;c:
\tomcat\lib\xerces.jar;%JAVA_HOME%\lib\tools.jar;c:
\tomcat\webapps\struts-example\WEB-INF;c:
\tomcat\webapps\struts-example\WEB-INF\lib\struts.jar

Thanks!
Brian

p.s. Woohoo!!!





   

"Jon Brisbin"  

  

net> cc: "Chuck Amadi" 
<[EMAIL PROTECTED]> 
 Subject: Re: Baisc q 2 Cannot find 
message resources u/key -  
07/24/2001 

10:02 AM   

Please 

respond to 

struts-user

   

   





> Hi, there only promlem is that i am not running tomcat 4.

i know that... :-)  ok...let's try this worded a different way:

the problem is an xml parser issue, as this question has come up a lot
lately and i got my own servlet container to work by carefully analyzing
where and when my xml parsers were getting loaded...

your solution will *obviously* be different, but the problem seems to come
from classloading of xml parsers...you'll of course need to look through
your lib directories and make sure no other jaxp or crimson parsers are
there, replacing them with xerces 1.3.1 (1.4.1 will also give some issues
with some containers, specifically tomcat)...

i was only using my solution as an *example* of how everyone having this
problem can analyze their own servlet container to help fix the problem.  i
was getting pretty irritated because NO ONE was helping me fix this
problem,
or even offering constructive advice on the deeper issue i knew it had to
be...one deeper than just making sure my config files were accurate...

it's something worth trying, anyway...

jb









Re: Baisc q 2 Cannot find message resources u/key -

2001-07-24 Thread Brian . Duchouquette


Jon,

That did something.  Before when I was starting my server, the console
read:

-

Starting service Tomcat-Standalone
Apache Tomcat/4.0-b6
Starting service Tomcat-Apache
Apache Tomcat/4.0-b6

--

Now the console shows:

--

A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL
relocation target' has occurred in :
'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method.
Please report this error in detail to
http://java.sun.com/cgi-bin/bugreport.cgi

Starting service Tomcat-Standalone
Apache Tomcat/4.0-b6
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
'jar:file:/C:/Tomcat/bin/../webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'jar:file:/C:/Tomcat/bin/../webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/
resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:/C:
/Tomcat/bin/../webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/
resources/web-app_2_3.dtd'
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
'jar
:file:/C:/Tomcat/bin/../webapps/struts-blank/WEB-INF/lib/struts.jar!/org/apache/
struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'jar:file:/C:
/Tomcat/bin/../webapps/struts-blank/WEB-INF/lib/struts.jar!/org/apache/struts/re
sources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:/C:
/Tomcat/bin/../webapps/struts-blank/WEB-INF/lib/struts.jar!/org/apache/struts/re
sources/web-app_2_3.dtd'
Starting service Tomcat-Apache
Apache Tomcat/4.0-b6

--

When the index.jsp page for the struts-example application attempts to
load, it seems to get caught in a loop..  Still no joy, but at least
something different is happening.

Thanks,
Brian




   

"Jon Brisbin"  

  

net> cc: "Chuck Amadi" 
<[EMAIL PROTECTED]> 
 Subject: Re: Baisc q 2 Cannot find 
message resources u/key -  
07/24/2001 

10:02 AM   

Please 

respond to 

struts-user

   

   





> Hi, there only promlem is that i am not running tomcat 4.

i know that... :-)  ok...let's try this worded a different way:

the problem is an xml parser issue, as this question has come up a lot
lately and i got my own servlet container to work by carefully analyzing
where and when my xml parsers were getting loaded...

your solution will *obviously* be different, but the problem seems to come
from classloading of xml parsers...you'll of course need to look through
your lib directories and make sure no other jaxp or crimson parsers are
there, replacing them with xerces 1.3.1 (1.4.1 will also give some issues
with some containers, specifically tomcat)...

i was only using my solution as an *example* of how everyone having this
problem can analyze their own servlet container to help fix the problem.  i
was getting pretty irritated because NO ONE was helping me fix this
problem,
or even offering constructive advice on the deeper issue i knew it had to
be...one deeper than just making sure my config files were accurate...

it's something worth trying, anyway...

jb









Re: Repost: Where did it go?!

2001-07-23 Thread Brian . Duchouquette


Dave,

It sounds like you may be having a problem with holding onto the session
between your two frames.  If this is a possibility, then set a session
variable in the lower frame and try printing out your session information
in the top frame to see what is going on.

Brian



   

dhay@lexmark.  

com  To: [EMAIL PROTECTED]

 cc:   

07/23/2001   Subject: Repost: Where did it go?!

03:13 PM   

Please 

respond to 

struts-user

   

   







Hi everyone.  Apologies for reposting, but I am really stuck on this one,
and
wondering if anyone has any ideas?!

After calling the action below to download a data directory, everything
goes
fine, but somehow I lose the response output stream permanently!
Thereafter,
whatever I try and view on the site is processed, but nothing gets
displayed!

Do I somehow have to reset the stream?  Is there any side effects from
returning
null?

Any help would really be appreciated!

Thanks,

Dave

--
DownloadDataDirAction.java:

package beans;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.zip.ZipOutputStream;
import java.util.zip.ZipException;
import java.util.zip.ZipEntry;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 * Implementation of Action that downloads the filtered
log to
 * the users disk.
 */

public final class DownloadDataDirAction extends Action
{

   // - Public
Methods

   /**
* Process the specified HTTP request, and create the corresponding HTTP
* response (or forward to another web component that will create it).
* Return an ActionForward instance describing where and
how
* control should be forwarded, or null if the response has
* already been completed.
*
* @param mapping The ActionMapping used to select this instance
* @param actionForm The optional ActionForm bean for this request (if
any)
* @param request The HTTP request we are processing
* @param response The HTTP response we are creating
*
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet exception occurs
*/
   public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
   throws IOException, ServletException
   {

  HttpSession session = request.getSession();
  ServerBean sb = (ServerBean)session.getAttribute("ServerBean");
  if (sb == null)
  {
 try
 {
sb = new ServerBean();
session.setAttribute("ServerBean", sb);
 }
 catch (ServerConnectionException sce)
 {
throw new ServletException("Connection Error", sce);
 }
  }

  try
  {

 String dataDir =
sb.getAbsolutePath(sb.getParameter("directories.dataDir"));
 System.out.println("dataDir: " + dataDir);


 //create output stream to write entries to
 response.setContentType("zip");
 response.setHeader("Content-disposition", "attachment;
filename=\"DataDir.zip\"");
 response.addHeader("Content-description", "my description");

 //create zip stream, and recursively add files/subdirectories to
zip
 ZipOutputStream out = new ZipOutputStream(r

Re: iPlanet - Cannot find message resources u/key

2001-07-23 Thread Brian . Duchouquette


All,

Has anyone with iPlanet Webserver 4.x, 6.x been able to get Struts to work?
If so, have you run into the:

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE  error?

If so, how were you able to fix it?

Thanks,
Brian



   
  
Brian.Duchouquette@tran
  
splace.com To: 
[EMAIL PROTECTED]
   cc: 
  
07/23/2001 02:50 PMSubject: Re: iPlanet - Cannot 
find message resources u/key
Please respond to  
  
struts-user
  
   
  
   
  





Does iPlanet Webserver 6.0 know how to use web.xml? Or is it like iPlanet
Webserver 4.2 which uses rules.properties to handle essentially the same
thing?  (I have a call into iPlanet technical support for this question
since I think I am getting too much into the container implementation of a
particular vendor.  However if someone has already solved this problem with
iPlanet, then please feel free to let me know!).

I did have the mapping in my Web.xml file from your last message, but I
think that the iPlanet servlet container doesn't know how to use it.  This
is just a guess... Maybe there is some other configuration I need to do in
the administration console for iPlanet Webserver 6.0 to map to a servlet
directory to get this to work?

Brian




Matt Raible

   cc:

 Subject: Re: iPlanet - Cannot
find message resources u/key
07/23/2001

02:25 PM

Please

respond to

struts-user







Make sure your web.xml has the following entry for the action class:

  
action
org.apache.struts.action.ActionServlet

  application
  ApplicationResources


--- [EMAIL PROTECTED] wrote:
>
> Matt,
>
> Oops, I suppose I should have specified Webserver or Appserver.  I'm
using
> iPlanet Webserver 6.0.  My classpath points to the directory containing
> ApplicationResources.properties which is: c:
>
\iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.properties


>
> This does not seem to work even after updating the server startup
classpath
> in jvm12.conf.
>
> Here is that entry in jvm12.conf:
>
> jvm.classpath=c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\;c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c:
> \iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c:
> \iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c:
>
\iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar


>
> Thanks,
> Brian
>
>
>
>
>

>
> Matt Raible

>
>  [EMAIL PROTECTED]
> yahoo.com>   cc:

>
>  Subject: Re: iPlanet -
Cannot
> find message resources u/key
> 07/23/2001

>
> 02:08 PM

>
> Please

>
> respond to

>
> struts-user

>
>

>
>

>
>
>
>
>
> iPlanet Web Server or App Server?  The fix on the appserver is a
classpath
> thing - probably the same on Web Server.
>
> --- [EMAIL PROTECTED] wrote:
> > All,
> >
> > Can someone please post their iPlanet 6x configuration files for the
> > struts_example.war web application?  I'm sure the answer to my problem
is
> > entering the descriptor xml to point to the location of the resources
> file,
> > but since iPlanet does not support Webapps and WAR files, this is not a
> > straightforward process.
> > Any hints appreciated...
> >
> > Thanks,
> > Brian
> >
>
>
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
>
>
>


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Mess

Re: iPlanet - Cannot find message resources u/key

2001-07-23 Thread Brian . Duchouquette


Does iPlanet Webserver 6.0 know how to use web.xml? Or is it like iPlanet
Webserver 4.2 which uses rules.properties to handle essentially the same
thing?  (I have a call into iPlanet technical support for this question
since I think I am getting too much into the container implementation of a
particular vendor.  However if someone has already solved this problem with
iPlanet, then please feel free to let me know!).

I did have the mapping in my Web.xml file from your last message, but I
think that the iPlanet servlet container doesn't know how to use it.  This
is just a guess... Maybe there is some other configuration I need to do in
the administration console for iPlanet Webserver 6.0 to map to a servlet
directory to get this to work?

Brian



   

Matt Raible

   cc:   

 Subject: Re: iPlanet - Cannot find 
message resources u/key
07/23/2001 

02:25 PM   

Please 

respond to 

struts-user

   

   





Make sure your web.xml has the following entry for the action class:

  
action
org.apache.struts.action.ActionServlet

  application
  ApplicationResources


--- [EMAIL PROTECTED] wrote:
>
> Matt,
>
> Oops, I suppose I should have specified Webserver or Appserver.  I'm
using
> iPlanet Webserver 6.0.  My classpath points to the directory containing
> ApplicationResources.properties which is: c:
>
\iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.properties

>
> This does not seem to work even after updating the server startup
classpath
> in jvm12.conf.
>
> Here is that entry in jvm12.conf:
>
> jvm.classpath=c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\;c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c:
> \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c:
> \iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c:
> \iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c:
>
\iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar

>
> Thanks,
> Brian
>
>
>
>
>

>
> Matt Raible

>
>  [EMAIL PROTECTED]
> yahoo.com>   cc:

>
>  Subject: Re: iPlanet -
Cannot
> find message resources u/key
> 07/23/2001

>
> 02:08 PM

>
> Please

>
> respond to

>
> struts-user

>
>

>
>

>
>
>
>
>
> iPlanet Web Server or App Server?  The fix on the appserver is a
classpath
> thing - probably the same on Web Server.
>
> --- [EMAIL PROTECTED] wrote:
> > All,
> >
> > Can someone please post their iPlanet 6x configuration files for the
> > struts_example.war web application?  I'm sure the answer to my problem
is
> > entering the descriptor xml to point to the location of the resources
> file,
> > but since iPlanet does not support Webapps and WAR files, this is not a
> > straightforward process.
> > Any hints appreciated...
> >
> > Thanks,
> > Brian
> >
>
>
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
>
>
>


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/







Re: iPlanet - Cannot find message resources u/key

2001-07-23 Thread Brian . Duchouquette


Matt,

Oops, I suppose I should have specified Webserver or Appserver.  I'm using
iPlanet Webserver 6.0.  My classpath points to the directory containing
ApplicationResources.properties which is: c:
\iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.properties

This does not seem to work even after updating the server startup classpath
in jvm12.conf.

Here is that entry in jvm12.conf:

jvm.classpath=c:
\iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c:
\iPlanet\Servers\docs\webapps\struts\WEB-INF\;c:
\iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c:
\iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c:
\iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c:
\iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c:
\iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar

Thanks,
Brian




   

Matt Raible

   cc:   

 Subject: Re: iPlanet - Cannot find 
message resources u/key
07/23/2001 

02:08 PM   

Please 

respond to 

struts-user

   

   





iPlanet Web Server or App Server?  The fix on the appserver is a classpath
thing - probably the same on Web Server.

--- [EMAIL PROTECTED] wrote:
> All,
>
> Can someone please post their iPlanet 6x configuration files for the
> struts_example.war web application?  I'm sure the answer to my problem is
> entering the descriptor xml to point to the location of the resources
file,
> but since iPlanet does not support Webapps and WAR files, this is not a
> straightforward process.
> Any hints appreciated...
>
> Thanks,
> Brian
>


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/







iPlanet - Cannot find message resources u/key

2001-07-23 Thread Brian . Duchouquette

All,

Can someone please post their iPlanet 6x configuration files for the
struts_example.war web application?  I'm sure the answer to my problem is
entering the descriptor xml to point to the location of the resources file,
but since iPlanet does not support Webapps and WAR files, this is not a
straightforward process.
Any hints appreciated...

Thanks,
Brian




RE: NewB: Is Struts completely reliant on sessions

2001-07-20 Thread Brian . Duchouquette


Renzo, Felix,

If your front-end web server/load balancer (also known as Local Director or
Resonate, etc) is implemented to use IP stickiness, then this is a
non-issue since the Web user will be returned to the server which serviced
the original request.

Brian




   

"Renzo Toma"   

  

s4all.nl>cc:   

 Subject: RE: NewB: Is Struts completely 
reliant on sessions   
07/20/2001 

05:40 AM   

Please 

respond to 

struts-user

   

   






Hi

As long as you carry over all properties to the next request using form
elements (text, hidden, ...), you will only miss the LOCALE session
variable. But you set that by subclassing ActionServlet.

Actually when you stay away from wizard-like/multipage forms, you'll be
fine.


Renzo

-Original Message-
From: Felix Ulrich [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 20 juli 2001 11:29
To: [EMAIL PROTECTED]
Subject: NewB: Is Struts completely reliant on sessions


Hi

We have to build & deploy some web applications with
JSP/Servlets on an LVS cluster.  At the moment,
though, I don't think we can guarantee session
affinity (i.e. subsequent requests will end up on
different machines), and it seems that Struts uses
sessions quite heavily.

Am I right in thinking that sessions are a
pre-requisite of using the Struts framework?  Is there
any part of Struts I could still use without sessions
(e.g. some of the taglibs maybe)?

Thanks

Felix.


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie