You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chaudhary, Harsh" <HC...@amfam.com> on 2007/03/13 17:45:24 UTC
Validation framework question
I am having an arguement with a co-worker here and here is how it goes.
We have a JSP which has about 100 input fields. These fields have custom
validators on them. When we try to run the JSP, it throws an exception
something to the tune of "Maximum try/catch size reached" or something
like that. He says that this is because of the validations and when we
remove the validations, everything is fine.
I say that the validation framework has absolutely nothing to do with
the JSP's. It deals with the struts forms exclusively. So, the exception
could not have been because of the validators. He says that when the JSP
is compiled to a servlet, all the validation code is added to the
compiled version of the JSP, something I do not agree with.
Any inputs?
Thanks,
Harsh.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework question
Posted by Mike Baroukh <mb...@cardiweb.com>.
for Websphere, in a subdirectory of AppServer/temp/ you should find
_*java or, at least _*class if it doesn't keep generated files.
There is a checkbox to check on the console to keep generated files but
I never remember where ...
(I hate WebSphere !).
If you use the integrated instance of WebSphere in WSAD, I think there
is a subfolder in eclipse/.plugins that is used for this ...
try again to search for "_*class" ....
google with websphere keepgenerated returns a lot of results
(or WSAD keepgenerated ...)
Mike
Chaudhary, Harsh a écrit :
> I tried to do that but I could not find where my IDE stores those files. I am using WSAD 5.1.1 with WebSphere. Any suggestions would be appreciated.
>
> Harsh.
>
> -----Original Message-----
> From: Mike Baroukh [mailto:mbaroukh@cardiweb.com]
> Sent: Tuesday, March 13, 2007 11:56 AM
> To: Struts Users Mailing List
> Subject: Re: Validation framework question
>
>
>
> then, you may try to look at the compiled jsp ?
>
>
> Chaudhary, Harsh a écrit :
>
>> I know that the exception "Maximum try/catch size reached" has something to do with the compiler but what I would likt to know is that whether or not any validation code is added to the compiled JSP file itself.
>>
>> Harsh.
>>
>> -----Original Message-----
>> From: Mike Baroukh [mailto:mbaroukh@cardiweb.com]
>> Sent: Tuesday, March 13, 2007 11:51 AM
>> To: Struts Users Mailing List
>> Subject: Re: Validation framework question
>>
>>
>>
>> Hi.
>>
>> This is only a problem with javac and depending on wich java version you
>> use.
>> jdk5 should not have the problem.
>> You may also try to use jikes for compiler.
>>
>> There may be or may be no code added for the validation.
>> But this is not the problem ...
>>
>> Mike
>>
>> Chaudhary, Harsh a écrit :
>>
>>
>>> I am having an arguement with a co-worker here and here is how it goes.
>>>
>>> We have a JSP which has about 100 input fields. These fields have custom
>>> validators on them. When we try to run the JSP, it throws an exception
>>> something to the tune of "Maximum try/catch size reached" or something
>>> like that. He says that this is because of the validations and when we
>>> remove the validations, everything is fine.
>>>
>>> I say that the validation framework has absolutely nothing to do with
>>> the JSP's. It deals with the struts forms exclusively. So, the exception
>>> could not have been because of the validators. He says that when the JSP
>>> is compiled to a servlet, all the validation code is added to the
>>> compiled version of the JSP, something I do not agree with.
>>>
>>> Any inputs?
>>>
>>> Thanks,
>>> Harsh.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>>
>>
>>
>
>
>
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---
RE: Validation framework question
Posted by "Chaudhary, Harsh" <HC...@amfam.com>.
I tried to do that but I could not find where my IDE stores those files. I am using WSAD 5.1.1 with WebSphere. Any suggestions would be appreciated.
Harsh.
-----Original Message-----
From: Mike Baroukh [mailto:mbaroukh@cardiweb.com]
Sent: Tuesday, March 13, 2007 11:56 AM
To: Struts Users Mailing List
Subject: Re: Validation framework question
then, you may try to look at the compiled jsp ?
Chaudhary, Harsh a écrit :
> I know that the exception "Maximum try/catch size reached" has something to do with the compiler but what I would likt to know is that whether or not any validation code is added to the compiled JSP file itself.
>
> Harsh.
>
> -----Original Message-----
> From: Mike Baroukh [mailto:mbaroukh@cardiweb.com]
> Sent: Tuesday, March 13, 2007 11:51 AM
> To: Struts Users Mailing List
> Subject: Re: Validation framework question
>
>
>
> Hi.
>
> This is only a problem with javac and depending on wich java version you
> use.
> jdk5 should not have the problem.
> You may also try to use jikes for compiler.
>
> There may be or may be no code added for the validation.
> But this is not the problem ...
>
> Mike
>
> Chaudhary, Harsh a écrit :
>
>> I am having an arguement with a co-worker here and here is how it goes.
>>
>> We have a JSP which has about 100 input fields. These fields have custom
>> validators on them. When we try to run the JSP, it throws an exception
>> something to the tune of "Maximum try/catch size reached" or something
>> like that. He says that this is because of the validations and when we
>> remove the validations, everything is fine.
>>
>> I say that the validation framework has absolutely nothing to do with
>> the JSP's. It deals with the struts forms exclusively. So, the exception
>> could not have been because of the validators. He says that when the JSP
>> is compiled to a servlet, all the validation code is added to the
>> compiled version of the JSP, something I do not agree with.
>>
>> Any inputs?
>>
>> Thanks,
>> Harsh.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
>
>
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework question
Posted by Mike Baroukh <mb...@cardiweb.com>.
then, you may try to look at the compiled jsp ?
Chaudhary, Harsh a écrit :
> I know that the exception "Maximum try/catch size reached" has something to do with the compiler but what I would likt to know is that whether or not any validation code is added to the compiled JSP file itself.
>
> Harsh.
>
> -----Original Message-----
> From: Mike Baroukh [mailto:mbaroukh@cardiweb.com]
> Sent: Tuesday, March 13, 2007 11:51 AM
> To: Struts Users Mailing List
> Subject: Re: Validation framework question
>
>
>
> Hi.
>
> This is only a problem with javac and depending on wich java version you
> use.
> jdk5 should not have the problem.
> You may also try to use jikes for compiler.
>
> There may be or may be no code added for the validation.
> But this is not the problem ...
>
> Mike
>
> Chaudhary, Harsh a écrit :
>
>> I am having an arguement with a co-worker here and here is how it goes.
>>
>> We have a JSP which has about 100 input fields. These fields have custom
>> validators on them. When we try to run the JSP, it throws an exception
>> something to the tune of "Maximum try/catch size reached" or something
>> like that. He says that this is because of the validations and when we
>> remove the validations, everything is fine.
>>
>> I say that the validation framework has absolutely nothing to do with
>> the JSP's. It deals with the struts forms exclusively. So, the exception
>> could not have been because of the validators. He says that when the JSP
>> is compiled to a servlet, all the validation code is added to the
>> compiled version of the JSP, something I do not agree with.
>>
>> Any inputs?
>>
>> Thanks,
>> Harsh.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
>
>
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---
RE: Validation framework question
Posted by "Chaudhary, Harsh" <HC...@amfam.com>.
I know that the exception "Maximum try/catch size reached" has something to do with the compiler but what I would likt to know is that whether or not any validation code is added to the compiled JSP file itself.
Harsh.
-----Original Message-----
From: Mike Baroukh [mailto:mbaroukh@cardiweb.com]
Sent: Tuesday, March 13, 2007 11:51 AM
To: Struts Users Mailing List
Subject: Re: Validation framework question
Hi.
This is only a problem with javac and depending on wich java version you
use.
jdk5 should not have the problem.
You may also try to use jikes for compiler.
There may be or may be no code added for the validation.
But this is not the problem ...
Mike
Chaudhary, Harsh a écrit :
> I am having an arguement with a co-worker here and here is how it goes.
>
> We have a JSP which has about 100 input fields. These fields have custom
> validators on them. When we try to run the JSP, it throws an exception
> something to the tune of "Maximum try/catch size reached" or something
> like that. He says that this is because of the validations and when we
> remove the validations, everything is fine.
>
> I say that the validation framework has absolutely nothing to do with
> the JSP's. It deals with the struts forms exclusively. So, the exception
> could not have been because of the validators. He says that when the JSP
> is compiled to a servlet, all the validation code is added to the
> compiled version of the JSP, something I do not agree with.
>
> Any inputs?
>
> Thanks,
> Harsh.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework question
Posted by Mike Baroukh <mb...@cardiweb.com>.
>Did 1.5+ remove the 64K limitation?
I'm not absolutly sure, but think.
I read this once and it's been a long time since I didn't saw this
exception ...
Mike
Dave Newton a écrit :
> --- Mike Baroukh <mb...@cardiweb.com> wrote:
>
>> jdk5 should not have the problem.
>>
>
> Did 1.5+ remove the 64K limitation?
>
>
>> There may be or may be no code added for the
>> validation. But this is not the problem ...
>>
>
> Technically, no, but it's the gating issue in this
> case.
>
> Try breaking up the JSP into dynamic includes (which
> will be easier to manage anyway, because 100 fields on
> a form is *way* too many, and must make
> editing/modifying a nightmare).
>
> d.
>
>
>
>
> ____________________________________________________________________________________
> Now that's room service! Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---
Re: Validation framework question
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave,
Dave Newton wrote:
> --- Christopher Schultz wrote:
>> I wrote:
>>> Try breaking up the JSP into dynamic includes
>> This might not help, depending in which type of
>> include you use. Static includes, for example, [...]
>
> ...
Heh. Missed "dynamic". Sorry 'bout that.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF9t3M9CaO5/Lv0PARAsrHAKCoeSdUyv4cH4wjTH7nmX16NPjXogCdEQ76
fc9Lms259ldMHMRCUPSpeWk=
=ZHid
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework question
Posted by Dave Newton <ne...@yahoo.com>.
--- Christopher Schultz wrote:
> I wrote:
>> Try breaking up the JSP into dynamic includes
> This might not help, depending in which type of
> include you use. Static includes, for example, [...]
...
d.
____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework question
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave,
Dave Newton wrote:
> --- Mike Baroukh <mb...@cardiweb.com> wrote:
>> jdk5 should not have the problem.
>
> Did 1.5+ remove the 64K limitation?
The 64k is a limit for method bodies, not try/catch. It should still be
very much in force:
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#88659
I must admit that I've never heard of this "try/catch too big" problem
before.
Since the "code" and "exceptions" attributes of a method in a Java
.class file have the same limitations (64k), and the compiler checks the
try/catch limits before the code limits, then they really are the same
thing.
In either case, those limits are still in force (i.e. you cann't exceed
64k of code, try/catch or not).
This is one of those irritating issues that breaks down the facade that
JSP operates behind. JSP authors shouldn't have to worry about the
limitations of Java when authoring their pages, but they do :(
>> There may be or may be no code added for the validation. But this
>> is not the problem ...
>
> Technically, no, but it's the gating issue in this case.
>
> Try breaking up the JSP into dynamic includes (which will be easier
> to manage anyway, because 100 fields on a form is *way* too many, and
> must make editing/modifying a nightmare).
This might not help, depending in which type of include you use. Static
includes, for example, will just import the code from the included JSP,
solving nothing.
Simplifying the page is definitely a good idea, though. If you use a lot
of taglibs (such as emitting 100 form fields using Struts tags), you'll
get a lot of generated code, causing you to run out of space.
The validation is not the problem, though. If you removed validation
entirely, you'd still get this error.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF9twQ9CaO5/Lv0PARAgX3AJ9CJTPbkAF7nQ5EJQ5bTjiGUPmtAACggJ+H
OvylAQkRLgU70hRGJUzcpXo=
=rObM
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework question
Posted by Dave Newton <ne...@yahoo.com>.
--- Mike Baroukh <mb...@cardiweb.com> wrote:
> jdk5 should not have the problem.
Did 1.5+ remove the 64K limitation?
> There may be or may be no code added for the
> validation. But this is not the problem ...
Technically, no, but it's the gating issue in this
case.
Try breaking up the JSP into dynamic includes (which
will be easier to manage anyway, because 100 fields on
a form is *way* too many, and must make
editing/modifying a nightmare).
d.
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework question
Posted by Mike Baroukh <mb...@cardiweb.com>.
Hi.
This is only a problem with javac and depending on wich java version you
use.
jdk5 should not have the problem.
You may also try to use jikes for compiler.
There may be or may be no code added for the validation.
But this is not the problem ...
Mike
Chaudhary, Harsh a écrit :
> I am having an arguement with a co-worker here and here is how it goes.
>
> We have a JSP which has about 100 input fields. These fields have custom
> validators on them. When we try to run the JSP, it throws an exception
> something to the tune of "Maximum try/catch size reached" or something
> like that. He says that this is because of the validations and when we
> remove the validations, everything is fine.
>
> I say that the validation framework has absolutely nothing to do with
> the JSP's. It deals with the struts forms exclusively. So, the exception
> could not have been because of the validators. He says that when the JSP
> is compiled to a servlet, all the validation code is added to the
> compiled version of the JSP, something I do not agree with.
>
> Any inputs?
>
> Thanks,
> Harsh.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---