help! confused over forms and errors and oooh, other stuff :-)

2001-02-20 Thread Ned Seagoon

Hi Guys,

I wonder if you could help me out a little please? I am in the middle of 
developing a proof of concept app with struts. If this comes off the company 
could migrate away from a proprietary framework to struts, which I am in 
favour of.

I seem to have confused myself over an issue regarding validation and forms. 
I’ll give a simplified workflow as an example.

We have for all intents and purposes a generated product overview page along 
these lines:

*Wooden Throat Mallet59.95 buy
*Leather Uncle Frightener12.60 buy
*Vandal-Proof Toupee 99.99 buy

Which is generated from struts tags. The buys are links to a pages which 
look something like ‘buyit.do?itemid=50’. The buyit.do action has registered 
a form in request scope. During processing, it looks up the full details of 
the itemid and places the resulting bean in request scope. It then creates 
the form object, populates it with some default information and sets this in 
the request too before forwarding onto buypage.jsp

This displays the details of the item, and contains a form for entering, 
say, credit card details:

*Item: Vandal-Proof Toupee
*Manufacturer: Lockheed-Martin Advanced Hairpiece Research
*Price: 99.99
*Additional Information: Also Invisible to Radar
*
* Inside Leg Measurement: _
* Credit Card Number: 
* BUY {forwards onto checkout.do}

Which is all fine and dandy and displays correctly. Though what happens if 
the form validate fails? If checkout.do has an ‘input’ attribute which is 
buypage.jsp then this will fail because the item details are stored on the 
request has not been set up (it was done in ‘buyit.do’). I could of course 
set the item details on the session, but if the user opened new browser 
windows for the ‘buyit’ link, then the session level object will be 
overwritten.

If have looked into placing the details object onto the form bean as it is 
populated, but will that property be preserved across a validate failing? 
And how do I get at the properties of the form bean outside of the 
hmtl:xxx tags?

Help !

Regards
Ned



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




How does Struts compare to Barracuda?

2001-02-20 Thread Johan Compagner

Here is the link:
http://barracuda.enhydra.org/Barracuda/

Can we learn something from it?
Is it better or worse?

Johan





Re: AW: Struts on IPlanet

2001-02-20 Thread Ted Husted

Oliver, 

For the installation page, I just entered for iPlanet Application Server
6.0

Service Pack 2 is recommended.

NOTE: At present, the Struts example application still uses a
non-Serializable servlet context attribute, and will not run in an
environment that requires them, like iPlanet Application Server.

For iPlanet Web Server 4.2 I added Stanley Santiago's notes from


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


Is this sufficient?

Should we include your workaround(s) for Service Pack 1?

Are these them? 


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



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





[EMAIL PROTECTED] wrote:
 
 Hi,
 
 no it isn't scary...it is working :-) !
 We are using IP6.0 with WS4.1 and although the manual says that SP1 is
 supporting SERVLET2.1 and JSP0.92 only  the main functions are runing (with
 a small workaround). But IP6.0 SP2 supports SERVLET2.2 and JSP1.1 as SUN
 announced. We are just installing SP2 and in a week we will see if this
 workaround isn't necessary any longer.
 
 Regards Oliver (Craig :-) ) Lauer



[Fwd: cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html ImageTag.java ImgTag.java]

2001-02-20 Thread Ted Husted

Anyone who is using the HTML Image tag should note the following.

See also 
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg00443.html


--- Original Message 

From: [EMAIL PROTECTED]
Subject: cvs commit:
jakarta-struts/src/share/org/apache/struts/taglib/html ImageTag.java
ImgTag.java
To: [EMAIL PROTECTED]

craigmcc01/02/19 18:59:00

  Modified:src/doc  struts-html.xml
   src/share/org/apache/struts/taglib/html ImageTag.java
ImgTag.java
  Log:
  Retrofit the html:image tag so that it offers the same support for
  dynamically looking up alternate text, context-relative URIs, or
source
  URLs in a message resources bundle that the html:img tag has.
  
  NOTE:  This change is *not* backwards compatible, but the changes are
very
  easy:
  * Change any use of 'src="foo" isKey="true"' to 'srcKey="foo"' instead
  * Change any use of 'path="/foo"' to 'page="/foo"' instead
  
  Revision  ChangesPath
  1.14  +144 -74   jakarta-struts/src/doc/struts-html.xml
  
  Index: struts-html.xml
  ===
  RCS file: /home/cvs/jakarta-struts/src/doc/struts-html.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- struts-html.xml   2001/02/20 01:48:44 1.13
  +++ struts-html.xml   2001/02/20 02:58:59 1.14
  @@ -1251,165 +1251,235 @@
   
   /tag
   
  -  tag 
  -  nameimage/name
  -  summary
  -Renders an input of type "image"
  -  /summary
  -  tagclassorg.apache.struts.taglib.html.ImageTag/tagclass
  -  info
  -This tag renders an input of type "image".  Use the
"src" attribute
  -in conjunction with a non-null "isKey" attribute to
retrieve a
  -property value from a resource bundle.  Use the
"path"
  -attribute to specify a direct path to the image.  See
info on
  -the "property" attribute if you would like to obtain
the coordinates
  -of the mouse click submitted with the request.
  -  /info
  -  attribute 
  -namelocale/name 
  -requiredfalse/required 
  -rtexprvaluetrue/rtexprvalue 
  -info
  -The locale to use to retrieve the key specified by
"src".
  -/info
  -  /attribute 
  -  attribute 
  -namebundle/name 
  -requiredfalse/required 
  -rtexprvaluetrue/rtexprvalue
  -info
  -The servlet context attribute key for the
MessageResources
  -instance to use.
  -/info
  -  /attribute 
  -  attribute 
  -nameaccesskey/name 
  -requiredfalse/required 
  -rtexprvaluetrue/rtexprvalue 
  -  /attribute 
  +tag 
  +nameimage/name
  +summary
  +Render an input tag of type "image"
  +/summary
  +   
tagclassorg.apache.struts.taglib.html.ImageTag/tagclass
  +info
  +
  +pRenders an HTML codelt;inputgt;/code tag of
type
  +"image".  The base URL for this image is calculated
directly
  +based on the value specified in the codesrc/code
or
  +codepage/code attributes, or indirectly by
looking up a
  +message resource string based on the
codesrcKey/code or
  +codepageKey/code attributes.  You
strongmust/strong
  +specify exactly one of these attributes./p
  +
  +pIf you would like to obtain the coordinates of the
mouse
  +click that submitted this request, see the
information below
  +on the codeproperty/code attribute./p
  +
  +/info
  +
  +attribute 
  +nameaccesskey/name 
  +requiredfalse/required 
  +rtexprvaluetrue/rtexprvalue 
  +info
  +pThe keyboard character used to move focus
immediately
  +to this element./p
  +/info
  +/attribute 
  +
  +attribute
  +namealt/name
  +requiredfalse/required
  +rtexprvaluetrue/rtexprvalue
  +info
  +pThe alternate text for this image./p
  +/info
  +/attribute
  +
  +attribute
  +namealtKey/name
  +requiredfalse/required
  +rtexprvaluetrue/rtexprvalue
  +info
  +pThe message resources key of the alternate text
for this
  +image./p
  +/info
  +/attribute
  +
  +attribute 
  +namebundle/name 
  +requiredfalse/required 
  +   

AW: Re: AW: Struts on IPlanet

2001-02-20 Thread oliver . lauer



-- Original Nachricht --

Oliver,

For the installation page, I just entered for iPlanet Application Server
6.0

Service Pack 2 is recommended.

== In a week I will know if that will fix our problems concerning the Servlet2.2
incompatibility

NOTE: At present, the Struts example application still uses a
non-Serializable servlet context attribute, and will not run in an
environment that requires them, like iPlanet Application Server.

== you have to deploy the Servlet as non distributable and then
it works with SP1, too

For iPlanet Web Server 4.2 I added Stanley Santiago's notes from


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


Is this sufficient?

Should we include your workaround(s) for Service Pack 1 ?

== You have to, not especially this one, but one that fixes the
getServletPath()-Problem.

Are these them?

== Yes, it works and I like STRUTS. We did not use all the Tags yet but
it runs...


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


== This one is cheap but the most important one


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





[EMAIL PROTECTED] wrote:

 Hi,

 no it isn't scary...it is working :-) !
 We are using IP6.0 with WS4.1 and although the manual says that SP1 is
 supporting SERVLET2.1 and JSP0.92 only  the main functions are runing
(with
 a small workaround). But IP6.0 SP2 supports SERVLET2.2 and JSP1.1 as
SUN
 announced. We are just installing SP2 and in a week we will see if this
 workaround isn't necessary any longer.

 Regards Oliver (Craig :-) ) Lauer







database locks.. (OT)

2001-02-20 Thread Anand Raman

hi guys
Please bear with me..  I am facing a typical problem though not directly
related to struts.. 

I am using struts to power my web application..

I am trying to implement a multi page form and in some scenario the
application is hanging because of a database lock which is not going
away after some DML. 

I am not sure if struts has got to do anything with this. I tried out
the postgresql mailing list too with no success. 

Could any one of u suggest a way out or any guidelines. I can post the
code too if somebody can have a look at it.

Thanks a ton..
Anand



Re: How does Struts compare to Barracuda?

2001-02-20 Thread Dan Connelly




Okay, that's a good question.

Here is my instant analysis of Barracuda v. Struts. 
("Instant" and therefore probably worthless. BTW, I haven't used 
Barracuda. And my experience with Struts is confined to toy 
applications.) 

Barracuda has apparently bitten of the Event/Listener model 
asits top-priority task. Struts has deferred this design decision 
until a later release. And there certainly are a ton of more mundane 
concepts to work through.

The Event/Listener Model appears on the Struts 1.1 to-do 
list. My guess is that it will actually not make 1.1, that it will be 
delayed until 2.0 because of the massive refactoring required. Just 
guessing.

The Barracuda docs say that the Event/Listener Model is the 
crux of the matter for leveraging MVC on the Web. Yes. Yes. 
Yes. Very True, IMHO. You screw it up, you lose.

But also Very Difficult given the client-server division of 
labor in HTTP and the on-going Browser War. (Just one war, 
obviously.) 

It does seem wise to me that Struts should not make a hasty 
decision onits Event/Listener Model, but not past the point where it would 
break everything to put it in.

When I worked on MVC apps in C++/Motif, we addressed this 
issueless generally,as Update Dependencies. We 
compiledthe UD declarationsinto Mapping objects using a 
preprocessor. This seemed adequate for building lively apps and gave 
quite good performance, but Motif widgets had a much finer granularity of 
interaction in the application logic than do FormBeans.

Of course,the Swing-style Event/Listener Model is much 
morerun-time oriented in its approachthan is a UD 
preprocessor. Java favors late binding. C++ favors early 
binding. It is a continuum. Each Framework needs to pick its 
spot on this continuum regardless of its implementation language.

My guess, and it is just a guess, is that Struts will end up 
with some flavor of static UDs in thestruts-config.xml, and that will be 
about the best you can do for HTTP Web apps. 

Barracuda will have to stick its hands very deeply into the 
DHTML mud to map the client-side events out to server-side objects. This 
is a mess. Once Barracuda is stuck there, then it falls victim tothe 
"real" barracudas (the proprietary vendor interests) . 

If you need something very dynamic,very programmatic in 
your application'sEvent/Listener Model, then you need a different protocol 
than HTTP over the wire. Period. IMHO. Surely X-style 
"GUI Servers" will become part of the Web in due time. Same goes for 
Critrix-style "Terminal Servers". (Were it not for firewalls, this 
would already be true.) And if that doesn't happen, then look who's 
betting on SOAP(nee XML-RPC) to put events (as RPCs) on the 
wire.Clever marketing can easily morphSOAPinto an 
Event/Listener Model on its own, eventually escaping HTTP 
altogether. 

Struts is wise to avoid this fray, for now. 
But, I'll bet that others in the Struts community feel strongly just the other 
way, that early engagementwould bebest. Maybe Barracuda 
has already done succeeded in mapping client-side events. ??


Dan Connelly






- Original Message - 
From: "Johan Compagner" [EMAIL PROTECTED]
To: "Struts" [EMAIL PROTECTED]
Sent: Tuesday, February 20, 2001 7:28 AM
Subject: How does Struts compare to 
Barracuda?
 Here is the link: 
http://barracuda.enhydra.org/Barracuda/ 
 Can we learn something from it? Is it better or worse? 
 Johan  


REQUEST for Multi-part form EXAMPLE

2001-02-20 Thread Rob Leland

Does anyone have an example of a multi-part form they would like to 
donate to the struts example library ?

-Rob



Re: How does Struts compare to Barracuda?

2001-02-20 Thread Craig Tataryn


I aggree, mapping DHTML events to server side handlers would be icky, and
tough to support accross browsers. Using a more cleaner UI def like
XUL (http://www.xulplanet.com/) is probably a better idea (although there
is only one browser supporting it thus far, although I'm sure someone could
write a plugin to support it in IE).
I like your comment on the firewall preventing more of the dynamic type
webapps (see my article on XSpot http://www.us-eh.com/craiger/articles/xspot/),
it's so true.
tataryn:craig/>
Dan Connelly wrote:

Okay, that's
a good question.Here is my instant analysis
of Barracuda v. Struts. ("Instant" and therefore probably worthless.
BTW, I haven't used Barracuda. And my experience with Struts is confined
to toy applications.)Barracuda has apparently
bitten of the Event/Listener model as its top-priority task. Struts
has deferred this design decision until a later release. And
there certainly are a ton of more mundane concepts to work through.The
Event/Listener Model appears on the Struts 1.1 to-do list. My guess
is that it will actually not make 1.1, that it will be delayed until 2.0
because of the massive refactoring required. Just guessing.The
Barracuda docs say that the Event/Listener Model is the crux of the matter
for leveraging MVC on the Web. Yes. Yes. Yes. Very
True, IMHO. You screw it up, you lose.But
also Very Difficult given the client-server division of labor in HTTP and
the on-going Browser War. (Just one war, obviously.)It
does seem wise to me that Struts should not make a hasty decision on its
Event/Listener Model, but not past the point where it would break everything
to put it in.When I worked on MVC apps in C++/Motif,
we addressed this issue less generally, as Update Dependencies. We
compiled the UD declarations into Mapping objects using a preprocessor.
This seemed adequate for building lively apps and gave quite good performance,
but Motif widgets had a much finer granularity of interaction in the application
logic than do FormBeans.Of course, the Swing-style
Event/Listener Model is much more run-time oriented in its approach than
is a UD preprocessor. Java favors late binding. C++ favors
early binding. It is a continuum. Each Framework needs
to pick its spot on this continuum regardless of its implementation language.My
guess, and it is just a guess, is that Struts will end up with some flavor
of static UDs in the struts-config.xml, and that will be about the best
you can do for HTTP Web apps.Barracuda will
have to stick its hands very deeply into the DHTML mud to map the client-side
events out to server-side objects. This is a mess. Once Barracuda
is stuck there, then it falls victim to the "real" barracudas (the proprietary
vendor interests) .If you need something very
dynamic, very programmatic in your application's Event/Listener Model,
then you need a different protocol than HTTP over the wire. Period.
IMHO. Surely X-style "GUI Servers" will become part of the Web in
due time. Same goes for Critrix-style "Terminal Servers".
(Were it not for firewalls, this would already be true.) And
if that doesn't happen, then look who's betting on SOAP (nee XML-RPC) to
put events (as RPCs) on the wire. Clever marketing can easily
morph SOAP into an Event/Listener Model on its own, eventually escaping
HTTP altogether.Struts is wise to avoid this
fray, for now. But, I'll bet that others in the Struts
community feel strongly just the other way, that early engagement would
be best. Maybe Barracuda has already done succeeded in mapping
client-side events. ??Dan Connelly-
Original Message -From: "Johan Compagner" [EMAIL PROTECTED]>To:
"Struts" [EMAIL PROTECTED]>Sent:
Tuesday, February 20, 2001 7:28 AMSubject: How does
Struts compare to Barracuda?> Here is the link:
> http://barracuda.enhydra.org/Barracuda/
>
> Can we learn something from it?
> Is it better or worse?
>
> Johan
>
>

--
I've been trying to change the world for years, but they just won't
give me the source code


begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



Problem w/ Struts and VA for Java

2001-02-20 Thread Tom Miller

Struts people

I had great success using VAJ to develop Struts applications a few
months ago, but recently upgraded my Tomcat to 3.2.1 and Struts to
recent releases. I lost the ability to develop and debug my Struts
application classes within VAJ.

Craig's excellently clear message of Feb. 13th (#4566) entitled
'Classpaths and the "struts.jar" file' gave, I believe, the reason.
Craig explained that containers (esp. Tomcat 3.x and 4.x) use custom
class loaders that *must* find struts.jar and application classes in the
WEB-INF directories of the web app itself, in the file system. (See
Craig's message if you want to understand the reasons thoroughly)

VAJ is a self-contained environment and needs to be able to work with
imported source and internally generated classes. Unless there is
something that I am not understanding, it appears to me that after
Tomcat 3.x, Struts applications cannot be developed in VAJ. I'm very
aware that one can debug into classes external to VAJ, but that is far
short of being able to use all of the extremely powerful features of the
IDE.

A perhaps naive question would be whether there is any way for VAJ users
to temporarily inhibit Tomcat from employing specialized classloaders
for webapps just during development.

If anyone knows another workaround for this, I would love to hear it.
TIA
--
Tom Miller
Miller Associates, Inc.
[EMAIL PROTECTED]
641.469.3535 Phone
413.581.6326 FAX



Re: Problem w/ Struts and VA for Java

2001-02-20 Thread Ned Seagoon


Hi Tom,

I'm using VAJ 3.5.2 with Tomcat 3.2.1 with no problems at all. Here is my 
setup:

Get rid of any IBM WTE stuff
Import the servlet.jar from tomcat into it's own project
Import all the struts source and resources into its own project
Create a class in a package in another project called 'TomcatRunner' (code 
follows at the end of this mail)
right click on tomcat runner and set the properties
in properties set tomcat.home=c:\yourwebhome

on the class path page set the 'extra directories' path to be
c:\TomcatLocal\lib\webserver.jar;
c:\TomcatLocal\lib\ant.jar;
c:\TomcatLocal\lib\jasper.jar;
c:\TomcatLocal\lib\jaxp.jar;
c:\TomcatLocal\lib\parser.jar;

(or whatever your directories are)

And in the project path add the VAJ projects for the servlet API and struts, 
plus whatever your own app project is. And that should be it, you can edit 
and debug your own code and the struts source in VAJ.

Your problems will come if you try to import Tomcat into VAJ. That I have 
not managed to do sucessfully!

Hope that helps!
Ned

TomcatRunner.java:

import java.lang.reflect.*;

public class TomcatRunner {

  public TomcatRunner() {
super();
  }

  public static void main(java.lang.String[] args) {
TomcatRunner runner = new TomcatRunner();
runner.start(args, "org.apache.tomcat.startup.Tomcat");   }

  public void start(String[] args, String className) {
try {
  Class cls = Class.forName(className);
  if (cls != null) {
Method main = cls.getMethod("main",new Class[] {new 
String[]{}.getClass()});
if(main != null) {
  Object [] mainArgs = new Object [] {args};
  main.invoke(null,mainArgs);
}
  }
} catch (ClassNotFoundException e) {
  System.out.println("Unable to find the class "+className);   
System.out.println("Set properties as described in this class' javadoc.");
} catch (Exception e) {
  e.printStackTrace();
}
  }
}



From: Tom Miller [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Problem w/ Struts and VA for Java
Date: Tue, 20 Feb 2001 10:14:27 -0600

Struts people

I had great success using VAJ to develop Struts applications a few
months ago, but recently upgraded my Tomcat to 3.2.1 and Struts to
recent releases. I lost the ability to develop and debug my Struts
application classes within VAJ.

Craig's excellently clear message of Feb. 13th (#4566) entitled
'Classpaths and the "struts.jar" file' gave, I believe, the reason.
Craig explained that containers (esp. Tomcat 3.x and 4.x) use custom
class loaders that *must* find struts.jar and application classes in the
WEB-INF directories of the web app itself, in the file system. (See
Craig's message if you want to understand the reasons thoroughly)

VAJ is a self-contained environment and needs to be able to work with
imported source and internally generated classes. Unless there is
something that I am not understanding, it appears to me that after
Tomcat 3.x, Struts applications cannot be developed in VAJ. I'm very
aware that one can debug into classes external to VAJ, but that is far
short of being able to use all of the extremely powerful features of the
IDE.

A perhaps naive question would be whether there is any way for VAJ users
to temporarily inhibit Tomcat from employing specialized classloaders
for webapps just during development.

If anyone knows another workaround for this, I would love to hear it.
TIA
--
Tom Miller
Miller Associates, Inc.
[EMAIL PROTECTED]
641.469.3535 Phone
413.581.6326 FAX

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




RE: Problem: Struts under Tomcat 3.2.1

2001-02-20 Thread Christian Billen

Thanks, I actually got a more recent build from today and cleaned the
directory.  It now works properly.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Maya
Muchnik
Sent: Tuesday, February 20, 2001 11:12 AM
To: [EMAIL PROTECTED]
Subject: Re: Problem: Struts under Tomcat 3.2.1


Maybe you need to remove struts-example directory and startup Tomcat again.

Christian Billen wrote:

 Hello,

 I am trying to run the struts-example.war from the 20010216 nightly build
in
 my tomcat 3.2.1

 On initialization I can see it initializing properly (reading User from
xml
 file and all) and I can even bring the main page in the browser
 http://localhost/struts-example

 If I try to click the Register link in the example app: (which does
 http://localhost/struts-example/editRegistration.do?action=Create)

 I get a nice 500 error and a stack trace:

 Error: 500
 Location: /struts-example/editRegistration.do
 Internal Servlet Error:

 java.lang.ClassCastException: javax.servlet.ServletException
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:354)
 at

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78
 6)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:732)
 at

org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
 (Ajp12ConnectionHandler.java:166)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

 Any clue on what I could have configured wrong? my struts.jar is NOT in my
 classpath
 I have also added the "AddHandler jserv-servlet .do" to my tomcat.conf
file

 Thanks for your help,

 Christian Billen






Re: Problem: Struts under Tomcat 3.2.1

2001-02-20 Thread Craig R. McClanahan

Christian Billen wrote:

 Hello,

 I am trying to run the struts-example.war from the 20010216 nightly build in
 my tomcat 3.2.1

 On initialization I can see it initializing properly (reading User from xml
 file and all) and I can even bring the main page in the browser
 http://localhost/struts-example

 If I try to click the Register link in the example app: (which does
 http://localhost/struts-example/editRegistration.do?action=Create)

 I get a nice 500 error and a stack trace:

 Error: 500
 Location: /struts-example/editRegistration.do
 Internal Servlet Error:

 java.lang.ClassCastException: javax.servlet.ServletException

Could you double check that there is no "servlet.jar" or "jsdk.jar" file on your
class path (except for the one that the Tomcat startup script adds), or in your
system extensions directory ($JAVA_HOME/jre/lib/ext)?  This sounds like a class
versioning conflict inside of Tomcat.

If it is not this situation, please post a bug in our bug tracking system at:

http://nagoya.apache.org/bugzilla/

Craig McClanahan





how to use image maps for form submission

2001-02-20 Thread Ravindran Ramaiah

Hi,
   I need to use image maps to submit a form using struts.
Is there an equivalent for form:submit to submit a form using imagemap and
how to configure the same?
Ravi



Re: Problem: Struts under Tomcat 3.2.1

2001-02-20 Thread Maya Muchnik

Whose is the file "jsdk.jar"? Is it the new for Tomcat  3.1?

"Craig R. McClanahan" wrote:


 Could you double check that there is no "servlet.jar" or "jsdk.jar" file on your
 class path (except for the one that the Tomcat startup script adds), or in your
 system extensions directory ($JAVA_HOME/jre/lib/ext)?  This sounds like a class
 versioning conflict inside of Tomcat.

 If it is not this situation, please post a bug in our bug tracking system at:

 http://nagoya.apache.org/bugzilla/

 Craig McClanahan




Re: Problem: Struts under Tomcat 3.2.1

2001-02-20 Thread Craig R. McClanahan

Maya Muchnik wrote:

 Whose is the file "jsdk.jar"? Is it the new for Tomcat  3.1?


No, it's actually old ... it was the servlet 2.0 classes from the old "Java Server
Development Kit".  Anyone who ever used Apache JServ is likely to have this file
hanging around, and it will cause problems if it is on your classpath.

Craig





RE: java.lang.Exception: org/apache/struts/action/ActionForm

2001-02-20 Thread Schachter, Michael

 Victor,

What is the directory structure of the webapp you're trying to run?  Also,
do you have struts.jar in your /WEB-INF/lib directory, and struts.jar out of
your system classpath?  The exception kind of looks like a
ClassNotFoundException

-Original Message-
From: Victor Corrales
To: [EMAIL PROTECTED]
Sent: 2/20/01 4:34 AM
Subject: java.lang.Exception: org/apache/struts/action/ActionForm

Hi everybody.
 
Does anyone know what this exception means?
 
I have tried running struts 0.5 and 1.0 but it's the same. I am
using Apache + Bluestone UBS.
 
In my IE5.5 window appear only :  
Error: JSP run-time exception
org/apache/struts/action/ActionForm 
 
And in my log window : 
...
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionMapping.addForward(ActionForward[flow1])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionMapping.addForward(ActionForward[flow2])
Pop org.apache.struts.action.ActionForward
Call
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/we
lcome, type=WelcomeAction])
Pop org.apache.struts.action.ActionMapping
Rebuilding servlet for 'index.jsp' because autoReload is
'true' and 'e:\UTILS\Bluestone\myWebapps\me\index.jsp'has not been
loaded yet
index.jsp: init
*** java.lang.Exception: org/apache/struts/action/ActionForm
at
SaServletEngine.me.index_sjsp_VERSION1._jspService(index_sjsp_VERSION1.j
ava, Compiled Code)
at java.lang.Exception.init(Exception.java,
Compiled Code)
at
SaServletEngine.me.index_sjsp_VERSION1._jspService(index_sjsp_VERSION1.j
ava, Compiled Code)
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)
...
 
 
 
Thanks,
 
Victor
 
 
Victor Corrales  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  
Phone: +44 (0) 191 206 4535
Bluestone Arjuna Labhttp://www.arjuna.com
http://www.arjuna.com/  
Rotterdam House
116 The Quayside
Newcastle upon Tyne (NE1 3DY)
 



component project rebuild / updating

2001-02-20 Thread Maya Muchnik

Hello, Cedric,

I have got your *zip file maybe one week ago. Do you update it and how often? Does it
depend on the struts updating?

Thanks,

Maya




Session atribute lost on forward

2001-02-20 Thread Shkuro, Yuri

Sorry for a question not directly related to struts.

My app is always enterred through login.do action, which authenticates
the user and sets a login bean in session attribute and returns some
forward based on user access level.  However, when the forward page is
displayed (along with the list of session attributes), the login bean
is not there if the session has isNew()==true.  If you hit reload, the
session.isNew()==false and the attribute appears.  It seems that when
I store something in a new session and then do an internal forward,
the request in the second page doesn't have info about the session, and
all attributes are lost.  Any idea how to fix this?

This is on Tomcat 3.2.1.  Here is the action class's perform() method.

public ActionForward perform(ActionMapping mapping,
ActionForm
form,

HttpServletRequest request,

HttpServletResponse response)
  throws IOException, ServletException
{
String sKerberosID = request.getRemoteUser();

// create login bean for this user  this application
LoginBean login = new LoginBean( sKerberosID );

// store login bean as a session-scope bean
request.getSession().setAttribute( LoginBean.getKey(), login
);

return mapping.findForward( login.getSuperuser() ?
"superuser" : "success" );
}



Re: Problem: Struts under Tomcat 3.2.1

2001-02-20 Thread Maya Muchnik

Maybe you need to remove struts-example directory and startup Tomcat again.

Christian Billen wrote:

 Hello,

 I am trying to run the struts-example.war from the 20010216 nightly build in
 my tomcat 3.2.1

 On initialization I can see it initializing properly (reading User from xml
 file and all) and I can even bring the main page in the browser
 http://localhost/struts-example

 If I try to click the Register link in the example app: (which does
 http://localhost/struts-example/editRegistration.do?action=Create)

 I get a nice 500 error and a stack trace:

 Error: 500
 Location: /struts-example/editRegistration.do
 Internal Servlet Error:

 java.lang.ClassCastException: javax.servlet.ServletException
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:354)
 at
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78
 6)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:732)
 at
 org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
 (Ajp12ConnectionHandler.java:166)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

 Any clue on what I could have configured wrong? my struts.jar is NOT in my
 classpath
 I have also added the "AddHandler jserv-servlet .do" to my tomcat.conf file

 Thanks for your help,

 Christian Billen




Re: How does Struts compare to Barracuda?

2001-02-20 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

 I have the same question as Dan regarding the event model  Why does the
 browser need to understand or send events (for the most common
 navigation/data entry)- wouldn't this be the responsibility of the
 controller servlet to translate HTTP requests/responses into Java events?
 As a side, The InetBeans components included with Borland JBuilder 4.0
 perform this type of event translation. I was very excited to see these
 beans in JBuilder, but unfortunately the lack of documentation and examples
 makes them difficult to use.


Just for one simple use case, consider that you might want a user to make a
selection in one GUI component (say, clicking a checkbox) that should cause
another GUI component (say, a select box) to be repopulated based on a database
query done at the server.

Web apps have to deal with the fact that events like this happen on the client
side, but require actions on the server side -- to say nothing about how you
arrange for the user interface to be updated.  It's even more complicated when
you realize that the JavaScript and DHTML support in popular browsers is so
different that you almost need to program a support environment for each browser
separately.

As others have said, doing this stuff right is *not* easy.  At the moment,
Struts is focused almost totally on the server side, and we will need to think
long and hard about how to get involved in client side stuff as well.  Custom
tags give us a technology that can do lots of the grunt work for us, but
deciding what those tags should do will be very interesting.



 Bob


Craig McClanahan





struts portability.

2001-02-20 Thread Peri Srinivas



Hi ,
 I just bumped on to 
project where I had a code base working 
with0.5  version of Struts.
 After replacing with 1.0 i 
discovered there were quite a bunch of chages 
like.
  
1)ValidatingActionForm --changed from Interface to 
class.
  2)Methods of 
ActionBase changed thier signatures.
  
  eg: 1)getResources
  
   
2)saveErrors.

Can we assume 
thebackWord compatiblity 
of 1.0when we have 
futureversions.


T,
Peri


Re: component project rebuild / updating

2001-02-20 Thread Craig R. McClanahan

Maya Muchnik wrote:

 Hello, Cedric,

 I have got your *zip file maybe one week ago. Do you update it and how often? Does it
 depend on the struts updating?

 Thanks,


Struts binary distributions are created every night, and reflect whatever changes in 
the
code and/or documentation have been made that day.  Recently, that's been quite a lot 
as
we approach a 1.0 beta release.  As betas (and the final release) are created, they 
will
remain stable -- and obviously will not reflect the day-to-day changes.

Subscribers to the STRUTS-DEV list receive a mail message on every CVS code commit that
is done, which documents the actual changes being made as they happen.  Yesterday, for
example, the html:img and html:image tags were updated so that you could grab the
image source and/or the alternate text out of your internationalized resources, instead
of having to hard code them.  This change showed up in last night's distribution files.


 Maya

Craig





Re: struts portability.

2001-02-20 Thread Craig R. McClanahan



Peri Srinivas wrote:

Hi
, I just
bumped on to project where I had a
code base working with 0.5 version of Struts.
After replacing with 1.0 i discovered there were
quite a bunch of chages like.
1)ValidatingActionForm --changed from Interface to class.
2)Methods of ActionBase changed thier signatures.
eg: 1)getResources
2)saveErrors.
Can we assume the backWord compatiblity of 1.0
when we have future versions.T,Peri
To the maximum degree possible, you should be able to count on backwards
compatibility within the 1.x family. That is why the extensive changes
between 0.5 and 1.0 were made now, *before* the 1.0 final release.

Craig McClanahan





RE: struts portability.

2001-02-20 Thread McCay, Larry



Backward compatibility is an ongoing priority from 1.0 
out.

The 
idea, as I have understood it, has been to makeas many non-backward 
compatible changes as possible before the 1.0 release to help alleviate the need 
for them later.

  -Original Message-From: Peri Srinivas 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 20, 2001 1:41 
  PMTo: [EMAIL PROTECTED]Subject: struts 
  portability.
  Hi ,
   I just bumped on to 
  project where I had a code base working 
  with0.5 version of Struts.
   After replacing with 1.0 
  i discovered there were quite a bunch of chages 
  like.

  1)ValidatingActionForm --changed from Interface to 
  class.
2)Methods 
  of ActionBase changed thier signatures.

eg: 1)getResources

 
  2)saveErrors.
  
  Can we assume 
  thebackWord compatiblity 
  of 1.0when we have 
  futureversions.
  
  
  T,
  Peri


Re: AW: Re: AW: Struts on IPlanet

2001-02-20 Thread Ted Husted

Oliver, 

Is there any chance that you could phrase this as a how-to?

[EMAIL PROTECTED] wrote:
 
 -- Original Nachricht --
 
 Oliver,
 
 For the installation page, I just entered for iPlanet Application Server
 6.0
 
 Service Pack 2 is recommended.
 
 == In a week I will know if that will fix our problems concerning the Servlet2.2
 incompatibility
 
 NOTE: At present, the Struts example application still uses a
 non-Serializable servlet context attribute, and will not run in an
 environment that requires them, like iPlanet Application Server.
 
 == you have to deploy the Servlet as non distributable and then
 it works with SP1, too
 
 For iPlanet Web Server 4.2 I added Stanley Santiago's notes from
 
 
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg00022.html
 
 
 Is this sufficient?
 
 Should we include your workaround(s) for Service Pack 1 ?
 
 == You have to, not especially this one, but one that fixes the
 getServletPath()-Problem.
 
 Are these them?
 
 == Yes, it works and I like STRUTS. We did not use all the Tags yet but
 it runs...
 
 
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01992.html
 
 
 == This one is cheap but the most important one
 
 
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02011.html
 



Re: database locks.. (OT)

2001-02-20 Thread Jim Richards


The usual thing to check for are: Are you using the
database conneciton pool? Are you closing your database
connection? Do use you transactions at all? Do you commit your
work? Do you have autocommit turned on?

Anand Raman wrote:
 I am trying to implement a multi page form and in some scenario the
 application is hanging because of a database lock which is not going
 away after some DML.



Re: help! confused over forms and errors and oooh, other stuff :-)

2001-02-20 Thread Ned Seagoon


Can nobody give me a clue as to whether I've missed something here? I have
to do a 'show and tell' session on friday where we probably will be deciding
whether to use struts as the basis of future developments. If I'm going to
have to branch away from struts to handle these issues, so be it, but I'd
rather hope they were handled somewhere. Worst case scenario is that we
don't use struts at all.

Regards
Ned

- Original Message -
From: "Ned Seagoon" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 20, 2001 11:47 AM
Subject: help! confused over forms and errors and oooh, other stuff :-)


 Hi Guys,

 I wonder if you could help me out a little please? I am in the middle of
 developing a proof of concept app with struts. If this comes off the
company
 could migrate away from a proprietary framework to struts, which I am in
 favour of.

 I seem to have confused myself over an issue regarding validation and
forms.
 I’ll give a simplified workflow as an example.

 We have for all intents and purposes a generated product overview page
along
 these lines:

 *Wooden Throat Mallet59.95 buy
 *Leather Uncle Frightener12.60 buy
 *Vandal-Proof Toupee 99.99 buy

 Which is generated from struts tags. The buys are links to a pages which
 look something like ‘buyit.do?itemid=50’. The buyit.do action has
registered
 a form in request scope. During processing, it looks up the full details
of
 the itemid and places the resulting bean in request scope. It then creates
 the form object, populates it with some default information and sets this
in
 the request too before forwarding onto buypage.jsp

 This displays the details of the item, and contains a form for entering,
 say, credit card details:

 *Item: Vandal-Proof Toupee
 *Manufacturer: Lockheed-Martin Advanced Hairpiece Research
 *Price: 99.99
 *Additional Information: Also Invisible to Radar
 *
 * Inside Leg Measurement: _
 * Credit Card Number: 
 * BUY {forwards onto checkout.do}

 Which is all fine and dandy and displays correctly. Though what happens if
 the form validate fails? If checkout.do has an ‘input’ attribute which is
 buypage.jsp then this will fail because the item details are stored on the
 request has not been set up (it was done in ‘buyit.do’). I could of course
 set the item details on the session, but if the user opened new browser
 windows for the ‘buyit’ link, then the session level object will be
 overwritten.

 If have looked into placing the details object onto the form bean as it is
 populated, but will that property be preserved across a validate failing?
 And how do I get at the properties of the form bean outside of the
 hmtl:xxx tags?

 Help !

 Regards
 Ned



 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





RE: help! confused over forms and errors and oooh, other stuff :-)

2001-02-20 Thread Jason H. Kim

You can access the properties of the form bean by using jsp:bean or just do

%
// if the bean was submitted in request scope.
formBean asdf = request.getAttribute("the key you used - or name attribute
of youe struts form tag.");
%

even if the validation failse and you used request, your bean properties
will be preserved.

Thank you.

Jason H. Kim
Quatrix Emerging Technology Team
Phone: 314-993-5858 EXT: 137

-Original Message-
From: Ned Seagoon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 5:48 AM
To: [EMAIL PROTECTED]
Subject: help! confused over forms and errors and oooh, other stuff :-)


Hi Guys,

I wonder if you could help me out a little please? I am in the middle of
developing a proof of concept app with struts. If this comes off the company
could migrate away from a proprietary framework to struts, which I am in
favour of.

I seem to have confused myself over an issue regarding validation and forms.
I’ll give a simplified workflow as an example.

We have for all intents and purposes a generated product overview page along
these lines:

*Wooden Throat Mallet59.95 buy
*Leather Uncle Frightener12.60 buy
*Vandal-Proof Toupee 99.99 buy

Which is generated from struts tags. The buys are links to a pages which
look something like ‘buyit.do?itemid=50’. The buyit.do action has registered
a form in request scope. During processing, it looks up the full details of
the itemid and places the resulting bean in request scope. It then creates
the form object, populates it with some default information and sets this in
the request too before forwarding onto buypage.jsp

This displays the details of the item, and contains a form for entering,
say, credit card details:

*Item: Vandal-Proof Toupee
*Manufacturer: Lockheed-Martin Advanced Hairpiece Research
*Price: 99.99
*Additional Information: Also Invisible to Radar
*
* Inside Leg Measurement: _
* Credit Card Number: 
* BUY {forwards onto checkout.do}

Which is all fine and dandy and displays correctly. Though what happens if
the form validate fails? If checkout.do has an ‘input’ attribute which is
buypage.jsp then this will fail because the item details are stored on the
request has not been set up (it was done in ‘buyit.do’). I could of course
set the item details on the session, but if the user opened new browser
windows for the ‘buyit’ link, then the session level object will be
overwritten.

If have looked into placing the details object onto the form bean as it is
populated, but will that property be preserved across a validate failing?
And how do I get at the properties of the form bean outside of the
hmtl:xxx tags?

Help !

Regards
Ned



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




RE: help! confused over forms and errors and oooh, other stuff :-)

2001-02-20 Thread Deadman, Hal

I don't know if I understand your question but would making the input
attribute of the action another action give you the opportunity to retrieve
data that the jsp form needs before the jsp is displayed? I have a form that
needs a drop down populated from the database before the form is displayed.
I can never go to the jsp form directly, I always reference the action that
gets the data needed by the jsp. The action returns a forward which forwards
to the jsp with redirect="false". 

Hal

-Original Message-
From: Ned Seagoon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 6:06 PM
To: [EMAIL PROTECTED]
Subject: Re: help! confused over forms and errors and oooh, other stuff
:-)



Can nobody give me a clue as to whether I've missed something here? I have
to do a 'show and tell' session on friday where we probably will be deciding
whether to use struts as the basis of future developments. If I'm going to
have to branch away from struts to handle these issues, so be it, but I'd
rather hope they were handled somewhere. Worst case scenario is that we
don't use struts at all.

Regards
Ned

- Original Message -
From: "Ned Seagoon" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 20, 2001 11:47 AM
Subject: help! confused over forms and errors and oooh, other stuff :-)


 Hi Guys,

 I wonder if you could help me out a little please? I am in the middle of
 developing a proof of concept app with struts. If this comes off the
company
 could migrate away from a proprietary framework to struts, which I am in
 favour of.

 I seem to have confused myself over an issue regarding validation and
forms.
 I’ll give a simplified workflow as an example.

 We have for all intents and purposes a generated product overview page
along
 these lines:

 *Wooden Throat Mallet59.95 buy
 *Leather Uncle Frightener12.60 buy
 *Vandal-Proof Toupee 99.99 buy

 Which is generated from struts tags. The buys are links to a pages which
 look something like ‘buyit.do?itemid=50’. The buyit.do action has
registered
 a form in request scope. During processing, it looks up the full details
of
 the itemid and places the resulting bean in request scope. It then creates
 the form object, populates it with some default information and sets this
in
 the request too before forwarding onto buypage.jsp

 This displays the details of the item, and contains a form for entering,
 say, credit card details:

 *Item: Vandal-Proof Toupee
 *Manufacturer: Lockheed-Martin Advanced Hairpiece Research
 *Price: 99.99
 *Additional Information: Also Invisible to Radar
 *
 * Inside Leg Measurement: _
 * Credit Card Number: 
 * BUY {forwards onto checkout.do}

 Which is all fine and dandy and displays correctly. Though what happens if
 the form validate fails? If checkout.do has an ‘input’ attribute which is
 buypage.jsp then this will fail because the item details are stored on the
 request has not been set up (it was done in ‘buyit.do’). I could of course
 set the item details on the session, but if the user opened new browser
 windows for the ‘buyit’ link, then the session level object will be
 overwritten.

 If have looked into placing the details object onto the form bean as it is
 populated, but will that property be preserved across a validate failing?
 And how do I get at the properties of the form bean outside of the
 hmtl:xxx tags?

 Help !

 Regards
 Ned



 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





Display Table using Iterate Tag

2001-02-20 Thread Dorai, Harish (c)

Hello all,

I am new to the JSP and Struts framework. 

How can I use the Iterate tag to display a few rows of the Database table? I
am storing the rows as a vector of vectors. Has anyone tried using Iterate
tag for similar stuff?

Thanks,
Harish.






Re: Template tags?

2001-02-20 Thread David Geary

Andrew Boyko wrote:

  during this process. First off,  the web pages we will be creating will
  have a common navigation bar used across the whole web site. It would be
  great if we can create one HTML file called navigation.jsp which
  all pages use.

 If that's the only common element on the pages, you can do that
 using the JSP include tags, pulling in the common nav bar within
 each content page.

True, but templates are so much cooler.  ;-)

 The template tags (as we've been using them, at least) support a
 somewhat different model: your content pages push their specific
 content into common templates, which place the content into regions
 of the template.  This allows you to have standard headers, footers,
 or any other common content and layout without the content pages
 needing to know or care what the standard layout is; it also allows
 you to redesign the template, potentially completely re-ordering
 the content presentation, without changing the content pages at all.

Another benefit is that templates encourage you to divide your JSP pages
into reusable components, although the same could be said of jsp:include.

 We've introduced the template tags to both java coders and HTML
 authors, and all found it easy to understand and like,
 and quite powerful.

Amen.

  It seems that the struts template taglibs might be the solution,
  unfortunately the 0.5 version of struts we downloaded does not contain
  these taglibs.

 In my experience, cvs or nightly builds have been solid for
 a long while, and have been quite safe for development, not
 only for the template tags, but for the entire library.

Templates are in Struts to stay.


david