Displaying non-String properties of beans

2002-03-27 Thread Rick Reumann

I'm sure this question has come up but I'm not having much luck search
the archives. I'm really new to Struts so I hope this question isn't
too out of place for this list. Lets see we are dealing with Employee
beans.
I like to have my EmployeeBean maintain the datatypes of the members
to not have to all be Strings. (In this example say Age would be an
int, birthDate a java.util.Date, etc.). Now in my sample app I'm
practicing with I have an EmployeeForm class also that currently has
just String datatypes for these fields.  Having the information from
the actual form jsp's going to the EmployeeForm in as all Strings
without any conversions is not that big of a deal since wherever I do
anything with this data (jdbc inserts in the business logic I could
always covert them there if I need to ). However, I'm more concerned
with getting this information out and to display using the tags. For
example, say I have on an Action class that gets back and ArrayList of
EmployeeBean objects and puts this list into the request before
forwarding. I assume I can't do:









since I won't have birthDate formatted correctly, or say I was
returning a Double that I needed in a currency format. What is the
best way to deal with this situation?  I could of course maybe have my
business logic return me a Collection of EmployeeForm beans instead
and inside the EmployeeForm beans there would be methods like
setBirthDateDate( Date date ) that would take a java.util.Date and format it into
a String and then call the EmployeeForm setBrithDate( String date ).
Although that would work, I'd still rather deal with the business
logic that returns a Collection of EmployeeBeans... as this seems to
make the most reusable sense (maybe the components later won't just be
for the web).

Thanks for any help.

--

Rick

mailto:[EMAIL PROTECTED]

"Marta was watching the football game with me when she said, 'You
know, most of these sports are based on the idea of one group
protecting its territory from invasion by another group.' 'Yeah,' I
said, trying not to laugh. Girls are funny."
  -Jack Handey


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




Migrating an existing architecture to Struts

2002-03-27 Thread bhatia10

I have a servlet based application, that uses client side xml parsing to
generate html served on the IE browser using xsl. It is quite tedious to
maintain this application (i have inherited it without support and it is a
modest size application). it is frames and lots of Javascript.

Anyways, the model is a single servlet application that uses POST for login
and GET for everything else. What my question is that I am considering
applying the Struts MVC-2 structure, I have studied MVC and understand how
the architecture works.

I wanted to get the opinion of users on this list to please share their
views on their projects of migrating an existing architecture to Struts. In
terms of

* how difficult was it
* is it worth the time and effort
* any pointers??
* in view of the articles written on structs, any online on migration?

I would appreciate your answers and I believe that it would help other users
too.

BH.

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




Re: Need example on using roles in struts-tiles

2002-03-27 Thread Reynaldo Timonera

Thanks Ted.

We are using database-based authentifiication -- we store our user and role
in a database. We retrieve these user and role info everytime the user logs
in and place the info in session scrope. I was thinking  if we can set the
isUserInRole according to the user's role from the database and not from the
container's web.xml. So I guess the question would be: is it still possible
to use the security role of tiles for this setup -- database-based.


Thanks again,

Reynaldo

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 8:43 AM
Subject: Re: Need example on using roles in struts-tiles


> When container-based authentification is being used, you can specify the
> secuirty role for a tile. If the user is not in the specified role, then
> the attribute value is not set. This allows you to specify a tile for
> each security role, and let the framework select the appropriate one for
> the current user.
>
> 
> 
>
> If the put command is being used in an insert tag, the role is checked
> immediately.  If the put command is being used within a definition tag,
> the role is checked when the Tile context is initialized
>
> Jakarta taglibs also has a handy IsUserInRole tag in the request taglib.
>
> http://jakarta.apache.org/taglibs/doc/request-doc/index.html
>
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services
>
>
> Reynaldo Timonera wrote:
> >
> > Hi,
> >
> > We are now in the middle of a project and we're using tiles. Does anyone
have a sample code on how to use roles in tiles?
> >
> > Thanks,
> > Reynaldo
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: source generator

2002-03-27 Thread Michael Grafton

Hi Annie,

I looked into doing this a while ago, and found out there is tool for
generating EJBs from an existing database, called Middlegen:

http://boss.bekk.no/boss/middlegen/

It's somehow hooked up with XDoclet, which has the ability to generated
Castor value objects I believe.  So even though you don't need EJBs it
seems that somehow you could go from Oracle->Castor.  But you'd have to dig
a little deeper than I did.

Mike.

> Hi,
> I'm planning to use Struts, Castor and Oracle to develop a web
> application. Sorry to ask a Castor question here, because I think many
> people are using Castor here.
>
> I'm a newbie of Castor. I want to use Castor with Oracle to generate
> all value objects of tables. What steps should I take? And How the
> source generator can help me to generate source code?
>
> Suppose I have add some code to the generated java files, and in the
> further, I modify the table definiation. What will happen if I
> re-generate the java files? All the code I added will lost?
>
> Thanks
>
> Annie




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




Struts Config Problem - Ryan Norman

2002-03-27 Thread Ryan Norman

Hi All,

I am Ryan Norman

I am trying to put together a simple sample application. 
Right now I have a login page upon submitting the user name and password I want it to 
be transferred
to another page.

For some reason, it is not working.

Can somebody help me with this?

I am pasting my code and struts-config.xml file contents.

Thanks in advance

struts-config.xml



http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>




  
  

  

  
  

   
  

  
  
   
   


  

  
  















  


LoginAction.java

package strutstest1;

import java.io.PrintWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

public class LoginAction extends Action
{
 public ActionForward perform( ActionServlet servlet,
   ActionMapping mapping,
  ActionForm form,
  javax.servlet.http.HttpServletRequest request,
  javax.servlet.http.HttpServletResponse response )
  {
  String userID = "";
String password = "";

PrintWriter out = null;

   ActionForward actionForward = null;

try
{
 userID = ( ( LoginForm ) form ).getUserID();
 password = ( ( LoginForm ) form ).getPassword();

  out = response.getWriter();

  out.println( "User ID  = [" + userID + "] " );
  out.println( "Password = [" + password + "] " );
}
catch( Exception error )
{
 System.out.println( "Error Occurred: " + error.toString() );
}

actionForward = mapping.findForward( "success" );

return( actionForward );
  }
}


LoginForm.java
===
package strutstest1;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;

public class LoginForm extends ActionForm
{
 private String userID = "";
  private String password = "";

  public String getUserID()
  {
   return( ( userID == null ? "" : userID ) );
  }
  public void setUserID( String userID )
  {
   this.userID = ( userID == null ? "" : userID );
  }

  public String getPassword()
  {
   return( ( password == null ? "" : password ) );
  }
  public void setPassword( String password )
  {
   this.password = ( password == null ? "" : password );
  }

  public ActionErrors validate( ActionMapping mapping, 
javax.servlet.http.HttpServletRequest request )
  {
   ActionErrors actionErrors = new ActionErrors();

if( this.getUserID().equals( "" ) )
{
   actionErrors.add( "userID", new ActionError( "error.login.blankuserid" ) );
}

if( this.getPassword().equals( "" ) )
{
   actionErrors.add( "password", new ActionError( "error.login.blankpassword" ) );
}

return( actionErrors );
  }
}





RE: Accessing action object inside the form bean

2002-03-27 Thread Javier Campoamor

You can also use a promptAction, to populate the form with the values that
you want, before putting it into the request. Some thing lije this:
PromptAction(Populates the form with default values)->ActionForm(Gets the
user input)->DoAction(Process the form)

Regards


> -Mensaje original-
> De: srinivas [mailto:[EMAIL PROTECTED]]
> Enviado el: jueves 28 de marzo de 2002 0:23
> Para: Struts Users Mailing List
> Asunto: RE: Accessing action object inside the form bean
>
>
> hello,
>
> set the scope in the struts-config.xml for the action to have session.
> type=""
> scope="session"
> name=""
> >
> 
> then set the fields u want to save across requests in the form bean.
> in this case new instance will not be created.
>
> hope this helps.
>
> regards,
> srinivas
> -Original Message-
> From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 1:07 AM
> To: Struts Group (E-mail)
> Subject: Accessing action object inside the form bean
>
>
> Hi,
>
> I open a form, collect user input and on submit store it in the
> action class
> (inside perform()) as
> instance variables. Next time when the same form is opened, I want to
> retrieve the values
> stored in the action class. Since a new instance of the form bean
> is created
> every time a form
> is accessed, is there anyway to get the field values stored in the action
> class from the bean
> form?
>
> Thanks,
> Bhaskar
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




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




RE: torque & struts

2002-03-27 Thread Robert Morse

Just Torque, but it has a connection pool mechanism.

-Original Message-
From: Hoang, Hai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:46 PM
To: 'Struts Users Mailing List'
Subject: RE: torque & struts


Do you use Fulcrum along with Torque? I think Fulcrum has lots of services
available such as caching, pool, and etc...I want to use Fulcrum but I don't
know how to set it up to work with Tomcat

-Original Message-
From: Robert Morse [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 4:42 PM
To: Struts Users Mailing List
Subject: RE: torque & struts

Torque is from the 2/25/2002 nightly, and the database is Oracle 9i (9.0.1).

-Original Message-
From: James A. Hillyerd [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:19 PM
To: Struts Users Mailing List
Subject: RE: torque & struts


What version of Torque are you using in production?  And with what
database, if I may ask?

Thanks.

-james

On Wed, 2002-03-27 at 05:18, Robert Morse wrote:
> Yes, and using it in production.  What questions do you have?
>

--
[]  James A. Hillyerd <[EMAIL PROTECTED]> - Java Developer
[]  PGP 1024D/D31BC40D F87B 7906 C0DA 32E8 B8F6 DE23 FBF6 4712 D31B C40D


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Where is struts-config.xml specification - Ryan Norman

2002-03-27 Thread srinivas

hi,

attached are the dtd's for struts1.0 and 1.1 config files. Its packed with
the struts src code.
hope this helps you.

regards,
srinivas



-Original Message-
From: Ryan Norman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:26 AM
To: [EMAIL PROTECTED]; LA Java User Group
Subject: Where is struts-config.xml specification - Ryan Norman


Hi,

I am Ryan Norman.

I know there is a specification given by sun for the web deployment
description (web.xml).
Is there one for the struts-config.xml file? Does anybody know where to find
the struts-config.xml tag specification file?

Thanks in advance

Ryan Norman


































































































































































































































































































































  

























































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


RE: self.close() exception

2002-03-27 Thread srinivas

hello,

thats not an error actually.
You are submitting a form and closing the window. So the webserver couldn't
complete ur request so the stack trace.

regards,
srinivas

-Original Message-
From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 11:15 PM
To: Struts Group (E-mail)
Subject: self.close() exception


Hi,
I'm trying to close a window from a javascript function and getting this
error:

java.net.SocketException: socket closed (code=0)
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.io.IOException(java.lang.String)
java.net.SocketException(java.lang.String)
int java.net.SocketInputStream.socketRead(byte [], int, int,
java.net.SocketImpl, java.io.FileDescriptor)
int java.net.SocketInputStream.read(byte [], int, int)
int java.net.SocketInputStream.read()
java.lang.String java.io.DataInputStream.readLine()
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(
java.net.Socket)
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
void java.lang.Thread.run()

The code is:
function setFilter() {
document.PipelineFilterForm.submit();
self.close();
}



Pls help.

Thnx,
Bhaskar

--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Where is struts-config.xml specification - Ryan Norman

2002-03-27 Thread Ryan Norman

Hi,

I am Ryan Norman.

I know there is a specification given by sun for the web deployment description 
(web.xml).
Is there one for the struts-config.xml file? Does anybody know where to find the 
struts-config.xml tag specification file?

Thanks in advance

Ryan Norman




RE: Accessing action object inside the form bean

2002-03-27 Thread srinivas

hello,

set the scope in the struts-config.xml for the action to have session.
   

then set the fields u want to save across requests in the form bean.
in this case new instance will not be created.

hope this helps.

regards,
srinivas
-Original Message-
From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:07 AM
To: Struts Group (E-mail)
Subject: Accessing action object inside the form bean


Hi,

I open a form, collect user input and on submit store it in the action class
(inside perform()) as
instance variables. Next time when the same form is opened, I want to
retrieve the values
stored in the action class. Since a new instance of the form bean is created
every time a form
is accessed, is there anyway to get the field values stored in the action
class from the bean
form?

Thanks,
Bhaskar

--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Accessing action object inside the form bean

2002-03-27 Thread Bhaskar Gopalan

Hi,

I open a form, collect user input and on submit store it in the action class
(inside perform()) as
instance variables. Next time when the same form is opened, I want to
retrieve the values
stored in the action class. Since a new instance of the form bean is created
every time a form
is accessed, is there anyway to get the field values stored in the action
class from the bean
form?

Thanks,
Bhaskar

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




Fulcrum and Torque with Struts in Tomcat

2002-03-27 Thread Hoang, Hai

Anyone is using Fulcrum and Torque with Struts in Tomcat?  If so, can you
share some experience and maybe show me how to initialize fulcrum.

 

Hai Hoang

Continental Airlines

(713) 324-9029 

 




RE: torque & struts

2002-03-27 Thread Hoang, Hai

Do you use Fulcrum along with Torque? I think Fulcrum has lots of services
available such as caching, pool, and etc...I want to use Fulcrum but I don't
know how to set it up to work with Tomcat

-Original Message-
From: Robert Morse [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 27, 2002 4:42 PM
To: Struts Users Mailing List
Subject: RE: torque & struts

Torque is from the 2/25/2002 nightly, and the database is Oracle 9i (9.0.1).

-Original Message-
From: James A. Hillyerd [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:19 PM
To: Struts Users Mailing List
Subject: RE: torque & struts


What version of Torque are you using in production?  And with what
database, if I may ask?

Thanks.

-james

On Wed, 2002-03-27 at 05:18, Robert Morse wrote:
> Yes, and using it in production.  What questions do you have?
>

--
[]  James A. Hillyerd <[EMAIL PROTECTED]> - Java Developer
[]  PGP 1024D/D31BC40D F87B 7906 C0DA 32E8 B8F6 DE23 FBF6 4712 D31B C40D


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: torque & struts

2002-03-27 Thread Robert Morse

Torque is from the 2/25/2002 nightly, and the database is Oracle 9i (9.0.1).

-Original Message-
From: James A. Hillyerd [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:19 PM
To: Struts Users Mailing List
Subject: RE: torque & struts


What version of Torque are you using in production?  And with what
database, if I may ask?

Thanks.

-james

On Wed, 2002-03-27 at 05:18, Robert Morse wrote:
> Yes, and using it in production.  What questions do you have?
>

--
[]  James A. Hillyerd <[EMAIL PROTECTED]> - Java Developer
[]  PGP 1024D/D31BC40D F87B 7906 C0DA 32E8 B8F6 DE23 FBF6 4712 D31B C40D


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




source generator

2002-03-27 Thread Annie Zhang

Hi, 
I'm planning to use Struts, Castor and Oracle to develop a web application. Sorry to 
ask a Castor question here, because I think many people are using Castor here.

I'm a newbie of Castor. I want to use Castor with Oracle to generate all value objects 
of tables. What steps should I take? And How the source generator can help me to 
generate source code?

Suppose I have add some code to the generated java files, and in the further, I modify 
the table definiation. What will happen if I re-generate the java files? All the code 
I added will lost?

Thanks

Annie



Question about include page and formbean

2002-03-27 Thread @Basebeans.com

Subject: Question about include page and formbean
From: "Jack Gao" <[EMAIL PROTECTED]>
 ===
Hi, list

I'm trying to develop a user management system by using struts.

Let's say my system has some plug-ins, and each plug-in has their own user
management system also. But system level user management should include all
user management system inside each plug-in. So my system level user
management page will include plug-in level user management page.

But the problem is formbean. How can I implement this formbean for system
level and plug-in?

Thanks a lot.

Jack



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




RE: torque & struts

2002-03-27 Thread James A. Hillyerd

What version of Torque are you using in production?  And with what
database, if I may ask?

Thanks.

-james

On Wed, 2002-03-27 at 05:18, Robert Morse wrote:
> Yes, and using it in production.  What questions do you have?
> 
 
-- 
[]  James A. Hillyerd <[EMAIL PROTECTED]> - Java Developer
[]  PGP 1024D/D31BC40D F87B 7906 C0DA 32E8 B8F6 DE23 FBF6 4712 D31B C40D


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




Re: Why Struts - Ryan Norman

2002-03-27 Thread Jim.W.Berg

Ryan,
   Struts is app server neutral.  I am currently working on a project 
using struts and WebLogic. We have saved a tremendous amount of time by 
implementing struts as our framework.  You should not be looking at this 
as struts and Tomcat versus Web Sphere and ?  You should look at this as 
struts and whichever ap server you want. 

Jim Berg 





"Ryan Norman" <[EMAIL PROTECTED]>

27-Mar-2002 12:48
Please respond to "Struts Users Mailing List" 
<[EMAIL PROTECTED]>

 
 

To: struts-user, "LA Java User Group"

cc: 
Subject:Why Struts - Ryan Norman

Hi,

I am Ryan Norman.

Are there frameworks available in other commercial Java Web Servers like 
Web Sphere, iPlanet, JRun, etc.

. If so why should somebody use struts framework rather than using the Web 
Server's native framework?
. Are there people who are using struts with commercial Java Web Server 
like Web Sphere, iPlanet, JRun, etc.

Thanks in advance

Ryan Norman






Re: self.close() exception

2002-03-27 Thread Adam Grohs

Bhaskar,
To the best of my knowledge, this approach outlined below has several
minor flaws.  First, it is not possible for the javascipt self.slose()
method to throw a java exception; That exception is likely being thrown by
your action class.  Second, in order to acomplish the functionality that it
appears you are describing, ie. submitting a form in a popup window and then
closing the window, you would need to do something like the following:

function setFilter() {
document.PipelineFilterForm.submit();
}


You may also consider using a regular html:submit button and avoid this
javascript above all together (preferable)
and then AFTER the form is submitted, have your action class forward to a
new generic page with some very simple code like



function closeWindow(){
self.close();
}






OR




function closeWindow(){
self.close();
}
closeWindow();




Not sure if this is the best approach, but it ensures that your action class
succeeds before your window closes, so if there is an error you can forward
to a different page while still inside of the popup window.

Just my 2 cents,
Adam Grohs

- Original Message -
From: "Bhaskar Gopalan" <[EMAIL PROTECTED]>
To: "Struts Group (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 4:14 PM
Subject: self.close() exception


> Hi,
> I'm trying to close a window from a javascript function and getting this
> error:
>
> java.net.SocketException: socket closed (code=0)
> java.lang.Throwable(java.lang.String)
> java.lang.Exception(java.lang.String)
> java.io.IOException(java.lang.String)
> java.net.SocketException(java.lang.String)
> int java.net.SocketInputStream.socketRead(byte [], int, int,
> java.net.SocketImpl, java.io.FileDescriptor)
> int java.net.SocketInputStream.read(byte [], int, int)
> int java.net.SocketInputStream.read()
> java.lang.String java.io.DataInputStream.readLine()
> void
>
com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(
> java.net.Socket)
> void
> com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
> void java.lang.Thread.run()
>
> The code is:
> function setFilter() {
> document.PipelineFilterForm.submit();
> self.close();
> }
>
>  property="submitButton"/>
>
> Pls help.
>
> Thnx,
> Bhaskar
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




self.close() exception

2002-03-27 Thread Bhaskar Gopalan

Hi,
I'm trying to close a window from a javascript function and getting this
error:

java.net.SocketException: socket closed (code=0)
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.io.IOException(java.lang.String)
java.net.SocketException(java.lang.String)
int java.net.SocketInputStream.socketRead(byte [], int, int,
java.net.SocketImpl, java.io.FileDescriptor)
int java.net.SocketInputStream.read(byte [], int, int)
int java.net.SocketInputStream.read()
java.lang.String java.io.DataInputStream.readLine()
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(
java.net.Socket)
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
void java.lang.Thread.run()

The code is:
function setFilter() {
document.PipelineFilterForm.submit();
self.close();
}



Pls help.

Thnx,
Bhaskar

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




an org.xml.sax.ErrorHandler was not set?

2002-03-27 Thread Rick Reumann

I hate to post about a stupid null pointer exception as I'm sure it
will end up being something stupid I'm doing. I'm modifying some of my
code to follow some of David's validation examples. Currently when one
of my forms gets submitted it's supposed to get validated but comes
back with a null pointer exception. Looking at the tomcat output in
the console window shows:

Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired.  Parser will use a default
ErrorHandler to print the first 10 errors.  Please call
the 'setErrorHandler' method to fix this.
Error: URI=null Line=62: Element "web-app" does not allow "servlet" here.
Error: URI=null Line=71: Element "web-app" does not allow "servlet" here.
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired.  Parser will use a default
ErrorHandler to print the first 10 errors.  Please call
the 'setErrorHandler' method to fix this.
Error: URI=null Line=62: Element "web-app" does not allow "servlet" here.
Error: URI=null Line=71: Element "web-app" does not allow "servlet" here.
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired.  Parser will use a default
ErrorHandler to print the first 10 errors.  Please call
the 'setErrorHandler' method to fix this.
Error: URI=null Line=62: Element "web-app" does not allow "servlet" here.
Error: URI=null Line=71: Element "web-app" does not allow "servlet" here.
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired.  Parser will use a default
ErrorHandler to print the first 10 errors.  Please call
the 'setErrorHandler' method to fix this.
Error: URI=null Line=62: Element "web-app" does not allow "servlet" here.
Error: URI=null Line=71: Element "web-app" does not allow "servlet" here.
2002-03-27 15:47:46 - DecodeInterceptor: Charset from session ISO-8859-1
2002-03-27 15:47:46 - Ctx(/backoffice) : Exception in R( /backoffice + /do + /in
sertEmployee) - java.lang.NullPointerException
at org.apache.commons.validator.Validator.(Unknown Source)
{etc..}

Any idea what I have screwed up?


-- 

Rick
mailto:[EMAIL PROTECTED]

"When the chairman introduced the guest speaker as a former illegal
alien, I got up from my chair and yelled, 'What's the matter, no jobs
on Mars?' When no one laughed, I was real embarrassed. I don't think
people should make you feel that way." 
  -Jack Handey


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




Re: struts tool ?

2002-03-27 Thread Marcelo Vanzin

Johann Eder wrote:
> The question is: anybody knows a tool, extension or whatever that actually
> work with struts tags ?

From the Struts "Resources" page:
http://jakarta.apache.org/taglibs/doc/ultradev4-doc/intro.html

You will have to modify your JSPs a little (we code a small scriptlet 
that instantiates the FormBean and put it in some scope - a shell script 
comments it out for production) for it to work with Struts, but it works.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
"Life is too short to drink cheap beer"


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




RE: struts tool ?

2002-03-27 Thread Tero P Paananen

> UltraDev40 and so on...
> 
> 
> The question is: anybody knows a tool, extension or whatever 
> that actually
> work with struts tags ?
> 
> So it's easier to build web applications.

This is a little off topic for this question, but
I just met with an IBM engineer, who was saying
that the latest WebSphere Studio Enterprise Developer
Beta (to be released in a month or so, if I remember
what he said right) will have features specifically
for building Struts applications.

You won't probably be able to build Struts applications
for other platforms with it though.

-TPP

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




Re: Form Beans - Vector

2002-03-27 Thread Annie Chang

Hi, Perpetua
The attachement is  the example,  I tested it, it is OK.
It is not my work. A kind person.send me.
Hope it is useful for you.

Annie


- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 5:42 AM
Subject: Re: Form Beans - Vector


> Generally, specifying the type seems to help.
>
> .. type="java.util.Vector" ...
>
> I don't use Vectors myself, since the synchronized aspect is not useful
> in the kind of applications I tend to work on, but using them with the
> iterate tags does seem to generate a lot of messages.
>
> If you continue to have problems, and if it's possible to use another
> collection class, like ArrayList, I'd do that. If not, I'd add a helper
> method that returned the Vector as an array.
>
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services
>
> Perpetua Cysne wrote:
> >
> > Could someone please provide me with an example of Form Beans using a
Vector
> > of objects? How do display it in a iterate tag?
> >
> > The object is Passenger(firstName, lastName).
> >
> > Thank you!
> >
> > Perpetua
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>




http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>




	
	
   
   
   
   
   
   



	
	
		
	
	
	
	
		
	
	
	
	
		
	
	
	
	
		
	
	
	
	
		
	
		
	
	
	
		
	

  
	
	
		
	

  
	
	
		
	


	
	
		
	


	
	
		
		
	


	
	
		
		
	

	
	
		
	


	
	
		
	


	
	
		
	
   

	
	
	
	
		
	









ParametersForm.java
Description: JavaScript source


SaveParametersAction.java
Description: JavaScript source


ShowParametersAction.java
Description: JavaScript source


Parameter.java
Description: JavaScript source

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


RE: Struts 1.0.2 checkbox - Error Message: No collection found

2002-03-27 Thread Dimitar Stavrakov

You can try using the present tag ex :

 

before actually going into the iterate and checkbox tags. This will check to
see if the collection exists, before executing the logic inside the tag. 

Regards, 

Dimitar

-Original Message-
From: Mike Finn [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 27, 2002 12:54 PM
To: Struts Users Mailing List
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found

Yu,
This looks like the same problem I posted this AM (subject = logic:iterate
and "no collection found"). I found that if the array actually has data in
it, everything works OK. It's only when it's empty or null that it blows up.
Post if you find a solution and I will do the same. I am going to try to
step through the source this afternoon.
Mike

-Original Message-
From: Yu, Yanhui [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:03 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found


Sorry I forgot that the reset method in the ActionForm looks like this:
==
public void reset(ActionMapping mapping, HttpServletRequest request)
{
cat.debug("ConflictResolutionForm reset");
/*
this.checked = false;
this.linenum = null;
this.field = null;
this.level = null;
this.currentValue = null;
this.overrideValue = null;
*/

 if(conflicts != null) {
for(int i=0; i< conflicts.size(); i++) {
((ConflictBean) conflicts.get(i)).setChecked(false);
}
}
}
==
Looking forward to hearing any hints, thank you very much,
Yanhui



-Original Message-
From: Yu, Yanhui
Sent: Wednesday, March 27, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0.2 checkbox - Error Message: No collection found


Hi All,

We are using struts verions 1.0.2 here.  I have a problem using checkbox in
a jsp, getting No collection found error.  Here is my sample code and I
really appreciate if anyone can give me a hand on this.

in jsp
=



 
 





===

in ConflictBean class

private String linenum = null;
private String field = null;
private String level = null;
private String currentValue = null;
private String overrideValue = null;
private boolean checked = false;

// all public getters and setters for all the String attributes

public boolean getChecked() {
return checked;
}
public void setChecked(boolean _checked){
checked = _checked;
}
==

in Action class
==
ConflictResolutionForm conFlictForm = new ConflictResolutionForm();
ArrayList conflicts = new ArrayList();
// Fill in the list here

ConflictBean cb = new ConflictBean();
cb.setLinenum("1");
cb.setField("Field 1");
cb.setLevel("Area");
cb.setCurrentValue("012345678");
cb.setOverrideValue("012345678");
conflicts.add(cb);

conFlictForm.setConflicts(conflicts);
return (mapping.findForward("conflictresolution"));   //set up in
struts-config.xml


in ActionForm
=
private ArrayList conflicts = null;

public ArrayList getConflicts() {
return conflicts;
}

public void setConflicts(ArrayList _conflicts) {
conflicts = _conflicts;
}

public ConflictBean getConflicts(int index) {
return (ConflictBean) conflicts.get(index);
}

public void setConflicts(int index, ConflictBean conflict) {
conflicts.set(index,conflict);
}
==


Any help would be greatly appreciated.  What I did wrong here? Maybe
multibox is what I need?

Yanhui




--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




struts tool ?

2002-03-27 Thread Johann Eder

UltraDev40 and so on...


The question is: anybody knows a tool, extension or whatever that actually
work with struts tags ?

So it's easier to build web applications.

I use JBuilder40. It's not very comfortable to build struts applications.

Thanks.

Hans 

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




RE: Struts 1.0.2 checkbox - Error Message: No collection found

2002-03-27 Thread Mike Finn

Yu,
This looks like the same problem I posted this AM (subject = logic:iterate
and "no collection found"). I found that if the array actually has data in
it, everything works OK. It's only when it's empty or null that it blows up.
Post if you find a solution and I will do the same. I am going to try to
step through the source this afternoon.
Mike

-Original Message-
From: Yu, Yanhui [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:03 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts 1.0.2 checkbox - Error Message: No collection found


Sorry I forgot that the reset method in the ActionForm looks like this:
==
public void reset(ActionMapping mapping, HttpServletRequest request)
{
cat.debug("ConflictResolutionForm reset");
/*
this.checked = false;
this.linenum = null;
this.field = null;
this.level = null;
this.currentValue = null;
this.overrideValue = null;
*/

 if(conflicts != null) {
for(int i=0; i< conflicts.size(); i++) {
((ConflictBean) conflicts.get(i)).setChecked(false);
}
}
}
==
Looking forward to hearing any hints, thank you very much,
Yanhui



-Original Message-
From: Yu, Yanhui
Sent: Wednesday, March 27, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0.2 checkbox - Error Message: No collection found


Hi All,

We are using struts verions 1.0.2 here.  I have a problem using checkbox in
a jsp, getting No collection found error.  Here is my sample code and I
really appreciate if anyone can give me a hand on this.

in jsp
=



 
 





===

in ConflictBean class

private String linenum = null;
private String field = null;
private String level = null;
private String currentValue = null;
private String overrideValue = null;
private boolean checked = false;

// all public getters and setters for all the String attributes

public boolean getChecked() {
return checked;
}
public void setChecked(boolean _checked){
checked = _checked;
}
==

in Action class
==
ConflictResolutionForm conFlictForm = new ConflictResolutionForm();
ArrayList conflicts = new ArrayList();
// Fill in the list here

ConflictBean cb = new ConflictBean();
cb.setLinenum("1");
cb.setField("Field 1");
cb.setLevel("Area");
cb.setCurrentValue("012345678");
cb.setOverrideValue("012345678");
conflicts.add(cb);

conFlictForm.setConflicts(conflicts);
return (mapping.findForward("conflictresolution"));   //set up in
struts-config.xml


in ActionForm
=
private ArrayList conflicts = null;

public ArrayList getConflicts() {
return conflicts;
}

public void setConflicts(ArrayList _conflicts) {
conflicts = _conflicts;
}

public ConflictBean getConflicts(int index) {
return (ConflictBean) conflicts.get(index);
}

public void setConflicts(int index, ConflictBean conflict) {
conflicts.set(index,conflict);
}
==


Any help would be greatly appreciated.  What I did wrong here? Maybe
multibox is what I need?

Yanhui




--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




RE: Why Struts - Ryan Norman

2002-03-27 Thread Mike Finn

Ryan,

1) There may be MVC frameworks available as value-adds to WebSphere,
WebLogic, etc. They may not port from one app server to another. Struts
should run in any JSP/Servlet spec-compliant web container. With proprietary
frameworks, you risk getting precisely what many hope to avoid by
implementing J2EE solutions: vendor lock-in. Plus, with Struts, you have the
(IMHO) benefits of Open Source.

2) We are using Struts with JBoss 3.0b/Tomcat 4.02 integrated.

Mike

-Original Message-
From: Ryan Norman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 12:48 PM
To: [EMAIL PROTECTED]; LA Java User Group
Subject: Why Struts - Ryan Norman


Hi,

I am Ryan Norman.

Are there frameworks available in other commercial Java Web Servers like Web
Sphere, iPlanet, JRun, etc.

. If so why should somebody use struts framework rather than using the Web
Server's native framework?
. Are there people who are using struts with commercial Java Web Server like
Web Sphere, iPlanet, JRun, etc.

Thanks in advance

Ryan Norman



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




RE: Why Struts - Ryan Norman

2002-03-27 Thread Joseph Barefoot

Hi Ryan,

Yes, there are other, propietary frameworks to be used, as well as rules
processing engines, in many of the commercial web servers.

So, why use Struts?

Some of these commercial web servers have very powerful features, but you
pay the price of tying oneself to the web server.  Not just the vendor, but
probably the software version as well.  This makes application maintenance
and migration a tricky endeavor, as you would have to (potentially) re-write
those elements of the application that depend upon the propietary framework.
And, if something doesn't work as expected, you are stuck with it, if you
employ propietary features in your application.


Another reason to use Struts is that it's open-source, which has several
implications:

1.  If you don't like it, then re-write it.  If a feature doesn't exist or
you'd like to improve an existing one, go for it.  Note that this kind of
customization can lead to migration problems as well, however.

2.  Continuous bug-fixes, development, and integration.  I have found that
open-source projects move more rapidly to fix bugs and support new
specifications that commercial products, as the developers who contribute
usually use the software as well.  Therefore, they ARE their own production
test environment, and if there's a bug that annoys you, you can be sure it
annoys them too, and they will move to fix it ASAP.

3.  "It's Quality, not quantity, man."  Open-source developers, in general,
tend to care more about their project's code than commercial developers do.
Why?  Because it is a part of them, not a part of the company they work for.
And if something is a part of who you are, then it tends towards quality
just as you do.  Commercial products may have more bells & whistles, but
that doesn't necessarily make them better.


Of course, it's your choice...I'm sure there are situations that would
warrant using iPlanet (for instance) for its rules engine to rapidly develop
an application, I just don't know what those situations are.

cheers,

Joe Barefoot

-Original Message-
From: Ryan Norman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 9:48 AM
To: [EMAIL PROTECTED]; LA Java User Group
Subject: Why Struts - Ryan Norman


Hi,

I am Ryan Norman.

Are there frameworks available in other commercial Java Web Servers like Web
Sphere, iPlanet, JRun, etc.

. If so why should somebody use struts framework rather than using the Web
Server's native framework?
. Are there people who are using struts with commercial Java Web Server like
Web Sphere, iPlanet, JRun, etc.

Thanks in advance

Ryan Norman



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




RE: Why Struts - Ryan Norman

2002-03-27 Thread David . A . Ventimiglia

. For starters, Struts is vendor-neutral.  What happens if you decide to
migrate an app developed with WebSphere's framework to JBoss?
. I am using Struts with Weblogic.  I don't believe I'm in the vanguard with
this.

Cheers,
David Ventimiglia

-Original Message-
From: Ryan Norman [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 27, 2002 9:48 AM
To: [EMAIL PROTECTED]; LA Java User Group
Subject: Why Struts - Ryan Norman

Hi,

I am Ryan Norman.

Are there frameworks available in other commercial Java Web Servers like Web
Sphere, iPlanet, JRun, etc.

. If so why should somebody use struts framework rather than using the Web
Server's native framework?
. Are there people who are using struts with commercial Java Web Server like
Web Sphere, iPlanet, JRun, etc.

Thanks in advance

Ryan Norman


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




Re: Problem with caching

2002-03-27 Thread Slimane

Thanx, I'll try

At 17:35 27/03/2002 +0100, Christian Bouessay wrote the following
>For all actions, you could configure the ActionServlet in web.xml, like this:
>...
>
>  nocache
>  true
>
>...
>
>
>--
>C. Bouessay
>
>Slimane Zouggari wrote:
>
>>Hi,
>>
>>When I try to follow a link to one of My action class. Sometimes, it 
>>works correctly and sometimes, my browser just take the old copy of the 
>>generated page it has in cache.
>>
>>My question is: How can I avoid that ? What do I have to do to be sure my 
>>browser doesn't set anything in cache ?
>>
>>I tried to put the following in my jsp pages, without any success:
>>
>><%
>>   response.addHeader("pragma","no-cache"); // http v1.0
>>   response.addHeader("cache-control","no-cache"); // http v1.1
>>%>
>>
>>Could anybody point me to the right way to achieve that ?
>>
>>Thanks in advance.
>>
>>Friendly Regards,
>>Slimane
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>>For additional commands, e-mail: 
>>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>


--
Make it run, Make it right, Make it fast


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




RE: Problem with caching

2002-03-27 Thread Slimane

my dev environment is : Tomcat 4 and Orion (it has to work on both of them) 
+ IE4,Opera5,Netscape4.7

Friendly Regards,
Slimane

At 17:30 27/03/2002 +0100, Etienne, Ingo (Goetzfried AG) wrote the following
>Hi,
>
>I had the same problem with IIS and IE5. The solution to this was to set the
>cache-control header on the web server, all other attempts were simply
>ignored by the browser.
>
>The drawback is that every single page and all images within these pages are
>not cached, so you loose the ability to distinguish which pages you don't
>want to be cached and which are ok to be cached.
>
>What is your dev environment? IIS + IE5 :)
>
>hth
>Ingo
>
>-Original Message-
>From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
>Sent: Mittwoch, 27. März 2002 17:18
>To: [EMAIL PROTECTED]
>Subject: Problem with caching
>
>
>Hi,
>
>When I try to follow a link to one of My action class. Sometimes, it works
>correctly and sometimes, my browser just take the old copy of the generated
>page it has in cache.
>
>My question is: How can I avoid that ? What do I have to do to be sure my
>browser doesn't set anything in cache ?
>
>I tried to put the following in my jsp pages, without any success:
>
><%
>response.addHeader("pragma","no-cache"); // http v1.0
>response.addHeader("cache-control","no-cache"); // http v1.1
>%>
>
>Could anybody point me to the right way to achieve that ?
>
>Thanks in advance.
>
>Friendly Regards,
>Slimane
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
Make it run, Make it right, Make it fast


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




Re: Attribute value should be quoted

2002-03-27 Thread SUPRIYA MISRA

yout jsp tags must have  format


>From: Bhaskar Gopalan <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Group (E-mail)" <[EMAIL PROTECTED]>
>Subject: Attribute value should be quoted
>Date: Wed, 27 Mar 2002 10:28:49 -0500
>
>Hi,
>I'm getting the error:
>
>org.apache.jasper.compiler.ParseException: C:\jsp\Filter.jsp(150,35)
>Attribute value should be quoted
>   java.lang.Throwable(java.lang.String)
>   java.lang.Exception(java.lang.String)
>   javax.servlet.ServletException(java.lang.String)
>   org.apache.jasper.JasperException(java.lang.String)
>
>org.apache.jasper.compiler.ParseException(org.apache.jasper.compiler.Mark,
>java.lang.String)
>   java.lang.String
>org.apache.jasper.compiler.JspReader.parseToken(boolean)
>   void
>org.apache.jasper.compiler.JspReader.parseAttributeValue(java.util.Hashtable
>)
>   java.util.Hashtable
>org.apache.jasper.compiler.JspReader.parseTagAttributes()
>   boolean
>org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
>eEventListener, org.apache.jasper.compiler.JspReader,
>org.apache.jasper.compiler.Parser)
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String,
>java.lang.Class [])
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String)
>   boolean
>org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
>eEventListener, org.apache.jasper.compiler.JspReader,
>org.apache.jasper.compiler.Parser)
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String,
>java.lang.Class [])
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String)
>   boolean
>org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
>eEventListener, org.apache.jasper.compiler.JspReader,
>org.apache.jasper.compiler.Parser)
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String,
>java.lang.Class [])
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String)
>   void org.apache.jasper.compiler.Parser.parse()
>   boolean org.apache.jasper.compiler.Compiler.compile()
>   boolean
>com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.compile(org.apache.jasper.com
>piler.Compiler, java.lang.Class)
>   boolean
>com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.loadJSP(java.lang.String,
>java.lang.String, boolean, javax.servlet.http.HttpServletRequest,
>javax.servlet.http.HttpServletResponse)
>   void
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(javax
>.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
>   void
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
>.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
>   void
>org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
>ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
>java.lang.Throwable, boolean)
>   void
>org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
>equest, javax.servlet.http.HttpServletResponse)
>   void
>javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
>javax.servlet.ServletResponse)
>   void
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
>ServletRequest, javax.servlet.ServletResponse)
>   void
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
>ServletRequest, javax.servlet.ServletResponse)
>   void
>com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin
>e.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest,
>javax.servlet.ServletResponse)
>   void
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S
>ervletRequest, javax.servlet.ServletResponse)
>   void
>com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR
>equest, javax.servlet.ServletResponse,
>com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
>   void
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se
>rvlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest,
>javax.servlet.ServletResponse,
>com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
>   void
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle
>t.ServletRequest, javax.servlet.ServletResponse,
>com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
>   void
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c
>om.ibm.servlet.engine.webapp.WebAppRequest,
>javax.servlet.http.HttpServletResponse, boolean)
>   void
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet
>.ServletRequest, javax.servlet.ServletResponse, boolean)
>   void
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.
>ServletRequest, javax.servlet.ServletResponse)
>   void
>org.apa

RE: Struts 1.0.2 checkbox - Error Message: No collection found

2002-03-27 Thread Yu, Yanhui

Sorry I forgot that the reset method in the ActionForm looks like this:
==
public void reset(ActionMapping mapping, HttpServletRequest request)
{
cat.debug("ConflictResolutionForm reset");
/*
this.checked = false;
this.linenum = null;
this.field = null; 
this.level = null;
this.currentValue = null;
this.overrideValue = null;
*/

 if(conflicts != null) {
for(int i=0; i< conflicts.size(); i++) {
((ConflictBean) conflicts.get(i)).setChecked(false);
}
}
}
==
Looking forward to hearing any hints, thank you very much,
Yanhui



-Original Message-
From: Yu, Yanhui 
Sent: Wednesday, March 27, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0.2 checkbox - Error Message: No collection found


Hi All,

We are using struts verions 1.0.2 here.  I have a problem using checkbox in
a jsp, getting No collection found error.  Here is my sample code and I
really appreciate if anyone can give me a hand on this.  

in jsp
=



 
 





===

in ConflictBean class

private String linenum = null;
private String field = null;
private String level = null;
private String currentValue = null;
private String overrideValue = null;
private boolean checked = false;

// all public getters and setters for all the String attributes

public boolean getChecked() {
return checked;
}
public void setChecked(boolean _checked){
checked = _checked;
}
==

in Action class
==
ConflictResolutionForm conFlictForm = new ConflictResolutionForm();
ArrayList conflicts = new ArrayList();
// Fill in the list here

ConflictBean cb = new ConflictBean();
cb.setLinenum("1");
cb.setField("Field 1");
cb.setLevel("Area");
cb.setCurrentValue("012345678");
cb.setOverrideValue("012345678");
conflicts.add(cb);

conFlictForm.setConflicts(conflicts);
return (mapping.findForward("conflictresolution"));   //set up in
struts-config.xml 


in ActionForm
=
private ArrayList conflicts = null;

public ArrayList getConflicts() {
return conflicts;
}

public void setConflicts(ArrayList _conflicts) {
conflicts = _conflicts;
}

public ConflictBean getConflicts(int index) {
return (ConflictBean) conflicts.get(index);
}

public void setConflicts(int index, ConflictBean conflict) {
conflicts.set(index,conflict);
}
==


Any help would be greatly appreciated.  What I did wrong here? Maybe
multibox is what I need? 

Yanhui

  


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




Struts 1.0.2 checkbox - Error Message: No collection found

2002-03-27 Thread Yu, Yanhui

Hi All,

We are using struts verions 1.0.2 here.  I have a problem using checkbox in
a jsp, getting No collection found error.  Here is my sample code and I
really appreciate if anyone can give me a hand on this.  

in jsp
=



 
 





===

in ConflictBean class

private String linenum = null;
private String field = null;
private String level = null;
private String currentValue = null;
private String overrideValue = null;
private boolean checked = false;

// all public getters and setters for all the String attributes

public boolean getChecked() {
return checked;
}
public void setChecked(boolean _checked){
checked = _checked;
}
==

in Action class
==
ConflictResolutionForm conFlictForm = new ConflictResolutionForm();
ArrayList conflicts = new ArrayList();
// Fill in the list here

ConflictBean cb = new ConflictBean();
cb.setLinenum("1");
cb.setField("Field 1");
cb.setLevel("Area");
cb.setCurrentValue("012345678");
cb.setOverrideValue("012345678");
conflicts.add(cb);

conFlictForm.setConflicts(conflicts);
return (mapping.findForward("conflictresolution"));   //set up in
struts-config.xml 


in ActionForm
=
private ArrayList conflicts = null;

public ArrayList getConflicts() {
return conflicts;
}

public void setConflicts(ArrayList _conflicts) {
conflicts = _conflicts;
}

public ConflictBean getConflicts(int index) {
return (ConflictBean) conflicts.get(index);
}

public void setConflicts(int index, ConflictBean conflict) {
conflicts.set(index,conflict);
}
==


Any help would be greatly appreciated.  What I did wrong here? Maybe
multibox is what I need? 

Yanhui

  


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




Websphere specific problem with template:get tag (flushing..

2002-03-27 Thread Marcelo Caldas

Hi guys,
I'm trying to deploy my application (developed so far on Oracle 91AS) to WebSphere...

First error I got is a illegal to flush within a custom tag...
I realized that the only struts tag that tries to flush is the template.GetTag. 
Although I'm using a very recent nightly build (2002-03-17), this behavior exists even 
on struts 1.0

I tried to add the mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




RE: dynamic alteration of multiple entry select box content with javascript : empty values upon submission

2002-03-27 Thread @Basebeans.com

Subject: RE: dynamic alteration of multiple entry select box content with javascript : 
empty values upon submission
From: Simon Kirk <[EMAIL PROTECTED]>
 ===
Ah, you're right - I think I'm missing a vital part of my setup - the 
function to select the stuff in the right hand boxes! What a foolish 
schoolboy error. Thanks very much.
S

Etienne, Ingo (Goetzfried AG) wrote:

> You have to select all the options before submit like this:
> 
> 
> function activateOptions(field){
> for(i=0;i  field.options[i].selected=true;
> }
> }
> 
> 
> hth
> Ingo
> 
> -Original Message-
> From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 27. März 2002 18:25
> To: [EMAIL PROTECTED]
> Subject: dynamic alteration of multiple entry select box content with
> javascript : empty values upon submission
> 
> 
> Subject: dynamic alteration of multiple entry select box content with
> javascript : empty values upon submission
> From: Simon Kirk <[EMAIL PROTECTED]>
>  ===
> Hello.
> 
> I have an html page with two select boxes configured to allow multiple
> selection in each. The one on the left contains options that are
> available, the one on the right contains options that are selected from
> those available. I've got a javascript method suite that will transfer
> selected options from the box on the left to the box on the right
> dynamically. I know it works with normal html form submission as I've used
> it many times in the past. Now however I'm trying to get it to work with
> struts.
> 
> The first problem I came across was populating the select boxes. Not
> normally a problem, but the form bean I had configured to accept the data
> from the html page complained about various problems. Finally I got this
> nailed. Here's an example of the html:
> 
> 
> 
>   Available options
>    
>   Selected options/td>
> 
> 
>   
> 
>labelProperty="label"/>
> 
>   
>   
>  onclick="moveSelectedOptions('fooForm','allOptions','selectedOptions')">
> 
>  onclick="moveSelectedOptions('fooForm','selectedOptions','allOptions')">
>   
>   
> 
>   
> 
>   
>   
> 
> 
> (please excuse any shonky indentation :)
> 
> I won't paste the javascript functions up here as they're pretty long
> winded.
> 
> The top select box gets its options from a bean containing a collection of
> LabelValue beans. The bottom select box gets it options from a collection
> contained in the form bean, which is populated from the database with an
> Action before the form is rendered.
> 
> Now, if you click one of the two buttons labelled >> or << the options
> move across into the relative box as expected. But when I submit the form
> I am getting nothing at all in the form bean for either the property
> "allOptions" or "selectedOptions". Nothing at all, not a null value, just
> nothing. This is independant of the type that you set that field to in the
> form bean class you make - struts isn't doing anything clever like turning
> the multiple selection into a Vector on the fly for you.
> 
> The selected options should come through as a comma seperated list of IDs.
> 
> 
> If anybody has any idea where to go I would be very helpful, as reading
> through the mailing list archive and checking google hasn't really given
> me any useful information. Is there anywhere I can check every value being
> gleaned out of the form by the controller servlet? Printing the query
> string out in the action class that the html page forwards off to doesn't
> help, it's empty too.
> 
> Regards,
> Simon
> 

-- 
Simon Kirk
perception|be.developer(java)
t. +44 (0) 20 7689 1200

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




Why Struts - Ryan Norman

2002-03-27 Thread Ryan Norman

Hi,

I am Ryan Norman.

Are there frameworks available in other commercial Java Web Servers like Web Sphere, 
iPlanet, JRun, etc.

. If so why should somebody use struts framework rather than using the Web Server's 
native framework?
. Are there people who are using struts with commercial Java Web Server like Web 
Sphere, iPlanet, JRun, etc.

Thanks in advance

Ryan Norman




RE: dynamic alteration of multiple entry select box content with javascript : empty values upon submission

2002-03-27 Thread Etienne, Ingo (Goetzfried AG)

You have to select all the options before submit like this:


function activateOptions(field){
for(i=0;imailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 27. März 2002 18:25
To: [EMAIL PROTECTED]
Subject: dynamic alteration of multiple entry select box content with
javascript : empty values upon submission


Subject: dynamic alteration of multiple entry select box content with
javascript : empty values upon submission
From: Simon Kirk <[EMAIL PROTECTED]>
 ===
Hello.

I have an html page with two select boxes configured to allow multiple 
selection in each. The one on the left contains options that are available, 
the one on the right contains options that are selected from those 
available. I've got a javascript method suite that will transfer selected 
options from the box on the left to the box on the right dynamically. I 
know it works with normal html form submission as I've used it many times 
in the past. Now however I'm trying to get it to work with struts.

The first problem I came across was populating the select boxes. Not 
normally a problem, but the form bean I had configured to accept the data 
from the html page complained about various problems. Finally I got this 
nailed. Here's an example of the html:



  Available options
   
  Selected options/td>


  

  

  
  



  
  

  

  
  


(please excuse any shonky indentation :)

I won't paste the javascript functions up here as they're pretty long 
winded.

The top select box gets its options from a bean containing a collection of 
LabelValue beans. The bottom select box gets it options from a collection 
contained in the form bean, which is populated from the database with an 
Action before the form is rendered.

Now, if you click one of the two buttons labelled >> or << the options move 
across into the relative box as expected. But when I submit the form I am 
getting nothing at all in the form bean for either the property 
"allOptions" or "selectedOptions". Nothing at all, not a null value, just 
nothing. This is independant of the type that you set that field to in the 
form bean class you make - struts isn't doing anything clever like turning 
the multiple selection into a Vector on the fly for you.

The selected options should come through as a comma seperated list of IDs.


If anybody has any idea where to go I would be very helpful, as reading 
through the mailing list archive and checking google hasn't really given me 
any useful information. Is there anywhere I can check every value being 
gleaned out of the form by the controller servlet? Printing the query 
string out in the action class that the html page forwards off to doesn't 
help, it's empty too.

Regards,
Simon

-- 
Simon Kirk
perception|be.developer(java)
t. +44 (0) 20 7689 1200

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




dynamic alteration of multiple entry select box content with javascript : empty values upon submission

2002-03-27 Thread @Basebeans.com

Subject: dynamic alteration of multiple entry select box content with javascript : 
empty values upon submission
From: Simon Kirk <[EMAIL PROTECTED]>
 ===
Hello.

I have an html page with two select boxes configured to allow multiple 
selection in each. The one on the left contains options that are available, 
the one on the right contains options that are selected from those 
available. I've got a javascript method suite that will transfer selected 
options from the box on the left to the box on the right dynamically. I 
know it works with normal html form submission as I've used it many times 
in the past. Now however I'm trying to get it to work with struts.

The first problem I came across was populating the select boxes. Not 
normally a problem, but the form bean I had configured to accept the data 
from the html page complained about various problems. Finally I got this 
nailed. Here's an example of the html:



  Available options
   
  Selected options/td>


  

  

  
  



  
  

  

  
  


(please excuse any shonky indentation :)

I won't paste the javascript functions up here as they're pretty long 
winded.

The top select box gets its options from a bean containing a collection of 
LabelValue beans. The bottom select box gets it options from a collection 
contained in the form bean, which is populated from the database with an 
Action before the form is rendered.

Now, if you click one of the two buttons labelled >> or << the options move 
across into the relative box as expected. But when I submit the form I am 
getting nothing at all in the form bean for either the property 
"allOptions" or "selectedOptions". Nothing at all, not a null value, just 
nothing. This is independant of the type that you set that field to in the 
form bean class you make - struts isn't doing anything clever like turning 
the multiple selection into a Vector on the fly for you.

The selected options should come through as a comma seperated list of IDs.


If anybody has any idea where to go I would be very helpful, as reading 
through the mailing list archive and checking google hasn't really given me 
any useful information. Is there anywhere I can check every value being 
gleaned out of the form by the controller servlet? Printing the query 
string out in the action class that the html page forwards off to doesn't 
help, it's empty too.

Regards,
Simon

-- 
Simon Kirk
perception|be.developer(java)
t. +44 (0) 20 7689 1200

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




Re: returning the selected value from an

2002-03-27 Thread Jim Crossley

You were quite clear in your question.  I can't see how I can be any
more clear in my answer.  :-)

It sounds like you didn't change your  property to
"vnameList".

josef richberg <[EMAIL PROTECTED]> writes:

> I did that, but it did not work.  It looks like it is
> now looking to get the names to populate the select
> list from the method getVname().  Maybe I was not
> clear in my question.  I have a collection object that
> is populated from a database with and id,descp.  Once
> the choice is selected I need to collect the id that
> was chosen.  I need to separate the population of the
> select with the choice made.
> 
> --josef
> --- Jim Crossley <[EMAIL PROTECTED]> wrote:
> > Here's how I would do it.  Change the name of the
> > existing method that
> > returns a collection and add a method to get the
> > vname:
> > 
> > public Collection getVnameList(){
> >   return new DBAccess().getVendorNames();
> > }
> > public void setVname(String value){
> >   xx
> > }
> > public String getVname(){
> >   xx
> > }
> > 
> > Then change your  property to
> > "vnameList".  That should
> > do the trick.
> > 
> > -- Jim
> > 
> > josef richberg <[EMAIL PROTECTED]> writes:
> > 
> > > That I understand.  What I don't understand is how
> > to
> > > do that.  How can I reference the value chosen in
> > the
> > > select?  The id is tied to the bean.  
> > > 
> > > --josef
> > > --- Jim Crossley <[EMAIL PROTECTED]> wrote:
> > > > In your formbean, you need to distinguish
> > between
> > > > the value selected
> > > > and the values able to be selected.  You've
> > > > accounted for the latter.
> > > > You need another method to account for the
> > former. 
> > > > The property
> > > > referred to in your bean:define (returning a
> > > > Collection) should not be
> > > > the same property referred to in your
> > html:select
> > > > that returns a
> > > > String.
> > > > 
> > > > -- Jim
> > > > 
> > > > josef richberg <[EMAIL PROTECTED]> writes:
> > > > 
> > > > > I have the following code snippet: 
> > > > >  > name="ProdAddForm"
> > > > > property="vname"
> > > > > type="java.util.Collection"/>
> > > > > 
> > > > > then below 
> > > > > 
> > > > >  > > > > property="value"  labelProperty="label"/>
> > > > > 
> > > > > 
> > > > > I have a getter method in my Action form: 
> > > > >  public Collection getVname(){
> > > > > return new
> > DBAccess().getVendorNames();
> > > > >  }
> > > > > 
> > > > > The problem is if I try to set the result of
> > the
> > > > > selection via this method in the action form: 
> > > > >  public void setVname(String value){
> > > > >xx
> > > > >  }
> > > > > 
> > > > > it errors with: No getter method for property
> > > > vname of
> > > > > bean ProdAddForm 
> > > > > How do I retrieve the lone value of the
> > select? 
> > > > > --josef
> > > > > 
> > > > > 
> > > > >
> > __
> > > > > Do You Yahoo!?
> > > > > Yahoo! Movies - coverage of the 74th Academy
> > > > Awards®
> > > > > http://movies.yahoo.com/
> > > > > 
> > > > > --
> > > > > To unsubscribe, e-mail:  
> > > >
> > 
> > > > > For additional commands, e-mail:
> > > > 
> > > > 
> > > > --
> > > > To unsubscribe, e-mail:  
> > > >
> > 
> > > > For additional commands, e-mail:
> > > > 
> > > > 
> > > 
> > > 
> > > __
> > > Do You Yahoo!?
> > > Yahoo! Movies - coverage of the 74th Academy
> > Awards®
> > > http://movies.yahoo.com/
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > 
> > > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
> http://movies.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Same action called another time after having returned null

2002-03-27 Thread Sergio Ramazzina

Hi to everybody,
 
I hope someone can clarify me about what is going on with my struts
application.
 
I'm writing an application that gives the users the opportunity to print
some data contained inside the browser page to a pdf file. That pdf file is
produced by an helper class called from a Struts action class. My action
class return null because the action itself produce the file, using the
helper class, and I don't need to forward the control to any page.
 
The pdf file is produced and displayed correctly also with IE but I've
noticed that the action that I call from inside my page to start the pdf
building and displaying is always started two times. It seems like someone,
in the process, calls it another time immediatly after the file has already
been displayed.
 
Below is an excerpt of the log just to clarify
 
==
Processing a GET for /ArticoliWebComponentPrintPDFItemDetail
 Looking for Action instance for class
luxapp.web.luxphotos.ArticoliWebComponentPrintPDFItemDetailAction
  Double checking for Action instance already there
  Creating new Action instance
action:ArticoliWebComponentPrintPDFItemDetailAction started
[INFO]: building formatting object tree
[INFO]: [1]
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[INFO]: Parsing of document complete, stopping renderer
action:ArticoliWebComponentPrintPDFItemDetailAction forwards to: null]
action:ArticoliWebComponentPrintPDFItemDetailAction done.
==
Processing a GET for /ArticoliWebComponentPrintPDFItemDetail
 Looking for Action instance for class
luxapp.web.luxphotos.ArticoliWebComponentPrintPDFItemDetailAction
action:ArticoliWebComponentPrintPDFItemDetailAction started
[INFO]: building formatting object tree
[INFO]: [1]
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[INFO]: Parsing of document complete, stopping renderer
action:ArticoliWebComponentPrintPDFItemDetailAction forwards to: null
action:ArticoliWebComponentPrintPDFItemDetailAction done.
==
 
 
I've noticed that this behaviour stops if I return a valid forward
reference, and not null, from the action class but I also know that
returning a null from an action class is a permitted behaviour.
 
Is there someone that can help me to clarify my ideas about that?
 
Thanks in advance
 
Sergio



Re: Attribute value should be quoted

2002-03-27 Thread Sjaak de Mul

Hi,

Can't you set the filterType property in the formBean before forwarding to
this page? Then Struts should take care of checking the appropriate radio
button.

Sjaak


"Bhaskar Gopalan" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> Hi,
> I'm getting the error:
> 
> org.apache.jasper.compiler.ParseException: C:\jsp\Filter.jsp(150,35)
> Attribute value should be quoted
>   java.lang.Throwable(java.lang.String)
>   java.lang.Exception(java.lang.String)
>   javax.servlet.ServletException(java.lang.String)
>   org.apache.jasper.JasperException(java.lang.String)
>   
> org.apache.jasper.compiler.ParseException(org.apache.jasper.compiler.Mark,
> java.lang.String)
>   java.lang.String
> org.apache.jasper.compiler.JspReader.parseToken(boolean)
>   void
>
org.apache.jasper.compiler.JspReader.parseAttributeValue(java.util.Hashtable
> )
>   java.util.Hashtable
> org.apache.jasper.compiler.JspReader.parseTagAttributes()
>   boolean
>
org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
> eEventListener, org.apache.jasper.compiler.JspReader,
> org.apache.jasper.compiler.Parser)
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String,
> java.lang.Class [])
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String)
>   boolean
>
org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
> eEventListener, org.apache.jasper.compiler.JspReader,
> org.apache.jasper.compiler.Parser)
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String,
> java.lang.Class [])
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String)
>   boolean
>
org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
> eEventListener, org.apache.jasper.compiler.JspReader,
> org.apache.jasper.compiler.Parser)
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String,
> java.lang.Class [])
>   void org.apache.jasper.compiler.Parser.parse(java.lang.String)
>   void org.apache.jasper.compiler.Parser.parse()
>   boolean org.apache.jasper.compiler.Compiler.compile()
>   boolean
>
com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.compile(org.apache.jasper.com
> piler.Compiler, java.lang.Class)
>   boolean
> com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.loadJSP(java.lang.String,
> java.lang.String, boolean, javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
>   void
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(javax
> .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
>   void
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
> .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
>   void
>
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
> ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
> java.lang.Throwable, boolean)
>   void
>
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
> equest, javax.servlet.http.HttpServletResponse)
>   void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse)
>   void
>
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
> ServletRequest, javax.servlet.ServletResponse)
>   void
>
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
> ServletRequest, javax.servlet.ServletResponse)
>   void
>
com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin
> e.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest,
> javax.servlet.ServletResponse)
>   void
>
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S
> ervletRequest, javax.servlet.ServletResponse)
>   void
>
com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR
> equest, javax.servlet.ServletResponse,
> com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
>   void
>
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se
> rvlet.engine.webapp.ServletInstanceReference,
javax.servlet.ServletRequest,
> javax.servlet.ServletResponse,
> com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
>   void
>
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle
> t.ServletRequest, javax.servlet.ServletResponse,
> com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
>   void
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c
> om.ibm.servlet.engine.webapp.WebAppRequest,
> javax.servlet.http.HttpServletResponse, boolean)
>   void
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet
> .ServletRequest, javax.servlet.ServletResponse, boolean)
>   void
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.
> ServletRequ

Javascript in Struts

2002-03-27 Thread Bhaskar Gopalan

Hi,

how does Javascript work with struts? I have a 'Filter' form with a couple
of radio, select and text
fields. The only three request parameters are filterSet, filterType and
filterValue.

Example:

   


  
  

Select One
Stage1
Stage2
Stage3
Stage4
Stage5

  


  
  
 

  
  

  


MY QUESTION IS:
Do I have to give the same property "filterValue" instead of "lenderVal" in
the ? If so, suppose the user chooses
the first radio button, but chooses both "Stage3" and enters some dummy text
in  by mistake. Now, will the filterValue be set to Stage3 or the
dummy text? I was initially using javascript (w/o struts) to associate radio
button with the corresponding select/text field. How do I do it now with
struts?

Quick reply appreciated.

Thanks,
Bhaskar

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




RE: Problem with caching

2002-03-27 Thread Etienne, Ingo (Goetzfried AG)

Hi,

I had the same problem with IIS and IE5. The solution to this was to set the
cache-control header on the web server, all other attempts were simply
ignored by the browser.

The drawback is that every single page and all images within these pages are
not cached, so you loose the ability to distinguish which pages you don't
want to be cached and which are ok to be cached.

What is your dev environment? IIS + IE5 :)

hth
Ingo

-Original Message-
From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 27. März 2002 17:18
To: [EMAIL PROTECTED]
Subject: Problem with caching


Hi,

When I try to follow a link to one of My action class. Sometimes, it works 
correctly and sometimes, my browser just take the old copy of the generated 
page it has in cache.

My question is: How can I avoid that ? What do I have to do to be sure my 
browser doesn't set anything in cache ?

I tried to put the following in my jsp pages, without any success:

<%
   response.addHeader("pragma","no-cache"); // http v1.0
   response.addHeader("cache-control","no-cache"); // http v1.1
%>

Could anybody point me to the right way to achieve that ?

Thanks in advance.

Friendly Regards,
Slimane


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Problem with caching

2002-03-27 Thread Christian Bouessay

For all actions, you could configure the ActionServlet in web.xml, like 
this:
...

  nocache
  true

...


--
C. Bouessay

Slimane Zouggari wrote:

> Hi,
>
> When I try to follow a link to one of My action class. Sometimes, it 
> works correctly and sometimes, my browser just take the old copy of 
> the generated page it has in cache.
>
> My question is: How can I avoid that ? What do I have to do to be sure 
> my browser doesn't set anything in cache ?
>
> I tried to put the following in my jsp pages, without any success:
>
> <%
>   response.addHeader("pragma","no-cache"); // http v1.0
>   response.addHeader("cache-control","no-cache"); // http v1.1
> %>
>
> Could anybody point me to the right way to achieve that ?
>
> Thanks in advance.
>
> Friendly Regards,
> Slimane
>
>
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
>
>




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




Problem with caching

2002-03-27 Thread Slimane Zouggari

Hi,

When I try to follow a link to one of My action class. Sometimes, it works 
correctly and sometimes, my browser just take the old copy of the generated 
page it has in cache.

My question is: How can I avoid that ? What do I have to do to be sure my 
browser doesn't set anything in cache ?

I tried to put the following in my jsp pages, without any success:

<%
   response.addHeader("pragma","no-cache"); // http v1.0
   response.addHeader("cache-control","no-cache"); // http v1.1
%>

Could anybody point me to the right way to achieve that ?

Thanks in advance.

Friendly Regards,
Slimane


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




RE: dynamic select box

2002-03-27 Thread Maturo, Larry

Hi Jose,

You might want to get the Struts white paper at
http://stealthis.athensgroup.com/presentations/
under Model Layer Framework.  It has a lot of
examples of using Struts tags, including a lot
on Select/Options.

By the way, I tried sending this to
[EMAIL PROTECTED] a few days ago and it 
bounced.

-- Larry Maturo
   [EMAIL PROTECTED]

-Original Message-
From: Jose Casas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 5:55 PM
To: 'Struts Users Mailing List'
Subject: RE: dynamic select box


I know it has been answered before, but that response was not useful to
me...i'm new to struts and i need something more in depth.

THanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



> -Original Message-
> From: Daniel Jaffa [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 4:49 PM
> To:   Struts Users Mailing List
> Subject:  Re: dynamic select box
> 
> This has been answered before.  Loop up html:options and collections
> - Original Message -
> From: "Jose Casas" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 26, 2002 2:26 PM
> Subject: dynamic select box
> 
> 
> > Does anybody have sample code that shows how to build a select box
> > dynamically?  I need to create the select box with values that come from
> a
> > database.
> >
> > Thank you.
> >
> > Jose Casas
> >
> > E-Commerce Applications
> > (501) 277-3112
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > **
> > This email and any files transmitted with it are confidential
> > and intended solely for the individual or entity to
> > whom they are addressed.  If you have received this email
> > in error destroy it immediately.
> > **
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: checking action name

2002-03-27 Thread Steve Hupert

In the perform method of my action class, I have stored the path attribute
of the forward being returned from the mapping object as an attribute in the
request.  I can then access the path from JSP pages to determine what lead
me to the JSP page.

For example in the perform method:
request.setAttribute("path", mapping.findForward("success").getPath());

Then in the JSP page:
 will give me the path that resulted in this JSP
being called.

If anyone has better ideas on how to handle this, I would like to hear about
them as well.



-Original Message-
From: Mike Dewhirst [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 7:18 AM
To: 'Struts Users Mailing List'
Subject: checking action name


Is it possible to find in the JSP what action mapping has lead us there? Is
there a parameter in the request?

Thanks in advance,

Mike



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




Attribute value should be quoted

2002-03-27 Thread Bhaskar Gopalan

Hi,
I'm getting the error:

org.apache.jasper.compiler.ParseException: C:\jsp\Filter.jsp(150,35)
Attribute value should be quoted
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.ServletException(java.lang.String)
org.apache.jasper.JasperException(java.lang.String)

org.apache.jasper.compiler.ParseException(org.apache.jasper.compiler.Mark,
java.lang.String)
java.lang.String
org.apache.jasper.compiler.JspReader.parseToken(boolean)
void
org.apache.jasper.compiler.JspReader.parseAttributeValue(java.util.Hashtable
)
java.util.Hashtable
org.apache.jasper.compiler.JspReader.parseTagAttributes()
boolean
org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
eEventListener, org.apache.jasper.compiler.JspReader,
org.apache.jasper.compiler.Parser)
void org.apache.jasper.compiler.Parser.parse(java.lang.String,
java.lang.Class [])
void org.apache.jasper.compiler.Parser.parse(java.lang.String)
boolean
org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
eEventListener, org.apache.jasper.compiler.JspReader,
org.apache.jasper.compiler.Parser)
void org.apache.jasper.compiler.Parser.parse(java.lang.String,
java.lang.Class [])
void org.apache.jasper.compiler.Parser.parse(java.lang.String)
boolean
org.apache.jasper.compiler.Parser$Tag.accept(org.apache.jasper.compiler.Pars
eEventListener, org.apache.jasper.compiler.JspReader,
org.apache.jasper.compiler.Parser)
void org.apache.jasper.compiler.Parser.parse(java.lang.String,
java.lang.Class [])
void org.apache.jasper.compiler.Parser.parse(java.lang.String)
void org.apache.jasper.compiler.Parser.parse()
boolean org.apache.jasper.compiler.Compiler.compile()
boolean
com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.compile(org.apache.jasper.com
piler.Compiler, java.lang.Class)
boolean
com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.loadJSP(java.lang.String,
java.lang.String, boolean, javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(javax
.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
java.lang.Throwable, boolean)
void
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin
e.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S
ervletRequest, javax.servlet.ServletResponse)
void
com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR
equest, javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se
rvlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest,
javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle
t.ServletRequest, javax.servlet.ServletResponse,
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c
om.ibm.servlet.engine.webapp.WebAppRequest,
javax.servlet.http.HttpServletResponse, boolean)
void
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet
.ServletRequest, javax.servlet.ServletResponse, boolean)
void
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
void
org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut
s.action.ActionForward, org.apache.struts.action.ActionMapping,
org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void
org.apache.struts.action.ActionServlet.process(javax.servlet.http

Status of Commons Workflow

2002-03-27 Thread Robert Williams

Does anyone know the status of the Commons Workflow project?  I have seen
little or no action there for a few months.  Is it being abandoned?

bob



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




RE: Installation on OS-390 and Websphere 3.5.3: Was 503Error- Now What struts.jar should I use.

2002-03-27 Thread Steven Banks

Roger.   Thanks for the response.   Before trying the upgrade, I am going to try 
getting it to work on 3.5.3 "just call me stubborn".  There is a set of notes from 
someone who has it working on this user group.   The latest I have tried was changing 
a WAS start-up parameter "appserver.compliance.mode=true".  The result was the the 
servlet does not load at all.  It could not find the config file.  I have since 
discovered that one result of the parameter change  is that the location of the 
struts-config.xml file has to be moved as the following code from the Action Servlets 
initMapping routine no longer worked.

When  appserver.compliance.mode=false  "the default value"

 InputStream input = getServletContext().getResourceAsStream(config); 

found the xml file in the following directory:   
   u/mywebs/dev/train/WEB-INF/classes/WEB-INF/struts-config.xml


When  appserver.compliance.mode=true,   the xml file had to be moved to
 /u/mywebs/dev/train/web/WEB-INF/struts-config.xml


It would be nice if the main struts code would return 
getServletContext().getRealPath(config));   when it cannot find the config file, this 
would solve a lot of problems like this very quickly.  

Once I moved the file to this new location, the servlet starts OK, but returns the 
http 503 error again as soon as I try to access any file in the web application.

I am going to put a call in to IBM tech support to see if they can help, but any other 
help here would be appreciated.  

Steven


Steven Banks
902-368-0566

>>> "Roger Fortier" <[EMAIL PROTECTED]> 03/26/02 04:32PM >>>
Below the dotted line is a message that was posted on IBM newsgroup for
WebSphere AS400 and basically Struts will not work with Websphere 3.5.3
on AS400. You must upgrade to 3.5.4.  Perhaps it's the same for
websphere on OS-390?

Also, check this link for a version of struts-jar that will work with
Websphere 4.0.

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



---

Good News:  Yes, it will work.
Bad News: You may have to jump through a few hoops, depending on just
what
it is you intend to do in the application, how you intend to deploy, and
what your AS400 configuration looks like.

3.5.5 hasn't really been out all that long, and when you consider that
anything like this for the 400 always comes poking along several weeks
or
months after the other platforms my guess would be that higher won't be
an
option for a while.

The way it has shaken out for me is that struts apps deploy fine on
versions
3.5.3, 3.5.4, and 3.5.5 for Windows.  I did do the documented hacks for
the
struts source and the parser.jar that are out on the Apache site.  This
may
not be necessary in version 3.5.5, but unfortunately I haven't had
adequate
time to investigate it.  If it isn't fixed, dock IBM several points for
not
walking it the way they talk it with regard to open source.  But don't
assume if it works on Windows it will work on the 400 - more on that
later.

In addition, I did have to change struts-config.xml and web.xml to use
system rather than public dtd's.  This was not necessary on my Windows
desktop, but when I deployed to the 400 I got numerous errors when the
webapp loaded.  Changing the dtd ref did the trick.  If your machine is
behind a firewall with no internet access you'll also have to make sure
the
dtd can be found, so you may need to specify an internal uri.  Don't
worry,
the system log will let you know right away if it doesn't like what you
picked.

I used the Struts connection pooling option because I used Tomcat as my
development server, and because I want to build in some monitoring that
is
currently not available in WSE for the 400.  I developed on Windows
using
the AS400 toolbox drivers, and switched over to the native DB2 drivers
when
moving up(Don't ask me why).  I ran into some issues there where I was
not
able to update certain files using SQL (support posts seem to point to
issues with non-journaled files), and switching back to the 400 drivers
cleared it up.  Not sure why, since connections using the WS connection
pool
and these same drivers seem to have no issues.

The big news is that while I got my apps to deploy to a 3.5.4
installation
on the 400, no amount of installing, finessing or tears/breastbeating
could
get them to run on 3.5.3.  Even though they ran alright on the same
number
release on Windows (and Linux for that matter ).  So my hunch is that as
long as you are on 3.5.4 on up you are OK.  But as to the line that if
it
runs on one it should run on the other platform versions of the same
number
release?  Well, I never say never, and I will always concede the
possibility
that it could be issues on my end somewhere.  But let's just think for a
moment on IBM's overall consistency in this area and in overall quality
of
delivered software product(my own view, there are some great successes
and
equally great failures), and it isn't 

can TILES use existing jsp files ?

2002-03-27 Thread Melissa . Manoogian

My current project is using Struts 1.0 and I already implemented about 20%
of my .jsp files,
without giving too much thought to the navigation.
Now I want to use tiles to implement the sidebar menus for navigation.
I am hoping this does not mean I will have to re-implement  those .jsp
files, i.e.
I imagine I could simply put each of my jsp files in the
place where we put body.jsp. However I am getting an error message because
each of my jsp
pages is using this tag "bean:message key=index.title".

In my struts-config.xml I added  this tag for message-resource:
  message-resource parameter
="org.apache.struts.example.tiles.dev1-1.ApplicationResources" null="false"

I tried both: tiles for struts 1.0 and tiles for struts 1.1 with the same
error message (see
bellow).
Searching  the mail-archive I found the same error but the scenario was
different - that tiles user *was
not using* the ApplicationResource, but was forced to specify it anyways.
In my case *I am
using* the ApplicationResource but the servlet cannot find it when I am
using tiles. It finds it ok
if I am not using tiles, i.e. if I am using just struts 1.0.


javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at
org.apache.struts.util.RequestUtils.message(RequestUtils.java:735)
at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:295)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:93)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Unknown Source)



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




logic:iterate and "no collection found"

2002-03-27 Thread Mike Finn



Hi 
All,
 
I have a 
form with an array of subforms on it, like so:
 
class 
BigForm extends ActionForm
{
  SubForm subFormX[];
 
  public SubForm[] getSubFormX() { return 
subFormX; }
  public void setSubFormX(SubForm[] 
newSubFormX) { this.subFormX = newSubFormX; }
 // 
other attributes...
}
 
When this 
has no data in it, and I use iterator on it, like so: 
(assume 
"TheBigForm" is declared w/ type BigForm in 
struts-config.xml)
 

   

 
I get "No 
Collection found" ServletException.  The BigForm is in request scope, and 
in fact if I force-feed it with data, everything works OK. I also wrapped the 
iterate block with logic:present to no avail:

...

 
Also, I 
initialized the array to new SubFormX[0] - again, no luck.
 
What is 
the correct way to handle this situation - where you have a sub or child form 
with an empty array?
 
TIA,
Mike
 
 
 

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


Re: Need example on using roles in struts-tiles

2002-03-27 Thread Ted Husted

When container-based authentification is being used, you can specify the
secuirty role for a tile. If the user is not in the specified role, then
the attribute value is not set. This allows you to specify a tile for
each security role, and let the framework select the appropriate one for
the current user.




If the put command is being used in an insert tag, the role is checked
immediately.  If the put command is being used within a definition tag,
the role is checked when the Tile context is initialized 

Jakarta taglibs also has a handy IsUserInRole tag in the request taglib. 

http://jakarta.apache.org/taglibs/doc/request-doc/index.html

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Reynaldo Timonera wrote:
> 
> Hi,
> 
> We are now in the middle of a project and we're using tiles. Does anyone have a 
>sample code on how to use roles in tiles?
> 
> Thanks,
> Reynaldo

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




Re: Using MessageTag for handling plural/singular

2002-03-27 Thread Ted Husted

In general, the answer to most questions like this is to do the work in
the Action, and then place the result in a bean for easy display. You
can obtain a reference to the message resources in the Action, 

MessageResources resource = servlet.getResources();

and then use the Java text-handling classes 

http://java.sun.com/docs/books/tutorial/i18n/format/index.html

like you would in any conventional Java program. 

The outcome can then be passed to the page in a simple JavaBean and
output with bean:write. The strength of Struts is that the Action class
provides a gateway to the business tier and lets us write Java programs
like Java programs. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Fabien Modoux wrote:
> 
> I am trying to use the Message tag to handle the display of plural vs.
> singular. I tried the following simple example but it does not work as
> ChoiceFormat requires a Number but MessageTag's argN are of type String.
> 
> > jsp:
> 
> <% for (int i = 0; i < 5; i++) { %>
> 
> <% } %>
> 
> > application resources:
> 
> test1=There {0,choice,0#are no files|1#is one file|2#are {0,number,integer}
> files}.
> 
> > error:
> 
> java.lang.IllegalArgumentException: Cannot format given Object as a Number
> at java.text.NumberFormat.format(NumberFormat.java:209)
> at java.text.Format.format(Format.java:121)
> at java.text.MessageFormat.format(MessageFormat.java:742)
> at java.text.MessageFormat.format(MessageFormat.java:491)
> at java.text.Format.format(Format.java:121)
> at
> org.apache.struts.util.MessageResources.getMessage(MessageResources.java:325
> )
> at org.apache.struts.util.RequestUtils.message(RequestUtils.java:586)
> at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
> 
> Has anyone found a workaround for this, or is there another way to do it?
> 
> Thanks in advance,
> 
> Fabien
> 
> -
> Fabien Modoux,
> Voicemate - http://www.voicemate.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: Form Beans - Vector

2002-03-27 Thread Ted Husted

Generally, specifying the type seems to help. 

.. type="java.util.Vector" ...

I don't use Vectors myself, since the synchronized aspect is not useful
in the kind of applications I tend to work on, but using them with the
iterate tags does seem to generate a lot of messages. 

If you continue to have problems, and if it's possible to use another
collection class, like ArrayList, I'd do that. If not, I'd add a helper
method that returned the Vector as an array.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

Perpetua Cysne wrote:
> 
> Could someone please provide me with an example of Form Beans using a Vector
> of objects? How do display it in a iterate tag?
> 
> The object is Passenger(firstName, lastName).
> 
> Thank you!
> 
> Perpetua
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




combination of and getMessage("sometag") in JSP: how

2002-03-27 Thread Lukas Österreicher

Hi.

I've got some i18n jsp pages which work so far by using commands like:

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bn"%>
<%  setLocale(session, request); %>
and


The problem is that now I've got some java code within the jsp
where I need to include some internationalisation - which
obviously won't work with 

Hope you can help me!

Cheers!

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: Can Dreamweaver and Struts work together

2002-03-27 Thread Jon Ferguson

Hi,

Only as a trial... However I seem to remember reading that due to Ultra-Dev formatting 
constraints
you need to START with UltraDev.. eg. DO not attempt to build a file in some other 
editor first.

Hope this helps,

Jon

$B%"%s%H%K!<(B $B%9%F%$%9(B wrote:

> Hi
>
> Has anyone successfully got Dreamweaver and Struts to cooperate together.  I want to 
>be able to edit
> my jsp files(with struts tags) in Dreamweaver 4 UltraDeveloper.
>
> Cheers
>
> Tony
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 



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


checking action name

2002-03-27 Thread Mike Dewhirst

Is it possible to find in the JSP what action mapping has lead us there? Is
there a parameter in the request?

Thanks in advance,

Mike


> -Original Message-
> From: Martin Gross [mailto:[EMAIL PROTECTED]]
> Sent: 27 March 2002 12:17
> To: Struts Users Mailing List
> Subject: Re: Object Mapping w/ Struts?
> 
> 
> Try ObjectRelationalBridge:
> 
> http://objectbridge.sourceforge.net/
> 
>  Martin
>  [EMAIL PROTECTED]
> 
> .
>  EVOLT Internet Applications GmbH
>  Brüningstrasse 35
>  61350 Bad Homburg, Germany
>  http://www.evolt.de
> .
> 
> > I am looking for an object-mapping (to sql relational DB) 
> solution for
> > Struts.  
> 
> > I have a medium sized database application which I've developed in
> > struts.  (around 25 tables in PostgreSQL)  I've been using 
> a home-brew
> > lightweight data-access bean system -- using perl scripts 
> to generate
> > beans that interact with the database.  The java source 
> these scripts
> > generate need a lot of manual editing, so making changes to 
> the object
> > model can be a nightmare. 
> 
> > I tried downloading Torque 2.1, but had problems, so then I 
> tried Torque
> > 3.0b1.  It seems like Torque isn't going to integrate well with my
> > already existing tables.  I use some postgres types such as TEXT and
> > BOOLEAN, which I would expect to map to LONGVARCHAR and BIT
> > respectively, but in the SQL that torque spit out they were 
> "bytea" and
> > "".  I can't find mention of "bytea" in postgres docs, and 
> obviously ""
> > isn't going to do much for me. =) 
> 
> > After reading the Torque docs, I really like what it offers 
> but I'm not
> > sure that it will work for me.  Are there any other solutions that
> > people can recommend?  Or should I try modifying torque to 
> fit my needs?
> > I don't have any EJB experience but I've heard good things 
> about JBoss. 
> > I've also heard the going EJB can really slow an 
> application down. I've
> > also noticed some talk of Expresso on this list, would this be worth
> > trying?
> 
> > Thanks for any advice! 
> 
> > -james 
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:



=**

If you are not the intended recipient, employee or agent responsible for delivering 
the message to the intended recipient, you are hereby notified that any dissemination 
or copying of this communication and its attachments is strictly prohibited.

If you have received this communication and its attachments in error, please return 
the original message and attachments to the sender using the reply facility on e-mail.

Internet communications are not secure and therefore the UCLES Group does not accept 
legal responsibility for the contents of this message.  Any views or opinions 
presented are solely those of the author and do not necessarily represent those of the 
UCLES Group unless otherwise specifically stated.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses although this does not guarantee that 
this email is virus free.

**=



***

If you are not the intended recipient, employee or agent responsible for delivering 
the message to the intended recipient, you are hereby notified that any dissemination 
or copying of this communication and its attachments is strictly prohibited.

If you have received this communication and its attachments in error, please return 
the original message and attachments to the sender using the reply facility on e-mail.
Internet communications are not secure and therefore the UCLES Group does not accept 
legal responsibility for the contents of this message.  Any views or opinions 
presented are solely those of the author and do not necessarily represent those of the 
UCLES Group unless otherwise specifically stated.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses although this does not guarantee that 
this email is virus free.

***




RE: torque & struts

2002-03-27 Thread Robert Morse

Yes, and using it in production.  What questions do you have?

-Original Message-
From: Oliver Kießler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 12:36 AM
To: Struts Users Mailing List
Subject: torque & struts


hello,
has anybody successfully combined torque with struts? i think it would a
be really nice level of abstraction not having to deal with SQL
Statements in an struts app anymore...

bye, oli


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Object Mapping w/ Struts?

2002-03-27 Thread Martin Gross

Try ObjectRelationalBridge:

http://objectbridge.sourceforge.net/

 Martin
 [EMAIL PROTECTED]

.
 EVOLT Internet Applications GmbH
 Brüningstrasse 35
 61350 Bad Homburg, Germany
 http://www.evolt.de
.

> I am looking for an object-mapping (to sql relational DB) solution for
> Struts.  

> I have a medium sized database application which I've developed in
> struts.  (around 25 tables in PostgreSQL)  I've been using a home-brew
> lightweight data-access bean system -- using perl scripts to generate
> beans that interact with the database.  The java source these scripts
> generate need a lot of manual editing, so making changes to the object
> model can be a nightmare. 

> I tried downloading Torque 2.1, but had problems, so then I tried Torque
> 3.0b1.  It seems like Torque isn't going to integrate well with my
> already existing tables.  I use some postgres types such as TEXT and
> BOOLEAN, which I would expect to map to LONGVARCHAR and BIT
> respectively, but in the SQL that torque spit out they were "bytea" and
> "".  I can't find mention of "bytea" in postgres docs, and obviously ""
> isn't going to do much for me. =) 

> After reading the Torque docs, I really like what it offers but I'm not
> sure that it will work for me.  Are there any other solutions that
> people can recommend?  Or should I try modifying torque to fit my needs?
> I don't have any EJB experience but I've heard good things about JBoss. 
> I've also heard the going EJB can really slow an application down. I've
> also noticed some talk of Expresso on this list, would this be worth
> trying?

> Thanks for any advice! 

> -james 



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




form-bean problem

2002-03-27 Thread Viet Kevin



Hello all I'm facing a problem and I want to get advices from you

I have three bean class that are extending from the same base class
the base class is declared as abstract

Now I want to create three action forms for validating the informations corresponding
to each of these beans.

For this I have created a base abstract action form and extended it to implement
the action forms corresponding to the beans.
In the abstract form I validate the properties of the abstract bean class and
in the three beans implentations I validate (calling the super.validate) all the
properties

The problem I have to deal with is that I don't want to declare in my 
struts-action.xml file
the three concrete form bean. I want to declare only one action form with the type of 
the abstract class
with one name. In one of my action I will instantiate the right concrete form bean put 
it in the session scope
(core struts wont have to create it again) with the name declared in the config file, 
then at validation 
time the struts core will get the action form bean from the session and validate the 
right way.

I have tested that but the problem is the following :
struts finds the bean in the session scope, then it retrieves the form-bean declaration
from the struts-config file and then test if the name of the class declared in the 
form-bean tag
is equal to the name of the class retrieved from the session. 
These names of course are different because one is the name of the abstract action 
form class and the other one of the name 
of the three concrete action form

Is there an another way to do or maybe I have to patch the struts core for making it 
search 
into the class hierarchy other than on the name of the form-bean class?






=
-- KeV -- 
=



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




RE: Is anyone else having trouble with Tomcat 4?

2002-03-27 Thread Arnaud Heritier

In TC 4 the verification of the web.xml syntaxe is more restricting.

you should verify that you correctly declare your web.xml as in the dtd :





The order of the elements is important.

arnaud

> -Message d'origine-
> De:   Johannes Wolfgang Woger [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 27 mars 2002 10:53
> A:Struts Users Mailing List
> Objet:Re: Is anyone else having trouble with Tomcat 4?
> 
> Hi,
> I had this sort of problems too.
> I had servlet.jar in $JAVA_HOME/jre/lib/ext,
> Tomcat33a accepted it , Catalina not. I put it
> into $CATALINA_HOME/common/lib ,
> it worked.
> 
> > Everytime I try to switch a webapp to Tomcat 4, I get exceptions.  Since
> it
> > works on Tomcat 3 I usually just switch back and don't investigate too
> much.
> > So, I'm just wondering if anyone else has these problems, and if so
> > ...what's the problem?
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


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




torque & struts

2002-03-27 Thread Oliver Kießler

hello,
has anybody successfully combined torque with struts? i think it would a
be really nice level of abstraction not having to deal with SQL
Statements in an struts app anymore...

bye, oli


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




Re: Is anyone else having trouble with Tomcat 4?

2002-03-27 Thread Johannes Wolfgang Woger

Hi,
I had this sort of problems too.
I had servlet.jar in $JAVA_HOME/jre/lib/ext,
Tomcat33a accepted it , Catalina not. I put it
into $CATALINA_HOME/common/lib ,
it worked.

> Everytime I try to switch a webapp to Tomcat 4, I get exceptions.  Since
it
> works on Tomcat 3 I usually just switch back and don't investigate too
much.
> So, I'm just wondering if anyone else has these problems, and if so
> ...what's the problem?



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




Re: Multiple Selects in a JSP

2002-03-27 Thread @Basebeans.com

Subject: Re: Multiple Selects in a JSP
From: "Pim" <[EMAIL PROTECTED]>
 ===
>From "Using Struts":
http://stealthis.athensgroup.com/presentations/Model_Layer_Framework/Struts_
Whitepaper.pdf

"Dependent Drop-Down Combo Box Lists
In many situations, you will have two combo boxes, with the contents of the
second
dependent on the value selected in the first. That is, each item in the
first combo box is
associated with a list. To handle this, you need for the first combo box to
do a submit
when it changes, so that you have a chance to update the second. You do this
with:





In this example, the property "value", of the beans in orglist are
orgIds and the "labelProperty" property is the name to display. When
you are in your action class the first time, the orgId string property
of your form bean will be null or blank. In subsequent submissions the
orgId property of your form bean will contain a valid orgId, so that
you can look up the list associated with that value, and thus populate
the second drop-down combo box propery.
Radio Button Input"

Gr,

Pim

"Ken Holzer" <[EMAIL PROTECTED]> wrote in message
news:a7qs8p$p2o$[EMAIL PROTECTED]...
> I have two selects in my JSP and I want to be able to dynamically change
the
> options of the 2nd select based on the choice selected from the 1st
select.
>
> Is there a way to do that using the Struts tags?
>
> Thanks,
>
> Ken
>
>



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