pleaseeee help!!! please help guys....is it possible to update properties of an object in an iteration?

2001-05-04 Thread Dudley [EMAIL PROTECTED]



-Original Message-
From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: very important please help guysis it possible to update
prope rties of an object in an iteration?


pleeaaasssee help

What i have is this...




.
.
.   



  


  


  


  


  



   








  

  


  


  


  


  
   




  


  

 

I want ot update the "state" property using the checkbox . does anyone have any suggestions?
Pleeeaaaeee!!



RE: nested logic:iterate tags

2001-05-04 Thread Richard Murray

I'm just using the following dummy data in my bean:

private String[] headings = {"User", "Job Group", "Job", "Spreadsheet",
"DataUpdated", "Status", "Submitted" };
private String[][] data = { { "1", "2", "3", "4", "true", "6", "7"},
{"8", "9", "10", "11", "false", "13",
"14"} };

I've got get and set methods for both properties and generate a table with
the following:

 
<%-- Generate table headings --%>






<%-- Generate table data by nesting iterate tag --%>




   





Richard.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 4:52 PM
To: [EMAIL PROTECTED]
Subject: RE: nested logic:iterate tags


Richard,

What does the array look like? Can you post the logic for that array?

On Thu, 03 May 2001, Richard Murray wrote:

> 
> Hi, 
> 
> For anyone interested I managed fix my problem with the following:
> 
>  scope="page">
> 
> 
> 
> 
> 
> 
> 
> 
> Regards
> 
> Richard
> 
> -Original Message-
> From: Richard Murray [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 03, 2001 2:44 PM
> To: '[EMAIL PROTECTED]'
> Subject: nested logic:iterate tags
> 
> 
> Hi, 
> 
> I'm trying to generate a table of data from a 2 dimensional array of
Strings
> called ( String[][] data ).  I am trying to use the struts tag
>  to loop through the data and generate the table.  As it is
a
> 2 dimensional array I have nested the iterate statements as follows:
> 
>  scope="page">
> 
> 
> 
> 
> 
> 
> I get the following exception trying to run this:
> 
> org.apache.jasper.compiler.CompileException:
> F:\projects\fcutc\deploy\fcutc\list.jsp(40,1) Unable to convert a String
to
> java.lang.Object for attribute collection 
> 
> I'm trying to use the id ("rows") from the first iterate statement as a
> variable in the second, however it seems it looks as though it is being
> treated as a string rather than a variable.  I thought the id held the
> current object in the iteration, which in my case is an array.
> 
> Hope someone can help.  I'm pretty new to struts ( and JSP ) so I may have
> done something obviously wrong.
> 
> Thanks.
>  
> Richard Murray 
> Software Engineer - Net Products Development 
> QSP
> OLAS House, Team Valley Trading Estate,
> 5th Avenue Business Park,
> Gateshead, Tyne & Wear NE11 0XA  
> Switchboard+44 (0) 191 402  
> Direct line   +44 (0) 191 402 3329 
> email  [EMAIL PROTECTED] 
> website   www.qspgroup.com 
> QSP - Enabling e-Finance 
> 
> 
> 
> 
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager at [EMAIL PROTECTED]
> 
> This footnote also confirms that this email message has been swept by
> for the presence of computer viruses.
> 
> http://www.qspgroup.com
> **

Thomas Peters

Senior Software Engineer
Aidera Solutions

Cell: 603-566-5406
Voice Mail: 603-888-7700



nesting logic:equals tags

2001-05-04 Thread Richard Murray

Hi, 

I'm iterating over an array of Strings containing the following dummy data {
"1", "2", "3", "4", "true", "6", "7"}.  I want to apply the following logic:
if the String is "true" or "false" display a checkbox, else display the
String.

I attempted to nest the tags as follows, but this does not work:








I can only get this working as shown below:  

 













   

   


However, this does not work properly as I have nested the notEquals logic
tags.  

Is there a way to nest these tags or supply conditional operators ( e.g. &&,
|| ).  Is there anyway to supply an else statement.  I'm not sure I can
achieve what I want with these tags and may be better of with a scriptlet.

Hope someone can help.
Richard.




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager at [EMAIL PROTECTED]

This footnote also confirms that this email message has been swept by
for the presence of computer viruses.

http://www.qspgroup.com
**



URL for struts archive?

2001-05-04 Thread Dudley [EMAIL PROTECTED]

Can someone please give me the URL to go search thru all the struts
archives?
thanx



RE: URL for struts archive?

2001-05-04 Thread Richard Murray

The struts user archive is at:

http://www.mail-archive.com/struts-user%40jakarta.apache.org/

Richard.

-Original Message-
From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 10:32 AM
To: [EMAIL PROTECTED]
Subject: URL for struts archive?


Can someone please give me the URL to go search thru all the struts
archives?
thanx


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager at [EMAIL PROTECTED]

This footnote also confirms that this email message has been swept by
for the presence of computer viruses.

http://www.qspgroup.com
**



regd. action classes --- please help

2001-05-04 Thread Manabendra Sarkar

Hi All,
  is there init() and destroy() like methods in Action class so that we
can be sure that those methods will always be called
by the action servlet?
  actually i need to aquire some resources (like database connection)
and initialize the action class. i want to hold thoise resources
through out the life of the action object. i want to release those resources
only when i don't need the action object anymore.   
 please help me in doing this. any other procedure to do this except
init() & destroy() ? 


Regards

Manabendra Sarkar




RE: Antwort: RE: Visual Age 3.5.3 & Tomcat with Struts

2001-05-04 Thread Jon.Ridgway

Hi Darren,

One way to install Tomcat into VAJ 3.5.3 is to first install into 3.5.
Store the 3.5 repository and /features/com-ibm-tomcat folder away. 
Install 3.5.3 and import tomcat from 3.5 repository and put the stored
tomcat folder back in place.

Jon. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 01 May 2001 05:11
To: [EMAIL PROTECTED]
Subject: Re: Antwort: RE: Visual Age 3.5.3 & Tomcat with Struts



Dion,

I had problems trying to configure the WTE.  The documentation
in VAJ was lousy in my opinion.  I was able to get the
default application working with WTE, access the samples, etc.,
but had troubles attempting to create an additional webapp.  I
followed the instructions in VAJ help for creating an additional
webapp, but got an exception when reloading the servlet engine.
The problem wasn't obvious, so after trying several different
permutations of changes, I gave up.  It may have been something
simple, but I ran out of ideas on how to debug the configuration.

Also, it seemed that the layout of directories, etc for WTE was
different than a standard j2ee webapp structure.  (e.g. the
default app had no WEB-INF).  I kind-of prefer open-source,
j2ee compliance, etc.

- Darren.



 

dion@multitas

k.com.au To:
[EMAIL PROTECTED]   
 cc: [EMAIL PROTECTED]

04/30/01 Subject: Re: Antwort: RE:
Visual Age 3.5.3 & Tomcat with Struts  
10:39 PM

Please

respond to

struts-user

 

 






Is there a reason you don't want to use the WebSphere Test Environment in
3.5.3?
--
dIon Gillard, Multitask Consulting
Work:  http://www.multitask.com.au
NetRexx: http://www.multitask.com.au/NetRexx.nsf



Darren_James@

i2.com   To:
[EMAIL PROTECTED]
 cc:

01/05/2001   Subject: Re: Antwort: RE:
Visual Age 3.5.3 & Tomcat with Struts
01:14 PM

Please

respond to

struts-user








> 1.) Install Tomcat 3.1 Test Environment & look into
/path/to/vaj35/ide/features/com.ibm.ivj.tomcat/... to
> find IVJJavaCompiler.java

Tomcat Test Environment won't install on top of VA 3.5.3.  It says that the
correct version
of VisualAge is not installed, and exits the installer application.  Any
ideas on how to
trick the Tomcat Test Environment installer?  It says it expects VisualAge
3.5, but
apparently doesn't recognize 3.5.3 :<

- Darren

P.S.
Thanks for the very detailed message on how to get things going with VA and
Tomcat.




Juergen.Walter

@hrmcon.deTo:
[EMAIL PROTECTED]
  cc:

04/27/01 04:49Subject: Antwort: RE: Visual
Age 3.5.3 & Tomcat with Struts
AM

Please respond

to struts-user









Hi Darren,

we're using VAJ 3.5.2 Enterprise with Tomcat and Struts. First we tried to
run Struts 1.0b1 with Tomcat Test Env 3.1 but unfortunately Struts does not
work with Tomcat 3.1's XML-Parser. If you want you can make a XML
(javax.xml.*) & SQL (javax.sql.*) package and put it into Tomcats ./lib
directory and add it to VAJ's classpath. But if you use Tomcat 3.2.1,
struts works out of the box - but not that comfortable as the Tomcat Test
Env does, e.g. you can't debug JSP and Servlet Code anymore :(((
I did a hack (in Tomcats WebReaderXML.java to enable "jspPageCompiler"
again) and added "com.ibm.ivj.tomcat.IJVJavaCompiler" again to re-enable
in-workspace JSP and Servlet Debugging.

Running Tomcat 3.2.1 in VAJ 3.5.x
~~~
In short:
0.) Prerequisites:
  * latest jakarta-servlet-api _source_
  * tomcat 3.2.1 binary distribution (includes ./src already)
  * Tomcat 3.1 Test Environment from www.ibm.com/vadd (to get
"com.ibm.ivj.tomcat.IVJJavaCompiler.java")
  * struts 1.0b1 source distribution
1.) Install Tomcat 3.1 Test Environment & look into
/path/to/vaj35/ide/features/com.ibm.ivj.tomcat/... to find
IVJJavaCompiler.java
2.) Start VAJ, do _not_ "Add feature Apache Test Env 3.1"!!!
3.) Create new Package, e.g. Apache_Tomcat_321
4.) Import all source from jakarta-servlet-api (do _not_ use servlet-api
from VAJ or other precompiled javax.servlet.* - classes; they _must_ be
compiled within VAJ Workspace to enable debugging of your own servlets and
JSPs) into your Project
5.) import following --> compiled classes (not source!) <- from jasper.jar
and webserver.jar  (both in tomcat-3.2.1/lib/)
jasper: all .class
webserver: org.apache.tomcat.logging.Logger,
org.apache.tomcat.logging.LogHelper, org.apache.tomcat.util.SimplePool
If VAJ still complains about

RE: nesting logic:equals tags

2001-05-04 Thread Richard Murray

Hi, 

I've used a scriptlet as follows to achieve what I want, but I'd rather user
the struts tags if possible

 
<%  
if ( element.equals( "true" ) ) 
{
out.println( "" ); 
}
else if (  element.equals( "false" ) )
{
out.println( "" );
}
else
{
out.println( "" + element + "" );

}
%>


If anyone knows how to do this using the struts logic tags then let me know.

Richard.

-Original Message-
From: Richard Murray [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 10:30 AM
To: [EMAIL PROTECTED]
Subject: nesting logic:equals tags


Hi, 

I'm iterating over an array of Strings containing the following dummy data {
"1", "2", "3", "4", "true", "6", "7"}.  I want to apply the following logic:
if the String is "true" or "false" display a checkbox, else display the
String.

I attempted to nest the tags as follows, but this does not work:








I can only get this working as shown below:  

 













   

   


However, this does not work properly as I have nested the notEquals logic
tags.  

Is there a way to nest these tags or supply conditional operators ( e.g. &&,
|| ).  Is there anyway to supply an else statement.  I'm not sure I can
achieve what I want with these tags and may be better of with a scriptlet.

Hope someone can help.
Richard.




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager at [EMAIL PROTECTED]

This footnote also confirms that this email message has been swept by
for the presence of computer viruses.

http://www.qspgroup.com
**



RE: URL for struts archive?

2001-05-04 Thread Young, Wayne


I like these.

http://marc.theaimsgroup.com/?l=struts-user&r=1&w=2

http://marc.theaimsgroup.com/?l=struts-dev&r=1&w=2



-Original Message-
From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 4:32 AM
To: [EMAIL PROTECTED]
Subject: URL for struts archive?


Can someone please give me the URL to go search thru all the struts
archives?
thanx



Re: Servlets, Beans, Struts, and Threading

2001-05-04 Thread William Jaynes

This is definately not true. You need to make a distinction between web containers and 
EJB containers, or to be more specific EJBs
themselves. There are some restrictions on EJBs with respect to threading. I'm not 
sure what they are exactly. But creating your own
threads is perfectly fine in web containers like Tomcat.

For example, for most of my Struts apps I have an initApplication servlet that runs on 
startup and loads some objects from the
database into the application scope. Sometimes I spin off a thread from the init 
method that hangs around for the life of the app
and periodically reloads the objects from the database. I probably could have 
subclassed ActionServlet and spun this thread off from
the init method there.

Sean, you could do the same thing with your Service thread. You don't need to turn it 
into a servlet.

Will

- Original Message -
From: "Paul Tindall" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 3:37 PM
Subject: Re: Servlets, Beans, Struts, and Threading


> Sean,
>
> It is my undertanding that you do not want to do your own threading anywhere
> within a J2EE container as bad things can happen.  If you need to create a
> timer process to kick off other communication processes, WebLogic and Resin
> both have them and the containers will manage the threads.  These timer
> features are not part of the J2EE standard so I'm not sure about Tomcat or
> other containers and what level of support they might have.
>
> Regards,
>
> Paul
>
>
> - Original Message -
> From: "Sean" <[EMAIL PROTECTED]>
> To: "Struts Users" <[EMAIL PROTECTED]>
> Sent: Thursday, May 03, 2001 10:31 AM
> Subject: Servlets, Beans, Struts, and Threading
>
>
> > Hello All,
> >
> > This is a simular question I asked on the Tomcat mailing list and never
> got
> > a reply.  I was hoping someone could give me some good input on this topic
> > from this list.
> >
> > If I have a process that needs to run within Tomcat&Struts to communicate
> > with a remote server, and that process needs it's own thread of execution,
> > what would be the best way to go about this in the Tomcat/Servlet
> container
> > world?  I am not sure if each Servlet has it's own thread of execution so
> I
> > wasn't sure if I should just subclass Servlet or HttpServlet.  I am not
> sure
> > of the ramifications of having a bean manage it's own threads and how that
> > would effect Tomcat in general.
> >
> > Does anyone have any pointers, ideas, or suggestions on how they have done
> > this or would go about doing this nicely in Tomcat?  Would this be cross
> > container code or Tomcat specific?
> >
> > Thanks,
> > Sean
> >
>




RE: regd. action classes --- please help

2001-05-04 Thread Nanduri, Amarnath

I would advise that you subclass the Action class, like  ObjectAction. the
below piece of code would work fine for you...
The parameters in the perform method will be send to the execute() method in
your subclasses. Hope this helps for ya all
If you want, you can also make the init() and destroy() methods abstract (if
each subclass wants to do soemthing different in the
init() and destroy() methods ).



cheers,
Amar..


  public abstract class ObjectAction  extends  Action
  {

   public  ActionForward  perform( , , , )
   {

init() ;

execute( , , , ) ;

destroy() ;
   }

   protected  abstract  ActionForward  execute( , , , ) ;

  }



  public  class  Subaction  extends  ObjectAction
  {

   protected  void  execute( , , , ) 
   {

   }

  }


-Original Message-
From: Manabendra Sarkar [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 6:38 AM
To: [EMAIL PROTECTED]
Subject: regd. action classes --- please help


Hi All,
  is there init() and destroy() like methods in Action class so that we
can be sure that those methods will always be called
by the action servlet?
  actually i need to aquire some resources (like database connection)
and initialize the action class. i want to hold thoise resources
through out the life of the action object. i want to release those resources
only when i don't need the action object anymore.   
 please help me in doing this. any other procedure to do this except
init() & destroy() ? 


Regards

Manabendra Sarkar



Dynamic Error Messages

2001-05-04 Thread Darryl

I can't figure out how to return dynamic error messages in the ActionErrors 
collection. In other words, if an exception is thrown in an
Action object, I want to use the e.getMessage() to get the message description and use 
that to populate an ActionError. The ActionError
class doesn't seem to have a constructor that supports this. Help!

- Darryl




Bean:message with args

2001-05-04 Thread Jon.Ridgway

Hi all,

Is there a way to acheive the following :

"/>

without resorting to scriplets, ie :




would work but just doesn't sit right with me.

Any ideas.

Jon.



RE: database connection

2001-05-04 Thread Ying Teng

Yes, I can get the DataSource reference in the ServletContext object of the
ActionServlet class. But I want to get the reference to the dataSource in
the DatabaseServlet class. Can anyone tell me how to get the reference to
the dataSource from the databaseServlet class? Thanks.

Ying

-Original Message-
From: Vivek Bhaskaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: database connection


A reference to the DataSource is stored in the ServletContext object... You
can get it from that.

- Original Message -
From: "Ying Teng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 11:28 AM
Subject: RE: database connection


>
> What you described is true. Now my question is how to get the datasource
> without referencing the actionServlet. I wanted to intialize the database
> hashtable of the databaseServlet class in the databaseServlet init
function.
> In order to do that, I need to get the datasource. But I can not reference
> the actionServlet because the action is initialized after the database is
> initialized (as in the log file). Hope someone can give me some hints.
> Thanks.
>
> Ying
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: database connection
>
>
>
> You will add the key information to the datasource info in you
> struts-config.xml file  it will look like this:
> 
>key="[some name I'll use to reference this datasource]"
>autoCommit="false"
>description="Data Source Configuration"
>driverClass="org.gjt.mm.mysql.Driver"
>maxCount="4"
>minCount="2"
>password="pass"
>
> url
> ="jdbc:mysql://bethsoft.dev.zenimax.com:3306/test?user=user&password=pass
> "
>user="user"
> />
>   
>
> Then, after that's done, the easiest way to access it is to reference it
by
> the action servlet (servlet),  because using actionServlet you can just do
> servlet.findDataSource("the name you called your datasource")  and voila,
> you have your datasource object.  From that datasource object you can
> create a connection.
> If you cannot access the actionServlet, then it's a little more
> difficult--and actually I wouldn't be able to help much there, but at
least
> your question would then be "how do I get the datasource without
> referencing the actionServlet"
>
> -Dallas
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





Feedback

2001-05-04 Thread Whitney Hunter

Hi all,

I am new to struts and new to this list. I am evaluating the use of struts
for a new project that I am starting. It looks fairly powerful, but since my
experience with the framework is quite limited, I would like to get opinions
from folks that have been using struts in real work web development
projects. What do you like and what are the limitations?

Thanks in advance,
Whitney Hunter
Online Architect
WatchGuard Technologies, Inc.



Struts questions for evaluation

2001-05-04 Thread laurent.delvaux

Hello Struts users,

We are currently evaluating Struts and other web (MVC) frameworks and would like to 
ask you some questions:

- Is there some struts-config XML-generation from some
  modeling tool (Rose for instance) ?

  We would like to design a state or activity diagram in 
  such a tool then generate the navigation XML file.

- Can struts behave like a real state machine ?

  i.e. how to ensure that some Action is performed only if
  another Action (or view but is not ideal) has been
  performed with some result (success to be simple). We   
  would like this to be Struts-controlled, not developper-  
  controlled (check session variables, etc.).

  We found the built-in Struts token system but this seem
  only to be used to demarcate transactions in a set of 
  views. This allow to demarcate a transaction end (token 
  value change) but not an inconstency within the 
  transaction (i.e. i valide twice the first page of the 
  transaction) as the token value will not change.

- Why does the struts-example perform some scoped-
  variables cleanup at the end of every Action ? 

  As these variables are defined as scoped in the struts-  
  config XML file, they should naturally live during the
  specified scope lifetime. We don't understand that in the
  struts-example (maybe this is not mandatory).

Thank you very much for your informations about Struts.

  Laurent.






javabean getters & setters and how properties are inferred.

2001-05-04 Thread Young, Wayne

I had a developer question how Struts infers property a name from a getter &
setter... and vice-versa. 

This was the problem:
property:   vTasks
getter: getVTasks()

At runtime, a "getter not found for property vTasks" error occurred. I
decided to research exactly what was going on... here's what I found in case
anyone is interested. 

It's a feature, not a bug.

Wayne
[EMAIL PROTECTED]


-

The following is from the javabean spec at
http://java.sun.com/products/javabeans/docs/beans.101.pdf. It discusses how
a property name is derived from a getter or setter.   
-
8.8 Capitalization of inferred names.
When we use design patterns to infer a property or event name, we need to
decide what rules
to follow for capitalizing the inferred name. If we extract the name from
the middle of a normal
mixedCase style Java name then the name will, by default, begin with a
capital letter.
Java programmers are accustomed to having normal identifiers start with
lower case letters.
Vigorous reviewer input has convinced us that we should follow this same
conventional rule
for property and event names.

Thus when we extract a property or event name from the middle of an existing
Java name, we
normally convert the first character to lower case. However to support the
occasional use of all
upper-case names, we check if the first two characters of the name are both
upper case and if
so leave it alone. So for example,

"FooBah" becomes "fooBah"
"Z" becomes "z"
"URL" becomes "URL"

We provide a method Introspector.decapitalize which implements this
conversion rule.


The decapitalize() method is below... straight from Sun. They look at the
getter, decapitalize the VTasks portion of getVTasks(), which is VTasks
since the 1st two characters are uppercase.

getVTasks -> VTasks
getvTasks->vTasks

Since we want to be able to infer the getter & setter from the property,
vTasks as a property -> getvTasks as a getter... which wasn't on your
bean... which is why you got the error. 

   public static String decapitalize(String name) {
if (name == null || name.length() == 0) {
return name;
}
if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
Character.isUpperCase(name.charAt(0))){
return name;
}
char chars[] = name.toCharArray();
chars[0] = Character.toLowerCase(chars[0]);
return new String(chars);
}

Hope this helps. I'll add something about this to the JSP Standards
document. There is already the following section on bean properties.

Bean Properties
Avoid properties that begin with two or more uppercase letters
AAA -> getAAA()
aaA -> getAaA()
AaA -> getAaA()???




How can I get a data source from custom tag?

2001-05-04 Thread Anna Hristova



Hi All,
 
I have different data sources defined in 
'struts-config.xml'. I want to use one of them from a custom tag. 
 
I know how to this from an Action class: 

    DataSource ds = (DataSource) 
servlet.findDataSource("dsUsers");
 
But in the custom tag I don't have reference to the 
'servlet' as in Action class How can I get it?
 
Any help will be appreciated. 
 
10x, Anna 


struts newbie trying to get onboard

2001-05-04 Thread Procek, Brett

Hello all, this is my first posting.  I'm trying to get onboard here
with one of those simple login
application I'm sure you've all seen.  I've spent some time trying to
get this to work.
I went through all steps to install struts on my workstation for Tomcat
3.2.1 and verified them several times. I even have the struts-example
application working, so I've come a little ways already.  

I'm using the sample login.jsp that one can find almost anywhere, but I
keep getting the same exception:

-
Root cause: 
javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection
at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
at
_0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_js
p_1.java:71)

-

I'm sure my taglibs are set up correctly, and I do have the struts.jar
file appended to the classpath.
Any help would be appreciated.
Thanks,
Brett



Here is the login.jsp file:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>

  

Username: 

Password: 


  
-





RE: Bean:message with args

2001-05-04 Thread Nanduri, Amarnath


Hello everybody,
 
 I am trying to test the iterate tag and i am getting the following error..
Can somebody point out as to what i am doing wrong ? Thanks a lot. I am
including the jsp code also. I am using Tomcat 3.2 and struts 1.0

cheers,
Amar..

ERROR
-
javax.servlet.ServletException: Cannot create iterator for this collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
_0002fpagerTest_0002ejsppagerTest_jsp_0._jspService(_0002fpagerTest_0002ejsp
pagerTest_jsp_0.java, Compiled Code)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java,
Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)



BEAN


public class StatesBean
{

  // stores an array list of states
  private  ArrayList  states  = new ArrayList() ;

  public StatesBean()
  {
states.add("ALABAMA");
states.add("ALASKA");
states.add("ARIZONA");
states.add("ARKANSAS" ) ;
states.add("CALIFORNIA") ;
states.add("COLORADO") ;
states.add("CONNECTICUT") ; 
  }


  public  Iterator  getStates()
  {
 return  states.iterator() ;
  }
}


JSP:


<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ page import =
"com.agilquest.onboard.presentation.actionforms.StatesBean" %>

<%
  {
com.agilquest.onboard.presentation.actionforms.StatesBean  statesBean =
new com.agilquest.onboard.presentation.actionforms.StatesBean() ;

pageContext.setAttribute("statesBean", statesBean,
PageContext.PAGE_SCOPE);
  }
%>














  

  



A Question about Transaction Tokens

2001-05-04 Thread yogesh kapoor

Hi All,
  I have just installed the struts1.0 b1 and the struts-example app. I wonder how the transaction token key works.Can anybody explain that to me please(it is a great stuff). 
  I checked out the code a bit and found out that struts is creating a transaction token key by convereting the session id and the current time to byte array and appending  it to a message digest . So how can the two tokens(one set before displaying the form and another set when submitting?) be equated when they have a time element involved in them.Antoher thing i could not undsrstand was that while saving the form the code retrieves the token using the request.getParameter(token_key), but where are we setting this paramater?
Can somebody explain , how are things working here?
Regards,
YogeshGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


basic forms/config question

2001-05-04 Thread Jeremy Mann


I have been trying to create a hello world with struts based on the login
example.  I have to the best of my knowledge done everything correctly as
stated in examples and documentation.  All I have is a simple page with a
form and 2 text fields in the form yet I still get the following error.

 "runtime error in custom tag 'form' " 

 I have read through all the documentation and can't figure out what I am
doing wrong.  Have you seen this?  What is a good way to debug?
 
Jeremy



Re: Servlets, Beans, Struts, and Threading

2001-05-04 Thread John Raley

Per Paul's comment, Servlets are allowed to create threads (EJB's are not).
However, a Servlet instance does get any special guarantees from the container
regarding synchronization.  Even a Servlet that is marked with the
SingleThreadModel is not, to my knowledge, protected from concurrent use by
other clients that can get to it.  The only promise is that the container will
not use it concurrently.  So making your RMI class into a Servlet won't prevent
two threads from using it at the same time.

Probably you will create a 'listener' object in application scope at startup
time.  When the listener receives info from the server it should put it in
application scope in an atomic (i.e. synchronized) manner  If your
Servlets/JSP's need to initiate communication you might have that go through
another object.  I don't know enough about what you're trying to do to make
more specific suggestions.

HTH,
John

Sean wrote:

> John,
>
> If I subclass servlets does that mean they always run within their own
> thread?  The reason I ask is that this "process" I am talking about is a
> connection to a remote server.  The calls to and from this process are
> asynchronous and thus the remote server can send messages to this process at
> any time reguardless if a request is being processed by Tomcat or not.  I
> want to make sure that this process has its own processing space (so it
> doesn't block) but still conform to the standards of the servlet container
> (i.e. startup and stop).  Since this process currently runs in its own
> thread implementing our own Service architecture I thought I might be able
> to subclass it and implement the Servlet interface in order to give it it's
> own thread of execution in the servlet container. That was what lead me to
> ask whether or not a Servlet is guaranteed to be in its own thread of
> execution.
>
> Any insight you, Paul, or anyone else could give here would be greatly
> appreciated.
>
> Sean
>
> - Original Message -
> From: "John Raley" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 03, 2001 12:20 PM
> Subject: Re: Servlets, Beans, Struts, and Threading
>
> > Sean,
> >
> > You would probably not write the task as a Servlet.  Instead, as part of
> your
> > startup you'd put the task in application scope.  Remember that
> Servlets/JSPs
> > that talk to the task are going to do so from different threads
> (potentially at
> > the same time).  The task would probably manage its own threads.  If it
> > executes periodically check out the Timer / TimerTask classes in
> java.util -
> > they might save you a fair amount of work.  There's no reason any of this
> > should be Tomcat-specific.




possible bug? "object is not an instance of declaring class" message

2001-05-04 Thread Iraklis Kourtidis

Hi fellow struts users,

I have been toiling with the following problem, and have not been able to
solve it even after looking at the Struts source and thoroughly checking the
mail archive. I wonder if it is a bug with Struts (?). The reason I dare say
that the problem may lie with Struts is that my code works the first few
times, but then fails. Here's a description:

I have an Action class that creates a couple of javabeans and places them on
the request. The JSP then displays them. The FIRST time I put my URL in the
browser, I see the results of the JSP correctly. Now, if I modify the JSP
(say, add a space and then delete it) and use the same URL, the whole thing
gets recompiled, and again I see the JSP output correctly. OK so far.

Then, when I use the same URL again, I get the following message:

  
<[WebAppServletContext(3068837,InfoportalJava)] Root cause of
ServletException
javax.servlet.jsp.JspException: Exception accessing property ichannelType
for bean anICLEntryBean: java.lang.IllegalArgumentException:
object is not an instance of declaring class
at
org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:
239)
at
org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:90)
at
org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagB
ase.java:218)
at
jsp_servlet._jsp._ichannel._displayiclist._jspService(_displayiclist.java:13
5)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:149)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1697)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1540)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

This is caused by the compiled code that corresponds to the following Struts
tag:


...

(the 'value' attribute evaluates to a String such as "2".)

Now, my javabean certainly has a property called 'ichannelType'; in fact, I
wrote some code that tests that this bean property exists when the javabean
gets placed on the request. So I don't see why that works for a few times at
first and then fails.

Any ideas on the subject will be greatly appreciated. In case this is
necessary, I am using BEA Weblogic as a JSP container.

thanks,
Iraklis




NEED HELP

2001-05-04 Thread TIqbal


I have one jsp page that dynamically generated and looks like as below. I
want to navigate to another jsp page when user selected 2 checkboxes and
press submit button. How do I know which two check buttons are checked? and
how I can pass customer number (key) and customer name to next page?

Any good idea /help to accomplish this taks.


Secondly on another jsp page I have three diffrent submit button ( <>
<> and <> ) How do i can associate with these button with 3
diffrent actions?


T H A N K S   I N   A  D  V  A  N  C  E

TAHIR




*---
--*
| SEL   CUSTOMERCUSTOMER
CUSTOMER|
|   NUMBER  NAME
ADDRESS |

*---
--*
   []   A   ROSE ANN
TORONTO, CANADA
   []   A   CRISTINA ANGHEL NEW
YORK, USA
   []   A   DAVED MILLER
LONDON, UK

*-*
|   SUBMIT  |
*-*


















RE: database connection

2001-05-04 Thread Gogineni, Pratima

 
in the databaseservlet class do: getServletContext().getAttribute(key);
-Original Message-
From: Ying Teng
To: [EMAIL PROTECTED]
Sent: 5/4/01 8:17 AM
Subject: RE: database connection

Yes, I can get the DataSource reference in the ServletContext object of
the
ActionServlet class. But I want to get the reference to the dataSource
in
the DatabaseServlet class. Can anyone tell me how to get the reference
to
the dataSource from the databaseServlet class? Thanks.

Ying

-Original Message-
From: Vivek Bhaskaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: database connection


A reference to the DataSource is stored in the ServletContext object...
You
can get it from that.

- Original Message -
From: "Ying Teng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 11:28 AM
Subject: RE: database connection


>
> What you described is true. Now my question is how to get the
datasource
> without referencing the actionServlet. I wanted to intialize the
database
> hashtable of the databaseServlet class in the databaseServlet init
function.
> In order to do that, I need to get the datasource. But I can not
reference
> the actionServlet because the action is initialized after the database
is
> initialized (as in the log file). Hope someone can give me some hints.
> Thanks.
>
> Ying
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: database connection
>
>
>
> You will add the key information to the datasource info in you
> struts-config.xml file  it will look like this:
> 
>key="[some name I'll use to reference this datasource]"
>autoCommit="false"
>description="Data Source Configuration"
>driverClass="org.gjt.mm.mysql.Driver"
>maxCount="4"
>minCount="2"
>password="pass"
>
> url
>
="jdbc:mysql://bethsoft.dev.zenimax.com:3306/test?user=user&password=pas
s
> "
>user="user"
> />
>   
>
> Then, after that's done, the easiest way to access it is to reference
it
by
> the action servlet (servlet),  because using actionServlet you can
just do
> servlet.findDataSource("the name you called your datasource")  and
voila,
> you have your datasource object.  From that datasource object you can
> create a connection.
> If you cannot access the actionServlet, then it's a little more
> difficult--and actually I wouldn't be able to help much there, but at
least
> your question would then be "how do I get the datasource without
> referencing the actionServlet"
>
> -Dallas
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




RE: Dynamic Error Messages

2001-05-04 Thread Gogineni, Pratima

 
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("view.construction.error", e.getMessage()));

in the application.properties you should have:

view.construction.error=Could not construct view because: {0}

e.getMessage() is substituted instead of {0}


-Original Message-
From: Darryl
To: [EMAIL PROTECTED]
Sent: 5/4/01 7:18 AM
Subject: Dynamic Error Messages

I can't figure out how to return dynamic error messages in the
ActionErrors collection. In other words, if an exception is thrown in an
Action object, I want to use the e.getMessage() to get the message
description and use that to populate an ActionError. The ActionError
class doesn't seem to have a constructor that supports this. Help!

- Darryl



RE: database connection

2001-05-04 Thread Gogineni, Pratima

 look at your web.xml file - 

you should have two  elements there one for DatabaseServlet and the
other for ActionServlet. each of them has a  element.

set the load-on-startup element of the actionservlet to 1 and that of
databaseservlet to 2. to indicate that the database servlet should be loaded
first.

-Original Message-
From: Ying Teng
To: Gogineni, Pratima
Sent: 5/4/01 12:10 PM
Subject: RE: database connection

I tried that. The ServletContext object does not have that attribute. If
you
look at the servlet.log file, the system initializes the database first
and
then action, datasource. So I am wondering how to let the system
initializes
the datasourc first so in the databaseServlet class, we can have access
to
the datasource.

My idea is to enable the system to write the database info to the
database.xml file when the database is initialized.

Thanks.

-Original Message-
From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 3:00 PM
To: 'Ying Teng '; '[EMAIL PROTECTED] '
Subject: RE: database connection



in the databaseservlet class do: getServletContext().getAttribute(key);
-Original Message-
From: Ying Teng
To: [EMAIL PROTECTED]
Sent: 5/4/01 8:17 AM
Subject: RE: database connection

Yes, I can get the DataSource reference in the ServletContext object of
the
ActionServlet class. But I want to get the reference to the dataSource
in
the DatabaseServlet class. Can anyone tell me how to get the reference
to
the dataSource from the databaseServlet class? Thanks.

Ying

-Original Message-
From: Vivek Bhaskaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: database connection


A reference to the DataSource is stored in the ServletContext object...
You
can get it from that.

- Original Message -
From: "Ying Teng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 11:28 AM
Subject: RE: database connection


>
> What you described is true. Now my question is how to get the
datasource
> without referencing the actionServlet. I wanted to intialize the
database
> hashtable of the databaseServlet class in the databaseServlet init
function.
> In order to do that, I need to get the datasource. But I can not
reference
> the actionServlet because the action is initialized after the database
is
> initialized (as in the log file). Hope someone can give me some hints.
> Thanks.
>
> Ying
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: database connection
>
>
>
> You will add the key information to the datasource info in you
> struts-config.xml file  it will look like this:
> 
>key="[some name I'll use to reference this datasource]"
>autoCommit="false"
>description="Data Source Configuration"
>driverClass="org.gjt.mm.mysql.Driver"
>maxCount="4"
>minCount="2"
>password="pass"
>
> url
>
="jdbc:mysql://bethsoft.dev.zenimax.com:3306/test?user=user&password=pas
s
> "
>user="user"
> />
>   
>
> Then, after that's done, the easiest way to access it is to reference
it
by
> the action servlet (servlet),  because using actionServlet you can
just do
> servlet.findDataSource("the name you called your datasource")  and
voila,
> you have your datasource object.  From that datasource object you can
> create a connection.
> If you cannot access the actionServlet, then it's a little more
> difficult--and actually I wouldn't be able to help much there, but at
least
> your question would then be "how do I get the datasource without
> referencing the actionServlet"
>
> -Dallas
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




RE: How can I get a data source from custom tag?

2001-05-04 Thread Gogineni, Pratima

 
but you have a reference to the pagecontext in which the tag is called
you could try 
(DataSource)pageContext.getAttribute("dsUsers",PageContext.APPLICATION_SCOPE
)
-Original Message-
From: Anna Hristova
To: Struts-User
Sent: 5/4/01 10:35 AM
Subject: How can I get a data source from custom tag?

Hi All,
 
I have different data sources defined in 'struts-config.xml'. I want to
use one of them from a custom tag. 
 
I know how to this from an Action class: 
DataSource ds = (DataSource) servlet.findDataSource("dsUsers");
 
But in the custom tag I don't have reference to the 'servlet' as in
Action class How can I get it?
 
Any help will be appreciated. 
 
10x, Anna 



Re: struts newbie trying to get onboard

2001-05-04 Thread Dan Miser

Did you write a struts-config.xml? If so, post it here so we can take a 
look. If not, take a look at the struts-example application and the docs to 
see how to define the form-bean and action-mapping. Also, you need to point 
to the config file in the action servlet definition of your web.xml. Again, 
struts-example should show you what to do.

Lastly, don't append the struts.jar to your classpath. For Tomcat, simply 
copy it to c:\tomcat\webapps\\WEB-INF\lib. Placing it anywhere 
else is asking for trouble.

Hope this helps.
--
Dan Miser
http://www.distribucon.com


>From: "Procek, Brett" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: struts newbie trying to get onboard
>Date: Fri, 4 May 2001 11:56:29 -0500
>-
>Root cause:
>javax.servlet.jsp.JspException: Cannot find ActionMappings or
>ActionFormBeans collection
>   at
>org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
>   at
>org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
>   at
>_0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_js
>p_1.java:71)
>
>-
>
>I'm sure my taglibs are set up correctly, and I do have the struts.jar
>file appended to the classpath.

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




Re: How can I get a data source from custom tag?

2001-05-04 Thread Dan Miser

This is now in the nightly build. Download it, and you should be able to do 
what you want.
--
Dan Miser
http://www.distribucon.com

>From: "Anna Hristova" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "Struts-User" <[EMAIL PROTECTED]>
>Subject: How can I get a data source from custom tag?
>Date: Fri, 4 May 2001 19:35:57 +0200
>
>I have different data sources defined in 'struts-config.xml'. I want to use 
>one of them from a custom tag.
>But in the custom tag I don't have reference to the 'servlet' as in Action 
>class How can I get it?

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




RE: struts newbie trying to get onboard

2001-05-04 Thread Deadman, Hal

Is the struts ActionServlet configured and starting up OK?  You should not
be using struts-form.tld either, it's deprecated. If you are using Struts
0.5, don't, use the Struts 1.0 beta.

> -Original Message-
> From: Procek, Brett [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 12:56 PM
> To: [EMAIL PROTECTED]
> Subject: struts newbie trying to get onboard
>
>
> Hello all, this is my first posting.  I'm trying to get onboard here
> with one of those simple login
> application I'm sure you've all seen.  I've spent some time trying to
> get this to work.
> I went through all steps to install struts on my workstation
> for Tomcat
> 3.2.1 and verified them several times. I even have the struts-example
> application working, so I've come a little ways already.
>
> I'm using the sample login.jsp that one can find almost
> anywhere, but I
> keep getting the same exception:
>
> -
> Root cause:
> javax.servlet.jsp.JspException: Cannot find ActionMappings or
> ActionFormBeans collection
>   at
> org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
>   at
> org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
>   at
> _0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ej
> splogin_js
> p_1.java:71)
>
> -
>
> I'm sure my taglibs are set up correctly, and I do have the struts.jar
> file appended to the classpath.
> Any help would be appreciated.
> Thanks,
> Brett
>
>
>
> Here is the login.jsp file:
> 
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
>
>   
>
>   Username: 
>
>   Password: 
>
>   
>   
> -
>
>



TEST (Please ignore it)

2001-05-04 Thread majid kamal

my first posting.

-- 
majid kamal
[EMAIL PROTECTED] - email
(781) 685-1450 x2371 - voicemail/fax



__
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com




RE: A Question about Transaction Tokens

2001-05-04 Thread Nanduri, Amarnath



The 
token is send as a hidden name=value pair in your html page. I believe a copy of 
the same value is stored in session object. When the user submits information 
back to the server, both these values are compared to make sure that they both 
match. If they both match, then the isTokenValid() returns  true, else 
false . Hope this helps.
 
cheers,
Amar..

  -Original Message-From: yogesh kapoor 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, May 04, 2001 1:11 
  PMTo: [EMAIL PROTECTED]Subject: A Question 
  about Transaction Tokens
  
  Hi All,
    
  I have just installed the struts1.0 b1 and the struts-example app. I wonder 
  how the transaction token key works.Can anybody explain that to me please(it 
  is a great stuff). 
    
  I checked out the code a bit and found out that struts is creating a 
  transaction token key by convereting the session id and the current time to 
  byte array and appending it to a message digest . So how can the two 
  tokens(one set before displaying the form and another set when 
  submitting?) be equated when they have a time element involved in them.Antoher 
  thing i could not undsrstand was that while saving the form the code retrieves 
  the token using the request.getParameter(token_key), but where are we setting 
  this paramater?
  Can 
  somebody explain , how are things working here?
  Regards,
  Yogesh
  
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
  


RE: Internationalised strings and scriptlets

2001-05-04 Thread Gogineni, Pratima

 I havent tried this but I am guessing you could get hold of the pagecontext
object and get a reference to the applicationresources from it - similar to
what you would do in a custom tag implementation.

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 5/3/01 1:45 AM
Subject: Internationalised strings and scriptlets


Is it possible to access internationalised messages from inside
scriptlets? 

For example consider a dropdown list populated with text strings
produced by a 
 tag.  I then want to do some processing based on a
user 
selection:

 <% 
 String selectedItem = request.getParameter( "dropDown" );
 String internationalisedString = ???
 if ( selectedItem.equals( internationalisedString ) ) 
 {
// do something
 } 
 %>

How do I get a value for internationalisedString?

Thanks,
Sam



--
This message was sent using http://uk2.net
NEWS - CHEAPEST DEDICATED SERVERS IN THE WORLD -  25/month
FREE UK DIAL 0845 609 1370 - username uk2: - password: uk2
UK's FREE Domains, FREE Dialup, FREE Webdesign, FREE email




RE: basic forms/config question

2001-05-04 Thread Abraham Kang

This is one of the banes that I have been working with on WebLogic 5.1 sp8.

I don't know if sp9 fixes it but what it means is one of the custom tags
within your
html:form tags is misconfigured, misspelled, missing a end tag or throwing
an exception.
To debug these I had to view the source of the Internal Server Error page.
If I was
lucky I could see some output to determine where in the JSP page I got the
error.  If you can't see any output when you view source I would
successively
add custom tags between the  tags until you get the error.

Good Luck,
Abraham

> -Original Message-
> From: Jeremy Mann [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: basic forms/config question
>
>
>
> I have been trying to create a hello world with struts based on the login
> example.  I have to the best of my knowledge done everything correctly as
> stated in examples and documentation.  All I have is a simple page with a
> form and 2 text fields in the form yet I still get the following error.
>
>  "runtime error in custom tag 'form' "
>
>  I have read through all the documentation and can't figure out what I am
> doing wrong.  Have you seen this?  What is a good way to debug?
>
> Jeremy
>




Re: A Question about Transaction Tokens

2001-05-04 Thread yogesh kapoor

the html:form tag creates a hidden field where it stores the trandsaction token key from the session transaction token key. This key is compared back to the session transaction token key while saving form to database.

>From: "yogesh kapoor" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED] 
>To: [EMAIL PROTECTED] 
>Subject: A Question about Transaction Tokens 
>Date: Fri, 04 May 2001 17:11:15 
> 
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Hi All,
  I have just installed the struts1.0 b1 and the struts-example app. I wonder how the transaction token key works.Can anybody explain that to me please(it is a great stuff). 
  I checked out the code a bit and found out that struts is creating a transaction token key by convereting the session id and the current time to byte array and appending  it to a message digest . So how can the two tokens(one set before displaying the form and another set when submitting?) be equated when they have a time element involved in them.Antoher thing i could not undsrstand was that while saving the form the code retrieves the token using the request.getParameter(token_key), but where are we setting this paramater?
Can somebody explain , how are things working here?
Regards,
YogeshGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: struts newbie trying to get onboard

2001-05-04 Thread Arlo Emerson



are your tld's in /WEB-INF/struts-form.tld or in /WEB-INF/TLDs/struts-form.tld?

To: [EMAIL PROTECTED]
cc:
From: [EMAIL PROTECTED]
Subject: struts newbie trying to get onboard


Hello all, this is my first posting.  I'm trying to get onboard here
with one of those simple login
application I'm sure you've all seen.  I've spent some time trying to
get this to work.
I went through all steps to install struts on my workstation for Tomcat
3.2.1 and verified them several times. I even have the struts-example
application working, so I've come a little ways already.

I'm using the sample login.jsp that one can find almost anywhere, but I
keep getting the same exception:

-
Root cause:
javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection
 at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
 at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
 at
_0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_js
p_1.java:71)

-

I'm sure my taglibs are set up correctly, and I do have the struts.jar
file appended to the classpath.
Any help would be appreciated.
Thanks,
Brett



Here is the login.jsp file:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>

  

  Username: 

  Password: 

 
  
-




www.lante.com
Harnessing the power of the Internet





Re: struts newbie trying to get onboard

2001-05-04 Thread Donnie_Hall



Don't include struts.jar in your classpath.  Make sure that struts.jar is in
your WEB-INF/lib directory.

See

http://www.husted.com/about/struts/threads.htm

for an explanation.

-Donnie Hall




|+--->
||  procek@lucent|
||  .com |
||   |
||  05/04/2001   |
||  11:56 AM |
||  Please   |
||  respond to   |
||  struts-user  |
||   |
|+--->
  >|
  ||
  |   To: [EMAIL PROTECTED]   |
  |   cc: (bcc: Donnie Hall/Enron Communications)  |
  |   Subject: struts newbie trying to get onboard |
  >|



Hello all, this is my first posting.  I'm trying to get onboard here
with one of those simple login
application I'm sure you've all seen.  I've spent some time trying to
get this to work.
I went through all steps to install struts on my workstation for Tomcat
3.2.1 and verified them several times. I even have the struts-example
application working, so I've come a little ways already.

I'm using the sample login.jsp that one can find almost anywhere, but I
keep getting the same exception:

-
Root cause:
javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection
   at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
   at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
   at
_0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_js
p_1.java:71)

-

I'm sure my taglibs are set up correctly, and I do have the struts.jar
file appended to the classpath.
Any help would be appreciated.
Thanks,
Brett



Here is the login.jsp file:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>

  

 Username: 

 Password: 

   
  
-









Re: NEED HELP

2001-05-04 Thread Scott Walter

With the checkboxes only the checkboxes that are
checked will be sent to the http header.  In other
words only checked checkboxes will have values from a 
request.getParameter("") call.

To pass a value onto the next page you could either
store in a hidden field on the first page or pass it
on the query string.

scott.
--- [EMAIL PROTECTED] wrote:
> 
> I have one jsp page that dynamically generated and
> looks like as below. I
> want to navigate to another jsp page when user
> selected 2 checkboxes and
> press submit button. How do I know which two check
> buttons are checked? and
> how I can pass customer number (key) and customer
> name to next page?
> 
> Any good idea /help to accomplish this taks.
> 
> 
> Secondly on another jsp page I have three diffrent
> submit button ( <>
> <> and <> ) How do i can associate
> with these button with 3
> diffrent actions?
> 
> 
> T H A N K S   I N   A  D  V  A  N  C  E
> 
> TAHIR
> 
> 
> 
>   
>
*---
> --*
>   | SEL   CUSTOMERCUSTOMER
> CUSTOMER  |
>   |   NUMBER  NAME
> ADDRESS   |
>   
>
*---
> --*
>  []   A   ROSE ANN
> TORONTO, CANADA
>  []   A   CRISTINA ANGHEL NEW
> YORK, USA
>  []   A   DAVED MILLER
> LONDON, UK
> 
>   *-*
>   |   SUBMIT  |
>   *-*
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 


=
~~~
Scott

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



RE: struts newbie trying to get onboard

2001-05-04 Thread Procek, Brett

You are correct, my ActionServlet is not starting up property.  I looked
at the output and I listed some of it below.
For some odd reason Struts cannot resolve a certain DTD that it needs.
Please take a quick look.  

Thanks for the help!
Brett


Starting tomcat. Check logs/tomcat.log for error messages 
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier
Parse Fatal Error at line 5 column -1: External entity not found:
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";.
org.xml.sax.SAXParseException: External entity not found:
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";.
at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
at
com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2506)
at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:13
01)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
at org.apache.tomcat.core.Handler.init(Handler.java:215)
at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnSta
rtupInterceptor.java:130)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:49
1)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
cannot load servlet name: action
register('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN',
'jar:file:/export/home/tomcat/webapps/TestApp/WEB-INF/lib/struts.jar!/or
g/apache/struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'jar:file:/export/home/tomcat/webapps/TestApp/WEB-INF/lib/struts.jar!/or
g/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:/export/home/tomcat/webapps/TestApp/WEB-INF/lib/struts.jar!/or
g/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Resolving to alternate DTD
'jar:file:/export/home/tomcat/webapps/TestApp/WEB-INF/lib/struts.jar!/or
g/apache/struts/resources/struts-config_1_0.dtd'
New org.apache.struts.action.ActionMapping

---







-Original Message-
From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 2:31 PM
To: [EMAIL PROTECTED]
Subject: RE: struts newbie trying to get onboard


Is the struts ActionServlet configured and starting up OK?  You should
not
be using struts-form.tld either, it's deprecated. If you are using
Struts
0.5, don't, use the Struts 1.0 beta.

> -Original Message-
> From: Procek, Brett [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 12:56 PM
> To: [EMAIL PROTECTED]
> Subject: struts newbie trying to get onboard
>
>
> Hello all, this is my first posting.  I'm trying to get onboard here
> with one of those simple login
> application I'm sure you've all seen.  I've spent some time trying to
> get this to work.
> I went through all steps to install struts on my workstation
> for Tomcat
> 3.2.1 and verified them several times. I even have the struts-example
> application working, so I've come a little ways already.
>
> I'm using the sample login.jsp that one can find almost
> anywhere, but I
> keep getting the same exception:
>
> -
> Root cause:
> javax.servlet.jsp.JspException: Cannot find ActionMappings or
> ActionFormBeans collection
>   at
> org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
>   at
> org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
>   at
> _0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ej
> splogin_js
> p_1.java:71)
>
> -
>
> I'm sure my taglibs are set up correctly, and I do have the struts.jar
> file appended to the classpath.
> Any help would be appreciated.
> Thanks,
> Brett
>
>
>
> Here is the login.jsp file:
> 
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
>
>   
>
>   Username: 
>
>   Password: 
>
>   
>   
> -
>
>



Re: struts newbie trying to get onboard

2001-05-04 Thread tpeters

The sample application shows how to do a login.

If you have that working, then you should be able to extract the needed code from 
there. If you go through the example you will see that there are several supporting 
classes for doing the login. One in paticular is the 'Constants.java' file which 
provides a way to store the session id in a key. There is also a 'login.jsp' file 
which needs to be linked to the 'LoginForm.java' bean. You link these files together 
in your 'struts-config.xml' file. Take a look there to see how the '/login' action is 
linked to the 'LoginAction' using the 'login.jsp' as the input.

Hope this helps...


On Fri, 04 May 2001, "Procek, Brett" wrote:

> 
> Hello all, this is my first posting.  I'm trying to get onboard here
> with one of those simple login
> application I'm sure you've all seen.  I've spent some time trying to
> get this to work.
> I went through all steps to install struts on my workstation for Tomcat
> 3.2.1 and verified them several times. I even have the struts-example
> application working, so I've come a little ways already.  
> 
> I'm using the sample login.jsp that one can find almost anywhere, but I
> keep getting the same exception:
> 
> -
> Root cause: 
> javax.servlet.jsp.JspException: Cannot find ActionMappings or
> ActionFormBeans collection
> at
> org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
> at
> org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
> at
> _0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_js
> p_1.java:71)
> 
> -
> 
> I'm sure my taglibs are set up correctly, and I do have the struts.jar
> file appended to the classpath.
> Any help would be appreciated.
> Thanks,
> Brett
> 
> 
> 
> Here is the login.jsp file:
> 
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
> 
>   
> 
> Username: 
> 
> Password: 
> 
> 
>   
> -

Thomas Peters

Senior Software Engineer
Aidera Solutions

Cell: 603-566-5406
Voice Mail: 603-888-7700



RE: basic forms/config question

2001-05-04 Thread Jeremy Mann

I tried that - In fact I tried a <% System.out.println("Hello") %> just
inside my  tag and it's not getting there.  This means that there
is a problem with the tag itself but I don't know what it is.

Jeremy

 -Original Message-
From:   Abraham Kang [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, May 04, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject:RE: basic forms/config question

This is one of the banes that I have been working with on WebLogic 5.1 sp8.

I don't know if sp9 fixes it but what it means is one of the custom tags
within your
html:form tags is misconfigured, misspelled, missing a end tag or throwing
an exception.
To debug these I had to view the source of the Internal Server Error page.
If I was
lucky I could see some output to determine where in the JSP page I got the
error.  If you can't see any output when you view source I would
successively
add custom tags between the  tags until you get the error.

Good Luck,
Abraham

> -Original Message-
> From: Jeremy Mann [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: basic forms/config question
>
>
>
> I have been trying to create a hello world with struts based on the login
> example.  I have to the best of my knowledge done everything correctly as
> stated in examples and documentation.  All I have is a simple page with a
> form and 2 text fields in the form yet I still get the following error.
>
>  "runtime error in custom tag 'form' "
>
>  I have read through all the documentation and can't figure out what I am
> doing wrong.  Have you seen this?  What is a good way to debug?
>
> Jeremy
>



RE: basic forms/config question

2001-05-04 Thread Jeremy Mann

One more thing

Here is my enter.jsp

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>









<% System.out.println("This is a Test"); %>

<% System.out.println("Thats right a test"); %>


  

UserName


  

  

  

  Password


  

  

  

  


  

  








and here is the snippet from strut-config.xml that applies to it

  
  







  


  
  
http://www.blackboard.com"/>
  


  
  



  http://www.nytimes.com"/>


any ideas?  Am I doing something inherently wrong?

Jeremy

 -Original Message-
From:   Abraham Kang [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, May 04, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject:RE: basic forms/config question

This is one of the banes that I have been working with on WebLogic 5.1 sp8.

I don't know if sp9 fixes it but what it means is one of the custom tags
within your
html:form tags is misconfigured, misspelled, missing a end tag or throwing
an exception.
To debug these I had to view the source of the Internal Server Error page.
If I was
lucky I could see some output to determine where in the JSP page I got the
error.  If you can't see any output when you view source I would
successively
add custom tags between the  tags until you get the error.

Good Luck,
Abraham

> -Original Message-
> From: Jeremy Mann [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: basic forms/config question
>
>
>
> I have been trying to create a hello world with struts based on the login
> example.  I have to the best of my knowledge done everything correctly as
> stated in examples and documentation.  All I have is a simple page with a
> form and 2 text fields in the form yet I still get the following error.
>
>  "runtime error in custom tag 'form' "
>
>  I have read through all the documentation and can't figure out what I am
> doing wrong.  Have you seen this?  What is a good way to debug?
>
> Jeremy
>



RE: struts newbie trying to get onboard

2001-05-04 Thread Procek, Brett

Actually, I must include the struts.jar file in my classpath.  However,
this is done automatically in the tomcat.sh script. The script
automatically includes all jar/zip files in the /lib directory.  Should
I remove this functionality?

Brett

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 3:19 PM
To: [EMAIL PROTECTED]
Subject: Re: struts newbie trying to get onboard




Don't include struts.jar in your classpath.  Make sure that struts.jar
is in
your WEB-INF/lib directory.

See

http://www.husted.com/about/struts/threads.htm

for an explanation.

-Donnie Hall




|+--->
||  procek@lucent|
||  .com |
||   |
||  05/04/2001   |
||  11:56 AM |
||  Please   |
||  respond to   |
||  struts-user  |
||   |
|+--->
 
>---
-|
  |
|
  |   To: [EMAIL PROTECTED]
|
  |   cc: (bcc: Donnie Hall/Enron Communications)
|
  |   Subject: struts newbie trying to get onboard
|
 
>---
-|



Hello all, this is my first posting.  I'm trying to get onboard here
with one of those simple login
application I'm sure you've all seen.  I've spent some time trying to
get this to work.
I went through all steps to install struts on my workstation for Tomcat
3.2.1 and verified them several times. I even have the struts-example
application working, so I've come a little ways already.

I'm using the sample login.jsp that one can find almost anywhere, but I
keep getting the same exception:

-
Root cause:
javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection
   at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703)
   at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
   at
_0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_js
p_1.java:71)

-

I'm sure my taglibs are set up correctly, and I do have the struts.jar
file appended to the classpath.
Any help would be appreciated.
Thanks,
Brett



Here is the login.jsp file:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>

  

 Username: 

 Password: 

   
  
-









RE: struts newbie trying to get onboard

2001-05-04 Thread Procek, Brett

Ok, what I did was simply remove the reference to the DTD in the
struts-config.xml file.  Now, the ActionServlet does load up.  However,
I am getting one more problem:

javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/login
at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:714)
at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
at
_0002flogin_0002ejsplogin_jsp_3._jspService(_0002flogin_0002ejsplogin_js
p_3.java:71)


The example I am coping is exactly the same.  Here is my
struts-config.xml file:


  

  


 



  


  



I'm sure when I can get this to work it'll all be worth it.
Thanks!!
Brett



Re: Bean:message with args

2001-05-04 Thread Stephen Schaub

> Is there a way to acheive the following :
> "/>
> without resorting to scriplets

I was looking for a way to do this a while back; currently
you have to resort to a scriptlet. I proposed and created an
implementation that allows you to do this:



The { } in argX parameters tell my modified bean:message tag
to use the bean introspection to insert the value of the
bean. If you're interested in the code, I'll be glad to
share it.

Stephen

- Original Message -
From: "Jon.Ridgway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 10:36 AM
Subject: Bean:message with args


Hi all,

Is there a way to acheive the following :

"/>

without resorting to scriplets, ie :




would work but just doesn't sit right with me.

Any ideas.

Jon.





JDBC driver specific functionality/GenericConnections

2001-05-04 Thread David Noll

Hello,

I would like to access functionality specific to the MM MySql driver in an
application that uses Struts' datasource pool and am having a bit of
troubling casting a GenericConnection back to an
org.gjt.mm.mysql.Connection. Casting from a GenericConnection to an
org.gjt.mm.mysql.Connection results in a class cast exception; casting a
Statement or PreparedStatement generated by the GenericConnection produces a
null pointer exception. I am working with Struts 1.0-beta-1 and MM Mysql
2.0.4.

If it sheds any light on the problem, the MM function I would like to access
is PreparedStatement.getLastInsertID(). Has anyone successfully prosecuted
this?

On a tangential note--why is the getConnection() method in GenericConnection
private? Were it public, I assume I could use it to get an MM Connection and
execute MySql specific functions to my heart's content.

Thanks is advance,
David






ping - ignore me

2001-05-04 Thread Harald Kornfeil

sorry - just checking - i am having problems sending mail to the list




Bug? TC4beta3 + struts-session-bean -> cannot serialize ??? (long!)

2001-05-04 Thread Harald Kornfeil

Hi List :-) !

I changed from TC3.2.1 to TC4b3 and experienced a strange
problem: after restarting a webapplication/the server I got the following
Error:
| HTTP Status 503 - This application is not currently
| available
|
|The requested service (This application is not currently available) is not 
|currently available.

So I searched the log-files -> and found the following test-cases:

case A) with a data-source section in struts-config.xml
===
after calling startup.sh the log says

2001-05-05 01:13:52 action: init
2001-05-05 01:13:52 action: Loading application resources from resource
org.apache.struts.example.Quis
2001-05-05 01:13:52 action: Initializing configuration from resource path
/WEB-INF/struts-config.xml
2001-05-05 01:13:52 action: Initializing application data source
org.apache.struts.action.DATA_SOURCE
2001-05-05 01:13:53 action: Process servletName=action, urlPattern=*.do
2001-05-05 01:13:53 action: Mapping for servlet 'action' = '*.do'

[playing around and creating a session]

after calling shutdown.sh the log says

2001-05-05 01:26:53 StandardHost[localhost]: standardHost.stop /quis
2001-05-05 01:26:53 Manager[/quis]: Cannot serialize session attribute
itemForm for session B1F2D2E20324816389E27719D5B2E592
2001-05-05 01:26:53 action: Finalizing this controller servlet
2001-05-05 01:26:53 action: Finalizing application data source
org.apache.struts.action.DATA_SOURCE
2001-05-05 01:26:53 ssi: destroy

when i startup tomcat now and call my webapp I get the message mentioned
above:
| HTTP Status 503 - This application is not currently
| available
|
|The requested service (This application is not currently available) is not 
|currently available.

and the log says:

2001-05-05 01:28:38 StandardHost[localhost]: Installing web application at
context path /quis from URL file:/usr/local/jakarta-tomcat-4.0-b3/webapps/quis
2001-05-05 01:28:38 Manager[/quis]: Seeding random number generator class
java.security.SecureRandom
2001-05-05 01:28:38 Manager[/quis]: Seeding of random number generator has
been completed
2001-05-05 01:28:38 StandardContext[/quis]: Exception loading sessions from
persistent storage
java.io.WriteAbortedException: Writing aborted by exception;
java.io.NotSerializableException: AT.ac.akhwien.quis.ItemSelectAction
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:445)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.util.HashMap.readObject(HashMap.java:840)
at java.lang.reflect.Method.invoke(Native Method)
   [deleted]
2001-05-05 01:28:38 StandardContext[/quis]: Context startup failed due to
previous errors


The webapplication only works again after deleting SESSIONS.ser in the 
folder $TOMCAT_HOME/work/localhost/quis/

case B)  no data-source - section in struts-config.xml
==

after calling startup.sh the log says

2001-05-04 23:15:54 action: init
2001-05-04 23:15:54 action: Loading application resources from resource
org.apache.struts.example.Quis
2001-05-04 23:15:54 action: Initializing configuration from resource path
/WEB-INF/struts-config.xml
2001-05-04 23:15:54 action: Process servletName=action, urlPattern=*.do
2001-05-04 23:15:54 action: Mapping for servlet 'action' = '*.do'

[playing around and creating a session]

after calling shutdown.sh the log says

2001-05-04 23:20:30 StandardHost[localhost]: standardHost.stop /quis
2001-05-04 23:20:31 StandardContext[/quis]: Exception unloading sessions to
persistent storage
java.lang.NoClassDefFoundError: javax/sql/DataSource
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:1039)
at
java.io.ObjectStreamClass.computeSerialVersionUID(ObjectStreamClass.java:873)
   [deleted]
2001-05-04 23:20:31 action: Finalizing this controller servlet


why is there "java.lang.NoClassDefFoundError: javax/sql/DataSource" when 
there is no data-source section defined?

So I asked myself: "Why do I get an error - and not the example?"
There is no data-source section in struts-example - and there is
no Error message when tomcat is finalizing struts-example!

2001-05-04 23:20:31 ssi: destroy
2001-05-04 23:20:31 StandardHost[localhost]: standardHost.stop /struts-example
2001-05-04 23:20:31 database: Finalizing database servlet
2001-05-04 23:20:31 database: Unloading database to
'/usr/local/jakarta-tomcat-4.0-b3/bin/../webapps/struts-example/WEB-INF/data
base.xml'
2001-05-04 23:20:31 action: Finalizing this controller servlet

BUT: Changing the scopes in struts-config.xml from request to session
[starting - playing - stopping]
brings up this log:

2001-05-05 01:07:31 ssi: destroy
2001-05-05 01:07:31 StandardHost[localhost]: standardHost.stop /struts-example
2001-05-05 01:07:31 StandardContext[/struts-example]: Exception unloading
sessions to persistent storage
java.lang.NoClassDefFoundError: javax/sql/Data