SilverStream 3.7 and Struts

2001-01-02 Thread Bill Pfeiffer

There was some mention a while back in a thread titled "Proposed Solution to
Non-Serializable MessageResources Class" that described a problem that I am
encountering with SilverStream 3.7.  I am not actually using
MessageResources in my web application, but I am encountering the following
when deploying a very simple struts web app to SilverStream:

java.lang.LinkageError: Class org/apache/struts/action/ActionForm violates
loader constraints

SilverStream support indicated that this had something to do with the way
the MessageResources is not serializable.

Is there an update (Struts or SilverStream) that addresses this problem?

TIA,

Bill Pfeiffer





Re: SilverStream 3.7 and Struts

2001-01-02 Thread Johan Compagner

Did you try one of the latest builds?

johan

- Original Message - 
From: "Bill Pfeiffer" [EMAIL PROTECTED]
To: "Struts-User" [EMAIL PROTECTED]
Sent: Tuesday, January 02, 2001 1:48 PM
Subject: SilverStream 3.7 and Struts


 There was some mention a while back in a thread titled "Proposed Solution to
 Non-Serializable MessageResources Class" that described a problem that I am
 encountering with SilverStream 3.7.  I am not actually using
 MessageResources in my web application, but I am encountering the following
 when deploying a very simple struts web app to SilverStream:
 
 java.lang.LinkageError: Class org/apache/struts/action/ActionForm violates
 loader constraints
 
 SilverStream support indicated that this had something to do with the way
 the MessageResources is not serializable.
 
 Is there an update (Struts or SilverStream) that addresses this problem?
 
 TIA,
 
 Bill Pfeiffer
 
 
 




Re: WebLogic NullPointer from PageContextImpl.getAttribute

2001-01-02 Thread Tim Kuntz

How do you have your environment setup? Where did you put the Struts.jar and 
your application classes?

From: Wong Kok Wai [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: WebLogic NullPointer from PageContextImpl.getAttribute
Date: Sat, 30 Dec 2000 17:45:03 -0800 (PST)

Strange I don't have the ClassCastException. Is the
struts.jar included in the weblogic classpath? If yes,
I believe if you remove struts.jar from the classpath,
the ClassCastException will go away.

--- Tim Kuntz [EMAIL PROTECTED] wrote:
  Thanks. SP8 corrects the
  PageContextImpl.getAttribute problem but the
  ClassCastException remains and will probably do so
  until BEA changes the way
  they handle class loading. I haven't evaluated
  WebLogic 6 to see if it works
  as expected.
 


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

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




Form errors

2001-01-02 Thread Neal Kaiser

I probably missed this in the documentation, but if I want to pull out the
error message for a specific field, how would I do it?  Let's say I have a
username which was left blank and I create a new ActionError :

errors.add("username",new ActionError("error.username.required"));

Now, in my .jsp, rather than having all the errors displayed with
form:errors/, I want to put the
error.username.required error right next to the username field:

form:text property="username" size="16" maxlength="16"/ nbsp;
form:errors username-only

I don't want it to use errors.header or errors.footer either in this case.

Is that possible?
Thanks.




RE: Unsuscribe

2001-01-02 Thread Pandya, Rajshree



 -Original Message-
 From: Rolf Holt [SMTP:[EMAIL PROTECTED]]
 Sent: 02 January 2001 17:37
 To:   [EMAIL PROTECTED]
 Subject:  Unsuscribe
 
 Unsuscribe



RE: SilverStream 3.7 and Struts

2001-01-02 Thread Ludwig, Pat

Bill,
the non-serializable nature of MessageResources is a likely cause for your
problem. even if your app doesn't use MessageResources, Struts itself does.
if this is the cause of your problem, cycling the Silverstream server should
resolve it.
regards,
Pat Ludwig

-Original Message-
From: Bill Pfeiffer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 02, 2001 7:48 AM
To: Struts-User
Subject: SilverStream 3.7 and Struts


There was some mention a while back in a thread titled "Proposed Solution to
Non-Serializable MessageResources Class" that described a problem that I am
encountering with SilverStream 3.7.  I am not actually using
MessageResources in my web application, but I am encountering the following
when deploying a very simple struts web app to SilverStream:

java.lang.LinkageError: Class org/apache/struts/action/ActionForm violates
loader constraints

SilverStream support indicated that this had something to do with the way
the MessageResources is not serializable.

Is there an update (Struts or SilverStream) that addresses this problem?

TIA,

Bill Pfeiffer



Re: Form errors

2001-01-02 Thread Johan Compagner

Use my ErrorTag attached.
I copied almost from ErrorsTag but only generated it for the property that was set.

I hope this or another one just like it will be in the default struts lib.
(they can use mine attached)

The current implementation isn't used very much on the internet. Users want
to see what the did wrong and where to fix it. 
And that's why the ErrorTag is much handier then the ErrorsTag.

If multiply errors are set for one property it will be comma seperated.

johan



 I probably missed this in the documentation, but if I want to pull out the
 error message for a specific field, how would I do it?  Let's say I have a
 username which was left blank and I create a new ActionError :
 
 errors.add("username",new ActionError("error.username.required"));
 
 Now, in my .jsp, rather than having all the errors displayed with
 form:errors/, I want to put the
 error.username.required error right next to the username field:
 
 form:text property="username" size="16" maxlength="16"/ nbsp;
 form:errors username-only
 
 I don't want it to use errors.header or errors.footer either in this case.
 
 Is that possible?
 Thanks.
 
 

 ErrorTag.java


Unsuscribe

2001-01-02 Thread Sanjay Sharma

Unsuscribe



Unsuscribe

2001-01-02 Thread shoban kumar

Unsuscribe




Problem w/ example using Websphere

2001-01-02 Thread Marilyn Bratis/Towers Perrin

Hi,

I'm trying to run the struts example under Websphere 3.5.2 but I keep
getting the following error:

Message: Server caught unhandled exception from servlet [JSP 1.1
Processor]: com.ibm.servlet.engine.webapp.UncaughtServletException: Server
caught unhandled exception from servlet [JSP 1.1 Processor]: Missing
resources attribute org.apache.struts.action.MESSAGE

I saw this error addressed under the Orion install documentation and I
tried applying the same fix but had no luck.  Has anyone else tried to
implement struts under Websphere?  I did successfully deploy the struts
example using JRUN, but I don't know what to try next for Websphere.

Thanks!

Marilyn




Re:Do you mean Unsubscribe? EOM

2001-01-02 Thread Ted Husted

To unsubscribe, send an empty email to 

  [EMAIL PROTECTED] 
 ^
*** REPLY SEPARATOR  ***

On 1/2/2001 at 3:12 PM Joe Clark wrote:

Yes, unsubscribe.

Reply Separator
Subject:Do you mean Unsubscribe? EOM
Author: [EMAIL PROTECTED]
Date:   1/2/01 11:55 AM


Get free email and a permanent address at
http://www.netaddress.com/?N=1






Re: Unsuscribe

2001-01-02 Thread Craig R. McClanahan

"Duffey, Kevin" wrote:

 unsubscribe

I guess no one ever reads the initial message they received when they subscribed
:-).  Or bothers to go back to the Jakarta web site mailing lists page
http://jakarta.apache.org/site/mail.html, which has convenient subscription
and unsubscription links.

For those who don't want to do either of the above, send an empty mail message
to "[EMAIL PROTECTED]".

Craig



Re: Form errors

2001-01-02 Thread Craig R. McClanahan

Neal Kaiser wrote:

 I probably missed this in the documentation, but if I want to pull out the
 error message for a specific field, how would I do it?  Let's say I have a
 username which was left blank and I create a new ActionError :

 errors.add("username",new ActionError("error.username.required"));

 Now, in my .jsp, rather than having all the errors displayed with
 form:errors/, I want to put the
 error.username.required error right next to the username field:

 form:text property="username" size="16" maxlength="16"/ nbsp;
 form:errors username-only

 I don't want it to use errors.header or errors.footer either in this case.

 Is that possible?
 Thanks.

The ActionErrors.get("username") method will return you an Iterator of all the
error messages recorded against the "username" property -- there could be more
than one.  The form:errors/ tag currently doesn't have any support for this,
and I'm not sure there is a good generic solution that works in every
circumstance, although I'm open to suggestion.

Craig McClanahan



Building Struts with ANT question

2001-01-02 Thread Rick Horowitz

I have successfully built Struts using the supplied ANT files, but have a 
question. There are classpaths referencing the property ${servlet.jar} in 
build.xml.. An example is the compile.example target...

!-- BUILD: Compile example application components --
target name="compile.example"
depends="dist.library,prepare.example"
javac srcdir="src/example"
destdir="${build.home}/example/WEB-INF/classes"
classpath="${build.home}/library/classes:${servlet.jar}"
...etc.

Question - where is the servlet.jar property defined? I got this to work by 
editing the build.bat file to include servlet.jar in the base classpath, 
but would like to understand this.

Thanks,

Rick Horowitz



Rick Horowitz


__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com



Using Struts with WebLogic 5.1 - JSP Problem

2001-01-02 Thread Barbosa, Steven

I am able to view struts-documentation. war ( a simple HTML page ) with
WebLogic, but get the following error when I try to view struts-example.war:

ServletContext-myapp problem defining JSP class
java.lang.NullPointerException
at weblogic.servlet.jsp.OneOffJspLoader.init(JspStub.java:420)
at weblogic.servlet.jsp.JspStub.getClassLoader(JspStub.java:107)

Has anyone else had problems defining the same JSP class with the Struts
example .war files in WebLogic 5.1?

Thanks,

Steven



Re: Business Logic Beanies

2001-01-02 Thread Ted Husted

I'm finishing up on a model for executing JDBC retrievals from a JSP,
using a scriptlet like 

% 
  FruitSalesForm fruitSalesForm = (FruitSalesForm)
session.getAttribute("fruitSalesForm");
  fruitSalesForm.setPageContext(pageContext); 
%

to execute pooled JDBC connetions, and transfer the results into
page-scope collections,  for use by the iterate or option tags. 

To get there, I 

Setup straight "data beans" to represent the rows of a table (or a form
option). 

Subclassed a "QueryFormBean" from ActionFormBean to encapsulate the
query string, execute the query given a GenericConnection, and to track
the last relative position in the result set.

Subclassed QueryFormBean to return an array of data beans from the
object's ResultSet (a RowSet would be better). This array is ultimately
inserted directly into the page context, for use by an iterate or
option tag.

Subclassed a "ActionDataForm" from ActionForm, and added methods to
expose key JSP and Struts resources via the page context, and a method
for obtaining a GenericConnection from the servlet. 

Implemented the ActionDataForm with the subclassed QueryFormBean as a
property. Overrode setPageContext to execute the QueryFormBean, and
insert the databean array into the page context. 

I'm working on adding metadata and other convenience methods now. I'll
post the working example soon. Just wondering what similar solutions
others might have found to handling JDBC queries within Struts.





Re: SilverStream 3.7 and Struts

2001-01-02 Thread Bill Pfeiffer

I have SS 3.7 rc1 which is the latest release.

- Original Message -
From: "Johan Compagner" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 02, 2001 8:10 AM
Subject: Re: SilverStream 3.7 and Struts


 Did you try one of the latest builds?

 johan

 - Original Message -
 From: "Bill Pfeiffer" [EMAIL PROTECTED]
 To: "Struts-User" [EMAIL PROTECTED]
 Sent: Tuesday, January 02, 2001 1:48 PM
 Subject: SilverStream 3.7 and Struts


  There was some mention a while back in a thread titled "Proposed
Solution to
  Non-Serializable MessageResources Class" that described a problem that I
am
  encountering with SilverStream 3.7.  I am not actually using
  MessageResources in my web application, but I am encountering the
following
  when deploying a very simple struts web app to SilverStream:
 
  java.lang.LinkageError: Class org/apache/struts/action/ActionForm
violates
  loader constraints
 
  SilverStream support indicated that this had something to do with the
way
  the MessageResources is not serializable.
 
  Is there an update (Struts or SilverStream) that addresses this problem?
 
  TIA,
 
  Bill Pfeiffer
 
 
 






Re: SilverStream 3.7 and Struts

2001-01-02 Thread Bill Pfeiffer

Pat,

Thanks, I was made aware of the restart option by SS support.  Cycling the
SS server is not an option I like during development nor during production.
The restart of SS takes a long time during dev and I prefer not to disrupt
my production server in such a manner.

It sounded as though there were plans to come up with a serializable version
of the class in question.  Is this still in the works?

TIA,

Bill Pfeiffer


- Original Message -
From: "Ludwig, Pat" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 02, 2001 1:15 PM
Subject: RE: SilverStream 3.7 and Struts


 Bill,
 the non-serializable nature of MessageResources is a likely cause for your
 problem. even if your app doesn't use MessageResources, Struts itself
does.
 if this is the cause of your problem, cycling the Silverstream server
should
 resolve it.
 regards,
 Pat Ludwig

 -Original Message-
 From: Bill Pfeiffer [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 02, 2001 7:48 AM
 To: Struts-User
 Subject: SilverStream 3.7 and Struts


 There was some mention a while back in a thread titled "Proposed Solution
to
 Non-Serializable MessageResources Class" that described a problem that I
am
 encountering with SilverStream 3.7.  I am not actually using
 MessageResources in my web application, but I am encountering the
following
 when deploying a very simple struts web app to SilverStream:

 java.lang.LinkageError: Class org/apache/struts/action/ActionForm violates
 loader constraints

 SilverStream support indicated that this had something to do with the way
 the MessageResources is not serializable.

 Is there an update (Struts or SilverStream) that addresses this problem?

 TIA,

 Bill Pfeiffer





Re: Building Struts with ANT question

2001-01-02 Thread Craig R. McClanahan

Rick Horowitz wrote:

 I have successfully built Struts using the supplied ANT files, but have a
 question. There are classpaths referencing the property ${servlet.jar} in
 build.xml.. An example is the compile.example target...

 !-- BUILD: Compile example application components --
 target name="compile.example"
 depends="dist.library,prepare.example"
 javac srcdir="src/example"
 destdir="${build.home}/example/WEB-INF/classes"
 classpath="${build.home}/library/classes:${servlet.jar}"
 ...etc.

 Question - where is the servlet.jar property defined? I got this to work by
 editing the build.bat file to include servlet.jar in the base classpath,
 but would like to understand this.


Ant provides a hierarchy of mechanisms by which properties can be defined.
Essentially, the following list is checked from top to bottom until an
appropriate definition is found:

* A command line setting (-Dservlet.jar=xx)
  passed to Ant

* A system property named "servlet.jar" passed to
  the JVM inside which Ant is running

* A property setting inside the build script itself.

In the case of Struts, the build script ("build.sh" or "build.bat") that you use
looks for an environment variable named SERVLETAPI_HOME, and uses that to
construct an appropriate value:

java ... -Dservlet.jar=$SERVLETAPI_HOME/lib/servlet.jar ...

See the comments at the top of build.sh or build.bat for more documentation on
the environment variables you can use to control where the build gets its files
from.  The Ant user's manual (which comes with the Ant distribution in file
"docs/index.html") is also very useful when trying to understand build.xml
files.


 Thanks,
 
 Rick Horowitz


Craig McClanahan





Re: SilverStream 3.7 and Struts

2001-01-02 Thread Craig R. McClanahan

Bill Pfeiffer wrote:

 Pat,

 Thanks, I was made aware of the restart option by SS support.  Cycling the
 SS server is not an option I like during development nor during production.
 The restart of SS takes a long time during dev and I prefer not to disrupt
 my production server in such a manner.

 It sounded as though there were plans to come up with a serializable version
 of the class in question.  Is this still in the works?


The Serializable implementation of MessageResources is in the current nightly
builds of Struts, and has been for at least a couple of weeks.

The Struts example application still has some non-Serializable context
attritutes, but as far as I know all of the components stored there by the
framework itself are now Serializable -- if I missed something, please report a
bug.


 TIA,

 Bill Pfeiffer


Craig McClanahan



 - Original Message -
 From: "Ludwig, Pat" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, January 02, 2001 1:15 PM
 Subject: RE: SilverStream 3.7 and Struts

  Bill,
  the non-serializable nature of MessageResources is a likely cause for your
  problem. even if your app doesn't use MessageResources, Struts itself
 does.
  if this is the cause of your problem, cycling the Silverstream server
 should
  resolve it.
  regards,
  Pat Ludwig
 
  -Original Message-
  From: Bill Pfeiffer [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 02, 2001 7:48 AM
  To: Struts-User
  Subject: SilverStream 3.7 and Struts
 
 
  There was some mention a while back in a thread titled "Proposed Solution
 to
  Non-Serializable MessageResources Class" that described a problem that I
 am
  encountering with SilverStream 3.7.  I am not actually using
  MessageResources in my web application, but I am encountering the
 following
  when deploying a very simple struts web app to SilverStream:
 
  java.lang.LinkageError: Class org/apache/struts/action/ActionForm violates
  loader constraints
 
  SilverStream support indicated that this had something to do with the way
  the MessageResources is not serializable.
 
  Is there an update (Struts or SilverStream) that addresses this problem?
 
  TIA,
 
  Bill Pfeiffer
 




MultiboxTag

2001-01-02 Thread Juan Gargiulo

Is there more documentation or examples on how to use the Multibox tag??

Thanks,

juan



Re: Template

2001-01-02 Thread John Hunt

To be a bit precise I meant template:get in the first
line and the files that are accesses later by
template:put


--- John Hunt [EMAIL PROTECTED] wrote:
 Hi
 If in a template body I get two files and each of it
 instatiates a bean with same id, what is the
 consequence?
 template:insert 
 template:put name='a' content='a.jsp'
 template:put name='b' content='b.jsp'
 /template:insert
 If a.jsp and b.jsp want to use the same bean in
 session scope how should they go about?
 And if a.jsp and b.jsp want to use same id for
 different beans in the session scope/page scope will
 there be a conflict?
 Any advice is welcome
 Thanks
 Jay
 
 
 __
 Do You Yahoo!?
 Yahoo! Photos - Share your holiday photos online!
 http://photos.yahoo.com/


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/



Submit tag fires when page first displays

2001-01-02 Thread HT Levine

I am using version 0.5 of Struts (release version)   I have a login form
taken from the example.  I notice that when logon.jsp draws itself, the
'submit' button logic fires, as if the user clicked the submit button.
Where would I look, read, etc to figure out how to make it only fire the
action I have it hooked to when the user clicks the button? 

thanks!



Re: WebLogic NullPointer from PageContextImpl.getAttribute

2001-01-02 Thread Wong Kok Wai

As per specs: struts.jar is under WEB-INF/lib and all
the classes in WEB-INF/classes

--- Tim Kuntz [EMAIL PROTECTED] wrote:
 How do you have your environment setup? Where did
 you put the Struts.jar and 
 your application classes?
 


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/



Re: Business Logic Beanies

2001-01-02 Thread Michael Gerdau

[scriptlets to execute JDBC inside a JSP]

I'm working on adding metadata and other convenience methods now. I'll
post the working example soon. Just wondering what similar solutions
others might have found to handling JDBC queries within Struts.

The design I us works like this:
- for each logical item of data write a trivial class with all the
  get/set methods (the Entity class).
- for each such trivial data class write a likewise trivial class that
  does know how to map a ResultSet to the Entity class. Some SQL-Stmt
  merging code is added as well to tune the query (the Retriever class).
- for each logical query add a more or less trivial class that does the
  actual JDBC stuff (the Controller class).

For all of the above there exists base classes that make writing the
code very simple.

The Entity class can easily be exposed to Struts and used there.

Th Controller class is invoked from Action; if there is some initialization
to be done for a JSP create an action that's executed before the JSP is
actually displayed.


AFAICT the design outlined above does facilitate a better separation
between the underlying physical data model and the way this data is
represented to the user than can be achieved by using scriplets.

If anyone is interested I'd be willing to share the code (though I'd
have to check on copyright before).

Best,
Michael
--
 Vote against SPAM - see http://www.politik-digital.de/spam/
 Michael Gerdau   email: [EMAIL PROTECTED]
 Windows loading; please take a nap...
 PGP-keys available on request or at public keyserver





Re: Business Logic Beanies

2001-01-02 Thread Craig R. McClanahan

Michael Gerdau wrote:

 [scriptlets to execute JDBC inside a JSP]

 I'm working on adding metadata and other convenience methods now. I'll
 post the working example soon. Just wondering what similar solutions
 others might have found to handling JDBC queries within Struts.

 The design I us works like this:
 - for each logical item of data write a trivial class with all the
   get/set methods (the Entity class).

If we have any XSLT gurus in our midst, this sounds like it is something that
could be auto-generated from an XML-based description of the "logical item", no?


 - for each such trivial data class write a likewise trivial class that
   does know how to map a ResultSet to the Entity class. Some SQL-Stmt
   merging code is added as well to tune the query (the Retriever class).

As above, could such a "trivial" class be auto-generated?


 - for each logical query add a more or less trivial class that does the
   actual JDBC stuff (the Controller class).


The EJB analogue for this would be to add a finder method that implemented the
logical query.


 For all of the above there exists base classes that make writing the
 code very simple.

 The Entity class can easily be exposed to Struts and used there.

 Th Controller class is invoked from Action; if there is some initialization
 to be done for a JSP create an action that's executed before the JSP is
 actually displayed.

 AFAICT the design outlined above does facilitate a better separation
 between the underlying physical data model and the way this data is
 represented to the user than can be achieved by using scriplets.

 If anyone is interested I'd be willing to share the code (though I'd
 have to check on copyright before).


I'd like to see design patterns like this available to the Struts community --
*especially* if we can create some tools that reduce the tedium of creating
"trivial" classes.


 Best,
 Michael

Craig McClanahan