RE: Where do YOU put JDBC calls?

2001-07-18 Thread Ritter, Steve

Ryan, you should really read the J2EE blueprints on DAO.  It covers everything you 
need to know.
 
Search aroun javasoft.com for the blueprints (they are documents, not software).
 
--Steve

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 7:36 AM
To: [EMAIL PROTECTED]
Subject: RE: Where do YOU put JDBC calls?


>From my understanding then - 
 
I would have my Business Object class that wraps the table, lets call it Address.
I would have a DAO object that is specific to that Business object for the JDBC calls, 
lets call it AddressDAO.
 
In Address, I would have loadAddress, DeleteAddress, InsertAddress, all of which would 
call AddressDAO to do the actual JDBC call?
 
Any simple examples of these two classes that are not EJB's? Is this the route to go 
if I'm not using EJB's?
 
Thanks,
Ryan
 


>>> [EMAIL PROTECTED] 07/18/01 08:17AM >>>
Iam using the DAO(Data Access Object) design pattern for such Data access
situations. DAO is a layer of abstraction that works in conjunction with the
Business Object which is nothing but a container for business data. the
Business Object calls the DAO's business methods. The DAO's Business methods
wrap the JDBC Code for data base interaction. Its been explained clearly on
the J2EE blueprints section.Once you are done writing your DAO's, extend the
DAO into a session bean or use it seperately.

regards
pathangi r

-Original Message-
From: Ryan Cornia [ mailto:[EMAIL PROTECTED]] 
 
Sent: Wednesday, July 18, 2001 8:56 AM
To: [EMAIL PROTECTED]
Subject: Where do YOU put JDBC calls?



I'm wondering what people are considering best practices for JDBC calls?

I have been writing beans that wrap a database table, and include functions
"select", "insert", "delete". These functions either load the bean, insert
the bean values in the database, or delete the record from the database. In
all of these functions, I pass in a database connection from the action. (Or
whatever else is calling the bean.)

ie- public boolean select(Connection cn1, String primaryKey)

How are others doing it? I think this is a good approach, but want to see if
someone has come up with something better.

Thanks,
Ryan







RE: Who Uses Struts (Struts Acceptance in Industry)

2001-06-20 Thread Ritter, Steve

Hi Stephen,

I've used Struts on several projects now.  Only one of them was an "enterprise" class 
application used for trading securities.  The other projects were intranet 
applications but nonetheless they were transactional and secure (the only thing that 
made them not conform to an "enterprise" app was that there were no scaling 
requirements, low volume stuff).

I would say that you have to ask "if not Struts, what?".  That is, what are you 
comparing struts to?  If the only other choice is "build it by hand" then I can 
garauntee that struts has great arguments that will help.  I believe a previous reply 
pointed out links to these types of docs.

If you are comparing struts to some other web-app framework it might be a little more 
difficult since I have not seen many comparisons out there.  I know the barracuda guys 
did a very superficial comparison but that's the only one I know about.

Hope some of this helps.

--Steve

> -Original Message-
> From: Molitor, Stephen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 20, 2001 1:07 PM
> To: '[EMAIL PROTECTED]'
> Subject: Who Uses Struts (Struts Acceptance in Industry)
> 
> 
> Hi.  I am a developer for a medium sized (45,000 employees) 
> company in the
> Midwest United States.  We are thinking about using Struts.  
> We've played
> with it, and think it's great.  However, we have to sell it to our
> management.  One concern that our managers have is that 
> Struts is relatively
> new, and they wonder how much industry acceptance Struts has.  So, my
> question is, what companies use Struts?  Any success stories, horror
> stories?  Actual company names would be great, but 
> descriptions like 'a
> large telecommunications company in the Midwest' would also be OK.  
> 
> Any other advice on how to sell Struts to management, 
> pointers to magazine
> articles, etc., would also be appreciated.  Or, conversely, 
> anyone who feels
> that Struts is not appropriate for enterprise application 
> development should
> also reply.  Feel free to reply to me personally if you don't feel
> comfortable replying to the public mailing list.
> 
> Thanks!
> 
> Steve Molitor
> [EMAIL PROTECTED]
> 



RE: "Cannot remove attribute from request"

2001-06-20 Thread Ritter, Steve

Hello Jesse, please check the struts-user archives and search for "Cannot remove 
attribute from request".  Its a well known issue.  Here is some stuff I sent out 
before:

Read this included thread and follow the links identified.  I am pretty sure that it 
covers your problem and potential fixes.  It reads best if you start with the bottom 
and then read the top.  To summarize, this is a known bug with VAJ and it has to do 
with the version of Jasper they are using.  Jasper is a set of JSP classes produced by 
Apache, lots of servlet engines use the Jasper package but there are known bugs with 
the older versions of it.  This is one of them.  Your two solutions are as follows:

1. Edit org.apache.struts.taglib.html.FormTag.doEndTag() as described (note, there are 
2 "FormTag" classes in Struts.  One in taglib and one in taglib.html, I had to edit 
the one in taglib.html). Recompile struts.

Or 

2. Preferrably get your servlet engine to use the newer version of Jasper (the one you 
need to get is included with the Tomcat 3.2.2 distribution).  I think there are 
actually instructions on how to do this with your servlet engine in the mail archives 
for struts-user.
 
--Steve

--- BEGIN INCLUDED 

Hi Steve,

Try editing org.apache.struts.taglib.FormTag.doEndTag as follows : 

 
// Remove the page scope attributes we created
pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

Jon.

-Original Message-
From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
Sent: 05 June 2001 20:03
To: '[EMAIL PROTECTED]'
Subject: Need help with "Can't remove attributes from request scope" probl
em.

Hi everyone,

We ran into a problem running b2/b3 on Servletmill that others seem to have
hit with WTE.  It occurs when trying to access the login page from
struts-example, you get an IllegalArgumentException with message "Can't
remove attributes from request scope".  It seems this thread discusses a
potential HACK to "fix" the issue.

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

The top-most posting in this thread indicates bugzilla id 932 which I
checked into:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

So, according to Craig the bug is really in the servlet container and it
would seem that my servlet container has the very same prolem.  What is
suggested work around for this?  Can someone help me with some more details
in the event that I need to speak with my container vendor?

--Steve


 END INCLUDED 

> -Original Message-
> From: Van-Landeghem Tom [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 13, 2001 7:08 AM
> To: '[EMAIL PROTECTED]'
> Subject: can't remove attributes from servlet
> 
> 
> Hi,
>  
> Today is my first day I try to play with Struts using Visual 
> Age V3.5.3.
> I try settingup and running the EmployeeList example 
> application from IBM in
> the WTE of VAJ.
> I get the following exception when I try to run the application :
> can't remove attributes from servlet
> which seems to be thrown by the Formtag.doEndTag()
> anybody has any ideas ?
>  
> Tom
> 
> -Original Message-
> From: Zhengxi Ruan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 20, 2001 6:57 AM
> To: '[EMAIL PROTECTED]'
> Subject: "Cannot remove attribute from request"
> 
> 
> Hi,
> We are using Bluestone/HP UBS 7.2 with patch and  Struts 
> building project.
> Struts released its final 1.0 version last Friday. But we got 
> an error which
> was not showing up in the previous Struts release when we 
> moved to 1.0 final
> version . I was wondering if anybody got the same error. Is 
> there any way to
> work around this problem?
> 
>  The following if the error message: 
> 
> java.lang.IllegalArgumentException: Cannot remove attribute 
> from request
> at
> SaApi.servlet.jsp.SaPageContext.removeAttribute(SaPageContext.
> java:378)
> at 
> org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:591)
> at
> SaServletEngine.web.kmp_logon_sjsp_VERSION1._jspService(kmp_lo
> gon_sjsp_VERSI
> ON1.java:547)
> at 
> SaApi.servlet.jsp.SaJspServlet.service(SaJspServlet.java:108)
> at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> at
> SaApi.servlet.SaServletUtils.serviceRequest(SaServletUtils.java:1571)
> at
> SaApi.servlet.SaServletUtils.processServletRequest(SaServletUt
> ils.java:1753)
> at
> SaApi.servlet.SaServletInvokerApp.SaProcessInputStream(SaServl
> etInvokerApp.j
> ava:290)
> at
> SaApi.servlet.SaServletInvokerApp.handleClient(SaServletInvoke
> rApp.java:135)

RE: [EJB] java report article says "bye-bye struts"

2001-06-19 Thread Ritter, Steve

Torsten, great lead!  Thanks for the info, I am going to check it out and if it works 
as reported it will save many hours.

Again, thanks for the pointer (oops, this is a Java group, I should have said 
"reference" :)

--Steve


> -Original Message-
> From: Torsten Terp [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 19, 2001 11:33 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [EJB] java report article says "bye-bye struts"
> 
> 
> Hi,
> 
> You should definetely check out EJBDoclet on sourgeforge.
> (http://sourceforge.net/projects/ejbdoclet/) It is javaDoc plugin
> that creates both valueobjects, remote and home interfaces interfaces,
> primary key classes you name it!! It is independent of the appserver 
> (it is basically an ant task which generates the files based on tags
> in your main ejb class. In addition to being appserver independent it
> supports some extra usefull stuff for a couple of appservers 
> (cant remember
> which) I use it with jBoss (excellent stuff too :-) and it is pretty
> well integrated since some (or all??) of the developers work on jBoss 
> too. 
> 
> It simply amazing, how much time this little puppy can save you!! I
> thank these guys every day I goto work :-)
> 
> ^terp
> 
> 
> > -Original Message-
> > From: Ritter, Steve [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 19, 2001 5:13 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: [EJB] java report article says "bye-bye struts"
> > 
> > 
> > Hi Bob, you make some great comments in this posting.  The 
> scenario you describe in "keeping value objects in sync with 
> > ActionForms" will strike a familiar chord with many developers.
> > 
> > Check this out, the Appserver that I am most familiar with 
> is unfortunately a very small player in the j2ee appserver 
> > market but has some key features that I love to rely on 
> (the appserver is PowerTier from Persistence Software).  One 
> > feature that helps out here is the auto-generation of 
> "pass-by-value" objects for each CMPD Entity bean that is generated 
> > for you.  Although it is a bit "heavy", it is a great time 
> saver and allows you to keep entities and value objects in 
> > synch transparently.  They even generate 
> ClassHome.create(ClassValue) methods for you so you can 
> create (and update) your 
> > entities directly with your Value (state) object.  No more 
> custom entity methods that simply copy one field to another.
> > 
> > How many other ejb containers do this?  I don't have a 
> whole bunch of experience on other containers and I am really curious.
> > 
> > In anycase, I think that for seemless EJB/WebApp 
> integration you hit the nail right on the head.  We need to automate 
> > value bean management and we need standard ways of 
> describing our solutions.
> > 
> > We'll save "security context passing" and session 
> management for later. :)
> > 
> > --Steve
> > 
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 19, 2001 7:45 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [EJB] java report article says "bye-bye struts"
> > > 
> > > 
> > > 
> > > Just a few comments. I picked up a book while out at JavaOne 
> > > called "core
> > > J2EE patterns" which is hot off the press and written by a 
> > > few guys that
> > > work at Sun Java Center. Personally, I did not find any 
> > > breakthrough ideas
> > > in here, but it is a well written book that also describes 
> > > what not to do
> > > and effectively demonstrated how to turn bad design into good 
> > > design (and
> > > provides nice pattern names for these design strategies). It 
> > > solidifies what
> > > most of us have been doing for the past year or so on J2EE 
> > > projects. I think
> > > that any EJB support included in Struts should be structured 
> > > around the
> > > patterns in this book. 
> > > 
> > > For example:
> > > *Value Objects to exchange business data with EJBs
> > > *Business Delegate to reduce coupling between client and 
> > > business services
> > > 
> > > My greatest concern with Struts-EJB integration is how we 
> can minimize
> > > development time, yet still come up with an intuitive and 
> > > flexible design.
> > > The ActionForms are the part that is still bother

RE: [EJB] java report article says "bye-bye struts"

2001-06-19 Thread Ritter, Steve
27;s, I'm listed on the 1.1 TODO list
> to add better EJB support/design patterns.  Ideas that anyone 
> has about
> things that they'd like Struts to do with EJB's will 
> definately help me
> along with this and help Struts quiet this EJB fud. I'm looking to get
> started on this soon, and anyone who wants to is more than welcome to
> help me out.
> 
>  - Mike
> 
> -Original Message-
> From: Bill G [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 5:04 PM
> To: [EMAIL PROTECTED]
> Subject: RE: java report article says "bye-bye struts"
> 
> 
> Hi Craig,
> 
> "Although excellent in dealing with Web-based applications, 
> Struts is not
> ready to take on EJB."
> 
> This is a concern of mine as well but as a newbie to this 
> technology, I am
> wondering how to adopt the Struts framework knowing that I 
> will move to
> EJB's. Is it worth starting with Struts with the idea of 
> moving to EJB's or
> what? Any info on this matter is seriously appreciated!
> 
> Thanks
> BG...
> 
> 
> 
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 11:14 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: java report article says "bye-bye struts"
> 
> 
> 
> 
> On Mon, 18 Jun 2001, Ritter, Steve wrote:
> 
> > Hi Hal, yeah I read the same article and couldn't help but laugh.
> > Prashant really made some outlandish comments and hopefully those
> > comments will diminish any negative impact his article might have on
> > Struts (or, the adoption of Struts I should say).
> >
> > Craig, if you read this thread it might not be a bad idea to send a
> > quick email to the editor's of Java Report and let them know about
> > some of the mis-leading statements.  Sounds like their review board
> > needs a little re-org.
> >
> 
> Looks like I'll have to go buy a copy -- I don't pay a lot of 
> attention to
> trade magazines in print, because production cycles make them 
> so far out
> of date.
> 
> Judging from the many thank-you's I've received for the 1.0 final
> release, I wouldn't worry to much about negative impact on Struts
> adoption.  :-)
> 
> > --Steve
> >
> 
> Craig
> 
> > > -Original Message-
> > > From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, June 18, 2001 7:52 AM
> > > To: 'Struts List'
> > > Subject: java report article says "bye-bye struts"
> > >
> > >
> > > Clearly there are too many java magazines and they will
> > > publish anything. In
> > > the July issue of Java Report there is an article titled
> > > "Writing a Reusable
> > > Implementation of the MVC Design Pattern" by Prashant Sarode
> > > from Brience.
> > > It's interesting because it has a section title of "Bye-Bye
> > > Struts". The
> > > section starts out as follows:
> > >
> > > "While the Struts framework is a powerful idea, it is not yet
> > > a product.
> > > Although excellent in dealing with Web-based applications,
> > > Struts is not
> > > ready to take on EJB."
> > >
> > > There are other gems in the article but I won't reproduce
> > > them all here.
> > >
> > > The premise of the article is that the author went 
> looking for an MVC
> > > framework. He found the Blueprint document and liked that but
> > > it was too
> > > complicated. He then found Struts but apparently it didn't
> > > meet his need for
> > > "a reusable implementation of the MVC pattern." Prashant must
> > > be a hard man
> > > to please. I think he wants one framework that can be used
> > > for both web
> > > applications and desktop applications. Personally I would
> > > rather share the
> > > model components and let my MVC framworks be a little less
> > > abstract and more
> > > useful to the task at hand.
> > >
> > > I couldn't find the article on-line. I just skimmed the rest
> > > of the article
> > > because it it was hard to concentrate or take it seriously
> > > after the Bye-Bye
> > > Struts section.
> > >
> > > Hal
> > >
> >
> 



RE: java report article says "bye-bye struts"

2001-06-18 Thread Ritter, Steve

Bill, although I think this thread needs to die, I really wanted to hopefully relieve 
some of your confusion.

EJB and Struts are COMPLETELY complementary technologies and I don't see how they 
"compete" with eachother at all.  Struts is a web-application framework based on MVC, 
EJB is really a "server side component architecture".

If you are faced with the task of delivering web-based access to an EJB backend, then 
Struts is a perfect fit.  Note, its not the only choice -- but IMHO it is one of the 
best choices from a framework standpoint.  In general, your Struts Action classes 
("the contoller") will acquire references to EJB objects (session/entity beans) and 
use them to implement business logic.

When using Struts in conjunction with EJB, Struts is really just concerned with the 
presentation logic and not so much with the business logic.  That should be handled by 
your EJB's.  In my development I routinely code pure-java (application) client to test 
out my EJB backend.  Once that works building the Web presentation stuff with JSP's 
and Action classes is pretty straight-forward.

I hope this is helpful, feel free to send me some email directly if you have more 
questions.

--Steve 


> -Original Message-
> From: Bill G [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 2:04 PM
> To: [EMAIL PROTECTED]
> Subject: RE: java report article says "bye-bye struts"
> 
> 
> Hi Craig,
> 
> "Although excellent in dealing with Web-based applications, 
> Struts is not
> ready to take on EJB."
> 
> This is a concern of mine as well but as a newbie to this 
> technology, I am
> wondering how to adopt the Struts framework knowing that I 
> will move to
> EJB's. Is it worth starting with Struts with the idea of 
> moving to EJB's or
> what? Any info on this matter is seriously appreciated!
> 
> Thanks
> BG...
> 
> 
> 
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 11:14 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: java report article says "bye-bye struts"
> 
> 
> 
> 
> On Mon, 18 Jun 2001, Ritter, Steve wrote:
> 
> > Hi Hal, yeah I read the same article and couldn't help but laugh.
> > Prashant really made some outlandish comments and hopefully those
> > comments will diminish any negative impact his article might have on
> > Struts (or, the adoption of Struts I should say).
> >
> > Craig, if you read this thread it might not be a bad idea to send a
> > quick email to the editor's of Java Report and let them know about
> > some of the mis-leading statements.  Sounds like their review board
> > needs a little re-org.
> >
> 
> Looks like I'll have to go buy a copy -- I don't pay a lot of 
> attention to
> trade magazines in print, because production cycles make them 
> so far out
> of date.
> 
> Judging from the many thank-you's I've received for the 1.0 final
> release, I wouldn't worry to much about negative impact on Struts
> adoption.  :-)
> 
> > --Steve
> >
> 
> Craig
> 
> > > -Original Message-
> > > From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, June 18, 2001 7:52 AM
> > > To: 'Struts List'
> > > Subject: java report article says "bye-bye struts"
> > >
> > >
> > > Clearly there are too many java magazines and they will
> > > publish anything. In
> > > the July issue of Java Report there is an article titled
> > > "Writing a Reusable
> > > Implementation of the MVC Design Pattern" by Prashant Sarode
> > > from Brience.
> > > It's interesting because it has a section title of "Bye-Bye
> > > Struts". The
> > > section starts out as follows:
> > >
> > > "While the Struts framework is a powerful idea, it is not yet
> > > a product.
> > > Although excellent in dealing with Web-based applications,
> > > Struts is not
> > > ready to take on EJB."
> > >
> > > There are other gems in the article but I won't reproduce
> > > them all here.
> > >
> > > The premise of the article is that the author went 
> looking for an MVC
> > > framework. He found the Blueprint document and liked that but
> > > it was too
> > > complicated. He then found Struts but apparently it didn't
> > > meet his need for
> > > "a reusable implementation of the MVC pattern." Prashant must
> > > be a hard man
> > > to please. I think he wants one framework that can be used
> > > for both web
> > > applications and desktop applications. Personally I would
> > > rather share the
> > > model components and let my MVC framworks be a little less
> > > abstract and more
> > > useful to the task at hand.
> > >
> > > I couldn't find the article on-line. I just skimmed the rest
> > > of the article
> > > because it it was hard to concentrate or take it seriously
> > > after the Bye-Bye
> > > Struts section.
> > >
> > > Hal
> > >
> >
> 



RE: java report article says "bye-bye struts"

2001-06-18 Thread Ritter, Steve

Oh yeah, I forgot... thanks for 1.0!! :-)

--Steve

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 11:14 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: java report article says "bye-bye struts"
> 
> 
> 
> 
> On Mon, 18 Jun 2001, Ritter, Steve wrote:
> 
> > Hi Hal, yeah I read the same article and couldn't help but laugh.  
> > Prashant really made some outlandish comments and hopefully those
> > comments will diminish any negative impact his article might have on
> > Struts (or, the adoption of Struts I should say).
> > 
> > Craig, if you read this thread it might not be a bad idea to send a
> > quick email to the editor's of Java Report and let them know about
> > some of the mis-leading statements.  Sounds like their review board
> > needs a little re-org.
> > 
> 
> Looks like I'll have to go buy a copy -- I don't pay a lot of 
> attention to
> trade magazines in print, because production cycles make them 
> so far out
> of date.
> 
> Judging from the many thank-you's I've received for the 1.0 final
> release, I wouldn't worry to much about negative impact on Struts
> adoption.  :-)
> 
> > --Steve
> > 
> 
> Craig
> 
> > > -Original Message-
> > > From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, June 18, 2001 7:52 AM
> > > To: 'Struts List'
> > > Subject: java report article says "bye-bye struts"
> > > 
> > > 
> > > Clearly there are too many java magazines and they will 
> > > publish anything. In
> > > the July issue of Java Report there is an article titled 
> > > "Writing a Reusable
> > > Implementation of the MVC Design Pattern" by Prashant Sarode 
> > > from Brience.
> > > It's interesting because it has a section title of "Bye-Bye 
> > > Struts". The
> > > section starts out as follows:
> > > 
> > > "While the Struts framework is a powerful idea, it is not yet 
> > > a product.
> > > Although excellent in dealing with Web-based applications, 
> > > Struts is not
> > > ready to take on EJB."
> > > 
> > > There are other gems in the article but I won't reproduce 
> > > them all here.
> > > 
> > > The premise of the article is that the author went 
> looking for an MVC
> > > framework. He found the Blueprint document and liked that but 
> > > it was too
> > > complicated. He then found Struts but apparently it didn't 
> > > meet his need for
> > > "a reusable implementation of the MVC pattern." Prashant must 
> > > be a hard man
> > > to please. I think he wants one framework that can be used 
> > > for both web
> > > applications and desktop applications. Personally I would 
> > > rather share the
> > > model components and let my MVC framworks be a little less 
> > > abstract and more
> > > useful to the task at hand.
> > > 
> > > I couldn't find the article on-line. I just skimmed the rest 
> > > of the article
> > > because it it was hard to concentrate or take it seriously 
> > > after the Bye-Bye
> > > Struts section.
> > > 
> > > Hal
> > > 
> > 
> 



RE: java report article says "bye-bye struts"

2001-06-18 Thread Ritter, Steve

I'd be happy to, but I think that it would carry a little more weight coming from the 
Struts inventor or even a Struts dev contributor.  I'm not one to make a mountain out 
of a mole-hill and I sense that this is already becoming that.

--Steve

> -Original Message-
> From: Leland, Rob [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 9:27 AM
> To: '[EMAIL PROTECTED]'
> Subject: Re: java report article says "bye-bye struts"
> 
> 
> "Ritter, Steve" wrote:
> > Craig, if you read this thread it might not be a bad idea 
> to send a quick
> email to the editor's of Java Report and let them know about 
> some of the
> mis-leading statements. 
> 
> 
> Maybe you could also share with the editor what you view as
> mis-leading statements ?
> 
> -Rob
> 
> Robert Leland ([EMAIL PROTECTED])  1611 North Kent Street
> Senior Software Engineer  Suite 600
> Solers Arlington, VA 22201
> Voice: +01-703-248-6026  Fax: +01-703 908-9353
> 



RE: java report article says "bye-bye struts"

2001-06-18 Thread Ritter, Steve

Hi Hal, yeah I read the same article and couldn't help but laugh.  Prashant really 
made some outlandish comments and hopefully those comments will diminish any negative 
impact his article might have on Struts (or, the adoption of Struts I should say).  

Craig, if you read this thread it might not be a bad idea to send a quick email to the 
editor's of Java Report and let them know about some of the mis-leading statements.  
Sounds like their review board needs a little re-org.

--Steve

> -Original Message-
> From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 7:52 AM
> To: 'Struts List'
> Subject: java report article says "bye-bye struts"
> 
> 
> Clearly there are too many java magazines and they will 
> publish anything. In
> the July issue of Java Report there is an article titled 
> "Writing a Reusable
> Implementation of the MVC Design Pattern" by Prashant Sarode 
> from Brience.
> It's interesting because it has a section title of "Bye-Bye 
> Struts". The
> section starts out as follows:
> 
> "While the Struts framework is a powerful idea, it is not yet 
> a product.
> Although excellent in dealing with Web-based applications, 
> Struts is not
> ready to take on EJB."
> 
> There are other gems in the article but I won't reproduce 
> them all here.
> 
> The premise of the article is that the author went looking for an MVC
> framework. He found the Blueprint document and liked that but 
> it was too
> complicated. He then found Struts but apparently it didn't 
> meet his need for
> "a reusable implementation of the MVC pattern." Prashant must 
> be a hard man
> to please. I think he wants one framework that can be used 
> for both web
> applications and desktop applications. Personally I would 
> rather share the
> model components and let my MVC framworks be a little less 
> abstract and more
> useful to the task at hand.
> 
> I couldn't find the article on-line. I just skimmed the rest 
> of the article
> because it it was hard to concentrate or take it seriously 
> after the Bye-Bye
> Struts section.
> 
> Hal
> 



RE: WebSphere, Jasper and Struts 1.0b3

2001-06-13 Thread Ritter, Steve

Hi John, 

This problem has been discussed many times in this mailgroup, you aren't alone!  I 
guess there are quite a few servlet engines that are using an old version of Jasper.  
You might want to check the mailgroup archives, here is a link to a thread that 
discusses alternatives -- and a link to the bugzilla entry for this (within struts):


http://www.mail-archive.com/struts-user@jakarta.apache.org/msg08663.html
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

I think severl people have been successfull in getting their containers to use newer 
versions of Jasper without help from their vendor.

--Steve

> -Original Message-
> From: Brugge, John [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 13, 2001 9:00 AM
> To: '[EMAIL PROTECTED]'
> Subject: WebSphere, Jasper and Struts 1.0b3
> 
> 
> We're trying to deploy our Struts application to WebSphere 
> 3.5.4, and are
> running into problems with what appears to be an outdated 
> version of Jasper
> shipping with WebSphere. I'm wondering if others have seen 
> similar problems.
> 
> [Note: we've been doing development using Tomcat 3.2.1, with 
> no problems.]
> 
> The first problem came when we tried deploying the app on 
> WebSphere 3.5.3
> (NT) with the Struts 1.0b2 release. We got the following stack trace
> (snippet included) that I traced to an old version of the 
> PageContextImpl
> class
> 
> java.lang.IllegalArgumentException: cant remove Attributes 
> from request
> scope 
>   at java.lang.RuntimeException.(RuntimeException.java:49) 
>   at
> java.lang.IllegalArgumentException.IllegalArgumentException.java:45) 
>   at
> org.apache.jasper.runtime.PageContextImpl.removeAttribute(Page
> ContextImpl.ja
> va:236) 
>   at 
> org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:591) 
> 
> A change in the Struts FormTag that was just introduced with 
> b2 makes the
> removeAttribute(Constants.BEAN_KEY, 
> PageContext.REQUEST_SCOPE) call, a call
> which should be legal for Jasper. The Jakarta CVS log for
> org.apache.jasper.runtime.PageContextImpl shows that the bug 
> above was fixed
> w/ v1.13.2.3 last November, and included in Tomcat 3.2.1 but 
> apparently
> completely ignored by IBM. The only reasonable(?) short term 
> remedy we see
> is to back off to Struts 1.0b1 until IBM gets its act 
> together. We applied
> the WebSphere 3.5.4 patch and found it still has the bug.
> 
> The second problem came once we'd recompiled with the Struts 1.0b1
> libraries, and redeployed to WebSphere. This time our home 
> page came up
> successfully (a JSP, invoked through an Action and doing 
> database I/O), but
> the next page threw another Jasper exception:
> org.apache.jasper.JasperException: Unable to compile class for JSP
> "/WEB-INF/jsp/searchShipments.jsp"
> C:\WebSphere\AppServer\temp\default_host\SHIPS_Web\WEB_2D_INF\
> jsp\_searchShi
> pments_jsp_0.java:21: Branch is too large, Internal 
> restriction. public
> class _searchShipments_jsp_0 extends HttpJspBase { ^ 1 error 
>   at javax.servlet.ServletException.(ServletException.java:107) 
>   at org.apache.jasper.JasperException.(JasperException.java:73) 
>   at 
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:298) 
>   at 
> org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:943)
> 
> 
> Once again, I don't know for sure which version of Jasper IBM 
> is using, but
> from looking at the Jakarta CVS logs again, there's indirect 
> evidence that
> the code is pretty old, since JspServlet (last line of the 
> stack trace) was
> moved from the runtime package to a 'servlet' package back in 
> June, 2000. 
> 
> This error is tougher to track, since WebSphere doesn't 
> appear to be saving
> the java file for the JSP to disk, so I can't look at the 
> actual generated
> code (if anyone knows a WebSphere setting that tells it to 
> save these .java
> files, I'd appreciate it!)
> 
> I can't see anything on the upcoming WebSphere 4.0 release 
> that lists bugs
> fixed/changes incorporated, and our release date is going to 
> come sooner
> than the internal operations group is going to be comfortable 
> moving to 4.0.
> Any suggestions or insights into the problem appreciated! 
> (except "Just run
> Tomcat!" We've tried that one, believe me...)
> 
> Thanks,
> John
> 



RE: can't remove attributes from servlet

2001-06-13 Thread Ritter, Steve

Hi Tom,

Read this included thread and follow the links identified.  I am pretty sure that it 
covers your problem and potential fixes.  It reads best if you start with the bottom 
and then read the top.  To summarize, this is a known bug with VAJ and it has to do 
with the version of Jasper they are using.  Jasper is a set of JSP classes produced by 
Apache, lots of servlet engines use the Jasper package but there are known bugs with 
the older versions of it.  This is one of them.  Your two solutions are as follows:

1. Edit org.apache.struts.taglib.html.FormTag.doEndTag() as described (note, there are 
2 "FormTag" classes in Struts.  One in taglib and one in taglib.html, I had to edit 
the one in taglib.html). Recompile struts.

Or 

2. Preferrably get your servlet engine to use the newer version of Jasper (the one you 
need to get is included with the Tomcat 3.2.2 distribution).  I think there are 
actually instructions on how to do this with your servlet engine in the mail archives 
for struts-user.
 
--Steve

--- BEGIN INCLUDED 

Hi Steve,

Try editing org.apache.struts.taglib.FormTag.doEndTag as follows : 

 
// Remove the page scope attributes we created
pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

Jon.

-Original Message-----
From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
Sent: 05 June 2001 20:03
To: '[EMAIL PROTECTED]'
Subject: Need help with "Can't remove attributes from request scope" probl
em.

Hi everyone,

We ran into a problem running b2/b3 on Servletmill that others seem to have
hit with WTE.  It occurs when trying to access the login page from
struts-example, you get an IllegalArgumentException with message "Can't
remove attributes from request scope".  It seems this thread discusses a
potential HACK to "fix" the issue.

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

The top-most posting in this thread indicates bugzilla id 932 which I
checked into:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

So, according to Craig the bug is really in the servlet container and it
would seem that my servlet container has the very same prolem.  What is
suggested work around for this?  Can someone help me with some more details
in the event that I need to speak with my container vendor?

--Steve


 END INCLUDED 

> -Original Message-
> From: Van-Landeghem Tom [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 13, 2001 7:08 AM
> To: '[EMAIL PROTECTED]'
> Subject: can't remove attributes from servlet
> 
> 
> Hi,
>  
> Today is my first day I try to play with Struts using Visual 
> Age V3.5.3.
> I try settingup and running the EmployeeList example 
> application from IBM in
> the WTE of VAJ.
> I get the following exception when I try to run the application :
> can't remove attributes from servlet
> which seems to be thrown by the Formtag.doEndTag()
> anybody has any ideas ?
>  
> Tom
> 



RE: Putting it all together, help???

2001-06-12 Thread Ritter, Steve

Hi Mike, I hope the following isn't too basic for you! 
 
With the Struts implementation of the MVC pattern (really Model-2) the View (JSP) gets 
access to all the data it needs by accessing objects stored in the session context.  
So, if the Action class wants to make data available to the JSP, it needs to first 
store that data in the session context.  Now, for the JSP to access it (or a custom 
tag) all you need to know is the key under which the data was stored.
 
It is possible to store EJB references directly in the session context however this 
would mean that the JSP/Tag would be using remote calls to get the data.  This is not 
really the best use of network resources so it is better for the Action class to put 
simple JavaBean value classes into the session context.  This might mean some amount 
of copying data, but that should be minimal.  If you follow this approach it might be 
best if the SessionBean that the Action is using (you're not talking to EntityBeans 
directly are you?) only return simple JavaBeans (as opposed to EJB's) to represent the 
data.
 
Make sense?
 
--Steve

-Original Message-
From: Mike Thompson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 1:20 PM
To: [EMAIL PROTECTED]
Subject: Re: Putting it all together, help???


/
Another point about your example above is that you are essentially going 
to need some kind of object to hold your result data. Either you have all 
fixed fields or some variable ones. So this is all a form requires you 
to have. The struts taglibs make accessing this data in a relatively 
uncluttered way very easy. They also obviate the need for you to write 
your own taglib to encapsulate all the necessary java, or to have 
unmaintainable scriptlets all over your jsps. 
//
 
Yes, I've already got a fairly extensive EJB backend, my only question was that I 
won't be populating a form and since Struts is not a servlet engine, how does the HTML 
get generated for my example.
 
In my actions perform method, I query some session EJBs for some data and would like 
to display it in a table.  Supposing I can get an iterator or collection of some sort, 
how could I forward that to a jsp page so It could use the Struts tag lib tags for 
iteration and display?
--m
 
P.S.
Thanks.




RE: Struts Questions

2001-06-12 Thread Ritter, Steve

Actually George, I think you and Chris both have the right idea.

You are correct in stating that using a SessionBean interface to you appserver is best 
-- the only issue that remains is what datatypes will the SessionBean return?  

IMHO, you should avoid the default "pass-by-reference" model supported by EJB and 
rather use a "pass-by-value" model.  You really want to avoid returning EntityBean 
references to the Action class, you would rather return "value" classes.  Some EJB 
containers support pass-by-value out of the box, others require that you create your 
own value classes by hand (a value class is simply a class that has all the data local 
to the class, calls to the getters are not remote calls).  The implementaion of the 
SessionBean ("server side") would be responsible for copying data from the EntityBean 
into the ValueBean.

Just like you SessionBeans are facades providing a specific view into the business 
logic provided by your application server, your value classes are really going to be 
facades (Facade Pattern, Gamma et al).  The reason for this is that it is likely that 
what you want to display on your web page is a combination of attributes from several 
EntityBeans.  I have found that is easier to model your value objects based on what 
pages they will be used by and only include the data needed to keep them as small as 
possible.  This does not mean that a particular ValueBean won't be used by multiple 
pages, its just a loose rule of thumb that I use.

What do you guys all think of this?

--Steve


> -Original Message-
> From: George, Carl [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 10:34 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Struts Questions
> 
> 
> I think there is a better way, we just call the ejb from the 
> action servlet
> and fill in the appropriate data.  The best architect for 
> entity beans is to
> have session beans in front of them anyway, so any methods 
> you need you put
> in a session bean, and call with the appropriate fields.
> 
> -Original Message-
> From: Assenza, Chris [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 1:27 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Struts Questions
> 
> 
> We are doing so right now - all we had to do was create an 
> additional class
> that has all the getters/setters of the ActionForm for a 
> particular screen
> or set of screens.  Then call all the sets from the Action 
> and pass the
> object along to the EJB. That's it. :) No tangible 
> performance loss/gain.
> 
> (BTW, any better ways of doing this for future reference?) :)
> 
> Chris
> 
> -Original Message-
> From: George, Carl [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 1:14 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Struts Questions
> 
> 
> Yes, I've done this.  Difficult is a relative term.  If you 
> know ejb and you
> know struts, no it's not difficult.  
> 
> -Original Message-
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 11:42 AM
> To: [EMAIL PROTECTED]
> Subject: Struts Questions
> 
> 
> Has anyone implemented Struts with EJBs for business logic.  
> If so, was it
> difficult?  Also, does anyone know of any performance 
> statistics for Struts?
>  
> Thanks,
>  
> Matt
> 



RE: Struts Questions

2001-06-12 Thread Ritter, Steve

Hi Matt, 
 
I am now working on my second project where we are using Struts in conjunction with 
EJBs.  Suffice it to say that Struts is awesome.  Your performance question is a bit 
loaded since there are many different pieces but from what I can tell, there do not 
seem to be any issues with Struts performance.  Any overhead that it might have is 
greatly out-weighed by all the benefits it provides.
 
The design point that will have the greatest impact on your performance will 
undoubtedly be how you implement the interface between Struts and your EJB Container. 
 
--Steve
 
 -Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 8:42 AM
To: [EMAIL PROTECTED]
Subject: Struts Questions



Has anyone implemented Struts with EJBs for business logic.  If so, was it difficult?  
Also, does anyone know of any performance statistics for Struts?
 
Thanks,
 
Matt




RE: Where can I get the latest version of Jasper?

2001-06-11 Thread Ritter, Steve

Thanks again for the help Craig.

My container vendor is asking me which version of Jasper (tomcat) they should use.  
Currently they are using 3.1.x -- what would you reccomend as a good version that 
contains the Jasper fix to get around the pageContext.removeAttribute() problem?

--Steve

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 09, 2001 4:17 PM
> To: '[EMAIL PROTECTED]'
> Subject: Re: Where can I get the latest version of Jasper?
> 
> 
> 
> 
> On Wed, 6 Jun 2001, Ritter, Steve wrote:
> 
> > Does anyone know how I get the latest version of Jasper?  
> Do I have to
> > download Tomcat and if so which version?
> > 
> > Thanks in advance!!!
> > 
> > --Steve
> > 
> 
> Jasper is not packaged separately from Tomcat -- you'll need 
> to get Tomcat
> if you want it.
> 
> Craig
> 
> 



Can someone figure out this FormTag error?

2001-06-07 Thread Ritter, Steve

Hey Everyone, I am simply trying to get the struts-example working with my servlet 
engine.  I can successfully navigate to the login page.  However, if I enter a 
user/pass combo (valid or not) my web server responds with a 404.  I also get this 
error in my log file:

[06/07/2001 08:17:55:795|20416] (ERROR) request_handler: Servlet Error: 
ClassNotFoundException: logon

Now, I have not modified the struts-config.xml file:


  



  








So this should all work right?  Any clues as to what's wrong?

By the way, I had to modify org.apache.struts.taglib.html.FormTag.doEndTag() to get 
around the "can't remove attributes from request scope" issue.

Thanks for any help.

--Steve



ClassNotFound Exception in struts-example (b3)???

2001-06-06 Thread Ritter, Steve

Hello, I've got struts-b3 installed here and we were stepping through the 
struts-example.  A problem arises when I click on the "submit" button in logon.jsp -- 
I get a ClassNotFound exception:

[06/06/2001 16:12:39:511|17000] (ERROR) request_handler: Servlet Error: 
ClassNotFoundException: logon

I used the correct username password ("user", "pass") so I would have expected to get 
forwarded to mainMenu.jsp via the "success" foward mapping.  Any ideas what might be 
wrong?

--Steve



Where can I get the latest version of Jasper?

2001-06-06 Thread Ritter, Steve

Does anyone know how I get the latest version of Jasper?  Do I have to download Tomcat 
and if so which version?

Thanks in advance!!!

--Steve



RE: Need help with "Can't remove attributes from request scope" p robl em.

2001-06-06 Thread Ritter, Steve

Hi Jon, where can I get the correct version of Jasper?  I checked the Jakarta site but 
I don't see Jasper identified on its own.  Do I have to pull it out of Tomcat?  If so, 
which release?

--Steve

> -Original Message-
> From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 06, 2001 9:10 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Need help with "Can't remove attributes from 
> request scope"
> p robl em.
> 
> 
> Hi Steve,
> 
> It has been suggested on this group before that updating 
> Jasper is a more
> elegant solution to this problem. So yes you might want to 
> try this. As to
> the stack trace; it confirms that the error occurs in 
> FormTag.doEngTag. Are
> you sure you are picking up the edited class? You might want 
> to add some
> debug to doEndTag.
> 
> Jon.
> 
> -Original Message-
> From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
> Sent: 06 June 2001 16:40
> To: '[EMAIL PROTECTED]'
> Subject: RE: Need help with "Can't remove attributes from 
> request scope" p
> robl em.
> 
> Sure Jon, here is an excerpt from my servlet container log 
> file -- I turned
> the verbocity way up and I'll give you all the context I can 
> (a wide mail
> reader window works well here :) :
> 
> [06/06/2001 08:34:48 PDT] worker1::jsp: ServletPath: /registration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: PathInfo: null
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: RealPath:
> /u/sritter/powertier654/servletmill/contexts/struts-example/re
> gistration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: RequestURI:
> /struts-example/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: QueryString: action=Create
> [06/06/2001 08:34:48 PDT] worker1::jsp: Request Params:
> [06/06/2001 08:34:48 PDT] worker1::jsp:  action = Create
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.tomcat.jsp_classpath
> [06/06/2001 08:34:48 PDT] worker1:jsp: Classpath according to the init
> parameter is:
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1:jsp: Class name is:
> _0002fregistration_0002ejspregistration_jsp_0
> [06/06/2001 08:34:48 PDT] worker1:getSession: session/sessionId
> null//struts-example.aak5b9008.1.3f8ec637463bb2c0
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MAPPINGS
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.FORM_BEANS
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.SERVLET_MAPPING
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:ServletException was 
> caught: cant remove
> Attributes from request scope
> [06/06/2001 08:34:49 PDT] worker1:Dumping response headers
> [06/06/2001 08:34:49 PDT] worker1:Dumping cookies
> [06/06/2001 08:34:49 PDT] java.lang.IllegalArgumentException: 
> cant remove
> Attributes from request scope
> at
> org.apache.jasper.runtime.PageContextImpl.removeAttribute(Page
> ContextImpl.ja
> va, Compiled Code)
> at 
> org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java,
> Compiled Code)
> at
> _0002fregistration_0002ejspregistration_jsp_0._jspService(_000
> 2fregistration
> _0002ejspregistration_jsp_0.java, Compiled Code)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java,
> Compiled Code)
> at 
> javax.ser

RE: Need help with "Can't remove attributes from request scope" p robl em.

2001-06-06 Thread Ritter, Steve

Yeah I am sure, but notice that there are 2 FormTag classes, one directly in the 
taglib package and one in org.apache.struts.taglib.html.FormTag so we have:

org.apache.struts.taglib.FormTag
org.apache.struts.taglib.html.FormTag

so I changed both.  I also decompiled the only versions of these .class files on my 
servlet engine's path and found my mods.  So I am pretty sure the changes are being 
picked up.  I'll look into updating jasper.

--Steve

> -Original Message-
> From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 06, 2001 9:10 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Need help with "Can't remove attributes from 
> request scope"
> p robl em.
> 
> 
> Hi Steve,
> 
> It has been suggested on this group before that updating 
> Jasper is a more
> elegant solution to this problem. So yes you might want to 
> try this. As to
> the stack trace; it confirms that the error occurs in 
> FormTag.doEngTag. Are
> you sure you are picking up the edited class? You might want 
> to add some
> debug to doEndTag.
> 
> Jon.
> 
> -Original Message-
> From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
> Sent: 06 June 2001 16:40
> To: '[EMAIL PROTECTED]'
> Subject: RE: Need help with "Can't remove attributes from 
> request scope" p
> robl em.
> 
> Sure Jon, here is an excerpt from my servlet container log 
> file -- I turned
> the verbocity way up and I'll give you all the context I can 
> (a wide mail
> reader window works well here :) :
> 
> [06/06/2001 08:34:48 PDT] worker1::jsp: ServletPath: /registration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: PathInfo: null
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: RealPath:
> /u/sritter/powertier654/servletmill/contexts/struts-example/re
> gistration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: RequestURI:
> /struts-example/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1::jsp: QueryString: action=Create
> [06/06/2001 08:34:48 PDT] worker1::jsp: Request Params:
> [06/06/2001 08:34:48 PDT] worker1::jsp:  action = Create
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.tomcat.jsp_classpath
> [06/06/2001 08:34:48 PDT] worker1:jsp: Classpath according to the init
> parameter is:
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
> :/registration.jsp
> [06/06/2001 08:34:48 PDT] worker1:jsp: Class name is:
> _0002fregistration_0002ejspregistration_jsp_0
> [06/06/2001 08:34:48 PDT] worker1:getSession: session/sessionId
> null//struts-example.aak5b9008.1.3f8ec637463bb2c0
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MAPPINGS
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.FORM_BEANS
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.SERVLET_MAPPING
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
> org.apache.struts.action.MESSAGE
> [06/06/2001 08:34:49 PDT] worker1:ServletException was 
> caught: cant remove
> Attributes from request scope
> [06/06/2001 08:34:49 PDT] worker1:Dumping response headers
> [06/06/2001 08:34:49 PDT] worker1:Dumping cookies
> [06/06/2001 08:34:49 PDT] java.lang.IllegalArgumentException: 
> cant remove
> Attributes from request scope
> at
> org.apache.jasper.runtime.PageContextImpl.removeAttribute(Page
> ContextImpl.ja
> va, Compiled Code)
> at 
> org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java,
> Compiled Code)
> at
> _0002fregistration_0002ejspregistration_jsp_

RE: Need help with "Can't remove attributes from request scope" p robl em.

2001-06-06 Thread Ritter, Steve

Sure Jon, here is an excerpt from my servlet container log file -- I turned the 
verbocity way up and I'll give you all the context I can (a wide mail reader window 
works well here :) :

[06/06/2001 08:34:48 PDT] worker1::jsp: ServletPath: /registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: PathInfo: null
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: RealPath: 
/u/sritter/powertier654/servletmill/contexts/struts-example/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: RequestURI: /struts-example/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: QueryString: action=Create
[06/06/2001 08:34:48 PDT] worker1::jsp: Request Params:
[06/06/2001 08:34:48 PDT] worker1::jsp:  action = Create
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.tomcat.jsp_classpath
[06/06/2001 08:34:48 PDT] worker1:jsp: Classpath according to the init parameter is:
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:jsp: Class name is: 
_0002fregistration_0002ejspregistration_jsp_0
[06/06/2001 08:34:48 PDT] worker1:getSession: session/sessionId  
null//struts-example.aak5b9008.1.3f8ec637463bb2c0
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = 
org.apache.struts.action.MAPPINGS
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = 
org.apache.struts.action.FORM_BEANS
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = 
org.apache.struts.action.SERVLET_MAPPING
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:ServletException was caught: cant remove Attributes 
from request scope
[06/06/2001 08:34:49 PDT] worker1:Dumping response headers
[06/06/2001 08:34:49 PDT] worker1:Dumping cookies
[06/06/2001 08:34:49 PDT] java.lang.IllegalArgumentException: cant remove Attributes 
from request scope
at 
org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.java, 
Compiled Code)
at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java, Compiled Code)
at 
_0002fregistration_0002ejspregistration_jsp_0._jspService(_0002fregistration_0002ejspregistration_jsp_0.java,
 Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled 
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java, 
Compiled Code)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java, 
Compiled Code)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at com.tenbasej.jmill.JMillConnection.run(JMillConnection.java, Compiled Code)
at com.tenbasej.jmill.JMillConnection.run(JMillConnection.java, Compiled Code)
at com.tenbasej.jmill.JMillThreadPool$WorkerThread.run(JMillThreadPool.java, 
Compiled Code)
[06/06/2001 08:34:49 PDT] worker2:Dumping response headers
[06/06/2001 08:34:49 PDT] worker2:Dumping cookies


Let me know if this helps.  Atleast I know my container is using Jasper!  I suppose I 
could look into updating my version of Jasper?

--Steve


> -Original Message-
> From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 06, 2001 8:05 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Need help with "Can't remove attributes from 
> request scope"
> p robl em.
> 
> 
> Hi Steve,
> 
> Do you have a stack trace for the error? It will tell us 
> which Struts class
> the exception is being thrown from, we can then figure out 
> how to solve it
> for your container.
> 
> Jon.
> 
> -Original Message-
> From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
> Sent: 06 June 2001 15:28

RE: Need help with "Can't remove attributes from request scope" p robl em.

2001-06-06 Thread Ritter, Steve

Hi Jon, 

Thanks for the reply, I tried the recommended change to the source code and still I 
get the same error.

I've sent an email to my vendor's support group, in lieu of that is there anything 
else you would suggest?

--Steve

> -Original Message-
> From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 06, 2001 2:10 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Need help with "Can't remove attributes from 
> request scope"
> p robl em.
> 
> 
> Hi Steve,
> 
> Try editing org.apache.struts.taglib.FormTag.doEndTag as follows : 
> 
>  
> // Remove the page scope attributes we created
> pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
> pageContext.getRequest().removeAttribute(Constants.FORM_KEY);
> 
> Jon.
> 
> -Original Message-
> From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
> Sent: 05 June 2001 20:03
> To: '[EMAIL PROTECTED]'
> Subject: Need help with "Can't remove attributes from request 
> scope" probl
> em.
> 
> Hi everyone,
> 
> We ran into a problem running b2/b3 on Servletmill that 
> others seem to have
> hit with WTE.  It occurs when trying to access the login page from
> struts-example, you get an IllegalArgumentException with 
> message "Can't
> remove attributes from request scope".  It seems this thread 
> discusses a
> potential HACK to "fix" the issue.
> 
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
08663.html

The top-most posting in this thread indicates bugzilla id 932 which I
checked into:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

So, according to Craig the bug is really in the servlet container and it
would seem that my servlet container has the very same prolem.  What is
suggested work around for this?  Can someone help me with some more details
in the event that I need to speak with my container vendor?

--Steve



Need help with "Can't remove attributes from request scope" problem.

2001-06-05 Thread Ritter, Steve

Hi everyone,

We ran into a problem running b2/b3 on Servletmill that others seem to have hit with 
WTE.  It occurs when trying to access the login page from struts-example, you get an 
IllegalArgumentException with message "Can't remove attributes from request scope".  
It seems this thread discusses a potential HACK to "fix" the issue.

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

The top-most posting in this thread indicates bugzilla id 932 which I checked into:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

So, according to Craig the bug is really in the servlet container and it would seem 
that my servlet container has the very same prolem.  What is suggested work around for 
this?  Can someone help me with some more details in the event that I need to speak 
with my container vendor?

--Steve



RE: Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

Thanks Ted, I will take it from here.  Once I get my project-specific sample put 
together I'll look into it some more if its still a problem.

--Steve

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 2:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Is struts-documentation really *required*?
> 
> 
> There's one other thread in the archive that references Servletmill. 
> 
> <
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
> 05794.html
> >
> 
> <
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
> 05796.html
> >
> 
> You might see if the original author is also having similar 
> problems, or
> found a fix.
> 
> Usually, you can just pick any old WAR and deploy it. No 
> worries, mate.
> 
> There's no good reason why one WebApp should affect another (and every
> reason why it should not).
> 
> Some vendors have started to use Struts as a compatibility 
> test, so you
> should be sure to check with PowerTier too.
> 
> "Ritter, Steve" wrote:
> > 
> > Here are the results of trying to install the struts sample 
> webapps without first deploying struts-documentation.war for 
> Servletmill.
> > 
> > Webapp  Works w/o doc
> > =
> > struts-blank.warNO
> > struts-example.war  NO
> > struts-template.war YES
> > struts-exercise-taglib.war  NO
> > struts-upload.war   NO
> > 
> > --Steve
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
> 



RE: Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

Here are the results of trying to install the struts sample webapps without first 
deploying struts-documentation.war for Servletmill.


Webapp  Works w/o doc
=
struts-blank.warNO
struts-example.war  NO
struts-template.war YES
struts-exercise-taglib.war  NO
struts-upload.war   NO

--Steve


> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Is struts-documentation really *required*?
> 
> 
> Are you able to deploy the other Struts WARs. 
> 
> There have been issues in getting the example to run with some
> containers that are not 100% compliant with the specification.
> 
> < http://jakarta.apache.org/struts/installation.html >
> 
> 
> "Ritter, Steve" wrote:
> > 
> > Ok, good.  The error I am getting is as follows:
> > 
> > 
> > 
> > Exception in thread "main_worker" 
> java.lang.IllegalAccessError: try to access class 
> org/apache/struts/action/AddDataSourceRule from class 
> org/apache/struts/action/ActionServlet
> > at 
> com.tenbasej.jmill.JMillServletManager.load_init(JMillServletManager.
> > java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager._myLoadServlet(JMillServletMan
> > ager.java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager.loadServlet(JMillServletManage
> > r.java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager.loadStartupServlets(JMillServl
> > etManager.java, Compiled Code)
> > at 
> com.tenbasej.jmill.JMillServletManager.init(JMillServletManager.java,
> >  Compiled Code)
> > at com.tenbasej.jmill.JMill.start(JMill.java, Compiled Code)
> > at com.tenbasej.jmill.JMill.main(JMill.java, Compiled Code)
> > 
> > 
> > 
> > Again, I am getting this when I try to start my servlet 
> container and the above exception causes the container to terminate.
> > 
> > I just verified the same behaviour with beta3.
> 



RE: Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

Ok, good.  The error I am getting is as follows:



Exception in thread "main_worker" java.lang.IllegalAccessError: try to access class 
org/apache/struts/action/AddDataSourceRule from class 
org/apache/struts/action/ActionServlet
at com.tenbasej.jmill.JMillServletManager.load_init(JMillServletManager.
java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager._myLoadServlet(JMillServletMan
ager.java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager.loadServlet(JMillServletManage
r.java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager.loadStartupServlets(JMillServl
etManager.java, Compiled Code)
at com.tenbasej.jmill.JMillServletManager.init(JMillServletManager.java,
 Compiled Code)
at com.tenbasej.jmill.JMill.start(JMill.java, Compiled Code)
at com.tenbasej.jmill.JMill.main(JMill.java, Compiled Code)



Again, I am getting this when I try to start my servlet container and the above 
exception causes the container to terminate.

I just verified the same behaviour with beta3.

--Steve

> -Original Message-
> From: Dan Miser [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 1:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Is struts-documentation really *required*?
> 
> 
> No, it's not required at all. What kind of error are you getting?
> --
> Dan Miser
> http://www.distribucon.com
> 
> 
> >From: "Ritter, Steve" <[EMAIL PROTECTED]>
> >
> >I found that I could not successfully deploy 
> struts-example.war without 
> >first deploying struts-documentation.war.  Does this sound 
> right or is it 
> >maybe something specific to my servlet container (Servletmill from 
> >PowerTier)?
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 



Is struts-documentation really *required*?

2001-06-04 Thread Ritter, Steve

I found that I could not successfully deploy struts-example.war without first 
deploying struts-documentation.war.  Does this sound right or is it maybe something 
specific to my servlet container (Servletmill from PowerTier)?

--Steve



RE: How do I contribute?

2001-06-04 Thread Ritter, Steve

Thanks Ted, I will simply collect the information and email it to you.  It will be of 
the nature "install hints for PowerTier..." that's it. Pretty simpl stuff but it can 
really help new users.

Love what you guys are doing, thanks for all the effort.

--Steve


> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 9:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How do I contribute?
> 
> 
> If you have a link, you can post it to the User list. 
> 
> Or if you want to send it to me, I can put it on my Struts page. 
> 
> Depending on the nature of the material, we could then 
> consider whether
> to add it to the Users Guide. 
> 
> "Ritter, Steve" wrote:
> > 
> > Hello, I would like to contribute some information on using 
> Struts with Persistence PowerTier (Apache/Servletmill).  
> What's the best way to do this?
> > 
> > --Steve
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
> 



How do I contribute?

2001-06-04 Thread Ritter, Steve

Hello, I would like to contribute some information on using Struts with Persistence 
PowerTier (Apache/Servletmill).  What's the best way to do this?

--Steve