Re: checking tiles-defs.xml

2004-03-31 Thread Mark Lowe
struts console validates and IMO is a tidy way to get around tiles-defs 
and other struts xml files.

On 1 Apr 2004, at 09:12, Dean A. Hoover wrote:

Found one: http://www.stg.brown.edu/service/xmlvalid/

Dean A. Hoover wrote:

As my application grows, so does my
tiles-defs.xml file. Well, I must have mistyped
something because now when I go to run
an exception is thrown telling me there's
a syntax error in there somewhere. (Actually,
it says there is a missing "".)
Reminds me of the old days when I was hacking
lex files that were several pages long and lex
would barf and output "syntax error".
Anyway the file is 547 lines long and it would
be nice if I could just run it through some
well-formedness checker or validator. I checked
in google but didn't hook up with anything useful.
Any suggestions?
Dean Hoover

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Clean url for home page

2004-03-31 Thread Jan Peter Hecking
John Boyes wrote:

I would like to have a clean url for my site's home page (built with Struts) 
displayed to the
user.

e.g
http://www.mysite.com
not
http://www.mysite.com/home.do
or
http://www.mysite.com/index.jsp
Is there a straightforward way to accomplish this, while still processing a
Struts action in the request?
 

I'm just using a simple index.jsp like this:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"; 
prefix="logic" %>


My stuts-config.xml then declares a global forward that defines what 
action gets executed for requests to index.jsp:

   
   
  
   
Hope this helps,
Jan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: checking tiles-defs.xml

2004-03-31 Thread Steve Widmar
Dean:

If you use ant, you could also use http://ant.apache.org/manual/OptionalTasks/xmlvalidate.html

eg:
  

  

Cheers,
Steve


>>> [EMAIL PROTECTED] 03/31/04 11:12PM >>>
Found one: http://www.stg.brown.edu/service/xmlvalid/ 

Dean A. Hoover wrote:

> As my application grows, so does my
> tiles-defs.xml file. Well, I must have mistyped
> something because now when I go to run
> an exception is thrown telling me there's
> a syntax error in there somewhere. (Actually,
> it says there is a missing "".)
> Reminds me of the old days when I was hacking
> lex files that were several pages long and lex
> would barf and output "syntax error".
> Anyway the file is 547 lines long and it would
> be nice if I could just run it through some
> well-formedness checker or validator. I checked
> in google but didn't hook up with anything useful.
> Any suggestions?
>
> Dean Hoover
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



changing two frames at one time

2004-03-31 Thread Otto, Frank
Hi,

I have three frames. If I click a link in one frame, I want to change the other two 
frames.

Is this possible with Struts?


Regards,

Frank

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] was Re: JavaServer Face

2004-03-31 Thread Mark Lowe
Vic

I've had a look around I'm a tad confused, do you subscribe to struts  
lists just for the comedy value then? You mention struts several times  
on your site and even offer training for struts.

As amusing as the cartoons are, I'm not sure the person who drew them  
is aware of the compatibility between various different frameworks. But  
I'd have thought you would be.

JSF looks to be like the formalization of various bits and pieces  
including the progress made by struts. I don't see the huge problem, in  
fact I see this as progress. I look forward to working with containers  
with out the box jsf and jstl support and having less of a dependancy  
on open source frameworks to fill in the gaps.

In terms of objections and such like I wasn't aware that anyone, sun or  
otherwise, was holding a gun to folk's heads making them use  
technologies developed via JCP or top level apache project. For  
example, I don't like EJB's so I don't use them, its quite simple.

Is there something I've misunderstood ?

Mark

On 31 Mar 2004, at 17:18, Vic Cekvenich wrote:

I duno. I used to have a page with links on EJB anecdotes, and I was  
taken to task over it by a popular Sun employee, but that's all I can  
think of.

.V

Mark Lowe wrote:

Just out of curiosity where's the link on your site that caused so  
much controversy?
On 31 Mar 2004, at 16:39, Vic Cekvenich wrote:
There is also a digram to help you get the picture:
http://www.theserverside.com/cartoons/TalesFromTheServerSide.tss
.V

Mark Lowe wrote:

There was a long thread on the developers list last week where the  
question of whether JSF would replace struts was discussed.
The basic conclusions of those taking part in the discussion what  
that struts was originally designed to fill a gap in the servlet  
api, and that the role of struts and open source projects in  
general are often to fill these gaps without the rigid and slower  
process of JSR.
Check the dev list mail archives for "struts JSR" and read the  
thread.
Mark
On 31 Mar 2004, at 11:00, Xuemin Guan wrote:

Hi, All, I know this is a bit off topic. But really want to
get an opinion about it from the Struts users.
The JavaServer Face 1.0, or JSF, has been released. It claims to
be a framework for building web-based user interfaces in Java.
Like Swing, it provides a set of standard widgets  (buttons,
hyperlinks, checkboxes, and so on). What I want to know is, can
JSF truly facilitate constructing a highly complex
user interface just like Swing does? If it can't, is Applet still  
the way
to go(don't hear much about it these days. Is Applet dead? Is there
an alternative to Applet when it comes to constructing a web
browser-accessed highly complex GUI?) Given the fact that Struts  
already
provides many features JavaServer Face provides(such as validation,
internalization, and tags for constructing UI widgets etc),  what's
the significant benefit to gain by adopting JSF? or combining  
them?(I heard
this
is possible, and someone says it would be a powerful combination.)  
And the
final question is will the JSF replace Struts in the future?

Any comment is welcome.

Thanks,

Xuemin

--- 
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: checking tiles-defs.xml

2004-03-31 Thread Dean A. Hoover
Found one: http://www.stg.brown.edu/service/xmlvalid/

Dean A. Hoover wrote:

As my application grows, so does my
tiles-defs.xml file. Well, I must have mistyped
something because now when I go to run
an exception is thrown telling me there's
a syntax error in there somewhere. (Actually,
it says there is a missing "".)
Reminds me of the old days when I was hacking
lex files that were several pages long and lex
would barf and output "syntax error".
Anyway the file is 547 lines long and it would
be nice if I could just run it through some
well-formedness checker or validator. I checked
in google but didn't hook up with anything useful.
Any suggestions?
Dean Hoover

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


checking tiles-defs.xml

2004-03-31 Thread Dean A. Hoover
As my application grows, so does my
tiles-defs.xml file. Well, I must have mistyped
something because now when I go to run
an exception is thrown telling me there's
a syntax error in there somewhere. (Actually,
it says there is a missing "".)
Reminds me of the old days when I was hacking
lex files that were several pages long and lex
would barf and output "syntax error".
Anyway the file is 547 lines long and it would
be nice if I could just run it through some
well-formedness checker or validator. I checked
in google but didn't hook up with anything useful.
Any suggestions?
Dean Hoover

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[OT] File explorer (tree view component) ...

2004-03-31 Thread Anand Stephen
Greetings,
Sorry for the off topic question.
Has any one used a tree view component, that has to process a very large
number of files (> 40,000) and browser is able to render this tree
quickly (< 1 sec)?
 
e.g. 
\---local
+---audio
+---colorswatches (as over 40,000) files 
 
+---kickers
|   +---gateway
|   +---home
|   \---thankyou
+---localbuttons
+---localgraphics
+---localnav
+---page_specific
|   +---advancedsearch
 
I have tried the nested tutorial from htttp://www.keyboardmonkey.com and

The tree component from
http://www.jenkov.dk/projects/treetag/treetag.jsp this component was
impressive.
I wanted to see if anyone else has run into this problem??
 
Any input would be greatly appreciated.
Thank you,
[sa]
 


Re: adding jsessionid without

2004-03-31 Thread Craig McClanahan
Fedor Smirnoff wrote:

Hi,

I have a couple of links that are printed from custom tags so I cannot use
html:link, I know I can just add ;jsessionid= but is there a way to
determine if there is a need for jsessionid to be added to the link, same
way 
Thanks
Fedor


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

Your best bet is to do exactly what the implementation of  
does ... pass in your destination URL to the response.encodeURL() 
method.  This lets the servlet container decide whether it needs to add 
the session identifier to the URL or not.

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Using Struts with Avalon

2004-03-31 Thread Craig McClanahan
Richard Megginson wrote:

I'd like to use Avalon for the lifecycle management of Struts Action and
ActionForm objects.  But it seems that in order to do so, the
RequestProcessor class would need to be replaced, or at least the
processActionForm() and processActionCreate() methods, in order to
perform the lifecycle management upon object creation.  Is this
desirable?  I think I would only be using the LogEnabled and Serviceable
interfaces for these objects - to get the correct log to use and to be
able to use services from my Actions and ActionForms.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Subclassing the RequestProcessor would indeed make sense for something 
like this.

For future versions, we're experimenting with dividing the 
RequestProcessor class into discrete elements using the Chain of 
Responsibility pattern (see the contrib/struts-chain sources in the 
Struts CVS repository, and commons-chain in the Jakarta Commons 
Sandbox).  In that sort of a world, you would just customize the 
corresponding elements of the chain to accomplish specializations like this.

Please report back on your progress -- I'm interested in seeing the 
different approaches people take to integrating IoC and SOA type 
architectures into Struts.

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Using Struts with Avalon

2004-03-31 Thread Richard Megginson
I'd like to use Avalon for the lifecycle management of Struts Action and
ActionForm objects.  But it seems that in order to do so, the
RequestProcessor class would need to be replaced, or at least the
processActionForm() and processActionCreate() methods, in order to
perform the lifecycle management upon object creation.  Is this
desirable?  I think I would only be using the LogEnabled and Serviceable
interfaces for these objects - to get the correct log to use and to be
able to use services from my Actions and ActionForms.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


SV: HashMap and tiles

2004-03-31 Thread hermod . opstvedt
Hi

You have a form on it that maps to an action, but you have not defined a
form for that action

Hermod

-Opprinnelig melding-
Fra: Mario St-Gelais [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 17:07
Til: [EMAIL PROTECTED]
Emne: HashMap and tiles


I am using Tomcat 5.0.19 and Struts 1.1.  I made a small application 
using a hashmap to store user entry from a form.  That works fine in 
itself.  Then to make the thing nicer, I added tiles.  All the pages 
work but the one with the form.  I keep getting the message :

javax.servlet.ServletException: Cannot retrieve definition for form bean

null.

I am also using the Validator to validate the entries but I don't think 
that is the issue as everything is fine without the tiles.

-- 
_
Mario St-Gelais
"Good judgment comes from
experience- usually experience
which was the result of poor judgment"
Bill Putnam



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dynamic tile definitions

2004-03-31 Thread Joshua Tuberville
Hello,

I am writing a component for a Struts 1.1 application that uses JSTL and
the Struts-EL library.  In my design I mistakenly thought that the tiles
tags were a part of Struts-EL for 1.1.  As pointed out earlier on this
list they are only in 1.2.  Upgrading our app to 1.2 is not a very
attractive option at this time so I have been trying to determine an
alternative solution to my needs.  My page is composed of dynamic
sections which are currently implemented as a List of view helper beans
put into the request scope each section had a "definition" property that
I wanted to dynamically insert so the core of the page looked like this:


  

  

  



Which works well with 1.2 but now that I can not use an EL expression
inside the tiles insert and the fact that each page will have 1..*
sections, how do I manage this?

Any input appreciated,
Joshua

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



adding jsessionid without

2004-03-31 Thread Fedor Smirnoff
Hi,

I have a couple of links that are printed from custom tags so I cannot use
html:link, I know I can just add ;jsessionid= but is there a way to
determine if there is a need for jsessionid to be added to the link, same
way 

Fw: Struts boooks: remommendations?

2004-03-31 Thread Xuemin Guan


- Original Message - 
From: "Charles Jordan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 11:00 PM
Subject: Re: Struts boooks: remommendations?


> Can you print the pdf?

Printable is one of the product's features.

Xuemin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



validaton and i18n

2004-03-31 Thread Laurie Harper
I've finally managed to get the Struts Validator working, thanks to the 
sample chapter on it from Struts in Action. I'm having one small problem 
still, though. When validation fails, I get a blank alery popup.

Looking at the generated Javascript the problem appears to be that the 
message strings aren't populated:

function required () {
 this.aa = new Array("email", "", new Function ("varName", 
"this.mask=/^([!#\\$%&'\\*\\+\\-\\.\\/0-9=\\?A-Z\\^\\x5E_`a-z\\{\\|\\}~]+)@(([0-9a-zA-Z]([0-9a-zA-Z-]*[0-9a-zA-Z])?)(\\.[0-9a-zA-Z]([0-9a-zA-Z-]*[0-9a-zA-Z])?)+)$/; 
 return this[varName];"));
 this.ab = new Array("password", "", new Function ("varName", " 
return this[varName];"));
}

The message keys are defined in the validation.xml file, I think correctly:






mask
^([!#\$%&'\*\+\-\.\/0-9=\?A-Z\^\x5E_`a-z\{\|\}~]+)@(([0-9a-zA-Z]([0-9a-zA-Z-]*[0-9a-zA-Z])?)(\.[0-9a-zA-Z]([0-9a-zA-Z-]*[0-9a-zA-Z])?)+)$







The message resources are defined and, indeed, I can see in the Struts 
debug log that they're being looked up when the form is rendered:

L4J 2004-03-31 19:52:00,945 DEBUG PropertyMessageResources 
getMessage(en_US,errors.required)

L4J 2004-03-31 19:52:00,946 DEBUG PropertyMessageResources 
getMessage(en_US,logon.error.password.missing)
L4J 2004-03-31 19:52:00,946 DEBUG PropertyMessageResources loadLocale(en_US)
L4J 2004-03-31 19:52:00,946 DEBUG PropertyMessageResources 
getMessage(en_US,errors.required)
L4J 2004-03-31 19:52:00,957 DEBUG PropertyMessageResources 
getMessage(en_US,logon.error.email.missing)

They just never get pushed to the page. Here's what I'm using to get the 
form validation in my JSP:

  

...
What have I missed?

Thanks,

L.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Responding to Your Newsletter Request

2004-03-31 Thread requests
Your request was not completed because the newsletter "from" could not be found.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unsubscribe from new list

2004-03-31 Thread Craig R. McClanahan
Nick Faiz wrote:

How do I unsubscribe from this list? I've sent emails to
both [EMAIL PROTECTED] and
[EMAIL PROTECTED]
 

Try sending an empty message to "[EMAIL PROTECTED]".  
If that doesn't work, send me mail privately and I'll remove you.

		Nick Faiz

 

Craig

		-Original Message-
		From: Dhaliwal, Pritpal (HQP)
[mailto:[EMAIL PROTECTED] 
		Sent: Thursday, 1 April 2004 9:51 AM
		To: 'Struts Users Mailing List'
		Subject: RE: How do I get Application Scope in Action Class

		HI Raghu,

		Good one.. Had me scrathing my head a lil..

ServletContext application =
getServlet().getServletContext();
Enjoy,
Pritpal Dhaliwal
		-Original Message-
		From: Raghu.Ramakrishnan
[mailto:[EMAIL PROTECTED] 
		Sent: Wednesday, March 31, 2004 3:20 PM
		To: Struts Users Mailing List
		Subject: How do I get Application Scope in Action Class



		Hi,

My problem is that I have set certain objects in Application
Scope. I am
able to access these objects in my jsp pages But unable to
get these objects
in my Action Classes.
		i) How do I get Objects(Objects that were set using
		application.setAttribute()) in Application scope in my
Action Class?? 

Thanking you.
Raghu
		-Original Message-
		From: Jens Kühnberger [mailto:[EMAIL PROTECTED] 
		Sent: Wednesday, March 31, 2004 1:08 PM
		To: Struts Users Mailing List
		Subject: Re: Struts 1.1, JSTL and Tomcat5

		Thanks a lot.

		I changed

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
		

		to

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
web-app_2_4.xsd"
 version="2.4">
		and now it's working.

		Martin Cooper wrote:
		> Did you update your web.xml file for Servlets 2.4, and
update any
		> taglib declarations in that file?
		> 
		> --
		> Martin Cooper
		> 
		> 
		> "Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message
		> news:[EMAIL PROTECTED]
		> 
		>>Hi everyone,
		>>
		>>I got a problem with updating my webapplication from
struts 1.0, jstl
		>>1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
		>>
		>>I got rid of all the old .jar and .tld files and inserted
the new
		>>ones. I tried all different uri on the .jsp page, read
through various 
		>>messages on the mailing list, but I'm still stuck with the
following
		> 
		> error.
		> 
		>>I would be happy for any new ideas.
		>>
		>>Thanks,
		>>Jens
		>>
		>>
		>>org.apache.jasper.JasperException: Validation error
messages from
		>>TagLibraryValidator for cnull: 
		>>java.lang.IllegalStateException: can't declare any more
prefixes in 
		>>this context
		>>
		>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHa
		> ndler.
		> java:94)
		> 
		>
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.ja
		> va:404
		> )
		> 
		>
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.ja
		> va:112
		> )
		> 
	
 

org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:15
 

		>>78)
	
 

org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
 

	
 

org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
 

	
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
 

	
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
 

		>>
		> 
		>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.
		> java:5
		> 53)
		> 
		>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
		> java:2
		> 91)
		> 
	
 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:30
 

		>>1)
	
 

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 

	
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 

		>>
		> 
		>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j
		> ava:10
		> 69)
		> 
		>
org.apache.struts.action.RequestProcessor.processForwardConfig(Request
		> Proces
		> sor.java:455)
		> 
		>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav
		> a:279)
		> 
	
 

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482
 

		>>)
	
 

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 

	
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
 

	
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 

		> 
		> 
		> 
		> 
		> 
		>
-
		> To unsubscribe, e-mail: [EMAIL PROTECTED]
		> For additional commands, e-mail:
[EMAIL PROTECTED]
		> 
		> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c

RE: Struts issue..working in local WSAD/iwndows but not in Web sphere Deployment/ AIX

2004-03-31 Thread Mathew, Manoj

Hi guys need your help

is this because i don't have any entry for  myCommonForm in struts config.?


-Original Message-
From: Mathew, Manoj 
Sent: Wednesday, March 31, 2004 3:59 PM
To: [EMAIL PROTECTED]
Subject: Struts issue..working in local WSAD/iwndows but not in Web
sphere Deployment/ AIX



I have a action form 
public class myForm1 extends myCommonForm{}

public abstract class myCommonForm extends ActionForm{}

public class myForm2 extends myCommonForm{}

Here myForm1 and myForm2 have some common properties which has put in 
myCommonForm(setters and getters) and i extend that in both the myForm1 and 2.  
myForm1 and 2 has their own different propertis adn it's getters and setters too.

The issue is when i do myForm1  frm1 = (myForm1 ) form;
drm1 doesn't seems to have any value which are common(ie the properties in 
myCommonForm)..
It's working fine in windows local WSAD but not in web Sphere Server/AIX
Please help me out
Manoj


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How do I get Application Scope in Action Class

2004-03-31 Thread Raghu.Ramakrishnan


Hi Pritpal

Thanks a lot for your timely help. We have a release in two days  Under 
heavy pressure, thanks again.

Raghu

-Original Message-
From: Dhaliwal, Pritpal (HQP) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 5:51 PM
To: 'Struts Users Mailing List'
Subject: RE: How do I get Application Scope in Action Class


HI Raghu,

Good one.. Had me scrathing my head a lil..

ServletContext application = getServlet().getServletContext();

Enjoy,
Pritpal Dhaliwal


-Original Message-
From: Raghu.Ramakrishnan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 3:20 PM
To: Struts Users Mailing List
Subject: How do I get Application Scope in Action Class



Hi,

My problem is that I have set certain objects in Application Scope. I am able to 
access these objects in my jsp pages But unable to get these objects in my Action 
Classes.

i) How do I get Objects(Objects that were set using
application.setAttribute()) in Application scope in my Action Class?? 

Thanking you.
Raghu


-Original Message-
From: Jens Kühnberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 1:08 PM
To: Struts Users Mailing List
Subject: Re: Struts 1.1, JSTL and Tomcat5


Thanks a lot.

I changed

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



to

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
 version="2.4">

and now it's working.


Martin Cooper wrote:
> Did you update your web.xml file for Servlets 2.4, and update any 
> taglib declarations in that file?
> 
> --
> Martin Cooper
> 
> 
> "Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> 
>>Hi everyone,
>>
>>I got a problem with updating my webapplication from struts 1.0, jstl 
>>1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
>>
>>I got rid of all the old .jar and .tld files and inserted the new 
>>ones. I tried all different uri on the .jsp page, read through various 
>>messages on the mailing list, but I'm still stuck with the following
> 
> error.
> 
>>I would be happy for any new ideas.
>>
>>Thanks,
>>Jens
>>
>>
>>org.apache.jasper.JasperException: Validation error messages from 
>>TagLibraryValidator for cnull:
>>java.lang.IllegalStateException: can't declare any more prefixes in
>>this context
>>
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHa
> ndler.
> java:94)
> 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.ja
> va:404
> )
> 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.ja
> va:112
> )
> 
>>org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:15
>>78)
>>org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
>>org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>>
> 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.
> java:5
> 53)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
> java:2
> 91)
> 
>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:30
>>1)
>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>
> 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j
> ava:10
> 69)
> 
> org.apache.struts.action.RequestProcessor.processForwardConfig(Request
> Proces
> sor.java:455)
> 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav
> a:279)
> 
>>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482
>>)
>>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Responding to Your Newsletter Request

2004-03-31 Thread requests
Your request was not completed because the newsletter "from" could not be found.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



unsubscribe from new list

2004-03-31 Thread Nick Faiz

How do I unsubscribe from this list? I've sent emails to
both [EMAIL PROTECTED] and
[EMAIL PROTECTED]

Nick Faiz

-Original Message-
From: Dhaliwal, Pritpal (HQP)
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, 1 April 2004 9:51 AM
To: 'Struts Users Mailing List'
Subject: RE: How do I get Application Scope in Action Class

HI Raghu,

Good one.. Had me scrathing my head a lil..

ServletContext application =
getServlet().getServletContext();

Enjoy,
Pritpal Dhaliwal


-Original Message-
From: Raghu.Ramakrishnan
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 3:20 PM
To: Struts Users Mailing List
Subject: How do I get Application Scope in Action Class



Hi,

My problem is that I have set certain objects in Application
Scope. I am
able to access these objects in my jsp pages But unable to
get these objects
in my Action Classes.

i) How do I get Objects(Objects that were set using
application.setAttribute()) in Application scope in my
Action Class?? 

Thanking you.
Raghu


-Original Message-
From: Jens Kühnberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 1:08 PM
To: Struts Users Mailing List
Subject: Re: Struts 1.1, JSTL and Tomcat5


Thanks a lot.

I changed

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



to

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
web-app_2_4.xsd"
 version="2.4">

and now it's working.


Martin Cooper wrote:
> Did you update your web.xml file for Servlets 2.4, and
update any
> taglib declarations in that file?
> 
> --
> Martin Cooper
> 
> 
> "Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
>>Hi everyone,
>>
>>I got a problem with updating my webapplication from
struts 1.0, jstl
>>1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
>>
>>I got rid of all the old .jar and .tld files and inserted
the new
>>ones. I tried all different uri on the .jsp page, read
through various 
>>messages on the mailing list, but I'm still stuck with the
following
> 
> error.
> 
>>I would be happy for any new ideas.
>>
>>Thanks,
>>Jens
>>
>>
>>org.apache.jasper.JasperException: Validation error
messages from
>>TagLibraryValidator for cnull: 
>>java.lang.IllegalStateException: can't declare any more
prefixes in 
>>this context
>>
>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHa
> ndler.
> java:94)
> 
>
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.ja
> va:404
> )
> 
>
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.ja
> va:112
> )
> 

>>org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:15
>>78)

>>org.apache.jasper.compiler.Validator.validate(Validator.java:1524)

>>org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)

>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)

>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>>
> 
>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.
> java:5
> 53)
> 
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
> java:2
> 91)
> 

>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:30
>>1)

>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)

>>javax.servlet.http.HttpServlet.service(HttpServlet

RE: How do I get Application Scope in Action Class

2004-03-31 Thread Nick Faiz
How do I unsubscribe from this list? I've sent emails to both
[EMAIL PROTECTED] and
[EMAIL PROTECTED]

Nick Faiz

-Original Message-
From: Dhaliwal, Pritpal (HQP) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 1 April 2004 9:51 AM
To: 'Struts Users Mailing List'
Subject: RE: How do I get Application Scope in Action Class

HI Raghu,

Good one.. Had me scrathing my head a lil..

ServletContext application = getServlet().getServletContext();

Enjoy,
Pritpal Dhaliwal


-Original Message-
From: Raghu.Ramakrishnan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 3:20 PM
To: Struts Users Mailing List
Subject: How do I get Application Scope in Action Class



Hi,

My problem is that I have set certain objects in Application Scope. I am
able to access these objects in my jsp pages But unable to get these objects
in my Action Classes.

i) How do I get Objects(Objects that were set using
application.setAttribute()) in Application scope in my Action Class?? 

Thanking you.
Raghu


-Original Message-
From: Jens Kühnberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 1:08 PM
To: Struts Users Mailing List
Subject: Re: Struts 1.1, JSTL and Tomcat5


Thanks a lot.

I changed

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



to

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
 version="2.4">

and now it's working.


Martin Cooper wrote:
> Did you update your web.xml file for Servlets 2.4, and update any
> taglib declarations in that file?
> 
> --
> Martin Cooper
> 
> 
> "Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
>>Hi everyone,
>>
>>I got a problem with updating my webapplication from struts 1.0, jstl
>>1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
>>
>>I got rid of all the old .jar and .tld files and inserted the new
>>ones. I tried all different uri on the .jsp page, read through various 
>>messages on the mailing list, but I'm still stuck with the following
> 
> error.
> 
>>I would be happy for any new ideas.
>>
>>Thanks,
>>Jens
>>
>>
>>org.apache.jasper.JasperException: Validation error messages from
>>TagLibraryValidator for cnull: 
>>java.lang.IllegalStateException: can't declare any more prefixes in 
>>this context
>>
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHa
> ndler.
> java:94)
> 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.ja
> va:404
> )
> 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.ja
> va:112
> )
> 
>>org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:15
>>78)
>>org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
>>org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>>
> 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.
> java:5
> 53)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
> java:2
> 91)
> 
>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:30
>>1)
>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>
> 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j
> ava:10
> 69)
> 
> org.apache.struts.action.RequestProcessor.processForwardConfig(Request
> Proces
> sor.java:455)
> 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav
> a:279)
> 
>>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482
>>)
>>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How do I get Application Scope in Action Class

2004-03-31 Thread Dhaliwal, Pritpal (HQP)
HI Raghu,

Good one.. Had me scrathing my head a lil..

ServletContext application = getServlet().getServletContext();

Enjoy,
Pritpal Dhaliwal


-Original Message-
From: Raghu.Ramakrishnan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 3:20 PM
To: Struts Users Mailing List
Subject: How do I get Application Scope in Action Class



Hi,

My problem is that I have set certain objects in Application Scope. I am
able to access these objects in my jsp pages But unable to get these objects
in my Action Classes.

i) How do I get Objects(Objects that were set using
application.setAttribute()) in Application scope in my Action Class?? 

Thanking you.
Raghu


-Original Message-
From: Jens Kühnberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 1:08 PM
To: Struts Users Mailing List
Subject: Re: Struts 1.1, JSTL and Tomcat5


Thanks a lot.

I changed

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



to

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
 version="2.4">

and now it's working.


Martin Cooper wrote:
> Did you update your web.xml file for Servlets 2.4, and update any
> taglib declarations in that file?
> 
> --
> Martin Cooper
> 
> 
> "Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
>>Hi everyone,
>>
>>I got a problem with updating my webapplication from struts 1.0, jstl
>>1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
>>
>>I got rid of all the old .jar and .tld files and inserted the new
>>ones. I tried all different uri on the .jsp page, read through various 
>>messages on the mailing list, but I'm still stuck with the following
> 
> error.
> 
>>I would be happy for any new ideas.
>>
>>Thanks,
>>Jens
>>
>>
>>org.apache.jasper.JasperException: Validation error messages from
>>TagLibraryValidator for cnull: 
>>java.lang.IllegalStateException: can't declare any more prefixes in 
>>this context
>>
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHa
> ndler.
> java:94)
> 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.ja
> va:404
> )
> 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.ja
> va:112
> )
> 
>>org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:15
>>78)
>>org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
>>org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>>
> 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.
> java:5
> 53)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
> java:2
> 91)
> 
>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:30
>>1)
>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>
> 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j
> ava:10
> 69)
> 
> org.apache.struts.action.RequestProcessor.processForwardConfig(Request
> Proces
> sor.java:455)
> 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav
> a:279)
> 
>>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482
>>)
>>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: xhtml gets turned off

2004-03-31 Thread Mark Mandel
Nope.

That's 

This is just a tag to say 'HEY! I'm XHTML everyone!'

Mind you -  tags still generate 'name' attributes, which are not valid
XHTML.

But what can you do?

Mark

-Original Message-
From: Dean A. Hoover [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 1 April 2004 9:36 AM
To: Struts Users Mailing List
Subject: Re: xhtml gets turned off

Thanks Mark. But it will not generate any more  tags?

Thanks
Dean

Mark Mandel wrote:

>Dean - 
>
>In each of your tiles that uses XHTML you need to have a  tag,
>so the system knows it's outputting xhtml.
>
>(Did the same thing a few days ago)
>
>Regards,
>
>Mark
>
>-Original Message-
>From: Dean A. Hoover [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, 1 April 2004 6:32 AM
>To: [EMAIL PROTECTED]
>Subject: xhtml gets turned off
>
>I have been using
>
>so that the various html tags will
>generate xhtml compliant code, and
>it has worked last time I checked.
>I just attempted to validate the
>HTML output at w3c and found
>that the are not getting generated with the
>closing /. Any ideas how xhtml can
>get turned off?
>
>Dean Hoover
>PS The code is too large to post. Tiles
>within tiles, within tiles, etc.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: xhtml gets turned off

2004-03-31 Thread Dean A. Hoover
Thanks Mark. But it will not generate any more  tags?

Thanks
Dean
Mark Mandel wrote:

Dean - 

In each of your tiles that uses XHTML you need to have a  tag,
so the system knows it's outputting xhtml.
(Did the same thing a few days ago)

Regards,

Mark

-Original Message-
From: Dean A. Hoover [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 1 April 2004 6:32 AM
To: [EMAIL PROTECTED]
Subject: xhtml gets turned off

I have been using

so that the various html tags will
generate xhtml compliant code, and
it has worked last time I checked.
I just attempted to validate the
HTML output at w3c and found
that the 
Dean Hoover
PS The code is too large to post. Tiles
within tiles, within tiles, etc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: xhtml gets turned off

2004-03-31 Thread Mark Mandel
Dean - 

In each of your tiles that uses XHTML you need to have a  tag,
so the system knows it's outputting xhtml.

(Did the same thing a few days ago)

Regards,

Mark

-Original Message-
From: Dean A. Hoover [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 1 April 2004 6:32 AM
To: [EMAIL PROTECTED]
Subject: xhtml gets turned off

I have been using

so that the various html tags will
generate xhtml compliant code, and
it has worked last time I checked.
I just attempted to validate the
HTML output at w3c and found
that the 

How do I get Application Scope in Action Class

2004-03-31 Thread Raghu.Ramakrishnan

Hi,

My problem is that I have set certain objects in Application Scope. I am able to 
access these objects in my jsp pages
But unable to get these objects in my Action Classes.

i) How do I get Objects(Objects that were set using application.setAttribute()) in 
Application scope in my Action Class?? 

Thanking you.
Raghu


-Original Message-
From: Jens Kühnberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 1:08 PM
To: Struts Users Mailing List
Subject: Re: Struts 1.1, JSTL and Tomcat5


Thanks a lot.

I changed

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



to

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
 version="2.4">

and now it's working.


Martin Cooper wrote:
> Did you update your web.xml file for Servlets 2.4, and update any 
> taglib declarations in that file?
> 
> --
> Martin Cooper
> 
> 
> "Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> 
>>Hi everyone,
>>
>>I got a problem with updating my webapplication from struts 1.0, jstl 
>>1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
>>
>>I got rid of all the old .jar and .tld files and inserted the new 
>>ones. I tried all different uri on the .jsp page, read through various 
>>messages on the mailing list, but I'm still stuck with the following
> 
> error.
> 
>>I would be happy for any new ideas.
>>
>>Thanks,
>>Jens
>>
>>
>>org.apache.jasper.JasperException: Validation error messages from 
>>TagLibraryValidator for cnull: 
>>java.lang.IllegalStateException: can't declare any more prefixes in 
>>this context
>>
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHa
> ndler.
> java:94)
> 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.ja
> va:404
> )
> 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.ja
> va:112
> )
> 
>>org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:15
>>78)
>>org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
>>org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>>
> 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.
> java:5
> 53)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
> java:2
> 91)
> 
>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:30
>>1)
>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>
> 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j
> ava:10
> 69)
> 
> org.apache.struts.action.RequestProcessor.processForwardConfig(Request
> Proces
> sor.java:455)
> 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav
> a:279)
> 
>>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482
>>)
>>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



feeding custom actionForm to a jsp page?

2004-03-31 Thread Max Kovalenkov
Hello,

I have a form for submitting data which can be optionally used to 
substitute new data instead of any other past entry by the same user. If 
you check a 'change' checkbox before pressing submit - brings you back 
to the same form, but now there's also a "radio-button" list of past 
entries, and you can choose one to write new data on top of. Original 
chain of events is:

prepop.java -> submit.jsp -> process.java -> end.jsp

If a checkbox is checked, however, there is one more 'loop'(for 
populating list of past entries):

prepop.java -> submit.jsp -> prepop.java -> submit.jsp -> process.java 
-> end.jsp

All I want is to be able to reproduce submitted values the second time 
around on submit.jsp, just like the validator does in case something's 
wrong. But it creates a new ActionForm when forwarded to for the second 
time and all the values are lost.. Is there a way to feed it my already 
populated actionForm?

This might be the clumsiest way to do this, but I'm relatively new to 
this and couldn't figure anything better by myself. Any tips are greatly 
appreciated.
Thanks.

Max

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Struts issue..working in local WSAD/iwndows but not in Web sphere Deployment/ AIX

2004-03-31 Thread Mathew, Manoj


anybody think 
"abstract" causing an issue here?


-Original Message-
From: Mathew, Manoj 
Sent: Wednesday, March 31, 2004 3:59 PM
To: [EMAIL PROTECTED]
Subject: Struts issue..working in local WSAD/iwndows but not in Web
sphere Deployment/ AIX



I have a action form 
public class myForm1 extends myCommonForm{}

public abstract class myCommonForm extends ActionForm{}

public class myForm2 extends myCommonForm{}

Here myForm1 and myForm2 have some common properties which has put in 
myCommonForm(setters and getters) and i extend that in both the myForm1 and 2.  
myForm1 and 2 has their own different propertis adn it's getters and setters too.

The issue is when i do myForm1  frm1 = (myForm1 ) form;
drm1 doesn't seems to have any value which are common(ie the properties in 
myCommonForm)..
It's working fine in windows local WSAD but not in web Sphere Server/AIX
Please help me out
Manoj


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validator and dispatch action

2004-03-31 Thread Adam Hardy
It depends on why you wanted to use dispatch action in the first place.

Yet another technique is to have multiple actions using the same action 
class, but with a seperate "parameter='whatever'" attribute, where 
'whatever' is 'update', 'delete' etc.

In fact you can put most common code in a base Action class, and in the 
subclass do the important bit. As long as the base class has a suitable 
switching / if else if clause, then you only need the one for the whole app.

HTH
Adam
On 03/31/2004 08:06 PM Paul Barry wrote:
You could do this same thing in Strust 1.1, except that you would need 
the method parameter.  In struts 1.1, the links would be:

/createSubscription.do?method=create
/editSubscription.do?method=edit
...
And with MappingDispatchAction they would be

/createSubscription.do
/editSubscription.do
...
That's a litte bit nicer, but if you are going to go through the trouble 
of defining an action-mapping for each method, why not just skip the 
dispatch aciton altogether and have separate actions?  If you keep all 
related actions in a package together, is it any harder to manage?  I am 
talking about having a configuration like this:


  
  
  
  
  
  
  
  
  
  
  
  
  
  
Mike Foody wrote:

If you're not opposed to using 1.2 the MappingDispatchAction will 
allow you to easily set up multiple action mappings, each capable of 
having their own ActionForm, validation, etc and then actually handle 
these all with a multiple methods in a single Action class. 
http://jakarta.apache.org/struts/api/index.html

Mike

Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp 
page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  
So for add, there would be no validation, it just gets the data need 
to build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have 
those fields.  Edit and delete would have to have a parameter for the 
primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like 
this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like 
this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property 
of the action-mapping, but doesn't this defeat the purpose of the 
dispatch action?  Why not just have separate actions at that point?  
I think the answer is to just not use the dispatch action with the 
validator, but I wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Struts issue..working in local WSAD/iwndows but not in Web sphere Deployment/ AIX

2004-03-31 Thread Mathew, Manoj

I have a action form 
public class myForm1 extends myCommonForm{}

public abstract class myCommonForm extends ActionForm{}

public class myForm2 extends myCommonForm{}

Here myForm1 and myForm2 have some common properties which has put in 
myCommonForm(setters and getters) and i extend that in both the myForm1 and 2.  
myForm1 and 2 has their own different propertis adn it's getters and setters too.

The issue is when i do myForm1  frm1 = (myForm1 ) form;
drm1 doesn't seems to have any value which are common(ie the properties in 
myCommonForm)..
It's working fine in windows local WSAD but not in web Sphere Server/AIX
Please help me out
Manoj


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



xhtml gets turned off

2004-03-31 Thread Dean A. Hoover
I have been using

so that the various html tags will
generate xhtml compliant code, and
it has worked last time I checked.
I just attempted to validate the
HTML output at w3c and found
that the 
Dean Hoover
PS The code is too large to post. Tiles
within tiles, within tiles, etc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: switching to struts-el

2004-03-31 Thread Bill Siggelkow
Wendy Smoak wrote:

Another question for Bill, also on page 33:

Why are you using the 'value' attribute of the  tag?  Struts
should pre-populate the HTML form element based on the Form bean
property, which would have been filled in when the form was submitted
(or be blank if not).
I haven't read the whole presentation, but this is a practice I've
argued against twice in the last week here.  Either I'm completely
wrong, in which case I'd appreciate being corrected, or this really
isn't necessary.
You are correct, Wendy.  As I recall, (I gave this presentation last 
August), I think I was trying to demonstrate the use of EL as an 
attribute value.  I should have shown something else using EL that 
didn't promote a poor practice.

Bill Siggelkow

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: switching to struts-el

2004-03-31 Thread Bill Siggelkow
Thanks for the mention, Ted.  As far as the Struts-EL calculator, the 
calculation is actually done by the CalcAction (Calc.do) -- not a helper 
bean.  The calculation could have been done inline (using EL in the 
) as with the JSTL calculator; however, in this case, I have the 
action to which the form is submitted perform the calculation and place 
the value into request scope.

Ted Husted wrote:

Bill, 

Your presentation, mentioned in another thread, is also very helpful. 

http://www.jadecove.com/articles/jstl-and-struts.pdf

Towards the end, you show a simple calculator implemented as JSP, Struts, Struts-EL, and JSTL. On page 33, the Struts-EL uses a "helper bean" to do the arithmetic. The others do the addition inline. Why is it done differently for Struts-EL?

-Ted.

On Tue, 30 Mar 2004 14:16:25 -0500, Bill Siggelkow wrote:

I feel your pain, Dean :) With the relatively rapid changes in
Java/Web technology it is difficult for print material to keep up.
I really liked JSTL in Action -- however, you may want to read the
JSTL 1.1 spec to pick up the new features.  I put out a JSTL Quick
Reference that you might find useful at
http://www.jadecove.com/jstl-quick-reference.pdf




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts 1.1, JSTL and Tomcat5

2004-03-31 Thread Jens Kühnberger
Thanks a lot.

I changed

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>


to

http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4">
and now it's working.

Martin Cooper wrote:
Did you update your web.xml file for Servlets 2.4, and update any taglib
declarations in that file?
--
Martin Cooper
"Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi everyone,

I got a problem with updating my webapplication from struts 1.0, jstl
1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
I got rid of all the old .jar and .tld files and inserted the new ones.
I tried all different uri on the .jsp page, read through various
messages on the mailing list, but I'm still stuck with the following
error.

I would be happy for any new ideas.

Thanks,
Jens
org.apache.jasper.JasperException: Validation error messages from
TagLibraryValidator for cnull: java.lang.IllegalStateException:
can't declare any more prefixes in this context
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:94)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404
)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112
)
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1578)
org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
53)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
91)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Question about logic:iterator, indexId and hidden fields

2004-03-31 Thread Martin Cooper

"Eric Hodges" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a form with a list of elements on it.  Each element has an "Edit"
> button associated with it.  When the user clicks the Edit button for a
> specific element, I want to send back the value of indexId in a hidden
field
> on the form.  I can't figure out a clean way to do this.  The
documentation
> says "indexId" will create a bean, but it really creates an Integer (which
> isn't a JavaBean).  I've tried passing my indexId to a Javascript function
> that sets the form's hidden field sort of like this:
>
>  onclick="setEditIndex(<%=index%>)"/>
>
> but the  tag is evaluated before the <%=index%> tag

The problem is that you have illegal JSP syntax for the 'onclick' attribute.
The attribute value must be a string literal or a scripting expression. You
cannot mix the two. Try this instead:

  onclick='<%= "setEditIndex(" + index + ")" %>'

--
Martin Cooper


>
>
> Right now I've got some ugly JSP code that outputs the submit element that
> calls the Javascript function that sets the hidden field.  There must be a
> simpler way.  Any ideas?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 1.1, JSTL and Tomcat5

2004-03-31 Thread Bill Siggelkow
A google search seems to indicate that this is an XML parsing problem. 
You might want to check and see if you have any old versions of parsers 
(such as xerces and crimson) on your classpath.

Bill Siggelkow

Jens Kühnberger wrote:
Hi everyone,

I got a problem with updating my webapplication from struts 1.0, jstl 
1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.

I got rid of all the old .jar and .tld files and inserted the new ones.
I tried all different uri on the .jsp page, read through various 
messages on the mailing list, but I'm still stuck with the following error.

I would be happy for any new ideas.

Thanks,
Jens
org.apache.jasper.JasperException: Validation error messages from
TagLibraryValidator for cnull: java.lang.IllegalStateException:
can't declare any more prefixes in this context
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) 

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404) 

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112) 

org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1578)
org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553) 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) 

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) 

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) 

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts 1.1, JSTL and Tomcat5

2004-03-31 Thread Martin Cooper
Did you update your web.xml file for Servlets 2.4, and update any taglib
declarations in that file?

--
Martin Cooper


"Jens Kühnberger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi everyone,
>
> I got a problem with updating my webapplication from struts 1.0, jstl
> 1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.
>
> I got rid of all the old .jar and .tld files and inserted the new ones.
> I tried all different uri on the .jsp page, read through various
> messages on the mailing list, but I'm still stuck with the following
error.
>
> I would be happy for any new ideas.
>
> Thanks,
> Jens
>
>
> org.apache.jasper.JasperException: Validation error messages from
> TagLibraryValidator for cnull: java.lang.IllegalStateException:
> can't declare any more prefixes in this context
>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:94)
>
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404
)
>
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112
)
> org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1578)
> org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
53)
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
91)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validator and dispatch action

2004-03-31 Thread Mike Foody
Agreed about it being mostly syntactical sugar. 

On the other hand I think defining multiple mappings for the same Action 
is extremely useful.  It allows you to group your functionality and 
easily access shared functionality, but also provide alternative 
validation and forwards without having work around it in the Action 
class.  It certainly isn't providing  anything you couldn't otherwise 
but from my perspective seems a cleaner solution.



Paul Barry wrote:

You could do this same thing in Strust 1.1, except that you would need 
the method parameter.  In struts 1.1, the links would be:

/createSubscription.do?method=create
/editSubscription.do?method=edit
...
And with MappingDispatchAction they would be

/createSubscription.do
/editSubscription.do
...
That's a litte bit nicer, but if you are going to go through the 
trouble of defining an action-mapping for each method, why not just 
skip the dispatch aciton altogether and have separate actions?  If you 
keep all related actions in a package together, is it any harder to 
manage?  I am talking about having a configuration like this:


  
  
  
  
  
  
  
  
  
  
  
  
  
  
Mike Foody wrote:

If you're not opposed to using 1.2 the MappingDispatchAction will 
allow you to easily set up multiple action mappings, each capable of 
having their own ActionForm, validation, etc and then actually handle 
these all with a multiple methods in a single Action class. 
http://jakarta.apache.org/struts/api/index.html

Mike

Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to jsp 
page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to 
jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating 
users.  So for add, there would be no validation, it just gets the 
data need to build the form.  For create, there might be a password 
and verify password field that need to be validated, but update 
wouldn't have those fields.  Edit and delete would have to have a 
parameter for the primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and 
then call validate method within each method of the dispatch action, 
like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like 
this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for 
each dispatch method, and then a form in your validation.xml for 
each action-mapping, where the form name is the same as the path 
property of the action-mapping, but doesn't this defeat the purpose 
of the dispatch action?  Why not just have separate actions at that 
point?  I think the answer is to just not use the dispatch action 
with the validator, but I wanted to know if others had found a way 
to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validator and dispatch action

2004-03-31 Thread Paul Barry
You could do this same thing in Strust 1.1, except that you would need 
the method parameter.  In struts 1.1, the links would be:

/createSubscription.do?method=create
/editSubscription.do?method=edit
...
And with MappingDispatchAction they would be

/createSubscription.do
/editSubscription.do
...
That's a litte bit nicer, but if you are going to go through the trouble 
of defining an action-mapping for each method, why not just skip the 
dispatch aciton altogether and have separate actions?  If you keep all 
related actions in a package together, is it any harder to manage?  I am 
talking about having a configuration like this:


  
  
  
  
  
  
  
  
  
  
  
  
  
  
Mike Foody wrote:

If you're not opposed to using 1.2 the MappingDispatchAction will allow 
you to easily set up multiple action mappings, each capable of having 
their own ActionForm, validation, etc and then actually handle these all 
with a multiple methods in a single Action class. 
http://jakarta.apache.org/struts/api/index.html

Mike

Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what the 
best way to do this is.  Consider that I have the following method in 
a dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp 
page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  
So for add, there would be no validation, it just gets the data need 
to build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have 
those fields.  Edit and delete would have to have a parameter for the 
primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like 
this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property 
of the action-mapping, but doesn't this defeat the purpose of the 
dispatch action?  Why not just have separate actions at that point?  I 
think the answer is to just not use the dispatch action with the 
validator, but I wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Exception handling with scaffold

2004-03-31 Thread Barett McGavock
Mr. Austin,

You can override the catchException method. You should put your exception
handler therein. Hopefully I understood the question...!

B

-Original Message-
From: Tate Austin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 10:22 AM
To: Struts Users Mailing List
Subject: Exception handling with scaffold


Whenever I attempt to have an action throw an Exception of any type it seems
that Scaffold catches it and treats it before struts does.  The code I refer
to is the BaseAction class withing scaffold, the catchexception method gets
tripped and intercepts the exception.  Is this architecturally one of hte
things scaffold was designed to do?  If it is, can and where do I plug in my
exception handler in scaffold?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validator and dispatch action

2004-03-31 Thread Mike Foody
Sorry about that link.  Frames are a killer ...

http://jakarta.apache.org/struts/api/org/apache/struts/actions/MappingDispatchAction.html

Mike Foody wrote:

If you're not opposed to using 1.2 the MappingDispatchAction will 
allow you to easily set up multiple action mappings, each capable of 
having their own ActionForm, validation, etc and then actually handle 
these all with a multiple methods in a single Action class. 
http://jakarta.apache.org/struts/api/index.html

Mike

Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp 
page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  
So for add, there would be no validation, it just gets the data need 
to build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have 
those fields.  Edit and delete would have to have a parameter for the 
primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like 
this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like 
this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property 
of the action-mapping, but doesn't this defeat the purpose of the 
dispatch action?  Why not just have separate actions at that point?  
I think the answer is to just not use the dispatch action with the 
validator, but I wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validator and dispatch action

2004-03-31 Thread Mike Foody
If you're not opposed to using 1.2 the MappingDispatchAction will allow 
you to easily set up multiple action mappings, each capable of having 
their own ActionForm, validation, etc and then actually handle these all 
with a multiple methods in a single Action class.  

http://jakarta.apache.org/struts/api/index.html

Mike

Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what the 
best way to do this is.  Consider that I have the following method in 
a dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp 
page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  
So for add, there would be no validation, it just gets the data need 
to build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have 
those fields.  Edit and delete would have to have a parameter for the 
primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like 
this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property 
of the action-mapping, but doesn't this defeat the purpose of the 
dispatch action?  Why not just have separate actions at that point?  I 
think the answer is to just not use the dispatch action with the 
validator, but I wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Question about logic:iterator, indexId and hidden fields

2004-03-31 Thread Eric Hodges
I have a form with a list of elements on it.  Each element has an "Edit"
button associated with it.  When the user clicks the Edit button for a
specific element, I want to send back the value of indexId in a hidden field
on the form.  I can't figure out a clean way to do this.  The documentation
says "indexId" will create a bean, but it really creates an Integer (which
isn't a JavaBean).  I've tried passing my indexId to a Javascript function
that sets the form's hidden field sort of like this:



but the  tag is evaluated before the <%=index%> tag


Right now I've got some ugly JSP code that outputs the submit element that
calls the Javascript function that sets the hidden field.  There must be a
simpler way.  Any ideas?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Exception handling with scaffold

2004-03-31 Thread Tate Austin
Whenever I attempt to have an action throw an Exception of any type it seems
that Scaffold catches it and treats it before struts does.  The code I refer
to is the BaseAction class withing scaffold, the catchexception method gets
tripped and intercepts the exception.  Is this architecturally one of hte
things scaffold was designed to do?  If it is, can and where do I plug in my
exception handler in scaffold?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: validator and dispatch action

2004-03-31 Thread Marco Mistroni
Hi,
Although not using validator, I had similar problem
When using dispatch actions (different methods requires different
Validations).
So I enable always validation, but I wrote my custom validate method
In the ActionForm.
Now, if u want to use validator, first thing that comes to my mind
Would be to use validator for what all your methods have in common,
And then write a custom validate() method that checks which 'method'
Is going to be called, and depending on that you will validate or
Do nothing.

My 2 cents..

Regards
marco

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 31 March 2004 17:13
To: Struts Users Mailing List
Subject: Re: validator and dispatch action

I mean, try changing it in the code in your action when you want to 
validate, & change it back afterwards to its previous value when done. 
Is that what you tried?

String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);



On 03/31/2004 05:52 PM Paul Barry wrote:
> The name of the action-mapping has to correspond to the name of the 
> form-bean.
> 
> Adam Hardy wrote:
> 
>> If I really wanted to stick with your set-up, I see a way it might be

>> possible, although I have not done this myself.
>>
>> Try changing the 'name' attribute of the mapping to the validation 
>> that you defined in the validation.xml, e.g. 'widget-update' or 
>> 'widget-edit' and then call the validate() method.
>>
>> My main worry is that ActionMapping may not like being changed, but
if 
>> so, you could instantiate a new one.
>>
>> Adam
>>
>> On 03/31/2004 05:18 PM Paul Barry wrote:
>>
>>> Hello Everyone,
>>>
>>> I am using the validator and dispatch actions and I am wonder what 
>>> the best way to do this is.  Consider that I have the following 
>>> method in a dispatch action:
>>>
>>> add- populates collections for drop-down lists, forwards to jsp
page
>>> create - needs to do validation and store in database
>>> edit   - needs to populate form with the data to edit, forward to
jsp 
>>> page
>>> update - needs to do validation and update database
>>> delete - needs to delete a record from the database
>>>
>>> You can see how the validation would be different for these actions.

>>> Let's say this is a dispatch action related to administrating users.

>>> So for add, there would be no validation, it just gets the data need

>>> to build the form.  For create, there might be a password and verify

>>> password field that need to be validated, but update wouldn't have 
>>> those fields.  Edit and delete would have to have a parameter for
the 
>>> primary key of the record to edit or delete.
>>>
>>> Now I found something related at this link:
>>>
>>> http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction
>>>
>>> Which says to set validate to false in the struts-config.xml and
then 
>>> call validate method within each method of the dispatch action, like

>>> this:
>>>
>>> ActionErrors errors = new ActionErrors();
>>> errors = form.validate(mapping, request);
>>>
>>> // Report any errors we have discovered back to the original form
>>> if (!errors.isEmpty()) {
>>> saveErrors(request, errors);
>>> return  new ActionForward(mapping.getInput());
>>> }
>>>
>>> This seems like a really good solution to me, but there is one 
>>> problem.  How do you call a different set of validation rules, based

>>> on which method you are in?  Doesn't this need to be something like 
>>> this:
>>>
>>> edit() {
>>> ActionErrors errors = new ActionErrors();
>>> errors = form.validateEdit(mapping, request);
>>> }
>>>
>>> update() {
>>> ActionErrors errors = new ActionErrors();
>>> errors = form.validateUpdate(mapping, request);
>>> }
>>>
>>> Because the rules for validating edit and update are different.  You

>>> could define different action-mappings in your struts config for
each 
>>> dispatch method, and then a form in your validation.xml for each 
>>> action-mapping, where the form name is the same as the path property

>>> of the action-mapping, but doesn't this defeat the purpose of the 
>>> dispatch action?  Why not just have separate actions at that point?

>>> I think the answer is to just not use the dispatch action with the 
>>> validator, but I wanted to know if others had found a way to do it.
>>>
>>>
-
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---

Re: validator and dispatch action

2004-03-31 Thread Paul Barry
Yeah, I guess that would work, but seems kludgey.  Wouldn't it be easier 
to just have separate actions for each operation?  The struts books that 
I have read (Struts in Action, Husted and Programming Jakarta Struts, 
Cavaness) claim that the dispatch action makes the application easier to 
maintain by grouping related operations together, but it seems that it 
makes using the validator more difficult.  Have others found this to be 
the case?

Adam Hardy wrote:

Sorry, that's the only property you do NOT want to copy! I mean all the 
others.

On 03/31/2004 06:44 PM Adam Hardy wrote:

It's worth trying it with a new mapping then. Copy across the relevant 
bits from the real mapping, in pseudocode:

newMapping = new Mapping();
newMapping.setName(origMapping.getName());
etc.


On 03/31/2004 06:37 PM Takhar, Sandeep wrote:

I thought there used to be a way in the struts-config to say "use 
this form name even though we are using the same class"

name=""
property=""??
It would still require a different mapping...if it is true

sandeep

-Original Message-
From: Paul Barry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I get this exception:

javax.servlet.ServletException: Configuration is frozen

Adam Hardy wrote:


I mean, try changing it in the code in your action when you want to 
validate, & change it back afterwards to its previous value when 
done. Is that what you tried?

String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);


On 03/31/2004 05:52 PM Paul Barry wrote:


The name of the action-mapping has to correspond to the name of the 
form-bean.

Adam Hardy wrote:


If I really wanted to stick with your set-up, I see a way it might 
be possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation 
that you defined in the validation.xml, e.g. 'widget-update' or 
'widget-edit' and then call the validate() method.

My main worry is that ActionMapping may not like being changed, 
but if so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:


Hello Everyone,

I am using the validator and dispatch actions and I am wonder 
what the best way to do this is.  Consider that I have the 
following method in a dispatch action:

add- populates collections for drop-down lists, forwards to 
jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to 
jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these 
actions. Let's say this is a dispatch action related to 
administrating users.  So for add, there would be no validation, 
it just gets the data need to build the form.  For create, there 
might be a password and verify password field that need to be 
validated, but update wouldn't have those fields.  Edit and 
delete would have to have a parameter for the primary key of the 
record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and 
then call validate method within each method of the dispatch 
action, like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
   saveErrors(request, errors);
   return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, 
based on which method you are in?  Doesn't this need to be 
something like this:

edit() {
   ActionErrors errors = new ActionErrors();
   errors = form.validateEdit(mapping, request);
}
update() {
   ActionErrors errors = new ActionErrors();
   errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  
You could define different action-mappings in your struts config 
for each dispatch method, and then a form in your validation.xml 
for each action-mapping, where the form name is the same as the 
path property of the action-mapping, but doesn't this defeat the 
purpose of the dispatch action?  Why not just have separate 
actions at that point?  I think the answer is to just not use the 
dispatch action with the validator, but I wanted to know if 
others had found a way to do it.

- 

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai

Re: validator and dispatch action

2004-03-31 Thread Adam Hardy
Sorry, that's the only property you do NOT want to copy! I mean all the 
others.

On 03/31/2004 06:44 PM Adam Hardy wrote:
It's worth trying it with a new mapping then. Copy across the relevant 
bits from the real mapping, in pseudocode:

newMapping = new Mapping();
newMapping.setName(origMapping.getName());
etc.


On 03/31/2004 06:37 PM Takhar, Sandeep wrote:

I thought there used to be a way in the struts-config to say "use this 
form name even though we are using the same class"

name=""
property=""??
It would still require a different mapping...if it is true

sandeep

-Original Message-
From: Paul Barry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I get this exception:

javax.servlet.ServletException: Configuration is frozen

Adam Hardy wrote:


I mean, try changing it in the code in your action when you want to 
validate, & change it back afterwards to its previous value when 
done. Is that what you tried?

String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);


On 03/31/2004 05:52 PM Paul Barry wrote:


The name of the action-mapping has to correspond to the name of the 
form-bean.

Adam Hardy wrote:


If I really wanted to stick with your set-up, I see a way it might 
be possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation 
that you defined in the validation.xml, e.g. 'widget-update' or 
'widget-edit' and then call the validate() method.

My main worry is that ActionMapping may not like being changed, but 
if so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:


Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to 
jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to 
jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these 
actions. Let's say this is a dispatch action related to 
administrating users.  So for add, there would be no validation, 
it just gets the data need to build the form.  For create, there 
might be a password and verify password field that need to be 
validated, but update wouldn't have those fields.  Edit and delete 
would have to have a parameter for the primary key of the record 
to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and 
then call validate method within each method of the dispatch 
action, like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
   saveErrors(request, errors);
   return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, 
based on which method you are in?  Doesn't this need to be 
something like this:

edit() {
   ActionErrors errors = new ActionErrors();
   errors = form.validateEdit(mapping, request);
}
update() {
   ActionErrors errors = new ActionErrors();
   errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  
You could define different action-mappings in your struts config 
for each dispatch method, and then a form in your validation.xml 
for each action-mapping, where the form name is the same as the 
path property of the action-mapping, but doesn't this defeat the 
purpose of the dispatch action?  Why not just have separate 
actions at that point?  I think the answer is to just not use the 
dispatch action with the validator, but I wanted to know if others 
had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-

Re: validator and dispatch action

2004-03-31 Thread Adam Hardy
It's worth trying it with a new mapping then. Copy across the relevant 
bits from the real mapping, in pseudocode:

newMapping = new Mapping();
newMapping.setName(origMapping.getName());
etc.


On 03/31/2004 06:37 PM Takhar, Sandeep wrote:
I thought there used to be a way in the struts-config to say "use this form name even though we are using the same class"

name=""
property=""??
It would still require a different mapping...if it is true

sandeep

-Original Message-
From: Paul Barry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I get this exception:

javax.servlet.ServletException: Configuration is frozen

Adam Hardy wrote:


I mean, try changing it in the code in your action when you want to 
validate, & change it back afterwards to its previous value when done. 
Is that what you tried?

String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);


On 03/31/2004 05:52 PM Paul Barry wrote:


The name of the action-mapping has to correspond to the name of the 
form-bean.

Adam Hardy wrote:


If I really wanted to stick with your set-up, I see a way it might be 
possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation 
that you defined in the validation.xml, e.g. 'widget-update' or 
'widget-edit' and then call the validate() method.

My main worry is that ActionMapping may not like being changed, but 
if so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:


Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to jsp 
page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to 
jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating 
users.  So for add, there would be no validation, it just gets the 
data need to build the form.  For create, there might be a password 
and verify password field that need to be validated, but update 
wouldn't have those fields.  Edit and delete would have to have a 
parameter for the primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and 
then call validate method within each method of the dispatch action, 
like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
   saveErrors(request, errors);
   return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like 
this:

edit() {
   ActionErrors errors = new ActionErrors();
   errors = form.validateEdit(mapping, request);
}
update() {
   ActionErrors errors = new ActionErrors();
   errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for 
each dispatch method, and then a form in your validation.xml for 
each action-mapping, where the form name is the same as the path 
property of the action-mapping, but doesn't this defeat the purpose 
of the dispatch action?  Why not just have separate actions at that 
point?  I think the answer is to just not use the dispatch action 
with the validator, but I wanted to know if others had found a way 
to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Struts 1.1, JSTL and Tomcat5

2004-03-31 Thread Jens Kühnberger
Hi everyone,

I got a problem with updating my webapplication from struts 1.0, jstl 
1.0 and tomcat 4.1 to struts 1.1, JSTL 1.1 and tomcat 5.

I got rid of all the old .jar and .tld files and inserted the new ones.
I tried all different uri on the .jsp page, read through various 
messages on the mailing list, but I'm still stuck with the following error.

I would be happy for any new ideas.

Thanks,
Jens
org.apache.jasper.JasperException: Validation error messages from
TagLibraryValidator for cnull: java.lang.IllegalStateException:
can't declare any more prefixes in this context

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112)
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1578)
org.apache.jasper.compiler.Validator.validate(Validator.java:1524)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: validator and dispatch action

2004-03-31 Thread Takhar, Sandeep
I thought there used to be a way in the struts-config to say "use this form name even 
though we are using the same class"

name=""
property=""??

It would still require a different mapping...if it is true


sandeep

-Original Message-
From: Paul Barry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action


I get this exception:

javax.servlet.ServletException: Configuration is frozen

Adam Hardy wrote:

> I mean, try changing it in the code in your action when you want to 
> validate, & change it back afterwards to its previous value when done. 
> Is that what you tried?
> 
> String oldName = mapping.getName();
> mapping.setName("widget-edit");
> form.validate(mapping, request);
> mapping.setName(oldName);
> 
> 
> 
> On 03/31/2004 05:52 PM Paul Barry wrote:
> 
>> The name of the action-mapping has to correspond to the name of the 
>> form-bean.
>>
>> Adam Hardy wrote:
>>
>>> If I really wanted to stick with your set-up, I see a way it might be 
>>> possible, although I have not done this myself.
>>>
>>> Try changing the 'name' attribute of the mapping to the validation 
>>> that you defined in the validation.xml, e.g. 'widget-update' or 
>>> 'widget-edit' and then call the validate() method.
>>>
>>> My main worry is that ActionMapping may not like being changed, but 
>>> if so, you could instantiate a new one.
>>>
>>> Adam
>>>
>>> On 03/31/2004 05:18 PM Paul Barry wrote:
>>>
 Hello Everyone,

 I am using the validator and dispatch actions and I am wonder what 
 the best way to do this is.  Consider that I have the following 
 method in a dispatch action:

 add- populates collections for drop-down lists, forwards to jsp 
 page
 create - needs to do validation and store in database
 edit   - needs to populate form with the data to edit, forward to 
 jsp page
 update - needs to do validation and update database
 delete - needs to delete a record from the database

 You can see how the validation would be different for these actions. 
 Let's say this is a dispatch action related to administrating 
 users.  So for add, there would be no validation, it just gets the 
 data need to build the form.  For create, there might be a password 
 and verify password field that need to be validated, but update 
 wouldn't have those fields.  Edit and delete would have to have a 
 parameter for the primary key of the record to edit or delete.

 Now I found something related at this link:

 http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

 Which says to set validate to false in the struts-config.xml and 
 then call validate method within each method of the dispatch action, 
 like this:

 ActionErrors errors = new ActionErrors();
 errors = form.validate(mapping, request);

 // Report any errors we have discovered back to the original form
 if (!errors.isEmpty()) {
 saveErrors(request, errors);
 return  new ActionForward(mapping.getInput());
 }

 This seems like a really good solution to me, but there is one 
 problem.  How do you call a different set of validation rules, based 
 on which method you are in?  Doesn't this need to be something like 
 this:

 edit() {
 ActionErrors errors = new ActionErrors();
 errors = form.validateEdit(mapping, request);
 }

 update() {
 ActionErrors errors = new ActionErrors();
 errors = form.validateUpdate(mapping, request);
 }

 Because the rules for validating edit and update are different.  You 
 could define different action-mappings in your struts config for 
 each dispatch method, and then a form in your validation.xml for 
 each action-mapping, where the form name is the same as the path 
 property of the action-mapping, but doesn't this defeat the purpose 
 of the dispatch action?  Why not just have separate actions at that 
 point?  I think the answer is to just not use the dispatch action 
 with the validator, but I wanted to know if others had found a way 
 to do it.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validator and dispatch action

2004-03-31 Thread Paul Barry
I get this exception:

javax.servlet.ServletException: Configuration is frozen

Adam Hardy wrote:

I mean, try changing it in the code in your action when you want to 
validate, & change it back afterwards to its previous value when done. 
Is that what you tried?

String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);


On 03/31/2004 05:52 PM Paul Barry wrote:

The name of the action-mapping has to correspond to the name of the 
form-bean.

Adam Hardy wrote:

If I really wanted to stick with your set-up, I see a way it might be 
possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation 
that you defined in the validation.xml, e.g. 'widget-update' or 
'widget-edit' and then call the validate() method.

My main worry is that ActionMapping may not like being changed, but 
if so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to jsp 
page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to 
jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating 
users.  So for add, there would be no validation, it just gets the 
data need to build the form.  For create, there might be a password 
and verify password field that need to be validated, but update 
wouldn't have those fields.  Edit and delete would have to have a 
parameter for the primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and 
then call validate method within each method of the dispatch action, 
like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like 
this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for 
each dispatch method, and then a form in your validation.xml for 
each action-mapping, where the form name is the same as the path 
property of the action-mapping, but doesn't this defeat the purpose 
of the dispatch action?  Why not just have separate actions at that 
point?  I think the answer is to just not use the dispatch action 
with the validator, but I wanted to know if others had found a way 
to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validator and dispatch action

2004-03-31 Thread Paul Barry
Ah, I got you now.  No, I didn't try that, I will give it a try.

Adam Hardy wrote:

I mean, try changing it in the code in your action when you want to 
validate, & change it back afterwards to its previous value when done. 
Is that what you tried?

String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);


On 03/31/2004 05:52 PM Paul Barry wrote:

The name of the action-mapping has to correspond to the name of the 
form-bean.

Adam Hardy wrote:

If I really wanted to stick with your set-up, I see a way it might be 
possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation 
that you defined in the validation.xml, e.g. 'widget-update' or 
'widget-edit' and then call the validate() method.

My main worry is that ActionMapping may not like being changed, but 
if so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to jsp 
page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to 
jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating 
users.  So for add, there would be no validation, it just gets the 
data need to build the form.  For create, there might be a password 
and verify password field that need to be validated, but update 
wouldn't have those fields.  Edit and delete would have to have a 
parameter for the primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and 
then call validate method within each method of the dispatch action, 
like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like 
this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for 
each dispatch method, and then a form in your validation.xml for 
each action-mapping, where the form name is the same as the path 
property of the action-mapping, but doesn't this defeat the purpose 
of the dispatch action?  Why not just have separate actions at that 
point?  I think the answer is to just not use the dispatch action 
with the validator, but I wanted to know if others had found a way 
to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validator and dispatch action

2004-03-31 Thread Adam Hardy
I mean, try changing it in the code in your action when you want to 
validate, & change it back afterwards to its previous value when done. 
Is that what you tried?

String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);


On 03/31/2004 05:52 PM Paul Barry wrote:
The name of the action-mapping has to correspond to the name of the 
form-bean.

Adam Hardy wrote:

If I really wanted to stick with your set-up, I see a way it might be 
possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation 
that you defined in the validation.xml, e.g. 'widget-update' or 
'widget-edit' and then call the validate() method.

My main worry is that ActionMapping may not like being changed, but if 
so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what 
the best way to do this is.  Consider that I have the following 
method in a dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp 
page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  
So for add, there would be no validation, it just gets the data need 
to build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have 
those fields.  Edit and delete would have to have a parameter for the 
primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like 
this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like 
this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property 
of the action-mapping, but doesn't this defeat the purpose of the 
dispatch action?  Why not just have separate actions at that point?  
I think the answer is to just not use the dispatch action with the 
validator, but I wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validator and dispatch action

2004-03-31 Thread Paul Barry
The name of the action-mapping has to correspond to the name of the 
form-bean.

Adam Hardy wrote:

If I really wanted to stick with your set-up, I see a way it might be 
possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation that 
you defined in the validation.xml, e.g. 'widget-update' or 'widget-edit' 
and then call the validate() method.

My main worry is that ActionMapping may not like being changed, but if 
so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:

Hello Everyone,

I am using the validator and dispatch actions and I am wonder what the 
best way to do this is.  Consider that I have the following method in 
a dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp 
page
update - needs to do validation and update database
delete - needs to delete a record from the database

You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  
So for add, there would be no validation, it just gets the data need 
to build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have 
those fields.  Edit and delete would have to have a parameter for the 
primary key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like 
this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one 
problem.  How do you call a different set of validation rules, based 
on which method you are in?  Doesn't this need to be something like this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property 
of the action-mapping, but doesn't this defeat the purpose of the 
dispatch action?  Why not just have separate actions at that point?  I 
think the answer is to just not use the dispatch action with the 
validator, but I wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validator and dispatch action

2004-03-31 Thread Adam Hardy
If I really wanted to stick with your set-up, I see a way it might be 
possible, although I have not done this myself.

Try changing the 'name' attribute of the mapping to the validation that 
you defined in the validation.xml, e.g. 'widget-update' or 'widget-edit' 
and then call the validate() method.

My main worry is that ActionMapping may not like being changed, but if 
so, you could instantiate a new one.

Adam

On 03/31/2004 05:18 PM Paul Barry wrote:
Hello Everyone,

I am using the validator and dispatch actions and I am wonder what the 
best way to do this is.  Consider that I have the following method in a 
dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database
You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  So 
for add, there would be no validation, it just gets the data need to 
build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have those 
fields.  Edit and delete would have to have a parameter for the primary 
key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one problem. 
 How do you call a different set of validation rules, based on which 
method you are in?  Doesn't this need to be something like this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property of 
the action-mapping, but doesn't this defeat the purpose of the dispatch 
action?  Why not just have separate actions at that point?  I think the 
answer is to just not use the dispatch action with the validator, but I 
wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: HashMap and tiles

2004-03-31 Thread Wendy Smoak
> From: Mario St-Gelais [mailto:[EMAIL PROTECTED] 
> I am using Tomcat 5.0.19 and Struts 1.1.  I made a small application 
> using a hashmap to store user entry from a form.  That works fine in 
> itself.  Then to make the thing nicer, I added tiles.  All the pages 
> work but the one with the form.  I keep getting the message :
> javax.servlet.ServletException: Cannot retrieve definition 
> for form bean null.

I see you posted the exact same message yesterday, so while I don't know
the answer I'll at least point out that you haven't included enough
information here for anyone to help.

If it works without the tiles, then probably something about the way you
split up the working JSP into parts is the problem.  By any chance have
you put the  tags in one jsp and the  (or other
form element) tags in another?  I think you might need to keep those
together.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SV: Session Time Out

2004-03-31 Thread Kumar M
I am using Weblogic 6.1 which has this disclaimer:

"Version 2.3 of the Servlet Specification from Sun Microsystems is a 
proposed final draft of the servlet specification and is subject to 
change. If you are planning to use any features introduced with version 
2.3 in your application, note that the specification has not been 
finalized and could change in the future."

Therefore, we are not using Filters.  Can I rely on "isNew()" method to 
identify if the session does not exist for the user but the web server 
(or is it Struts?) created it for this particular request. How are folks 
doing it if they cannot user filters?

Thanks!

[EMAIL PROTECTED] wrote:

Hi

If it expires, the filter will be called again. The sessioncontext
listener gets notified when the session is created, and when it is
destroyed.
Hermod

-Opprinnelig melding-
Fra: MOHAN RADHAKRISHNAN [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 10:27
Til: 'Struts Users Mailing List'
Emne: RE: Session Time Out
HI
We are not finding it that easy. It could expire anywhere after the
filter.
Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 1:39 PM
To: [EMAIL PROTECTED]
Subject: SV: Session Time Out
Hi

Use a servletfilter to trap when a new session is created, and do what
ever you want to there.
Hermod

-Opprinnelig melding-
Fra: Adam Hardy [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 09:56
Til: Struts Users Mailing List
Emne: Re: Session Time Out
Hi Kumar,
struts will create the session. AFAIK there is no way to disable it in
struts.
Adam

On 03/30/2004 11:17 PM Kumar M wrote:
 

I am setting the web application to time out in 60 mins. After that if
   

 

the user sends a request from the expired browser session I was hoping
   

 

to identify that state using "request.getSession(false) == null" in my
   

 

Action Servlet.

But I am noticing that "request.getSession(false)" is never null. When
   

I
 

looked carefully at the other attributes on Session, I noticed that
   

the
 

"isNew" attribute is set to true. According to the API,

   

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSer
vletRequest.html#getSession(boolean),
 

request.getSession(false)  should return null when there is no session
   

 

in progress for that request. I am wondering if the web server creates
   

a
 

session if there is not one associated with this request.

Could some one confirm if this is true? I am using JDK 1.3 and
   

Weblogic 6.1
 

Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email.
This email message has been virus checked by the virus programs used
in the DnB NOR Group.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: Struts and plugin question

2004-03-31 Thread Andrew Hill
btw: actually I often tend to make the static method a member of the object
that my plugin is initialising, - but only do that if the object is already
'servlet aware'. otoh if the object isnt supposed to know about servlets and
such like (or its a third party thing) then you dont want to introduce a
dependency on servlet.jar so just do it like I said below.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 31 March 2004 23:08
To: Struts Users Mailing List
Subject: RE: Struts and plugin question



But, fact is that when I want to get my component from servletcontext
I have to cast it to my  proper type.
Is there a way to avoid that?


Not really, but you could create a static (or non static if you like) helper
method somewhere to take care of both remembering the key and casting:

public class MyComponentFinder
{
  public static final MyComponent getMyComponent(ServletContext sc)
  {
return (MyComponent)sc.getATtribute(MY_COMPONENT_KEY);
  }
}

-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 31 March 2004 23:02
To: 'Struts Users Mailing List'
Subject: Struts and plugin question


Hi all,
I was wondering something about plugIns.

Let's say, I want to create an object that has application context.
So I create a plugIn to initialize it and store it in ServletContext.
But, fact is that when I want to get my component from servletcontext
I have to cast it to my  proper type.
Is there a way to avoid that?

Just for some brainstorming

Thanx in advance to all the replies
Regards
marco


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaServer Face

2004-03-31 Thread Vic Cekvenich
I duno. I used to have a page with links on EJB anecdotes, and I was 
taken to task over it by a popular Sun employee, but that's all I can 
think of.

.V

Mark Lowe wrote:

Just out of curiosity where's the link on your site that caused so much 
controversy?

On 31 Mar 2004, at 16:39, Vic Cekvenich wrote:

There is also a digram to help you get the picture:
http://www.theserverside.com/cartoons/TalesFromTheServerSide.tss
.V

Mark Lowe wrote:

There was a long thread on the developers list last week where the 
question of whether JSF would replace struts was discussed.
The basic conclusions of those taking part in the discussion what 
that struts was originally designed to fill a gap in the servlet api, 
and that the role of struts and open source projects in general are 
often to fill these gaps without the rigid and slower process of JSR.
Check the dev list mail archives for "struts JSR" and read the thread.
Mark
On 31 Mar 2004, at 11:00, Xuemin Guan wrote:

Hi, All, I know this is a bit off topic. But really want to
get an opinion about it from the Struts users.
The JavaServer Face 1.0, or JSF, has been released. It claims to
be a framework for building web-based user interfaces in Java.
Like Swing, it provides a set of standard widgets  (buttons,
hyperlinks, checkboxes, and so on). What I want to know is, can
JSF truly facilitate constructing a highly complex
user interface just like Swing does? If it can't, is Applet still 
the way
to go(don't hear much about it these days. Is Applet dead? Is there
an alternative to Applet when it comes to constructing a web
browser-accessed highly complex GUI?) Given the fact that Struts 
already
provides many features JavaServer Face provides(such as validation,
internalization, and tags for constructing UI widgets etc),  what's
the significant benefit to gain by adopting JSF? or combining 
them?(I heard
this
is possible, and someone says it would be a powerful combination.) 
And the
final question is will the JSF replace Struts in the future?

Any comment is welcome.

Thanks,

Xuemin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


validator and dispatch action

2004-03-31 Thread Paul Barry
Hello Everyone,

I am using the validator and dispatch actions and I am wonder what the 
best way to do this is.  Consider that I have the following method in a 
dispatch action:

add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in database
edit   - needs to populate form with the data to edit, forward to jsp page
update - needs to do validation and update database
delete - needs to delete a record from the database
You can see how the validation would be different for these actions. 
Let's say this is a dispatch action related to administrating users.  So 
for add, there would be no validation, it just gets the data need to 
build the form.  For create, there might be a password and verify 
password field that need to be validated, but update wouldn't have those 
fields.  Edit and delete would have to have a parameter for the primary 
key of the record to edit or delete.

Now I found something related at this link:

http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorDispatchAction

Which says to set validate to false in the struts-config.xml and then 
call validate method within each method of the dispatch action, like this:

ActionErrors errors = new ActionErrors();
errors = form.validate(mapping, request);
// Report any errors we have discovered back to the original form
if (!errors.isEmpty()) {
saveErrors(request, errors);
return  new ActionForward(mapping.getInput());
}
This seems like a really good solution to me, but there is one problem. 
 How do you call a different set of validation rules, based on which 
method you are in?  Doesn't this need to be something like this:

edit() {
ActionErrors errors = new ActionErrors();
errors = form.validateEdit(mapping, request);
}
update() {
ActionErrors errors = new ActionErrors();
errors = form.validateUpdate(mapping, request);
}
Because the rules for validating edit and update are different.  You 
could define different action-mappings in your struts config for each 
dispatch method, and then a form in your validation.xml for each 
action-mapping, where the form name is the same as the path property of 
the action-mapping, but doesn't this defeat the purpose of the dispatch 
action?  Why not just have separate actions at that point?  I think the 
answer is to just not use the dispatch action with the validator, but I 
wanted to know if others had found a way to do it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: switching to struts-el

2004-03-31 Thread Wendy Smoak
> From: Ted Husted [mailto:[EMAIL PROTECTED] 
> Bill, 
> Your presentation, mentioned in another thread, is also very helpful. 
> http://www.jadecove.com/articles/jstl-and-struts.pdf

Another question for Bill, also on page 33:


Why are you using the 'value' attribute of the  tag?  Struts
should pre-populate the HTML form element based on the Form bean
property, which would have been filled in when the form was submitted
(or be blank if not).

I haven't read the whole presentation, but this is a practice I've
argued against twice in the last week here.  Either I'm completely
wrong, in which case I'd appreciate being corrected, or this really
isn't necessary.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts and plugin question

2004-03-31 Thread Andrew Hill

But, fact is that when I want to get my component from servletcontext
I have to cast it to my  proper type.
Is there a way to avoid that?


Not really, but you could create a static (or non static if you like) helper
method somewhere to take care of both remembering the key and casting:

public class MyComponentFinder
{
  public static final MyComponent getMyComponent(ServletContext sc)
  {
return (MyComponent)sc.getATtribute(MY_COMPONENT_KEY);
  }
}

-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 31 March 2004 23:02
To: 'Struts Users Mailing List'
Subject: Struts and plugin question


Hi all,
I was wondering something about plugIns.

Let's say, I want to create an object that has application context.
So I create a plugIn to initialize it and store it in ServletContext.
But, fact is that when I want to get my component from servletcontext
I have to cast it to my  proper type.
Is there a way to avoid that?

Just for some brainstorming

Thanx in advance to all the replies
Regards
marco


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HashMap and tiles

2004-03-31 Thread Mario St-Gelais
I am using Tomcat 5.0.19 and Struts 1.1.  I made a small application 
using a hashmap to store user entry from a form.  That works fine in 
itself.  Then to make the thing nicer, I added tiles.  All the pages 
work but the one with the form.  I keep getting the message :

javax.servlet.ServletException: Cannot retrieve definition for form bean 
null.

I am also using the Validator to validate the entries but I don't think 
that is the issue as everything is fine without the tiles.

--
_
Mario St-Gelais
"Good judgment comes from
experience- usually experience
which was the result of poor judgment"
Bill Putnam


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Struts and plugin question

2004-03-31 Thread Marco Mistroni
Hi all,
I was wondering something about plugIns.

Let's say, I want to create an object that has application context.
So I create a plugIn to initialize it and store it in ServletContext.
But, fact is that when I want to get my component from servletcontext
I have to cast it to my  proper type.
Is there a way to avoid that? 

Just for some brainstorming

Thanx in advance to all the replies
Regards
marco


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaServer Face

2004-03-31 Thread Mark Lowe
Just out of curiosity where's the link on your site that caused so much 
controversy?

On 31 Mar 2004, at 16:39, Vic Cekvenich wrote:

There is also a digram to help you get the picture:
http://www.theserverside.com/cartoons/TalesFromTheServerSide.tss
.V

Mark Lowe wrote:
There was a long thread on the developers list last week where the 
question of whether JSF would replace struts was discussed.
The basic conclusions of those taking part in the discussion what 
that struts was originally designed to fill a gap in the servlet api, 
and that the role of struts and open source projects in general are 
often to fill these gaps without the rigid and slower process of JSR.
Check the dev list mail archives for "struts JSR" and read the thread.
Mark
On 31 Mar 2004, at 11:00, Xuemin Guan wrote:
Hi, All, I know this is a bit off topic. But really want to
get an opinion about it from the Struts users.
The JavaServer Face 1.0, or JSF, has been released. It claims to
be a framework for building web-based user interfaces in Java.
Like Swing, it provides a set of standard widgets  (buttons,
hyperlinks, checkboxes, and so on). What I want to know is, can
JSF truly facilitate constructing a highly complex
user interface just like Swing does? If it can't, is Applet still 
the way
to go(don't hear much about it these days. Is Applet dead? Is there
an alternative to Applet when it comes to constructing a web
browser-accessed highly complex GUI?) Given the fact that Struts 
already
provides many features JavaServer Face provides(such as validation,
internalization, and tags for constructing UI widgets etc),  what's
the significant benefit to gain by adopting JSF? or combining 
them?(I heard
this
is possible, and someone says it would be a powerful combination.) 
And the
final question is will the JSF replace Struts in the future?

Any comment is welcome.

Thanks,

Xuemin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JavaServer Face

2004-03-31 Thread Andrew Hill
rofl!
Reckon Im gonna be forwarding that link a fair bit. Nice :-)


-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich
Sent: Wednesday, 31 March 2004 22:39
To: [EMAIL PROTECTED]
Subject: Re: JavaServer Face


There is also a digram to help you get the picture:
http://www.theserverside.com/cartoons/TalesFromTheServerSide.tss

.V

Mark Lowe wrote:
> There was a long thread on the developers list last week where the
> question of whether JSF would replace struts was discussed.
>
> The basic conclusions of those taking part in the discussion what that
> struts was originally designed to fill a gap in the servlet api, and
> that the role of struts and open source projects in general are often to
> fill these gaps without the rigid and slower process of JSR.
>
> Check the dev list mail archives for "struts JSR" and read the thread.
>
> Mark
> On 31 Mar 2004, at 11:00, Xuemin Guan wrote:
>
>> Hi, All, I know this is a bit off topic. But really want to
>> get an opinion about it from the Struts users.
>>
>> The JavaServer Face 1.0, or JSF, has been released. It claims to
>> be a framework for building web-based user interfaces in Java.
>> Like Swing, it provides a set of standard widgets  (buttons,
>> hyperlinks, checkboxes, and so on). What I want to know is, can
>> JSF truly facilitate constructing a highly complex
>> user interface just like Swing does? If it can't, is Applet still the way
>> to go(don't hear much about it these days. Is Applet dead? Is there
>> an alternative to Applet when it comes to constructing a web
>> browser-accessed highly complex GUI?) Given the fact that Struts already
>> provides many features JavaServer Face provides(such as validation,
>> internalization, and tags for constructing UI widgets etc),  what's
>> the significant benefit to gain by adopting JSF? or combining them?(I
>> heard
>> this
>> is possible, and someone says it would be a powerful combination.) And
>> the
>> final question is will the JSF replace Struts in the future?
>>
>> Any comment is welcome.
>>
>> Thanks,
>>
>> Xuemin
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaServer Face

2004-03-31 Thread Vic Cekvenich
There is also a digram to help you get the picture:
http://www.theserverside.com/cartoons/TalesFromTheServerSide.tss
.V

Mark Lowe wrote:
There was a long thread on the developers list last week where the 
question of whether JSF would replace struts was discussed.

The basic conclusions of those taking part in the discussion what that 
struts was originally designed to fill a gap in the servlet api, and 
that the role of struts and open source projects in general are often to 
fill these gaps without the rigid and slower process of JSR.

Check the dev list mail archives for "struts JSR" and read the thread.

Mark
On 31 Mar 2004, at 11:00, Xuemin Guan wrote:
Hi, All, I know this is a bit off topic. But really want to
get an opinion about it from the Struts users.
The JavaServer Face 1.0, or JSF, has been released. It claims to
be a framework for building web-based user interfaces in Java.
Like Swing, it provides a set of standard widgets  (buttons,
hyperlinks, checkboxes, and so on). What I want to know is, can
JSF truly facilitate constructing a highly complex
user interface just like Swing does? If it can't, is Applet still the way
to go(don't hear much about it these days. Is Applet dead? Is there
an alternative to Applet when it comes to constructing a web
browser-accessed highly complex GUI?) Given the fact that Struts already
provides many features JavaServer Face provides(such as validation,
internalization, and tags for constructing UI widgets etc),  what's
the significant benefit to gain by adopting JSF? or combining them?(I 
heard
this
is possible, and someone says it would be a powerful combination.) And 
the
final question is will the JSF replace Struts in the future?

Any comment is welcome.

Thanks,

Xuemin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Clean url for home page

2004-03-31 Thread Bill Siggelkow
Actually, as I recall a welcome-file cannot be a servlet path but must 
be a JSP or static page.
First, you will want to set 'index.jsp' as the welcome file.
Then to achieve what you want you want (that is, the web app is accessed 
at http://www.mysite.com) you need to configure the application to 
deploy as the root (default) context. This configuration is specific to 
the container you are deploying to and you will also want to set the 
container to listen to port 80.  Here is the setting for port 80 for 
Tomcat in the 'server.xml':


disableUploadTimeout="true" />

Then you add a Context element that specifies the path as "" (empty 
string) to set the root context to be your web app.

For Tomcat you would add an entry into 'server.xml' like the following:



Bill Siggelkow

Tuncay Baskan (Yazilim Muh. - Proje Gel. ve Uyg. Gr.) wrote:
-Original Message-
You can add


home.do

to your web.xml and the application server processes /home.do for requests like http://www.mysite.com/.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Switching validation on | off

2004-03-31 Thread Joe Germuska
i have a dynaValidatorForm declared with validate="true". Under certain
conditions, i´d like to turn validation off. Is 
there any chance to achive this
on the fly ?
Depending on how dynamic your rules for 
validating or not are, you may be able to use the 
DynaValidatorActionForm.  The only difference 
between DVAF and DVF is that DVAF uses the 
ActionMapping's path value to look up a 
validation configuration from the 
commons-validator, while DVF uses the form-bean's 
name.

If you can't use action paths to signal your 
validation intentions, then Niall's suggestion is 
the way to go.

Joe

--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
  "Imagine if every Thursday your shoes 
exploded if you tied them the usual way.  This 
happens to us all the time with computers, and 
nobody thinks of complaining."
-- Jef Raskin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts boooks: remommendations?

2004-03-31 Thread Charles Jordan
Can you print the pdf?

> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> List-Unsubscribe: 
> List-Subscribe: 
> List-Help: 
> List-Post: 
> List-Id: "Struts Users Mailing List" 
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: "Xuemin Guan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: Re: Struts boooks: remommendations?
> Date: Wed, 31 Mar 2004 18:05:07 +0900
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on  
cvgmx5in.convergys.com
> X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham  
version=2.63
> 
> If you already have some basic understanding or even little
> practical experence of using it, I highly the book, "Struts Survival Guide"
> (www.objectsource.com). It takes you one step further on how
> extend the framework to fulfill your more advanced requirement.
> 
> PS. you can buy a download PDF file as well, which is much cheaper
> than it's paper back conterpart.
> 
> Xuemin
> 
> - Original Message - 
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 31, 2004 5:27 PM
> Subject: SV: Struts boooks: remommendations?
> 
> 
> > Hi
> >
> > Try Professional Jakarta Struts from Wrox - It is way better than Struts
> > in Action.
> >
> > Hermod
> >
> > -Opprinnelig melding-
> > Fra: Laurie Harper [mailto:[EMAIL PROTECTED]
> > Sendt: 31. mars 2004 08:10
> > Til: [EMAIL PROTECTED]
> > Emne: Struts boooks: remommendations?
> >
> >
> > I'm looking for a good book on Struts, but there seem to be a number of
> > choices... Choice is all well and good, but i need some selection
> > criteria :-) I'm looking for a book that has comprehensive coverage of
> > Struts, is up-to-date, and which focuses on Struts (not a book on web
> > application development that happens to talk about Struts along the way,
> >
> > for example).
> >
> > So, what do people recommend? What books have you found most useful in
> > that context? From the sample chapters on line it seems like Struts in
> > Action may be a good choice but I don't know how up-to-date it is.
> >
> > Suggestions appreciated :)
> >
> > L.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> *
> >
> > This email with attachments is solely for the use of the individual or
> > entity to whom it is addressed. Please also be aware that DnB NOR cannot
> > accept any payment orders or other legally binding correspondence with
> > customers as a part of an email.
> >
> > This email message has been virus checked by the virus programs used
> > in the DnB NOR Group.
> >
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> *
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Charles (Allen) Jordan   <[EMAIL PROTECTED]>
  System Administrator(407)771-8919
  Convergys
  285 International Parkway, 
  Lake Mary, FL 32746-5007


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: One Action class but more than one functionality

2004-03-31 Thread Joao Batistella
Pedro, this is exactly what I need. Thanks!

-Original Message-
From: Pedro Salgado [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 31 de março de 2004 11:14
To: Struts Users Mailing List
Subject: Re: One Action class but more than one functionality


On 31/03/2004 10:12, "Joao Batistella" <[EMAIL PROTECTED]>
wrote:

> I understood what you and mean John Menke said. But the validations I have
> in my abstract action class is not specific for a Person, for example. It
> must be called for every action in the system and I don't want it to be
> called like PersonUtils.commonCodeMethod(params). This must be
automatically
> called, so no chance of forgetting.


  Maybe extending RequestProcessor, overriding processActionPerform

  ... processActionPerform(...) {

  //general validation
  (...)

  super.processActionPerform();
}

  Specify the controller on your struts-config






  This gives you the guarantee that for everything performed with Struts,
the validation is always performed. I did something similar for
processingRoles my way and it is the most cleaner solution, the one that
gives more guarantees and gives more flexbility to use Actions in anyway you
like. I have even made a package out of it so I could reuse the solution.

  More with your method, you can still forget to extend right class and
still get an action performed out of general validation (maybe at most you
get an error executing the action - I don't know your webapp).

  Here goes the javadoc for RequestProcessor ->
http://jakarta.apache.org/struts/api/org/apache/struts/action/RequestProcess
or.html#processActionPerform(javax.servlet.http.HttpServletRequest,%20javax.
servlet.http.HttpServletResponse,%20org.apache.struts.action.Action,%20org.a
pache.struts.action.ActionForm,%20org.apache.struts.action.ActionMapping)


  I ran out of ideas so... you can still solve your problem with multiple
actions. :)


Pedro Salgado



> 
> Thanks you all.
> 
> -Original Message-
> From: Pedro Salgado [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 30 de março de 2004 23:50
> To: Struts Users Mailing List
> Subject: Re: One Action class but more than one functionality
> 
> 
> 
>  Have you tried dispatch action (1 class => several methods that can be
> executed)?
> 
> This way you have:
> 
> - class Person extends Action
>   - add(request, mapping, form, etc)
>   - edit(request, mapping, form, etc)
>   - remove(request, mapping, form, etc)
> 
> You could then create a PersonVUtils (validation utilities for Person or
> something like that) to refactor the code that is common for adding and
> editing a person (in principle, they have the same attributes).
> 
> 
>  If still want to continue with a regular action, like John Menke
> mentioned, it would be best to have an super abstract class.
> 
> This way you have:
> 
> - abstract class BaseAction extends Action
> - class AddPerson extends BaseAction
>   - execute() : 1st executes PersonUtils.commonCodeMethod(params);
> - class EditPerson extends BaseAction
>   - execute() : 1st executes PersonUtils.commonCodeMethod(params);
> - class RemovePerson extends BaseAction
>   - execute() : 1st executes PersonUtils.commonCodeMethod(params);
> 
> Pedro Salgado
> 
> On 30/03/2004 21:12, "Menke, John" <[EMAIL PROTECTED]> wrote:
> 
>> In our base action classes we have elected not to implement the execute
>> method making them abstract actions instead.  this way you can include
>> protected methods in these classes to do validation and call them when
>> needed.  implementing exeucte method in base class seems too limiting.
> you
>> could call super.execute() in your execute method but this is sloppy in
my
>> opinion.  I would rather have a abstract super class.
>> 
>> 
>> -Original Message-
>> From: Joao Batistella [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, March 30, 2004 3:02 PM
>> To: 'Struts Users Mailing List'
>> Subject: RE: One Action class but more than one functionality
>> 
>> 
>> That's right.
>> But I have a problem. I have a superclass that all other actions extend
> and
>> this class only implement execute method with generic validations and so
> on.
>> So, I need the execute method being called, understand?
>> Thanks.
>> -Original Message-
>> From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
>> Sent: terça-feira, 30 de março de 2004 17:33
>> To: Struts Users Mailing List
>> Subject: RE: One Action class but more than one functionality
>> look at the org.apache.struts.actions.DispatchAction class. It is exactly
>> for the use case you described.
>> -Original Message-
>> From: Joao Batistella [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, March 30, 2004 11:28 AM
>> To: 'Struts Users Mailing List'
>> Subject: One Action class but more than one functionality
>> Hello.
>> I have an action class to create, edit and remove a Person, for example.
>> Is this a poor decision? I mean, should I create 3 action classes, one
for
>> create, another for edit and

Re: Struts boooks: remommendations?

2004-03-31 Thread Rick Reumann
On Wed, Mar 31, 2004 at 10:22:06AM +0200, Jesse Alexander (KAID 11) wrote:

 
> Online doc is ok, but for a beginner Ted's book is better.

I think "Programming Jakarta Struts" by 
Chuck Cavaness is a bit better for a beginner. Ted seems to
cover a few  more concepts, but Chuck explains more of the
commonly used concepts in more depth so that you really
understand it.


http://www.amazon.com/exec/obidos/ASIN/0596003285/qid=1080738917/sr=2-2/ref=sr_2_2/103-7806751-9165401

Both books are very good, though.

-- 
Rick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Switching validation on | off

2004-03-31 Thread Niall Pemberton
You could extend DynaValidatorForm and override the validate() method in the
DynaValidatorForm:

public ActionErrors validate(ActionMapping mapping,
   HttpServletRequest request) {

if (---?---) {
return super.validate(mapping, request);
}

}
Niall

- Original Message - 
From: "Frank Schaare" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 2:12 PM
Subject: Switching validation on | off


> Hi,
>
> i have a dynaValidatorForm declared with validate="true". Under certain
> conditions, i´d like to turn validation off. Is there any chance to achive
this
> on the fly ?
>
> -- 
> +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz
+++
> 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Introduction & broken list links

2004-03-31 Thread Brian Lalor
Good morning, all.  I'm really writing to complain that all links to 
subscribe to the struts lists are broken on the Apache website.  
Apparently there was a change from jakarta.apache.org -> 
struts.apache.org.  Messages to 
[EMAIL PROTECTED] are bouncing, so new user 
subscriptions don't work.

I'm a new Struts user, and I've been doing a 
self-indoctrination-by-fire the last few days trying to put together a 
couple of struts-based user request forms for a very clueless and 
cranky marketing department.  Its been quite a learning process.  I've 
got both "Struts in Action" and "Struts Kick Start" by my side, but 
frankly, I'm still struggling.  I'll follow up with specific questions 
later.

Struts looks like a great tool to learn, and I'm looking forward to 
working more with it!

Thanks,
B
--
   __   
  / /  / __/ Brian Lalor
 / _ \/__ \  [EMAIL PROTECTED]
/_.__//  http://bravo5.org/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Switching validation on | off

2004-03-31 Thread Frank Schaare
Hi,

i have a dynaValidatorForm declared with validate="true". Under certain
conditions, i´d like to turn validation off. Is there any chance to achive this
on the fly ?

-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts boooks: remommendations?

2004-03-31 Thread Amit Kumar Sharma
can u please mail the link for the Struts in action by ted husted. or any
online document which can be helpful.


-Original Message-
From: Gardner, David [IT] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:50 AM
To: Struts Users Mailing List
Subject: RE: Struts boooks: remommendations?


Struts in action by ted husted. Covers tiles and the validator quite
well to. Also the online doco for the project is pretty good.


-Original Message-
From: Laurie Harper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 31 March 2004 4:10 PM
To: [EMAIL PROTECTED]
Subject: Struts boooks: remommendations?


I'm looking for a good book on Struts, but there seem to be a number of
choices... Choice is all well and good, but i need some selection
criteria :-) I'm looking for a book that has comprehensive coverage of
Struts, is up-to-date, and which focuses on Struts (not a book on web
application development that happens to talk about Struts along the way,

for example).

So, what do people recommend? What books have you found most useful in
that context? From the sample chapters on line it seems like Struts in
Action may be a good choice but I don't know how up-to-date it is.

Suggestions appreciated :)

L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Clean url for home page

2004-03-31 Thread Tuncay Baskan \(Yazilim Muh. - Proje Gel. ve Uyg. Gr.\)
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of John Boyes
> Sent: 31 Mart 2004 Çarşamba 15:42
> To: [EMAIL PROTECTED]
> Subject: Clean url for home page
> 
> I would like to have a clean url for my site's home page 
> (built with Struts) displayed to the user.
> 
> e.g
> http://www.mysite.com
> 
> not
> http://www.mysite.com/home.do
> or
> http://www.mysite.com/index.jsp
> 
> Is there a straightforward way to accomplish this, while 
> still processing a Struts action in the request?
> 

You can add


home.do


to your web.xml and the application server processes /home.do for requests like 
http://www.mysite.com/.

> I've had a good look at the archives but haven't found a solution.
> 
> Thanks for any help
> 
> John

Regards.
/tb.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clean url for home page

2004-03-31 Thread John Boyes
I would like to have a clean url for my site's home page (built with Struts) 
displayed to the
user.

e.g
http://www.mysite.com

not
http://www.mysite.com/home.do
or
http://www.mysite.com/index.jsp

Is there a straightforward way to accomplish this, while still processing a
Struts action in the request?

I've had a good look at the archives but haven't found a solution.

Thanks for any help

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: switching to struts-el

2004-03-31 Thread Ted Husted
Bill,

Your presentation, mentioned in another thread, is also very helpful.

http://www.jadecove.com/articles/jstl-and-struts.pdf

Towards the end, you show a simple calculator implemented as JSP, Struts, Struts-EL, 
and JSTL. On page 33, the Struts-EL uses a "helper bean" to do the arithmetic. The 
others do the addition inline. Why is it done differently for Struts-EL?

-Ted.

On Tue, 30 Mar 2004 14:16:25 -0500, Bill Siggelkow wrote:
> I feel your pain, Dean :) With the relatively rapid changes in
> Java/Web technology it is difficult for print material to keep up.
> I really liked JSTL in Action -- however, you may want to read the
> JSTL 1.1 spec to pick up the new features.  I put out a JSTL Quick
> Reference that you might find useful at
> http://www.jadecove.com/jstl-quick-reference.pdf



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamic forward in tiles

2004-03-31 Thread Mariano García
El vie, 26-03-2004 a las 11:36, Pedro Salgado escribió:

>   If you want to make a tiles attribute dynamic, you must specify and
> implement the tiles controller (described in the other mail).
> 

I am using a Controller in the same way you described in the last mail,
setting my 'body' attribute with the 'putAttribute' method (for
example):

///
String encoderIP = (String)
request.getSession().getAttribute("serverLocation");
tilesctx.putAttribute("body", encoderIP);
///

Is this correct? Note I want to use an external page. If I use (for
example) http://www.google.com as my 'body' attribute value, I get a
page with all its sections, but the 'body' section is empty.

Thanks,
Mariano.

-- 
  Mariano García González :: Ingeniero de Sistemas

OPTIVA MEDIAPGP 0x89E8E4CE
O'Donnel 29
28010 Madrid (España)
t. +34 91 297 72 69
www.optivamedia.com

© This message is printed on 100% recycled electrons.


signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada	digitalmente


FormFile and Opera browser

2004-03-31 Thread Vesa Hirsimaa

Hi!

I'm having problems when using Opera 7.23 for submitting html-form with 
file input element which I want to left blank. I'm running with Resin 
2.1.12 and JRE 1.4.2. Stack trace included below.

I think that this occurs because Opera is sending the multipart-file field 
differently than ex. Mozilla. Here is HTTP stuff taken with netcat.

Opera:-
Content-Disposition: form-data; name="imageFile"

Mozilla:---
Content-Disposition: form-data; name="imageFile"; filename=""
Content-Type: application/octet-stream

---

Is anyone having same kind of troubles? Please let me know if you have 
some decision to fix this one. Thanks advance!

// Vesa H.




Stack trace :---

500 Servlet Exception

java.lang.IllegalArgumentException: [EMAIL PROTECTED]
at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at 
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at 
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at 
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at 
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at 
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:534)
Resin 2.1.12 (built Tue Dec 9 14:58:25 PST 2003)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: One Action class but more than one functionality

2004-03-31 Thread Pedro Salgado
On 31/03/2004 10:12, "Joao Batistella" <[EMAIL PROTECTED]>
wrote:

> I understood what you and mean John Menke said. But the validations I have
> in my abstract action class is not specific for a Person, for example. It
> must be called for every action in the system and I don't want it to be
> called like PersonUtils.commonCodeMethod(params). This must be automatically
> called, so no chance of forgetting.


  Maybe extending RequestProcessor, overriding processActionPerform

  ... processActionPerform(...) {

  //general validation
  (...)

  super.processActionPerform();
}

  Specify the controller on your struts-config






  This gives you the guarantee that for everything performed with Struts,
the validation is always performed. I did something similar for
processingRoles my way and it is the most cleaner solution, the one that
gives more guarantees and gives more flexbility to use Actions in anyway you
like. I have even made a package out of it so I could reuse the solution.

  More with your method, you can still forget to extend right class and
still get an action performed out of general validation (maybe at most you
get an error executing the action - I don't know your webapp).

  Here goes the javadoc for RequestProcessor ->
http://jakarta.apache.org/struts/api/org/apache/struts/action/RequestProcess
or.html#processActionPerform(javax.servlet.http.HttpServletRequest,%20javax.
servlet.http.HttpServletResponse,%20org.apache.struts.action.Action,%20org.a
pache.struts.action.ActionForm,%20org.apache.struts.action.ActionMapping)


  I ran out of ideas so... you can still solve your problem with multiple
actions. :)


Pedro Salgado



> 
> Thanks you all.
> 
> -Original Message-
> From: Pedro Salgado [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 30 de março de 2004 23:50
> To: Struts Users Mailing List
> Subject: Re: One Action class but more than one functionality
> 
> 
> 
>  Have you tried dispatch action (1 class => several methods that can be
> executed)?
> 
> This way you have:
> 
> - class Person extends Action
>   - add(request, mapping, form, etc)
>   - edit(request, mapping, form, etc)
>   - remove(request, mapping, form, etc)
> 
> You could then create a PersonVUtils (validation utilities for Person or
> something like that) to refactor the code that is common for adding and
> editing a person (in principle, they have the same attributes).
> 
> 
>  If still want to continue with a regular action, like John Menke
> mentioned, it would be best to have an super abstract class.
> 
> This way you have:
> 
> - abstract class BaseAction extends Action
> - class AddPerson extends BaseAction
>   - execute() : 1st executes PersonUtils.commonCodeMethod(params);
> - class EditPerson extends BaseAction
>   - execute() : 1st executes PersonUtils.commonCodeMethod(params);
> - class RemovePerson extends BaseAction
>   - execute() : 1st executes PersonUtils.commonCodeMethod(params);
> 
> Pedro Salgado
> 
> On 30/03/2004 21:12, "Menke, John" <[EMAIL PROTECTED]> wrote:
> 
>> In our base action classes we have elected not to implement the execute
>> method making them abstract actions instead.  this way you can include
>> protected methods in these classes to do validation and call them when
>> needed.  implementing exeucte method in base class seems too limiting.
> you
>> could call super.execute() in your execute method but this is sloppy in my
>> opinion.  I would rather have a abstract super class.
>> 
>> 
>> -Original Message-
>> From: Joao Batistella [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, March 30, 2004 3:02 PM
>> To: 'Struts Users Mailing List'
>> Subject: RE: One Action class but more than one functionality
>> 
>> 
>> That's right.
>> But I have a problem. I have a superclass that all other actions extend
> and
>> this class only implement execute method with generic validations and so
> on.
>> So, I need the execute method being called, understand?
>> Thanks.
>> -Original Message-
>> From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
>> Sent: terça-feira, 30 de março de 2004 17:33
>> To: Struts Users Mailing List
>> Subject: RE: One Action class but more than one functionality
>> look at the org.apache.struts.actions.DispatchAction class. It is exactly
>> for the use case you described.
>> -Original Message-
>> From: Joao Batistella [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, March 30, 2004 11:28 AM
>> To: 'Struts Users Mailing List'
>> Subject: One Action class but more than one functionality
>> Hello.
>> I have an action class to create, edit and remove a Person, for example.
>> Is this a poor decision? I mean, should I create 3 action classes, one for
>> create, another for edit and another one for remove?
>> Does struts have a mechanism to help me in that?
>> Thanks all.
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTE

RE: Problem with html:multibox not clearing

2004-03-31 Thread Murray, Christopher
You have my sympathies Jim!

I have been wrestling with this same problem.  I am attempting to fix a bug
in some code that uses a multibox.  I too had a reset method called by
struts (1.02).  My problem is that I only wanted to call the reset method
when I submitted the search initially.  There were times when I returned to
the search page and I wanted the search criteria (including my checkbox
value) to still be there.  Unfortunately the struts calls the reset method
all the time resetting the checkbox value.

I have since worked around this by putting a branch around the checkbox
reset in the actionForm obtaining a value from the request which is only set
when the search is first submitted.  This ensures that the checkbox value is
only reset when the search is submitted in the first place and not when
returned to.

Is there any intention to modify the html:multibox tag so that it submits a
value for when it is unchecked?

regards,
Chris.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 09:16
To: [EMAIL PROTECTED]
Subject: SV: Problem with html:multibox not clearing


Hi

Have a reset() (Inherited from ActionForm) method in you form bean.

In it you set all Boolean/boolean variables to false/null. That way,
because a nonselected value is never submitted, when you get tne value
from the form bean, it is false/null

Hermod

-Opprinnelig melding-
Fra: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sendt: 30. mars 2004 22:06
Til: 'Struts Users Mailing List'
Emne: Problem with html:multibox not clearing


 I am using an html:multibox that is pretty much working fine except
when I
uncheck all choices. I am also using the logic:iterate tag to generate
many
checkboxes.  If I have a single box checked I can't seem to uncheck it
if
it's the last one.  If I have several checked, I can uncheck them one at
a
time and that works.  At least until I get down to just one checked.
Very
odd.  The problem seems to be that I can't get Struts to realize that
there
are no checkboxes checked after I submit the form.

I am using struts 1.1, with DynaValidatorForm's.  Here's some of my
code:

...



...





  



Don't think the above is the issue.  It's something deeper I think.

Any help is appreciated.

Jim Kennedy
IT Consultant



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JavaServer Face

2004-03-31 Thread Mark Lowe
There was a long thread on the developers list last week where the 
question of whether JSF would replace struts was discussed.

The basic conclusions of those taking part in the discussion what that 
struts was originally designed to fill a gap in the servlet api, and 
that the role of struts and open source projects in general are often 
to fill these gaps without the rigid and slower process of JSR.

Check the dev list mail archives for "struts JSR" and read the thread.

Mark
On 31 Mar 2004, at 11:00, Xuemin Guan wrote:
Hi, All, I know this is a bit off topic. But really want to
get an opinion about it from the Struts users.
The JavaServer Face 1.0, or JSF, has been released. It claims to
be a framework for building web-based user interfaces in Java.
Like Swing, it provides a set of standard widgets  (buttons,
hyperlinks, checkboxes, and so on). What I want to know is, can
JSF truly facilitate constructing a highly complex
user interface just like Swing does? If it can't, is Applet still the 
way
to go(don't hear much about it these days. Is Applet dead? Is there
an alternative to Applet when it comes to constructing a web
browser-accessed highly complex GUI?) Given the fact that Struts 
already
provides many features JavaServer Face provides(such as validation,
internalization, and tags for constructing UI widgets etc),  what's
the significant benefit to gain by adopting JSF? or combining them?(I 
heard
this
is possible, and someone says it would be a powerful combination.) And 
the
final question is will the JSF replace Struts in the future?

Any comment is welcome.

Thanks,

Xuemin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JavaServer Face

2004-03-31 Thread Andrew Hill
hehe, this (struts vs jsf) has been asked a lot on the list.

If you search the list archives you will find a lot of discussion on it, and
in the struts wiki I found this page particularly enlightening:
http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsMoreAboutJSF


-Original Message-
From: Xuemin Guan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 31 March 2004 17:00
To: Struts Users Mailing List
Subject: JavaServer Face


Hi, All, I know this is a bit off topic. But really want to
get an opinion about it from the Struts users.

The JavaServer Face 1.0, or JSF, has been released. It claims to
be a framework for building web-based user interfaces in Java.
Like Swing, it provides a set of standard widgets  (buttons,
hyperlinks, checkboxes, and so on). What I want to know is, can
JSF truly facilitate constructing a highly complex
user interface just like Swing does? If it can't, is Applet still the way
to go(don't hear much about it these days. Is Applet dead? Is there
an alternative to Applet when it comes to constructing a web
browser-accessed highly complex GUI?) Given the fact that Struts already
provides many features JavaServer Face provides(such as validation,
internalization, and tags for constructing UI widgets etc),  what's
the significant benefit to gain by adopting JSF? or combining them?(I heard
this
is possible, and someone says it would be a powerful combination.) And the
final question is will the JSF replace Struts in the future?

Any comment is welcome.

Thanks,

Xuemin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: One Action class but more than one functionality

2004-03-31 Thread Joao Batistella
I understood what you and mean John Menke said. But the validations I have
in my abstract action class is not specific for a Person, for example. It
must be called for every action in the system and I don't want it to be
called like PersonUtils.commonCodeMethod(params). This must be automatically
called, so no chance of forgetting.

Thanks you all.

-Original Message-
From: Pedro Salgado [mailto:[EMAIL PROTECTED]
Sent: terça-feira, 30 de março de 2004 23:50
To: Struts Users Mailing List
Subject: Re: One Action class but more than one functionality



   Have you tried dispatch action (1 class => several methods that can be
executed)?

  This way you have:

  - class Person extends Action
- add(request, mapping, form, etc)
- edit(request, mapping, form, etc)
- remove(request, mapping, form, etc)

  You could then create a PersonVUtils (validation utilities for Person or
something like that) to refactor the code that is common for adding and
editing a person (in principle, they have the same attributes).


   If still want to continue with a regular action, like John Menke
mentioned, it would be best to have an super abstract class.

  This way you have:

  - abstract class BaseAction extends Action
  - class AddPerson extends BaseAction
- execute() : 1st executes PersonUtils.commonCodeMethod(params);
  - class EditPerson extends BaseAction
- execute() : 1st executes PersonUtils.commonCodeMethod(params);
  - class RemovePerson extends BaseAction
- execute() : 1st executes PersonUtils.commonCodeMethod(params);

Pedro Salgado

On 30/03/2004 21:12, "Menke, John" <[EMAIL PROTECTED]> wrote:

> In our base action classes we have elected not to implement the execute
> method making them abstract actions instead.  this way you can include
> protected methods in these classes to do validation and call them when
> needed.  implementing exeucte method in base class seems too limiting.
you
> could call super.execute() in your execute method but this is sloppy in my
> opinion.  I would rather have a abstract super class.
> 
> 
> -Original Message-
> From: Joao Batistella [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 30, 2004 3:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: One Action class but more than one functionality
> 
> 
> That's right.
> But I have a problem. I have a superclass that all other actions extend
and
> this class only implement execute method with generic validations and so
on.
> So, I need the execute method being called, understand?
> Thanks.
> -Original Message-
> From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 30 de março de 2004 17:33
> To: Struts Users Mailing List
> Subject: RE: One Action class but more than one functionality
> look at the org.apache.struts.actions.DispatchAction class. It is exactly
> for the use case you described.
> -Original Message-
> From: Joao Batistella [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 30, 2004 11:28 AM
> To: 'Struts Users Mailing List'
> Subject: One Action class but more than one functionality
> Hello.
> I have an action class to create, edit and remove a Person, for example.
> Is this a poor decision? I mean, should I create 3 action classes, one for
> create, another for edit and another one for remove?
> Does struts have a mechanism to help me in that?
> Thanks all.
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JavaServer Face

2004-03-31 Thread Xuemin Guan
Hi, All, I know this is a bit off topic. But really want to
get an opinion about it from the Struts users.

The JavaServer Face 1.0, or JSF, has been released. It claims to
be a framework for building web-based user interfaces in Java.
Like Swing, it provides a set of standard widgets  (buttons,
hyperlinks, checkboxes, and so on). What I want to know is, can
JSF truly facilitate constructing a highly complex
user interface just like Swing does? If it can't, is Applet still the way
to go(don't hear much about it these days. Is Applet dead? Is there
an alternative to Applet when it comes to constructing a web
browser-accessed highly complex GUI?) Given the fact that Struts already
provides many features JavaServer Face provides(such as validation,
internalization, and tags for constructing UI widgets etc),  what's
the significant benefit to gain by adopting JSF? or combining them?(I heard
this
is possible, and someone says it would be a powerful combination.) And the
final question is will the JSF replace Struts in the future?

Any comment is welcome.

Thanks,

Xuemin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts boooks: remommendations?

2004-03-31 Thread Xuemin Guan
If you already have some basic understanding or even little
practical experence of using it, I highly the book, "Struts Survival Guide"
(www.objectsource.com). It takes you one step further on how
extend the framework to fulfill your more advanced requirement.

PS. you can buy a download PDF file as well, which is much cheaper
than it's paper back conterpart.

Xuemin

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 5:27 PM
Subject: SV: Struts boooks: remommendations?


> Hi
>
> Try Professional Jakarta Struts from Wrox - It is way better than Struts
> in Action.
>
> Hermod
>
> -Opprinnelig melding-
> Fra: Laurie Harper [mailto:[EMAIL PROTECTED]
> Sendt: 31. mars 2004 08:10
> Til: [EMAIL PROTECTED]
> Emne: Struts boooks: remommendations?
>
>
> I'm looking for a good book on Struts, but there seem to be a number of
> choices... Choice is all well and good, but i need some selection
> criteria :-) I'm looking for a book that has comprehensive coverage of
> Struts, is up-to-date, and which focuses on Struts (not a book on web
> application development that happens to talk about Struts along the way,
>
> for example).
>
> So, what do people recommend? What books have you found most useful in
> that context? From the sample chapters on line it seems like Struts in
> Action may be a good choice but I don't know how up-to-date it is.
>
> Suggestions appreciated :)
>
> L.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
>
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that DnB NOR cannot
> accept any payment orders or other legally binding correspondence with
> customers as a part of an email.
>
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: Session Time Out

2004-03-31 Thread hermod . opstvedt
Hi

If it expires, the filter will be called again. The sessioncontext
listener gets notified when the session is created, and when it is
destroyed.

Hermod

-Opprinnelig melding-
Fra: MOHAN RADHAKRISHNAN [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 10:27
Til: 'Struts Users Mailing List'
Emne: RE: Session Time Out


HI
 We are not finding it that easy. It could expire anywhere after the
filter.

Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 1:39 PM
To: [EMAIL PROTECTED]
Subject: SV: Session Time Out


Hi

Use a servletfilter to trap when a new session is created, and do what
ever you want to there.

Hermod


-Opprinnelig melding-
Fra: Adam Hardy [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 09:56
Til: Struts Users Mailing List
Emne: Re: Session Time Out


Hi Kumar,
struts will create the session. AFAIK there is no way to disable it in
struts.

Adam

On 03/30/2004 11:17 PM Kumar M wrote:
>
> I am setting the web application to time out in 60 mins. After that if

> the user sends a request from the expired browser session I was hoping

> to identify that state using "request.getSession(false) == null" in my

> Action Servlet.
>
> But I am noticing that "request.getSession(false)" is never null. When
I
> looked carefully at the other attributes on Session, I noticed that
the
> "isNew" attribute is set to true. According to the API,
>
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSer
vletRequest.html#getSession(boolean),
> request.getSession(false)  should return null when there is no session

> in progress for that request. I am wondering if the web server creates
a
> session if there is not one associated with this request.
>
> Could some one confirm if this is true? I am using JDK 1.3 and
Weblogic 6.1
>
> Thanks!
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email.

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: Struts boooks: remommendations?

2004-03-31 Thread hermod . opstvedt
Hi

Try Professional Jakarta Struts from Wrox - It is way better than Struts
in Action.

Hermod

-Opprinnelig melding-
Fra: Laurie Harper [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 08:10
Til: [EMAIL PROTECTED]
Emne: Struts boooks: remommendations?


I'm looking for a good book on Struts, but there seem to be a number of 
choices... Choice is all well and good, but i need some selection 
criteria :-) I'm looking for a book that has comprehensive coverage of 
Struts, is up-to-date, and which focuses on Struts (not a book on web 
application development that happens to talk about Struts along the way,

for example).

So, what do people recommend? What books have you found most useful in 
that context? From the sample chapters on line it seems like Struts in 
Action may be a good choice but I don't know how up-to-date it is.

Suggestions appreciated :)

L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Session Time Out

2004-03-31 Thread MOHAN RADHAKRISHNAN
HI
 We are not finding it that easy. It could expire anywhere after the
filter.

Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 1:39 PM
To: [EMAIL PROTECTED]
Subject: SV: Session Time Out


Hi

Use a servletfilter to trap when a new session is created, and do what
ever you want to there.

Hermod


-Opprinnelig melding-
Fra: Adam Hardy [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 09:56
Til: Struts Users Mailing List
Emne: Re: Session Time Out


Hi Kumar,
struts will create the session. AFAIK there is no way to disable it in
struts.

Adam

On 03/30/2004 11:17 PM Kumar M wrote:
>
> I am setting the web application to time out in 60 mins. After that if

> the user sends a request from the expired browser session I was hoping

> to identify that state using "request.getSession(false) == null" in my

> Action Servlet.
>
> But I am noticing that "request.getSession(false)" is never null. When
I
> looked carefully at the other attributes on Session, I noticed that
the
> "isNew" attribute is set to true. According to the API,
>
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSer
vletRequest.html#getSession(boolean),
> request.getSession(false)  should return null when there is no session

> in progress for that request. I am wondering if the web server creates
a
> session if there is not one associated with this request.
>
> Could some one confirm if this is true? I am using JDK 1.3 and
Weblogic 6.1
>
> Thanks!
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email.

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts boooks: remommendations?

2004-03-31 Thread Jesse Alexander (KAID 11)
second that...
other advantage: buy it for half the price as e-book. If you like it and
want it in real print: you can buy the printed book from mannigs at a lower
price ().
I first bought it in real print, and then afterwards added the ebook, to 
have it with me whenever I carry my laptop with me ;-)

Online doc is ok, but for a beginner Ted's book is better.

hth
Alexander

-Original Message-
From: Gardner, David [IT] [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 31. März 2004 08:20
To: Struts Users Mailing List
Subject: RE: Struts boooks: remommendations?


Struts in action by ted husted. Covers tiles and the validator quite
well to. Also the online doco for the project is pretty good. 


-Original Message-
From: Laurie Harper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 31 March 2004 4:10 PM
To: [EMAIL PROTECTED]
Subject: Struts boooks: remommendations?


I'm looking for a good book on Struts, but there seem to be a number of 
choices... Choice is all well and good, but i need some selection 
criteria :-) I'm looking for a book that has comprehensive coverage of 
Struts, is up-to-date, and which focuses on Struts (not a book on web 
application development that happens to talk about Struts along the way,

for example).

So, what do people recommend? What books have you found most useful in 
that context? From the sample chapters on line it seems like Struts in 
Action may be a good choice but I don't know how up-to-date it is.

Suggestions appreciated :)

L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: Problem with html:multibox not clearing

2004-03-31 Thread hermod . opstvedt
Hi

Have a reset() (Inherited from ActionForm) method in you form bean.

In it you set all Boolean/boolean variables to false/null. That way,
because a nonselected value is never submitted, when you get tne value
from the form bean, it is false/null

Hermod

-Opprinnelig melding-
Fra: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sendt: 30. mars 2004 22:06
Til: 'Struts Users Mailing List'
Emne: Problem with html:multibox not clearing


 I am using an html:multibox that is pretty much working fine except
when I
uncheck all choices. I am also using the logic:iterate tag to generate
many
checkboxes.  If I have a single box checked I can't seem to uncheck it
if
it's the last one.  If I have several checked, I can uncheck them one at
a
time and that works.  At least until I get down to just one checked.
Very
odd.  The problem seems to be that I can't get Struts to realize that
there
are no checkboxes checked after I submit the form.

I am using struts 1.1, with DynaValidatorForm's.  Here's some of my
code:

...



...





  



Don't think the above is the issue.  It's something deeper I think.

Any help is appreciated.

Jim Kennedy
IT Consultant



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: Session Time Out

2004-03-31 Thread hermod . opstvedt
Hi

Use a servletfilter to trap when a new session is created, and do what
ever you want to there.

Hermod


-Opprinnelig melding-
Fra: Adam Hardy [mailto:[EMAIL PROTECTED]
Sendt: 31. mars 2004 09:56
Til: Struts Users Mailing List
Emne: Re: Session Time Out


Hi Kumar,
struts will create the session. AFAIK there is no way to disable it in 
struts.

Adam

On 03/30/2004 11:17 PM Kumar M wrote:
> 
> I am setting the web application to time out in 60 mins. After that if

> the user sends a request from the expired browser session I was hoping

> to identify that state using "request.getSession(false) == null" in my

> Action Servlet.
> 
> But I am noticing that "request.getSession(false)" is never null. When
I 
> looked carefully at the other attributes on Session, I noticed that
the 
> "isNew" attribute is set to true. According to the API, 
>
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSer
vletRequest.html#getSession(boolean), 
> request.getSession(false)  should return null when there is no session

> in progress for that request. I am wondering if the web server creates
a 
> session if there is not one associated with this request.
> 
> Could some one confirm if this is true? I am using JDK 1.3 and
Weblogic 6.1
> 
> Thanks!
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



R:struts-faces

2004-03-31 Thread Manganotti Francesco \(USI\)
when will the integration library (struts-faces) be released? more or less.

cheers,
F.

Questo messaggio di posta elettronica contiene informazioni di carattere confidenziale 
rivolte esclusivamente al destinatario sopra indicato.
E' vietato l'uso, la diffusione, distribuzione o riproduzione da parte di ogni altra 
persona. Nel caso aveste ricevuto questo messaggio di posta elettronica per errore, 
siete pregati di segnalarlo immediatamente al mittente e distruggere quanto ricevuto 
(compresi i file allegati) senza farne copia.
Qualsivoglia utilizzo non autorizzato del contenuto di questo messaggio costituisce 
violazione dell'obbligo di non prendere cognizione della corrispondenza tra altri 
soggetti, salvo più grave illecito, ed espone il responsabile alle relative 
conseguenze.

Confidentially notice. This e-mail transmission may contain legally privileged and/or 
confidential information. Please do not read it if you are not the intended 
recipient(S).
Any use, distribution, reproduction or disclosure by any other person is strictly 
prohibited.
If you have received this e-mail in error, please notify the sender and destroy the 
original transmission and its attachments without reading or saving it in any manner.