RE: [OT] RE: JSTL ot struts taglibs?

2003-08-14 Thread Bailey, Shane C.

It is nice to follow the heard sometimes but other times you just have to
step back and say, "Can't we do any better?".  I am not THAT closed minded
if I am convinced that the only real way to write tags to do what JSTL does
is to do it the current way then I will gladly use them I just think if
there is a better way then we should be about to talk about it.

The Big 3 car execs didn't want to talk about the future of the industry and
what was more user friendly and now look how they are paying.

I'm not mad.  Just not convinced.

BTW, how could you eat those poor defenseless bunnies

:)

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 12:07 PM
To: 'Struts Users Mailing List'
Subject: [OT] RE: JSTL ot struts taglibs?

Everyone take a deep breath and think of bunny rabbits.
Cute little bunnies

()()
('.')
(")(")

Hmm.. I'm getting hungry now.

-Tim


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 11:50 AM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?




Another debate.  Your debate was to make me feel like I was doing something
wrong by posting my opinion.  There was no debate.

The tags do speak for themselves and if you think that $var which Java
allows but is NEVER used is acceptable syntax for a tag then that speaks
volumes as well.

Never said, "JSF will replace JSTL".  I just said let's see what that
technology and others has in store in the near future.  Java didn't have
every API and package when it first came out so, like I said, we will see
what JSF has to offer in the near future.  I'm just hoping it is some
replacement for those step backwards tags.


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 11:51 AM
To: Struts Users Mailing List
Subject: RE: JSTL ot struts taglibs?

--- "Bailey, Shane C." <[EMAIL PROTECTED]> wrote:
> 
> Don't get me wrong, I think scriptlets are ugly and shouldn't be used
> but
> like I said JSTL is not da bomb and if already know Struts tags I
> wouldn't
> go rewriting my code to JSTL until I have seen what JSF and any new
> technology near by has in store.

JSF is not a replacement for JSTL.  They complement each other.

> 
> I'm just saying all the reasons listed do not necessarily mean a whole
> lot
> since scriptlets can fit nearly everything said about JSTL but yet
> everybody
> agrees not to use scriptlets.  I am just giving another opinion.

The question had nothing to do with scriptlets.  It was about using JSTL
or Struts tags.  I'm not going to participate in another JSTL debate.  The
tags speak for themselves.

David


> 
> 
> 
> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 11:21 AM
> To: 'Struts Users Mailing List'
> Subject: RE: JSTL ot struts taglibs?
> 
> 
> Scriptlets are more powerful (you can do ANYTHING Java can do), faster,
> is a
> standard (it is the Java language you know) and if you are going to
> spend
> time learning a new language (${var} == "pooPoo") then you would be
> better
> off learning Java (assuming you don't already know it) cause then you
> could
> do scriptlets and middle tier coding and more whereas if you use your
> time
> learning JSTL all you will know is JSTL.  
> 
> Believe me, JSTL will be easy to replace if someone comes out with an
> alternative.  I am a programmer but I understand the importance of
> having
> the tags be similar to HTML tags and not like tags containing
> scriptlets.
> 
> If it makes you happy $var is a legal Java variable name so you could
> just
> write scriptlets with $var and no one would realize you weren't writing
> JSTL
> 
> 
> :)
> 
> Why do you think Ant is so popular??? It got rid of all the $var UNIX
> script
> like crap and made it more like tags should be!!!
> 
> Bottom line is, yes, Struts tags aren't the best but JSTL is not much
> better
> and will probably be replaced with something not so ugly in the future.
> 
> 
> Just my .02 sense.
> 
> I like it how some people don't get disturbed by questions about
> connecting
> to a database with JDBC to the Struts user list but get mad if you post
> a
> differing opinion about the crappy way some tags were written that
> interfaces with Struts code.  What an ACE!
> 
> 
> 
> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 10:28 AM
> To: Struts Users Mailing List
> Subject: Re: JSTL ot struts taglibs?
> 
> --- David Thielen &

RE: JSTL ot struts taglibs?

2003-08-14 Thread Bailey, Shane C.

Before I get bashed again, I meant JSTL is replacing the use of the
traditional JSP tags before all the  came out.  I haven't seen one
of those tags in ages.   

Maybe it will still be called JSTL but maybe their will be nicer replacement
tags for some of the ugly logic ones.  Maybe that is the solution.


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 4:20 PM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?


But, what I really meant about JSTL being replaced was in popularity.

JSP tags are being replaced (in popularity) with Struts tags, your JSTL, and
alike.


-Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 4:02 PM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?



-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 3:45 PM
To: Struts Users Mailing List
Subject: Re: JSTL ot struts taglibs?



Bailey, Shane C. wrote:

[Snip]
Why should build files be composed of tags at all?  I think Ant is great 
too (a lot better than make), but does the fact that it is tag-based 
have anything to do with it?  No.  The reason that the original author 
went with XML for the structure of Ant build files had nothing to do 
with tags -- it had to do with hierarchy.  See <http://tinyurl.com/jg0d> 
to read his thoughts on the matter (sorry for the cachelink but I can't 
find the official permalink).
[/Snip]

I don't know why a build file should be composed of tags either.  My point
was that Ant is nicer and more recently popular than make and the developer
could have thought, "You know, most people that will be using Any will
probably know make so I am going to throw a bunch of "==" in there and that
would be fine.  Ant has more of an excuse to have "==" in the darn thing
than a View (geared toward UI and graphic artist specialist) tag set does.
And the Ant developer must have seen the light. (All my opinion, of course).

[Snip]
Faster?  Given a programmer with equal knowledge of scriptlets and JSTL, 
scriptlets are definitely not faster for development.  Since when are 
they faster for performance?  Plus they tend to be difficult to read -- 
and I say this as a former PHP programmer.
[/Snip]

If they aren't faster in performance then something is wrong.  All the JSP
rendering practically has to do is put the code as is into the Servlet which
is a Java class.  No interpretation.  I haven't looked at the source but I
am sure the optimization for rendering code for Scriptlets vs JSTL has to be
there.  I know more Java programmers that could get a JSP page drawn if you
simple told them <% ... %> for multiple code segments and do <%= ... %> to
return an expression given all they knew was Java and no Web stuff
(including JSTL at all).

[Snip]
Okay, first of all, JSTL is a JCP specification (JSR-52, for more info 
see <http://jcp.org/aboutJava/communityprocess/final/jsr052/>).  It's 
not just some 3rd-party library that is going to be "replaced" any time 
soon.  Second of all, it is actually a part of the JSP 2.0 specification 
(just as scriptlets are part of an earlier JSP specification).  While 
scriptlets are still supported in JSP 2.0, it is clear that Sun and the 
JCP are trying to provide alternatives to scriptlets and at some point 
they might even be deprecated.
[/Snip]

Nothing is impossible.  I remember being devastated after getting pretty
efficient with AWT and then the model changed and then Swing came out. And
you even mention how scriptlets WERE part of the spec and are now close to
deprecation.  So what is so ridiculous about my statement???

[Snip]
So sorry, but I had to ask - what the crap were you talking about.
[/Snip]

No problem.



-
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: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.


I understand all that but as Sun is more like Microsoft than given credit
(at least with Java).  IE incorporated JavaScript because it had to even
though NS invented it based on Sun's language (neither Microsoft's friend).
Not that Struts is JSF's foe but I think for the meantime it is good to have
them play well together until Sun decides how they want to complete the
whole framework from A-Z and anything you can do in Struts you will be able
to do with JSF and so will be promoted that way (at least by Sun of course).

Java (to Sun) is like Windows (to Microsoft):  The browser is part of the
OS. In the same vain it will come down to this: JSF is part of Java so
therefore that is what you should use (as your one and only framework). Can
you imagine MS saying, no, use NS in concert with IE?  
 
My point is that Sun has added to the core or extensions of Java everything
but the kitchen sink.  C++ has been around longer and maybe it is my lack of
knowledge but I think Sun's Java (it's younger years) has more APIs to
develop in more genres than C or C++.  Java is destined to be everything to
everybody.  No one over there will be happy with JSF being used in part. 

Sun has to compete with .NET.  If .NET offers everything for EE development
then so does Sun's Java and they can't risk that people will just know to
use Struts along with JSF they want to say here is the whole thing, the only
thing you need to compete with .NET, come and get it at Sun.com!

That is just my opinion, of course.

But I guess you are right that if the Struts controller framework is better
and plays well with JSF that, even if Sun promotes JSF as a 100% solution,
it doesn't mean developers will do exactly that.  You do know more about the
near future but I am just trying to look a little farther beyond.

It is almost like you are saying it yourself that in order for Struts to be
used in concert with JSF there needs to be some changes (new features you
are going to add to Struts).  Unless you are saying that Sun is going to
package JSF so that it contains code from the Jakarta project and so stated.
Then I can see Struts hanging around as Mozilla is the base for browser
development then Struts will be the code base for some JSF releases.

BTW, I did not know you worked for Sun:
http://java.sun.com/j2ee/javaserverfaces/
so you know how Sun works.  Where am I going wrong?



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 2:22 PM
To: Struts Users Mailing List
Subject: Re: [OT] Interesting JSF info

On Mon, 11 Aug 2003, Bailey, Shane C. wrote:

> Date: Mon, 11 Aug 2003 13:24:53 -0400
> From: "Bailey, Shane C." <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [OT] Interesting JSF info
>
>
>
> Start here:
>
> http://java.sun.com/webservices/docs/1.2/tutorial/doc/IntroIWA6.html
> <http://java.sun.com/webservices/docs/1.2/tutorial/doc/IntroIWA6.html>
>
> hit the TUTORIAL'S back button.  Read the last paragraph.
>
>
>
> HeHe.
>
> It sure sounds like JSF is here to conquer not to co-exist.
>
>  :-)
>
>

Since I wrote Struts in the first place, and am co-spec-lead of JSR-127
(JavaServer Faces), perhaps my opinion on this topic might be of some
interest?  :-).  It's certainly been of interest in LOTS of mail threads
on this list over the last year or so -- see the mail archives for
details.  I also presented a session ("Beyond Struts") at O'Reilly Open
Source 2003 in July, and the slides are available here:

  http://www.apache.org/~craigmcc/

Basically, you can use Struts and JavaServer Faces together already:

  http://jakarta.apache.org/builds/jakarta-struts/release/struts-faces/

and this library will be updated as the JavaServer Faces spec is changed
on the path towards a final 1.0 release.  My personal plan will be to do
two things as soon as JavaServer Faces goes final.

* Migrate my existing Struts based apps to using JavaServer Faces
  component tags, instead of Struts HTML tags, to take advantage
  of their additional functionality.  Fortunately, this can be
  done with basically zero changes to the form beans and actions.

* Focus my efforts on adding new features to Struts towards the
  core controller framework, rather than extending the existing
  HTML tags.  That's where the value of Struts really comes from,
  in my opinion -- the HTML tag library was always a means toward
  an end, not the core benefit of the framework.

Craig McClanahan


-
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: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.

I meant the, "Java is destined to be everything to everybody" more as in
Sun's mind.  Don't forget, "The network is the computer"!



-Original Message-
From: Reinhard [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 4:30 PM
To: Struts Users Mailing List
Subject: Re: [OT] Interesting JSF info

> Java (to Sun) is like Windows (to Microsoft):  The browser is part of the
> OS. In the same vain it will come down to this: JSF is part of Java so
> therefore that is what you should use (as your one and only framework).
Can
> you imagine MS saying, no, use NS in concert with IE?

I believe, you're right!

When I first get in contact with JSF - I thought: Hell, let me never have to

use that.
But I fear, Sun is to powerful on that item.

> Java is destined to be everything to everybody.  

I believe, that point will never fullfill. Same with .NET 
Nor Java, nor .NET is good for anything and better than everything. Not for 
the language and not for the environment. But, ... both companies are
telling 
us just this, but each item has it's (different) focus.

I hope, that apache and their comunity could play a third role and keep on 
inventing goodies like struts or ojb.

cheers Reinhard 

-
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 1.1 question

2003-08-14 Thread Bailey, Shane C.

Something as simple as the security gains of going through a single servlet
or code duplication that you can get rid of because in every JSP you set
some request attribute or something and now you can extend the ActionServlet
or alike and add that in one place and if it changes it is much easier to
change it in that one place.

Or you can have your actions detect that the device accessing this action is
a carFishBicycle device (yet to be invented) so it forwards to the page that
the carFishBicycle can interpret instead of a JSP.

I think you are on the edge of the forest and you aren't scared but if you
were in the middle of the forest and night started falling...  You'd start
fronting those darn JSPs 

:-)


-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 5:19 PM
To: [EMAIL PROTECTED]
Subject: RE: struts 1.1 question

This, of course, assumes that all pages require the functionality of 
forwards and actions and lions and tigers and bears.

don't lose sight of the forest for the trees.


From: "Bailey, Shane C." <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: struts 1.1 question
Date: Mon, 11 Aug 2003 17:02:13 -0400



A good starting point for all you antidisestablishmentarianist that don't
want to front your JSPs might be the use of the ForwardAction and
global-forwards.  That just forwards to a view page without writing a new
class.  This way, when you are ready to do the right thing, you can change
some of those ForwardActions and possibly global-forwards to real Actions.

Just a thought.

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

_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
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: application.properties question

2003-08-14 Thread Bailey, Shane C.


They are suggested strings.  For instance if you don't have the error
prefix, suffix, header and footer specified then you won't get an exception
thrown or anything you just won't get anything printed.  You can change the
value if you don't like the error display formatting.

In general, I haven't seen the Validator blow up if a message didn't exist
(it just prints blank).  If you use tags that reference messages that don't
exist I think you get an exception thrown on the page.

As far as other languages go, I would say do a find in the Struts directory
for *.properties and see.  I don't have specs to implement
internationalization.

What do you call someone who knows 3 languages?
Trilingual.

What do you call someone who knows 2 languages?
Bilingual.

What do you call someone who knows 1 language?
An American.

:)



-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 1:11 PM
To: Struts-Users
Subject: application.properties question

Hi;

The application.properties file that comes with the blank struts sample has
a bunch of strings already in it. Are these strings needed by struts or are
they just suggested strings for sample errors I might have in my pages?

Also, are these sample files available in languages other than english? And
if so, where do I get them?

thanks - dave

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



RE: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.

I'm confused at what you are saying.  I am not using EJB on this project,
anyway.



-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 1:42 PM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Interesting JSF info

If you decide for http://www.jsfcentral.com/#EJB,
I assume you would also use Portlet API (JCP 168) and not tiles.

.V

Bailey, Shane C. wrote:
> But if Tiles is separate from Struts (plug-in and not built-in) I wonder
if
> you will be able to plug Tiles into JSF.
> 
> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 11, 2003 8:50 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] Interesting JSF info
> 
> --- Jeff Caddel <[EMAIL PROTECTED]> wrote:
> 
>>>My personal plan will be to do two things as soon as JavaServer Faces
>>
>>goes final.
>>
>>>* Migrate my existing Struts based apps to using JavaServer Faces
>>> component tags, instead of Struts HTML tags, to take advantage
>>> of their additional functionality.  Fortunately, this can be
>>> done with basically zero changes to the form beans and actions.
>>>
>>
>>Once JSF is released, will Tiles be considered a phased out technology 
>>similar to how JSTL and Struts-EL replaced the Struts Tag Libraries?
> 
> 
> AFAIK, JSF doesn't provide templating abilities similar to Tiles.
> 
> David
> 
> 
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> -
> 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: [OT] How can Java compete?

2003-08-14 Thread Bailey, Shane C.


Voice recognition software is sure sounding good at this point.



-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 11:57 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] How can Java compete?

Do you really want to use the same keyboard/mouse as someone that had just
used the 'loo'.
-Tim

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 11:55 AM
To: 'Struts Users Mailing List'
Subject: [OT] How can Java compete?


Going where no application has gone before

http://msn.com.com/2100-1103_2-999509.html



-
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: fail getDataSource(request)

2003-08-14 Thread Bailey, Shane C.



Use data-sources.xml instead.   Just a suggestion.
If I remember right, there has been talk that future Struts releases won't
support datasources anyway.

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


On Wednesday, August 13, 2003, at 01:50 PM, Jiri Chaloupka wrote:

> Is it so simply you do not want to help or nobody knows? ...
>
> Jiri Chaloupka wrote:
>
>> Hallo,
>> I cannot get DataSource in Struts.
>>
>> in my strits-config.xml file is configured:
>> 
>>>  property="driverClassName"
>>  value="oracle.jdbc.driver.OracleDriver" />
>>>  property="url"
>>  value="jdbc:oracle:thin:@chaloupkaj.iccc.cz:1521:ordb" />
>>>  property="username"
>>  value="xxx" />
>>>  property="password"
>>  value="xxx" />
>>>  property="maxActive"
>>  value="10" />
>>>  property="maxWait"
>>  value="5000" />
>>>  property="defaultAutoCommit"
>>  value="false" />
>>>  property="defaultReadOnly"
>>  value="false" />
>>   
>>
>> and in my code:
>> public class TestList extends Action{
>>HttpServletRequest request = null;
>> ...
>> public int getList() throws Exception
>>{
>> DataSource ds = null;
>>  
>>  try{
>>try{
>>// try request object
>>res.append("URI is "+request.getContextPath()+"");
>>}catch(Exception e){
>>res.append("something wrong with request!!! ");
>>}
>>try{
>>  ds = this.getDataSource(request);
>>res.append("datasource ok ");
>>}catch(Exception e){
>>res.append("cannot get datasource!!! ");
>>res.append("Fail: "+e.toString());
>>}
>>
>> etc...
>>
>> and displays:
>> URI is /blabla
>> cannot get datasource!!!
>> Fail. : java.lang.NullPointerException
>>
>> Is there anything else I must configure, or I badly undestand 
>> something else?
>> Or is there another way to do it better? I am new in Struts, reading 
>> manual,  I was order some book (Programming Struts) but this book 
>> does not deliveder yet...
>> I cannot use Hibernate for this project becouse data into database 
>> will be writen by another way and as I understand hibernate layer 
>> should not know about its changes.
>>
>> Thanks
>> Jiri
>>
>>
>> -
>> 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: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.

But if Tiles is separate from Struts (plug-in and not built-in) I wonder if
you will be able to plug Tiles into JSF.


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 8:50 PM
To: Struts Users Mailing List
Subject: Re: [OT] Interesting JSF info

--- Jeff Caddel <[EMAIL PROTECTED]> wrote:
> 
> >My personal plan will be to do two things as soon as JavaServer Faces
> goes final.
> >
> >* Migrate my existing Struts based apps to using JavaServer Faces
> >  component tags, instead of Struts HTML tags, to take advantage
> >  of their additional functionality.  Fortunately, this can be
> >  done with basically zero changes to the form beans and actions.
> >
> 
> Once JSF is released, will Tiles be considered a phased out technology 
> similar to how JSTL and Struts-EL replaced the Struts Tag Libraries?

AFAIK, JSF doesn't provide templating abilities similar to Tiles.

David

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.

Dude, where have you been.  What you have said has already been posted.
But, you also have to remember that the JCP members are going to want their
product (their name is associated with) to be as complete and strong as .NET
so I still think that JSF will have everything Struts does within a year or
so.  Which can be an eternity, I do realize.  I am not saying Struts is done
right now.  I just think it is going to be like do I choose the Camaro or
the Firebird (two things that are that closely related in what they offer),
though, Struts and JSF won't come off the same assembly line (in Canada and
this won't be the last year of production, but other than that... :) .


-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 4:53 PM
To: Struts Users Mailing List
Subject: RE: [OT] Interesting JSF info

You talk as if Sun were in sole control of the destiny of JSF and of Struts.
The truth is that Sun in in control of neither.

JSF is being developed under the the Java Community Process and the expert
group comprises a wide cross section of companies and individuals. You can
see for yourself: http://jcp.org/en/jsr/detail?id=127

>From the JCP home page:
"The Java Community Process is the way the Java platform evolves. Its an
open organization of international Java developers and licensees whose
charter is to develop and revise Java technology specifications, reference
implementations, and technology compatibility kits. Both Java technology and
the JCP were originally created by Sun Microsystems, however, the JCP has
evolved from the informal process that Sun used beginning in 1995, to a
formalized process overseen by representatives from many organizations
across the Java community."

That doesn't sound very like Microsoft at all. (Microsoft also aren't known
for giving away the fruits of their labour or committing development
resources to open source projects.)

Also, don't forget that JSF is a *specification*, not a product. As far as
I'm aware, vendors (in the loose sense, including Apache) will be free to
develop their own implementations.

With regard to Struts, as long as there is demand and support for Struts
from the user community then Struts will continue to exist and develop. Even
if JSF encompassed everything that Struts has to offer (Craig says it
doesn't and I'm apt to believe him) that would not kill Struts as long as
people still want an alternative.

The bottom line is that Struts will be what *we* need it to be and what *we*
make of it.

Steve

p.s. I don't work for Sun and I don't hate Microsoft :-)

> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> Sent: August 11, 2003 12:06 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [OT] Interesting JSF info
>
>
>
>
> I understand all that but as Sun is more like Microsoft than given credit
> (at least with Java).  IE incorporated JavaScript because it had to even
> though NS invented it based on Sun's language (neither
> Microsoft's friend).
> Not that Struts is JSF's foe but I think for the meantime it is
> good to have
> them play well together until Sun decides how they want to complete the
> whole framework from A-Z and anything you can do in Struts you
> will be able
> to do with JSF and so will be promoted that way (at least by Sun
> of course).
>
> Java (to Sun) is like Windows (to Microsoft):  The browser is part of the
> OS. In the same vain it will come down to this: JSF is part of Java so
> therefore that is what you should use (as your one and only
> framework). Can
> you imagine MS saying, no, use NS in concert with IE?
>
> My point is that Sun has added to the core or extensions of Java
> everything
> but the kitchen sink.  C++ has been around longer and maybe it is
> my lack of
> knowledge but I think Sun's Java (it's younger years) has more APIs to
> develop in more genres than C or C++.  Java is destined to be
> everything to
> everybody.  No one over there will be happy with JSF being used in part.
>
> Sun has to compete with .NET.  If .NET offers everything for EE
> development
> then so does Sun's Java and they can't risk that people will just know to
> use Struts along with JSF they want to say here is the whole
> thing, the only
> thing you need to compete with .NET, come and get it at Sun.com!
>
> That is just my opinion, of course.
>
> But I guess you are right that if the Struts controller framework
> is better
> and plays well with JSF that, even if Sun promotes JSF as a 100% solution,
> it doesn't mean developers will do exactly that.  You do know
> more about the
> near future but I am just trying to look a little farther beyond.
>
> It is almost like you are saying it 

RE: application.properties file location

2003-08-14 Thread Bailey, Shane C.

IMO, struts config.  I didn't know you could do it in the web.xml, never had
to, works great in the struts config.


-Original Message-
From: Kommana, Sridhar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:58 PM
To: Struts Users Mailing List
Subject: RE: application.properties file location

what is the best place to specify application.properties file in either
web.xml or struts-config.xml ?

-
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: Mapping Struts controller servlet to webapp root: trouble

2003-08-14 Thread Bailey, Shane C.


I am in a hurry too much lately. Let me complete that sentence.  

If I remember correctly, from looking at the source code, Struts determines
what extension (or prefix) to add to the request by parsing the URL mapping
in the web.xml.  If /* is used I could see how it could screw things up.  



-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:04 AM
To: 'Struts Users Mailing List'
Subject: RE: Mapping Struts controller servlet to webapp root: trouble



If I remember correctly, from looking at the source code, Struts determines
what extension (or prefix) to add to the request. If /* is used I could see
how it could screw things up.  You don't want images and things like that
going through Struts anyway, I wouldn't think.

Why do you want to do /* (at least for Struts URL pattern)?


-Original Message-
From: Paul Yunusov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: Mapping Struts controller servlet to webapp root: trouble

I was wondering if anyone has heard of issues arising when the contoller is 
mapped to a webapp's root.

I am talking about this:


  action
  /*


where "action" is the Struts controller.

Struts seems to return a 400 error with such mapping when it tries to make a

forward from an Action instance saying that "the request was syntactically 
incorrect".

/struts/* or *.do are 
commong but I was wondering about the "/*" mapping. Anyone heard of any 
issues with this?
Thanks,

Paul


-
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]



Question for you Internationalization supporters

2003-08-14 Thread Bailey, Shane C.
 

I don't have a need right now to support Internationalization but if I do
need to it seems like I would have to do much more than just the field names
but whole page content must be done with message keys.  I mean, what is the
best way to support not just form field names with different languages using
the message keys but whole page content that is say just a long description
with no form on it.   Every paragraph must be in a message resource.

 

E.g.

 

You must be doing this (not exact but abbreviated to shorten):

 

file1.jsp:









 

 

as opposed to doing this:

 

file1_en.jsp:



Hello!

Here is the paragraph that welcomes you in English.



footer copyright 1999

 

where you would have to figure out how to display the correct file1_en.jsp
as opposed to file1_fr.jsp.

 

 

I guess the first way with EVERYTHING in a message resource is the only way
to go?  Just curious what the best way and any pit falls for supporting
internationalization even with all the built in locale stuff already in the
framework?

 

 



RE: application.properties file location

2003-08-14 Thread Bailey, Shane C.

>From what you are saying I think you should try:

 
in your struts config file.  Since you specifically say
"application.properties" as the name of your file.

For instance my file is also called "application.properties" as opposed to
"aApplicationResources.properties" or something.  But since mine in a
resources directory off of the classes directory I declare mine as:



So I am assuming struts takes the last name in the parameter as the file
name and anything before it as directory structure.



-Message d'origine-
De : Samanth Athrey <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : mercredi 13 août 2003 16:57
Objet : application.properties file location


>Hi,
>
>I have my application.properties file stored in the classes directory. But
>the application is unable to locate and load this file. Any tips would be
of
>great help.
>
>Thanks,
>Samanth Athrey
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


--
Ce message est protege par les regles relatives au secret des
correspondances ; il peut en outre contenir des informations a caractere
confidentiel ou protegees par differentes regles et notamment le secret des
affaires ; il est etabli a destination exclusive de son destinataire. Toute
divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de
ce message, ou des informations qu'il contient, doit etre prealablement
autorisee. 
Tout message electronique est susceptible d'alteration et son integrite ne
peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
message s'il a ete modifie ou falsifie. 
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur de l'erreur de distribution et de la
destruction du message.
This message is protected by the secrecy of correspondence rules ;
furthermore it may contain privileged or confidential information that is
protected by law, notably by the secrecy of business relations rule ; it is
intended solely for the attention of   the addressee . Any disclosure, use,
dissemination or reproduction (either whole or  partial) of this message or
the information contained herein is strictly prohibited without prior
consent.
Any electronic message  is susceptible to alteration  and  its integrity can
not be assured.  AGF declines any  responsibility for  this message in the
event of  alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and
notify the sender of the wrong delivery and the mail deletion. 
--


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



RE: Mapping Struts controller servlet to webapp root: trouble

2003-08-14 Thread Bailey, Shane C.


Do you want to add a filter which will look over every request prior to
Struts getting any requests?  That might be one possibility.

If you have never written a filter then one I know where you can get source
for is at securityfilter.sourceforge.net that one isn't doing necessarily
what you want but it is a (working with source) example.

- Original Message - 
From: "Paul Yunusov" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 13, 2003 11:51 AM
Subject: Re: Mapping Struts controller servlet to webapp root: trouble

> Thanks, I see how the way Struts parses URLs could confuse it. I want to
map
> Struts to the webapp's root because my webapp doesn't contain any static
> content and I want to limit all requests to Struts-defined actions.
>
> Can anyone confirm Struts does not support "/*" mapping for its controller
> servlet?
>
> Thank you,
>
> Paul
>
>
>
> >
> >
> > -Original Message-
> > From: Paul Yunusov [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 13, 2003 11:05 AM
> > To: [EMAIL PROTECTED]
> > Subject: Mapping Struts controller servlet to webapp root: trouble
> >
> > I was wondering if anyone has heard of issues arising when the contoller
is
> > mapped to a webapp's root.
> >
> > I am talking about this:
> >
> > 
> >   action
> >   /*
> > 
> >
> > where "action" is the Struts controller.
> >
> > Struts seems to return a 400 error with such mapping when it tries to
make
> > a
> >
> > forward from an Action instance saying that "the request was
syntactically
> > incorrect".
> >
> > /struts/* or *.do
are
> > commong but I was wondering about the "/*" mapping. Anyone heard of any
> > issues with this?
> > Thanks,
> >
> > Paul
> >
> >
> > -
> > 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]



RE: Struts Validator

2003-08-14 Thread Bailey, Shane C.


In the validation.xml file I believe that the validator takes

  as validate based on form name and
 as validate based on the action name.

Meaning that if the validator "sees" a formbean with the first examples name
it does validation and then if it "sees" an action with same name as the
second example it will do validation on the associated form.

Anyway, in your example you have your action name with not slash so you
would have to have either:

...OR



You also need to keep in mind that you need to extend ValidationTypeForm
must extend ValidatorActionForm to use the action validation and
ValidatorForm to use the form validation.



-Original Message-
From: Stephen Bennett [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:39 AM
To: [EMAIL PROTECTED]
Subject: Struts Validator

Has anyone had any problems getting the Struts Validator to work?
 
I have a small sample app that works OK but cannot get my main app to
work! As far as I can see I have done everything the same as in the
sample one.
 
I have noticed that when the sample app that works starts up I get four
messages from the ValidatorPlugin the first pair mentions the
validation.xml and the validator-rules.xml then later it says
ValidatorPlugin initResources then the previous xml messages. 
 
With the real app that doesn't work I don't get these second
initResources messages. I am not sure if this is significant or not,
does anyone have any ideas?
 
I have: -
 
  

  
 
in my struts-config
 
and 
 
  

  


  

  
 
in my validation.xml
 
validator-rules.xml are default
 
my formbean is extending ValidatorActionForm
 
and my action mapping is
 

  
  

 
I am using Struts 1.1 with Tomcat 4.1.24 on XP
 
Can anyone help?
 
Thanks
 
Steve

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



RE: DynaValidatorForm problem

2003-08-14 Thread Bailey, Shane C.


struts config dtd states:

 dynamic If the form bean type is a  DynaActionForm subclass
(that you
 created), then (and only then) set this attribute to
"true".
 If the type is set to the default DynaActionForm or any
 conventional ActionForm subclass, then this attribute
can be
 omitted.


It appears that you are not using a subclass of the dynaform so omit the
dynamic attribute and see what happens.


-Original Message-
From: Laurent MARQUEZ [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 5:33 AM
To: [EMAIL PROTECTED]
Subject: DynaValidatorForm problem


I m using DynaValidatorFrom
And in my JSP, i used this line for debugging
!<%
! out.println(((org.apache.struts.action.DynaActionForm)
!   (request.getSession( )
! .getAttribute("projectForm")))
!   .getMap( ));
!%>

And nothing is displaying 

!
!   
!   
!   
!
!



-
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: very simple if/else question

2003-08-14 Thread Bailey, Shane C.


Why isn't there a page for JSTL reference that is as nice and easy to use
as:

http://jakarta.apache.org/struts/userGuide/struts-logic.html ???

You would be much closer to substantiating your claim of JSTL being faster
to develop with if such a page existed, Ace.



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:41 PM
To: Struts Users Mailing List
Subject: RE: very simple if/else question

--- "Slattery, Tim - BLS" <[EMAIL PROTECTED]> wrote:
> > 
> > 
> 
> What are these  tags? What do I have to have installed in order
> to
> use them?

http://java.sun.com/products/jsp/jstl/index.html

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

David

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: application.properties file location - Internationalisation

2003-08-14 Thread Bailey, Shane C.


I think everything is supported except diagonal right to left (or is it
diagonal left to right).  Sorry, I'm not sure.  :)

-Original Message-
From: message message [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 1:50 PM
To: [EMAIL PROTECTED]
Subject: RE: application.properties file location - Internationalisation



Also I was curious about languages ( i.e.Arabic based) which are written 
from right to left.
Can I have a sample file with right to left text
which says the following

welcome.title=Welcome title
welcome.heading=Welcome heading
welcome.message=To get started on your own application

I want to rename this right to left file to application.properties
and try it out.

Thanks

>From: "Bailey, Shane C." <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: application.properties file location - Internationalisation
>Date: Wed, 13 Aug 2003 13:21:23 -0400
>
>
>
>It is built-in to the properties file framework.
>http://java.sun.com/docs/books/tutorial/i18n/intro/steps.html
>
>I believe Struts will get the correct properties file based on the locale
>set for each remote user.
>
>Create files like:
>application.properties
>application_en_US.properties
>application_fr_FR.properties
>application_de_DE.properties
>
>The first one is the default and all the rest should be selected
>automatically depending on the remote user's locale.  I don't have an
>Internationalization specification on my project so this is what I beilieve
>to be true.
>
>Someone else can verify.
>
>
>
>
>-Original Message-
>From: message message [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 13, 2003 12:35 PM
>To: [EMAIL PROTECTED]
>Subject: RE: application.properties file location - Internationalisation
>
>
>In theory if you have a file called application_fr.properties in your
>/WEB-INF/classes/resources directory then all the text will be
>replaced with French.
>Based on the assumption that the browser is configured to French.
>Therefore no coding is required.
>
>However what happens if the browser is configured to spanish when you only
>have a file for French and English ?
>Is there a default or will this an error  ?
>
> >From: "Bailey, Shane C." <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> >Subject: RE: application.properties file location
> >Date: Wed, 13 Aug 2003 11:51:53 -0400
> >
> >
> >From what you are saying I think you should try:
> >
> >
> >in your struts config file.  Since you specifically say
> >"application.properties" as the name of your file.
> >
> >For instance my file is also called "application.properties" as opposed 
>to
> >"aApplicationResources.properties" or something.  But since mine in a
> >resources directory off of the classes directory I declare mine as:
> >
> >
> >
> >So I am assuming struts takes the last name in the parameter as the file
> >name and anything before it as directory structure.
> >
> >
> >
> >-Message d'origine-
> >De : Samanth Athrey <[EMAIL PROTECTED]>
> >À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> >Date : mercredi 13 août 2003 16:57
> >Objet : application.properties file location
> >
> >
> > >Hi,
> > >
> > >I have my application.properties file stored in the classes directory.
> >But
> > >the application is unable to locate and load this file. Any tips would 
>be
> >of
> > >great help.
> > >
> > >Thanks,
> > >Samanth Athrey
> > >
> > >
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> >--
> >Ce message est protege par les regles relatives au secret des
> >correspondances ; il peut en outre contenir des informations a caractere
> >confidentiel ou protegees par differentes regles et notamment le secret 
>des
> >affaires ; il est etabli a destination exclusive de son destinataire. 
>Toute
> >divulgation, utilisation, diffusion ou reproduction (totale ou partielle)
> >de
> >ce message, ou des informations qu'il contient, doit etre prealablement
> >autorisee.
> >Tout 

RE: Error - tag useAttribute : no tiles context found.

2003-08-14 Thread Bailey, Shane C.

Good to hear you fixed it.
Very unexpected cause for the effect.

I use to do the attribute values without quotes and ever since using Struts
(which really makes it essential to use double quotes around tag attribute
values) I have done it for all my tags (HTML, JSP, Struts, etc.)

Even though that wasn't your probably in this case you may want to get in a
habit of doing  instead of .

Just to be safe.

So how did you figure out that was the problem?


-Original Message-
From: Jianbo Mao [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 4:37 PM
To: 'Struts Users Mailing List'
Subject: RE: Error - tag useAttribute : no tiles context found.

Hi, Shane,

This is just for your information.

An error in html table tag caused the tile context to be lost;-)

This is what it took to get rid of the nasty exception:

fixed this:
to : 

I'm not sure how could this html error to upset the tile by the way.

Jianbo



-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: 12 August 2003 19:01
To: 'Struts Users Mailing List'
Subject: RE: Error - tag useAttribute : no tiles context found.






Here is the source code producing your problem:

ComponentContext compContext = (ComponentContext)pageContext.getAttribute(
ComponentConstants.COMPONENT_CONTEXT, pageContext.REQUEST_SCOPE);
if( compContext == null )
  throw new JspException ( "Error - tag useAttribute : no tiles context
found." );


If this happens intermittently then maybe it is because a user is hitting
the back button or a cached page or something like that which would cause
the request to be missing the component context.

Just a guess.


-Original Message-
From: Jianbo Mao [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 1:38 PM
To: [EMAIL PROTECTED]
Subject: Error - tag useAttribute : no tiles context found.

I am using tiles:useAttribute tag to define a variable in request scope for
the remaining page to reference like this:



The runtime complains about tiles context not found as follow:

javax.servlet.jsp.JspException: Error - tag useAttribute : no tiles context
found.
at
org.apache.struts.taglib.tiles.UseAttributeTag.doStartTag(UseAttributeTag.ja
va:219)
at
jsp_servlet._common._layouts._classiclayout._jspService(_classiclayout.java:
85)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:915)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:879)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)

The application works fine with intended functionalities, but this exception
fills my log file all over. Any idea what could cause this?

Jianbo


-
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: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.

Don't get me wrong.  I am more trying to display what I can foresee as a
possibility and am trying to get other's opinions and feedback.  I would
LOVE for Struts to be the main Java framework because then I wouldn't have
to relearn a new technology.  I think managers who do the hiring will put
JSF on top of the list instead of Struts.

Just like those on this list who are always pushing JSTL as "it is the
standard", "it is the standard" (so live with it and don't try to change it
and don't look for any weaknesses, just use it).  So will many people being
doing that with JSF.

I try to be a realist (the problem is that others don't get where I am
coming from).

If you can't listen to both sides of the story then you are no better off
than the U.S. auto execs in the 1970's.

I may have posted this before but it is interesting:
http://www.csd.uwo.ca/courses/CS472b/pfaffenberger.html

Thanks man!


-Original Message-
From: Reinhard [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 11:38 AM
To: Struts Users Mailing List
Subject: Re: [OT] Interesting JSF info

Hey Bailey,

just let me say, that I enjoy your comments.
Not only for showing me, that I'm not the only in doubt about the future ;-)
 

-
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: application.properties file location - Internationalisation

2003-08-14 Thread Bailey, Shane C.


It is built-in to the properties file framework.
http://java.sun.com/docs/books/tutorial/i18n/intro/steps.html

I believe Struts will get the correct properties file based on the locale
set for each remote user.

Create files like:
application.properties
application_en_US.properties
application_fr_FR.properties
application_de_DE.properties

The first one is the default and all the rest should be selected
automatically depending on the remote user's locale.  I don't have an
Internationalization specification on my project so this is what I beilieve
to be true.

Someone else can verify.




-Original Message-
From: message message [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: RE: application.properties file location - Internationalisation


In theory if you have a file called application_fr.properties in your
/WEB-INF/classes/resources directory then all the text will be 
replaced with French.
Based on the assumption that the browser is configured to French.
Therefore no coding is required.

However what happens if the browser is configured to spanish when you only 
have a file for French and English ?
Is there a default or will this an error  ?

>From: "Bailey, Shane C." <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: application.properties file location
>Date: Wed, 13 Aug 2003 11:51:53 -0400
>
>
>From what you are saying I think you should try:
>
>
>in your struts config file.  Since you specifically say
>"application.properties" as the name of your file.
>
>For instance my file is also called "application.properties" as opposed to
>"aApplicationResources.properties" or something.  But since mine in a
>resources directory off of the classes directory I declare mine as:
>
>
>
>So I am assuming struts takes the last name in the parameter as the file
>name and anything before it as directory structure.
>
>
>
>-Message d'origine-
>De : Samanth Athrey <[EMAIL PROTECTED]>
>À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date : mercredi 13 août 2003 16:57
>Objet : application.properties file location
>
>
> >Hi,
> >
> >I have my application.properties file stored in the classes directory. 
>But
> >the application is unable to locate and load this file. Any tips would be
>of
> >great help.
> >
> >Thanks,
> >Samanth Athrey
> >
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>Ce message est protege par les regles relatives au secret des
>correspondances ; il peut en outre contenir des informations a caractere
>confidentiel ou protegees par differentes regles et notamment le secret des
>affaires ; il est etabli a destination exclusive de son destinataire. Toute
>divulgation, utilisation, diffusion ou reproduction (totale ou partielle) 
>de
>ce message, ou des informations qu'il contient, doit etre prealablement
>autorisee.
>Tout message electronique est susceptible d'alteration et son integrite ne
>peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
>message s'il a ete modifie ou falsifie.
>Si vous n'etes pas destinataire de ce message, merci de le detruire
>immediatement et d'avertir l'expediteur de l'erreur de distribution et de 
>la
>destruction du message.
>This message is protected by the secrecy of correspondence rules ;
>furthermore it may contain privileged or confidential information that is
>protected by law, notably by the secrecy of business relations rule ; it is
>intended solely for the attention of   the addressee . Any disclosure, use,
>dissemination or reproduction (either whole or  partial) of this message or
>the information contained herein is strictly prohibited without prior
>consent.
>Any electronic message  is susceptible to alteration  and  its integrity 
>can
>not be assured.  AGF declines any  responsibility for  this message in the
>event of  alteration  or falsification..
>If you are not the intended  recipient, please destroy it immediately and
>notify the sender of the wrong delivery and the mail deletion.
>--
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


-
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: very simple if/else question

2003-08-14 Thread Bailey, Shane C.

OK, let's vote. Who here thinks that Ace Graham is correct in saying that
these links are as easy to use as a reference (which is what I requested
since I understand the concept of tags in general and I only need a quick
reference):

http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL.html

http://www.amazon.com/exec/obidos/search-handle-url/index=books&field-keywor
ds=jstl&search-type=ss&bq=1/002-7447468-3651265

http://www.google.com/search?q=jstl&sourceid=opera&num=0&ie=utf-8&oe=utf-8


VS.


http://jakarta.apache.org/struts/userGuide/struts-logic.html


I am not talking about the tags themselves right now as to which better but
as to which links, the set above or the last one, is better in a reference
situation.  Get your stop watches out and see how fast you can know the
attributes for any given Struts tags vs. any given JSTL.  Ready go.

I understand there is documentation out there for JSTL that is not the
point.



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 1:29 PM
To: Struts Users Mailing List
Subject: RE: very simple if/else question

--- "Bailey, Shane C." <[EMAIL PROTECTED]> wrote:
> 
> 
> Why isn't there a page for JSTL reference that is as nice and easy to
> use
> as:
> 
> http://jakarta.apache.org/struts/userGuide/struts-logic.html ???
> 
> You would be much closer to substantiating your claim of JSTL being
> faster
> to develop with if such a page existed, Ace.

http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL.html

http://www.amazon.com/exec/obidos/search-handle-url/index=books&field-keywor
ds=jstl&search-type=ss&bq=1/002-7447468-3651265

http://www.google.com/search?q=jstl&sourceid=opera&num=0&ie=utf-8&oe=utf-8

David

> 
> 
> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 13, 2003 12:41 PM
> To: Struts Users Mailing List
> Subject: RE: very simple if/else question
> 
> --- "Slattery, Tim - BLS" <[EMAIL PROTECTED]> wrote:
> > > 
> > > 
> > 
> > What are these  tags? What do I have to have installed in
> order
> > to
> > use them?
> 
> http://java.sun.com/products/jsp/jstl/index.html
> 
> http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
> 
> David
> 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> -
> 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]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: Getting hashmap value based on bean value.

2003-08-14 Thread Bailey, Shane C.


Will this work:


  
   



-Original Message-
From: Wes Kubo [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 2:38 PM
To: Struts Users Mailing List
Subject: Getting hashmap value based on bean value.

In my jsp I have a collection of beans and a hashmap. One of the things that
I need to display is the name, e.g.


   

Note that the beanA contains a beanB. Now what I want to is get a value out
of my hashmap based on beanB.id. Theoretically, I want something like:


   


Which I know doesn't work. I had to resort to using bean:define to define
the id as a scripting variable and then using a scriplet to display the
hashmap, e.g.


<%= myHashMap.get(beanBId)%>.

I want to avoid scriptlets but can't figure out how to do this.

Thanks.

Wes


-
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: very simple if/else question

2003-08-14 Thread Bailey, Shane C.

Much better. 

Not quite as good as an HTML page where you don't need a (an acrobat)
plug-in (it is a minor pain being asked if I want to upgrade my acrobat when
I am trying to look something up) and laid out so that every tag (even if
just by library) is listed at the top for quick access (like both the struts
tag reference and javadoc methods, see them all click to the one you want).

But still. Much better.



-Original Message-
From: Evan Schnell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 6:11 PM
To: Struts Users Mailing List
Subject: Re: very simple if/else question

Bailey, Shane C. wrote:

>OK, let's vote. Who here thinks that Ace Graham is correct in saying that
>these links are as easy to use as a reference (which is what I requested
>since I understand the concept of tags in general and I only need a quick
>reference):
>  
>
Print and laminate this:
http://www.manning.com/bayern/appendixA.pdf

Evan.


-
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: very simple if/else question

2003-08-14 Thread Bailey, Shane C.


First, my comparison was about whether JSTL is faster than scriptlets and
not Struts tags (I NEVER said Struts tags were faster than JSTL tags) so
there you misquoted me (so we are even).

Second, I meant your quote as a summary any moron would agree that is what
you were, in summary, saying.  I don't think you said "..." either but that
is in the quote, so it wasn't exact.  Sorry for the misunderstanding.

Third, "something as silly as Java taglibs" is exactly my point.  
Basically, listen to you your own advice, I have seen people come on this
forum and bash Struts (on this, the Struts forum) and you don't say a word.
Yet, you basically tried to tell me not to post bad things about JSTL here
even though we are all barraged with JSTL postings DAILY (basically, a
censorship attempt, IMO).

So who really cares more about the stupid tags, you or me just trying to,
instead of censor, at least give another idea about, how they ARE just
stupid tags, that aren't perfect.

Fourth, I think you have me all wrong.  I'm not mad or anything, I am just
as irritated about your original censorship attempt and follow up JSTL hype
up as you are of people basing JSTL.  I just don't understand why you can't
just say, here is how to do it in JSTL, without trying to hype it up on the
Struts group. 

Just for the record here is what made me think of "elitist":
http://marc.theaimsgroup.com/?l=struts-user&m=105897443627729&w=2

I guess it is futile, because, why, people on the struts users group aren't
elite enough to have a valid opinion?  Only JCP members no what's best for
developers.

Anyway, I am done with this topic myself.




-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 10:44 AM
To: Struts Users Mailing List
Subject: RE: very simple if/else question

--- "Bailey, Shane C." <[EMAIL PROTECTED]> wrote:
> 
> Man (you already used Dude), I already stated that that doc is much
> better
> than the 50 other docs out there as far as JSTL reference.  It appears
> to be
> a scan of a book in crappy PDF format.
> 
> I just think it is very elitist for Dave to be constantly throwing
> around
> that JSTL is so great in so many aspects (e.g. faster for development
> and
> faster execution)as if it were fact when it is mostly opinion (or future
> release fact).  He never says, "IMO, JSTL is really good ..." it is
> always
> "JSTL IS the greatest ...". All because an alpha product (tomcat)
> optimizes
> some JSTL tags doesn't mean it is faster for execution (people take that
> as
> everywhere everytime).  Any container vendor could make whatever they
> want
> optimized (if they really wanted to).

There is absolutely nothing elitist about my views.  It is a fact that the
JSTL tags are faster than Struts tags in some containers.  Resin already
provides this optimization and Tomcat 5 will (at least in part) when it is
released.  It's very unlikely that a container would optimize
non-standard, proprietary tags like Struts.  It's also very likely that
all major containers will provide optimized JSTL implementations because
it is a Java standard.

I don't need to preface every opinion I have with "IMO".  It's fairly
obvious what is an opinion statement and what is factual.  I have never
stated, "JSTL IS the greatest ..." as you seem to have quoted me as
saying.  I have also never said that the JSTL is perfect.

I believe this conversation started with someone asking for opinions on
which taglibs to use: Struts or JSTL.  I stated my opinions and reasons
for preferring the JSTL over the Struts counterparts.  There is no need to
make personal attacks over something as silly as Java taglibs so I suggest
you lighten up.

David

> 
> If you read my previous posts you see how everything that David said
> which
> made JSTL so great could also be said for scriptlets and as I said, that
> doesn't mean that scriptlets should be used.  The only come back anyone
> could say was that JSTL IS optimized (leaving out that it is only in
> alpha
> tomcat, partly).  I agree that JSTL has many good parts but to act like
> it
> is perfect and so great and exaggerate its current capabilities is just
> one
> sided.
> 
> It is like brainwashing.  And that is sad.
> 
> 
> -Original Message-
> From: Steve Raeburn [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 13, 2003 8:41 PM
> To: Struts Users Mailing List
> Subject: RE: very simple if/else question
> 
> Dude, did you bother to look at the links David gave you?
> Or ask on the correct mailing list?
> Or even do some research yourself?
> 
> Google. Fifth link down. JSTL reference.
> 
> Steve
> 
> > -Original Message---

RE: using modules versus simply using multiple struts-config files

2003-08-14 Thread Bailey, Shane C.


Very interesting. I didn't know you could now have multiple struts-configs
and no modules.  

The two problems I had with using modules was (at first) the switching
between them as mentioned. I never took to the SwitchAction so I use global
forwards which do my module prefixes for me.  And second, having to
duplicate my (commonly used) messages in each modules resource file (this
problem is more of a problem of "why can't I inherit them" than anything
else.

It seems like multi configs with no modules solves problem 1.  I take it
that you will still have problem 2.  But I did see a post recently about
someone who made a code change so that resource files could inherit.

Sadly, since I am using modules, I can't think of any advantages of modules
if you can have multiple struts config, tiles def and resource files and no
modules. 




-Original Message-
From: Van Riper, Mike [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 2:02 PM
To: List Struts-User (E-mail)
Subject: RE: using modules versus simply using multiple struts-config files

> -Original Message-
> From: Van Riper, Mike 
> Sent: Tuesday, August 12, 2003 5:55 PM
> To: List Struts-User (E-mail)
> Subject: using modules versus simply using multiple 
> struts-config files
> 
> 
> I did search the archives and there is information about 
> using multiple
> config files and separately about using full-blown modules 
> too. There may
> have been a comparison of the two approaches somewhere in the 
> archives too,
> but, I was not able to find it. Thus, my reason for posting 
> this to the
> group.
> 
> I'm setting up the webapp infrastructure for a new project. 
> This is the
> first opportunity I have to use the new module support in 
> Struts 1.1. As I
> am investigating it, it seems like the new capability to 
> specify multiple
> struts-config files in your default module configuration in 
> the web.xml file
> gets you most of the modularity advantages that multiple 
> modules provide.
> 
> Sure, you do get to leave the module leading subdirectory out 
> of your action
> mapping definitions when you define separate modules in 
> web.xml for each
> struts-config file. Other than that, I'm not seeing the 
> advantages of using
> full-blown modules when I could just setup separate 
> struts-config files for
> each logical module. On the flip side, you have to deal with properly
> switching between modules when you use modules. Also, every 
> request must go
> through an action mapping to use modules.
> 
> Right now, I'm leaning towards setting up separate 
> struts-config files for
> each logical module and simply specifying them as a comma 
> separated list in
> the default module configuration in my web.xml. This is a 
> relatively small
> webapp which can be logically partitioned in to about 5 
> areas. Also, there
> will be three of us working in parallel on a tight schedule. 
> So, it seems to
> me that I get the modularity benefits without the module 
> restrictions by
> simply setting up separate struts-config files.
> 
> Before going too far down this path, I was interested in any 
> feedback from
> others on the list about this approach. Am I missing 
> something about the
> differences between these two approaches?

I love talking to myself. ;-)

I know that setting it up with separate modules in web.xml can be made to
work, but, I've also seen recent postings about difficulties using tiles and
difficulties switching between modules by other module newbies. I'd rather
not have to deal with that myself let alone training the other Struts
newbies on my current tightly scheduled project. So, I guess I'll go ahead
with my current plan to use multiple struts-config files associated with one
entry in my web.xml file. The way I'll be setting it up makes it easy to
switch to true separate module definitions later on anyway. Each logical
module will already have its own subdirectory below the web root.

Based on other suggestions I've seen, I'll have a default struts-config file
for shared configuration of plug-ins (e.g., tiles), global forwards,
controller, etc... In addition, a separate struts-config file for each
logical module.

> 
> - Van
> 
> Mike Van Riper
> mailto:[EMAIL PROTECTED]
> http://www.baychi.org/bof/struts

-
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: authentication

2003-08-14 Thread Bailey, Shane C.


You could have two modules, one named public and one named private and so
you would have two different path="/someAction" actions one in each modules
struts config.

Then in the private one you have path="/someAction" role="Admin" and in the
public one you don't have a role attribute or it is role="all" or something.




-Original Message-
From: Travis Stevens [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 5:22 PM
To: [EMAIL PROTECTED]
Subject: authentication

I need some help with authentication with struts.  I have been looking 
into filter validation, having a directory /publicAction and a directory 
/privateAction each containing public and private actions.  The 
interesting thing, if the action mapping is /privateAction/* and 
/publicAction/*, then two two different urls can acccess someAction, 
both /privateAction/someAction and /publicAction/someAction.

I could have two directories, one /action/public and the other 
action/private.  But here, the mapping would be action/*, and the 
struts-config.xml paths would have to me something like: 
path="/private/privateAction", which seems a little messy, especially if 
a privateAction is to become a public action.  Any ideas?

I can't use container managed authentication.

any help would be great!

-Trav


-
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: JSTL ot struts taglibs?

2003-08-14 Thread Bailey, Shane C.

Don't get me wrong, I think scriptlets are ugly and shouldn't be used but
like I said JSTL is not da bomb and if already know Struts tags I wouldn't
go rewriting my code to JSTL until I have seen what JSF and any new
technology near by has in store.

I'm just saying all the reasons listed do not necessarily mean a whole lot
since scriptlets can fit nearly everything said about JSTL but yet everybody
agrees not to use scriptlets.  I am just giving another opinion.



-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 11:21 AM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?


Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a
standard (it is the Java language you know) and if you are going to spend
time learning a new language (${var} == "pooPoo") then you would be better
off learning Java (assuming you don't already know it) cause then you could
do scriptlets and middle tier coding and more whereas if you use your time
learning JSTL all you will know is JSTL.  

Believe me, JSTL will be easy to replace if someone comes out with an
alternative.  I am a programmer but I understand the importance of having
the tags be similar to HTML tags and not like tags containing scriptlets.

If it makes you happy $var is a legal Java variable name so you could just
write scriptlets with $var and no one would realize you weren't writing JSTL


:)

Why do you think Ant is so popular??? It got rid of all the $var UNIX script
like crap and made it more like tags should be!!!

Bottom line is, yes, Struts tags aren't the best but JSTL is not much better
and will probably be replaced with something not so ugly in the future.


Just my .02 sense.

I like it how some people don't get disturbed by questions about connecting
to a database with JDBC to the Struts user list but get mad if you post a
differing opinion about the crappy way some tags were written that
interfaces with Struts code.  What an ACE!




-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 10:28 AM
To: Struts Users Mailing List
Subject: Re: JSTL ot struts taglibs?

--- David Thielen <[EMAIL PROTECTED]> wrote:
> Hi;
> 
> For the logic and I18N taglibs - what do you recommend - using the
> struts taglibs or the JSTL taglibs?

Definitely JSTL.  They're more powerful, easier to use, potentially
faster, and a Java standard.

David

> 
> thanks - dave


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: LookupDispatchAction error

2003-08-14 Thread Bailey, Shane C.


Sorry, solution #1 should read:
 ... 

Not sure if you need the .do part but I do and that can be bad if you change
the extension later.  So if you can do it with just action="/test" then I
suggest to do it.  I will look at mine now to see if I can change it.




-Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 12:01 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction error



I think you could do it a couple different ways...

1. 
JSP:

 
...


2. 
JSP:
...

struts config:
  
  
  


I've done similar so either way should work.



-Original Message-
From: OFlaherty, Colm [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 11:35 AM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction error

I am getting the following error on , which I can't figure out:

HTTP ERROR: 500 Request[/test] does not contain handler parameter named
updateMethod
RequestURI=/clientdb/test.do


I am following a couple of decent examples using the LookupDispatchAction
class (pages 128 -130 in "Programming Jakarta Struts" by Chuck Cavaness). My
config is basically the same as what he has, but I have a couple of minor
differences, which I don't think should be causing any issues, but maybe
someone can put me right: 

The JSP link that gives me the error is the following: 



My action mappings section has the following action:





...




I also have a section for the testForm: 




...



My /pages/test.jsp uses a template, which points at /pages/testcontent.jsp,
which contains the following: 







As u would expect, the "insert.label" key is contained in the properties
file (as well as the "test.maintain.label"  from the initial link)


insert.label=Insert
test.maintain.label=Maintain Tests



My TestUpdateAction class has the following hierarchy and methods



LookupDispatchAction
  |
BaseLookupDispatchAction
  |
BaseUpdateAction (methods: getKeyMethodMap (),getKeyMethodMap (params),
insert (params), update (params), delete ()
  (Maps "insert.label" to "insert")
  |
TestUpdateAction


My TestForm was generated using Xdoclet from the Test.java source code, and
has a protected "updateMethod" string variable, with a getter and setter.
TestForm is inherited from ActionForm


The kind of thing that I'm thinking might be causing the issue include: 

1.  The hierarchy of TestUpdateAction
2.  The fact that /pages/testcontent.jsp is not referenced directly, but
via the following lines in /pages/test.jsp: 

 ...
3.  The calling link does NOT in a Form.  Its entire contents looks like
this: 

<%@ include file="/tags/taglibs.jsp" %>









Can anyone see anything I'm missing, or anything that I'm just doing
incorrectly?  Any help is much appreciated.

Colm


**
This message is sent in confidence for the addressee
only.  The contents are not allowed to be disclosed to
anyone other than the addressee.  Unauthorised 
recipients must preserve this confidentiality and should 
please advise the sender immediately of any error in
transmission.
**


-
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: Error - tag useAttribute : no tiles context found.

2003-08-14 Thread Bailey, Shane C.




Here is the source code producing your problem:

ComponentContext compContext = (ComponentContext)pageContext.getAttribute(
ComponentConstants.COMPONENT_CONTEXT, pageContext.REQUEST_SCOPE);
if( compContext == null )
  throw new JspException ( "Error - tag useAttribute : no tiles context
found." );


If this happens intermittently then maybe it is because a user is hitting
the back button or a cached page or something like that which would cause
the request to be missing the component context.

Just a guess.


-Original Message-
From: Jianbo Mao [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 1:38 PM
To: [EMAIL PROTECTED]
Subject: Error - tag useAttribute : no tiles context found.

I am using tiles:useAttribute tag to define a variable in request scope for
the remaining page to reference like this:



The runtime complains about tiles context not found as follow:

javax.servlet.jsp.JspException: Error - tag useAttribute : no tiles context
found.
at
org.apache.struts.taglib.tiles.UseAttributeTag.doStartTag(UseAttributeTag.ja
va:219)
at
jsp_servlet._common._layouts._classiclayout._jspService(_classiclayout.java:
85)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:915)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:879)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)

The application works fine with intended functionalities, but this exception
fills my log file all over. Any idea what could cause this?

Jianbo


-
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 1.1 question

2003-08-14 Thread Bailey, Shane C.


A good starting point for all you antidisestablishmentarianist that don't
want to front your JSPs might be the use of the ForwardAction and
global-forwards.  That just forwards to a view page without writing a new
class.  This way, when you are ready to do the right thing, you can change
some of those ForwardActions and possibly global-forwards to real Actions.

Just a thought.

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



RE: uploadfile path

2003-08-14 Thread Bailey, Shane C.


I had the same requirement to just retrieve the original (client side) file
location and not the file itself.  This was because I develop strictly for
an Intranet (and not trying to get peoples file names unwillingly or
anything) and the users had mapped drives to the same shared server.  One
use would fill out a request asking where a specific file was located on the
mapped drive and the other user would fill out a form with the file name
only but it was convenient to browse to the file for accuracy.  Any these
files could literally be a gig in size.

With those requirements it meant that the best way was to browse to the file
and return only the full path name to the Web/Container server not
necessarily the whole file.  I assume that is what you want to do?

This is what I did:

I created two forms on the JSP page.  One was a "dummy" form and the other
the real form.  The real form was nothing but hidden fields. The submit
button for the "dummy" form (the form you could actually see) was not a
submit but a button and it went to a JavaScript method with then did a copy.

JavaScript function contents:

function submitReal(form1)
{
form2 = document.forms[1];
form2.personName.vaule = form1.personName.value;
form2.file1Name.value = form1.file.value;
...
form2.submit();

}



Where form2.file1Name was of type html:hidden and form1.file1 was of type
html:file.


I hope this helps.



-Original Message-
From: Daniel Massie [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 11:43 AM
To: Struts Users Mailing List
Subject: RE: uploadfile path

its only the original file's location that i require, i can't find any
mention of how to aquire this in any online articles.

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]
Sent: 06 August 2003 16:24
To: Struts Users Mailing List
Subject: Re: uploadfile path


Folow the Struts upload example, you can trace thru how Struts gets the
client file and upload to server where you have to do extra work to copy
data from FormFile (its stream buffer)  to the your choice of server
location.

-Dan

- Original Message -
From: "Yansheng Lin" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, August 06, 2003 8:18 AM
Subject: RE: uploadfile path


> 
> 
> 
>
> theFile is type of FormFile.  You can go from there.
>
> -Original Message-
> From: Daniel Massie [mailto:[EMAIL PROTECTED]
> Sent: August 6, 2003 2:35 AM
> To: Struts Users Mailing List
> Subject: uploadfile path
>
>
> I am trying to upload a file using html:file which is received as a
> FormFile, the problem is I need to find out this files absolute path. Hwo
> can I retrieve this information?
>
> Thanks
> Daniel
>
>
> -
> 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]



RE: JSTL ot struts taglibs?

2003-08-14 Thread Bailey, Shane C.


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 3:45 PM
To: Struts Users Mailing List
Subject: Re: JSTL ot struts taglibs?



Bailey, Shane C. wrote:

[Snip]
Why should build files be composed of tags at all?  I think Ant is great 
too (a lot better than make), but does the fact that it is tag-based 
have anything to do with it?  No.  The reason that the original author 
went with XML for the structure of Ant build files had nothing to do 
with tags -- it had to do with hierarchy.  See <http://tinyurl.com/jg0d> 
to read his thoughts on the matter (sorry for the cachelink but I can't 
find the official permalink).
[/Snip]

I don't know why a build file should be composed of tags either.  My point
was that Ant is nicer and more recently popular than make and the developer
could have thought, "You know, most people that will be using Any will
probably know make so I am going to throw a bunch of "==" in there and that
would be fine.  Ant has more of an excuse to have "==" in the darn thing
than a View (geared toward UI and graphic artist specialist) tag set does.
And the Ant developer must have seen the light. (All my opinion, of course).

[Snip]
Faster?  Given a programmer with equal knowledge of scriptlets and JSTL, 
scriptlets are definitely not faster for development.  Since when are 
they faster for performance?  Plus they tend to be difficult to read -- 
and I say this as a former PHP programmer.
[/Snip]

If they aren't faster in performance then something is wrong.  All the JSP
rendering practically has to do is put the code as is into the Servlet which
is a Java class.  No interpretation.  I haven't looked at the source but I
am sure the optimization for rendering code for Scriptlets vs JSTL has to be
there.  I know more Java programmers that could get a JSP page drawn if you
simple told them <% ... %> for multiple code segments and do <%= ... %> to
return an expression given all they knew was Java and no Web stuff
(including JSTL at all).

[Snip]
Okay, first of all, JSTL is a JCP specification (JSR-52, for more info 
see <http://jcp.org/aboutJava/communityprocess/final/jsr052/>).  It's 
not just some 3rd-party library that is going to be "replaced" any time 
soon.  Second of all, it is actually a part of the JSP 2.0 specification 
(just as scriptlets are part of an earlier JSP specification).  While 
scriptlets are still supported in JSP 2.0, it is clear that Sun and the 
JCP are trying to provide alternatives to scriptlets and at some point 
they might even be deprecated.
[/Snip]

Nothing is impossible.  I remember being devastated after getting pretty
efficient with AWT and then the model changed and then Swing came out. And
you even mention how scriptlets WERE part of the spec and are now close to
deprecation.  So what is so ridiculous about my statement???

[Snip]
So sorry, but I had to ask - what the crap were you talking about.
[/Snip]

No problem.



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



RE: Is this a bug with struts config file?

2003-08-14 Thread Bailey, Shane C.


Actually, now that I have thought about it one of the reasons struts can't
assume and automatically put the extension on because forwards can have
Tiles definitions.  

But then again struts should be able to see any path which starts with "/"
will need the extension inserted and any that doesn't should be a Tile def.
Then that is flexible for the future I guess.

Then lastly, my thinking is that you probably technically shouldn't forward
to an action because that would be action chaining, wouldn't it?  (Assuming
forwards use ActionForwards). I guess I am bad cause I do forward to other
actions.  Mostly to get between modules.

Thanks for all the responses to clear my head.



-Original Message-
From: Aguirre Carlos Federico [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 7:58 PM
To: [EMAIL PROTECTED]
Subject: Re: Is this a bug with struts config file?

Hi.



the ".do" in forwards to actions is necessary because when you make a
forward, the request is processed again by application server,  if you not
add .do in forwards  to struts actions then the application server do not
map the request to action servlet of struts.


"Richard J. Duncan" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> My experience is the same as yours. That while the ".do" can be omitted
> in the action definition, it may not be omitted in the forward. FWIW, I
> think this is proper behavior. Certainly if you html:link to the forward
> your html pages will be do-less. Also, you can change to another scheme
> (e.g., "/action/login") simply by modifying the structs-config.
>
>
>
> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 6:00 PM
> To: [EMAIL PROTECTED]
> Subject: Is this a bug with struts config file?
>
>
>
> Short version:
>
> I would think that I could do this then  path="/home"/>
> and Struts
>
> would know to add the .do for me.  When a  is
> rendered it does not
>
> have the .do on it.  I have to make it  path="/home.do"/>
>
>
>
> Is that a bug?
>
>
>
> Since Struts determines extensions on the fly (at Servlet startup based
> on
> URL pattern in web.xml)
>
> it just seems defeating that you would have to hard code an extension
> anywhere in the system.
>
>
>
>
>
> Longer version:
>
> In my crusade to wipe out all hard coded ".do" extensions in the app for
> future upgradability
>
> (for instance all my links are like this 
> instead of "login.do"
>
>
>
> I found that (unless something is not right) the global-forwardS don't
> act
> as I would expect.
>
> It implies in the struts config dtd that if contextRelative not true
> then
> the path is module relative.
>
>
>
> It seems minor but if I need to change the extension to ".go" or
> something
> else,
>
> say, because if a hacker doesn't know you are using Struts because the
> extension is ".poo" then
>
> it may help the system.  But in order to make the change I would have to
> go
> into all my many
>
> struts config files and globally replace ".do".  Not too bad if I am
> doing
> it but when someone else
>
> in the group with less experience does it then it could be a pain.




-
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]



[OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.
 

Start here:

http://java.sun.com/webservices/docs/1.2/tutorial/doc/IntroIWA6.html
 

hit the TUTORIAL'S back button.  Read the last paragraph.  

 

HeHe.

It sure sounds like JSF is here to conquer not to co-exist.

 :-)



RE: Tiles related question

2003-08-14 Thread Bailey, Shane C.

You are practically there; you know Java and XML and that's all you need to
know with Tiles.






http://marc.theaimsgroup.com/?t=10306302322&r=1&w=2
Check out the post by Cedric, I believe he wrote Tiles.


-Original Message-
From: JavaXML Developer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 5:51 PM
To: [EMAIL PROTECTED]
Subject: Tiles related question

I am new to tiles and want to learn it quickly. Is there any tutorial ,
sample program anywhere including introduction to tiles?
 
Thanks,
Vicky


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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



RE: very simple if/else question

2003-08-14 Thread Bailey, Shane C.

Man (you already used Dude), I already stated that that doc is much better
than the 50 other docs out there as far as JSTL reference.  It appears to be
a scan of a book in crappy PDF format.

I just think it is very elitist for Dave to be constantly throwing around
that JSTL is so great in so many aspects (e.g. faster for development and
faster execution)as if it were fact when it is mostly opinion (or future
release fact).  He never says, "IMO, JSTL is really good ..." it is always
"JSTL IS the greatest ...". All because an alpha product (tomcat) optimizes
some JSTL tags doesn't mean it is faster for execution (people take that as
everywhere everytime).  Any container vendor could make whatever they want
optimized (if they really wanted to).

If you read my previous posts you see how everything that David said which
made JSTL so great could also be said for scriptlets and as I said, that
doesn't mean that scriptlets should be used.  The only come back anyone
could say was that JSTL IS optimized (leaving out that it is only in alpha
tomcat, partly).  I agree that JSTL has many good parts but to act like it
is perfect and so great and exaggerate its current capabilities is just one
sided.

It is like brainwashing.  And that is sad.


-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 8:41 PM
To: Struts Users Mailing List
Subject: RE: very simple if/else question

Dude, did you bother to look at the links David gave you?
Or ask on the correct mailing list?
Or even do some research yourself?

Google. Fifth link down. JSTL reference.

Steve

> -----Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> Sent: August 13, 2003 2:50 PM
> To: 'Struts Users Mailing List'
> Subject: RE: very simple if/else question
>
>
>
> OK, let's vote. Who here thinks that Ace Graham is correct in saying that
> these links are as easy to use as a reference (which is what I requested
> since I understand the concept of tags in general and I only need a quick
> reference):
>
> http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL.html
>
> http://www.amazon.com/exec/obidos/search-handle-url/index=books&fi
> eld-keywor
> ds=jstl&search-type=ss&bq=1/002-7447468-3651265
>
> http://www.google.com/search?q=jstl&sourceid=opera&num=0&ie=utf-8&oe=utf-8
>
>
> VS.
>
>
> http://jakarta.apache.org/struts/userGuide/struts-logic.html
>
>
> I am not talking about the tags themselves right now as to which
> better but
> as to which links, the set above or the last one, is better in a reference
> situation.  Get your stop watches out and see how fast you can know the
> attributes for any given Struts tags vs. any given JSTL.  Ready go.
>
> I understand there is documentation out there for JSTL that is not the
> point.
>
>
>
> -Original Message-----
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 13, 2003 1:29 PM
> To: Struts Users Mailing List
> Subject: RE: very simple if/else question
>
> --- "Bailey, Shane C." <[EMAIL PROTECTED]> wrote:
> >
> >
> > Why isn't there a page for JSTL reference that is as nice and easy to
> > use
> > as:
> >
> > http://jakarta.apache.org/struts/userGuide/struts-logic.html ???
> >
> > You would be much closer to substantiating your claim of JSTL being
> > faster
> > to develop with if such a page existed, Ace.
>
> http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL.html
>
> http://www.amazon.com/exec/obidos/search-handle-url/index=books&fi
> eld-keywor
> ds=jstl&search-type=ss&bq=1/002-7447468-3651265
>
> http://www.google.com/search?q=jstl&sourceid=opera&num=0&ie=utf-8&oe=utf-8
>
> David
>
> >
> >
> >
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 13, 2003 12:41 PM
> > To: Struts Users Mailing List
> > Subject: RE: very simple if/else question
> >
> > --- "Slattery, Tim - BLS" <[EMAIL PROTECTED]> wrote:
> > > > 
> > > > 
> > >
> > > What are these  tags? What do I have to have installed in
> > order
> > > to
> > > use them?
> >
> > http://java.sun.com/products/jsp/jstl/index.html
> >
> > http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
> >
> > David
> >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
&g

RE: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.





I guess my problem is that I think of Java as being a Sun only product and I
forget about the committees involved in the process of deciding what goes
into the different Java specifications or editions (EE,SE,ME).

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



RE: JSTL ot struts taglibs?

2003-08-14 Thread Bailey, Shane C.

I see the ease of using a flat file for config since a framework doesn't
have to support the many DBs where their data could be stored but I think
you can better protect data in a DB and you won't have parsing errors at run
time.  You just need an interface to manipulate the data.

Until Struts broke down into modules you had to view, in some cases, a very
big and sometimes ugly config file.  

Didn't Oracle have a product that was like the file system is in the DB?
Whatever happened to that?

It is Friday and I feel like talking about the future of software a little
that's all.

:)

-Original Message-
From: Reinhard [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 12:04 PM
To: Struts Users Mailing List
Subject: Re: JSTL ot struts taglibs?

> So many things are a step backwards like config files for instance.  J2EE
> is supposed to be for the Enterprise which means there is at least a DB
and
> maybe the LDAP at your disposal yet people go back to storing stuff in
> files.

I don't agree.
You have to think about the time after the rollout - so, things which are
not 
subject of change, IMHO are ok in config files.
All other stuff it's already possible, read from database.
So I can see no step backward.

cheers Reinhard 

-
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: Registration and action mappings

2003-08-14 Thread Bailey, Shane C.





I think I understand what you want.  I would need to know whether you are
using Validator or not (in general how validation is to be performed) to
give a better answer.




-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 6:07 AM
To: 'Struts Users Mailing List'
Subject: Registration and action mappings

I have a registration wizard. In each JSP member of this wizard I have a
. 


  
  
  


Note that the scope is "session". Now I want to write the part of
editing these pages separately. Thing is I want to use the same
SignupAction (subclass of DispatchAction), but I can't use the same
action-mapping cause I need it now to be scope="request". Also, in terms
of security & roles, I need the editing and wizard-creation mode action
mappings to be different in order to set different security settings.
The signup creation is open to all, while the editing is only for logged
on users (role=User).

I don't know if it would work (I will try it) is having two  for wizard creation mode, and
 Or use javascript
to change these dynamically with onclick on the buttons.

I would really appreciate any comment here,
Erez






-
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 1.1 question

2003-08-14 Thread Bailey, Shane C.

Yup. It really isn't so bad.  

A lot of pages of what?  You need a lot of pages even without Struts if your
site has a lot of content.  You don't have any extra JSP pages because of it
but it makes you Struts config file a little longer than if you didn't have
to map all your JSPs.  But then that (config file size) is one reason you
can break down your struts config into multiple files per module.

Goes back to a point I made last week that config info might be better
served in say the LDAP compared to a flat file.  Unless the framework is
willing to do inefficient constant file reads to get the actions mappings
then it means all the Struts config info has to be loaded into memory.  If
you site has 1 mappings could you imagine the memory usage?  But the
LDAP is made for fast reads, perfect for something which doesn't change
much, like config information.

Wouldn't that be nice for a large Enterprise site?



-Original Message-
From: e [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 4:37 PM
To: Struts Users Mailing List
Subject: struts 1.1 question


I am about to upgrade to struts 1.1 and I have a question.
I have a site with a decent amount of content stored in a content manager.
I want to use tiles, but I read that in struts 1.1, all jsps have to be 
fronted by actions.
Does this mean that I have to write forwards in strutsconfig.xml for every 
single jsp on the site?
This could add up to a lot of pages.

Am I interpreting this correctly?

Thanks.

-e



-
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: Allowing only POST for form submittal ????

2003-08-14 Thread Bailey, Shane C.

Jason,

That makes since about the user (hacker) recreating the form on POSTing. Why
the original separation in the Servlet then, any ideas?

I would do the check at the top of the action.  It seems more flexible than
having to put your form actions in a certain area.

Thanks.

BTW, SecurityFilter is running smoothly :-)



-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 6:21 PM
To: Struts Users Mailing List
Subject: Re: Allowing only POST for form submittal 

Hi Shane,

I don't think it really matters.

Say you have a hidden field containing an id in your form that is posted 
back to an action.  A user could copy that page to their hard disk, 
modify the field and then submit it.  They would still be POSTing so 
your action would be happy.  You still need to verify the id is ok, or 
user has permission to access that id.

If you had some reason to only allow POSTs then you might be able to 
check in the action, or I think you can do that with a security 
contraint in web.xml:


 
   allow only POSTs
   /postonly/*.do
   GET
 
 
   no-member-role
 


This basically means if someone tries to use GET (eg a normal request to 
the action) they would have to be a member of the role 'no-member-role'. 
  Since we won't have anyone in this role, nobody can use GET for these 
actions.  All other methods are allowed.

-- 
Jason Lea



Bailey, Shane C. wrote:
>  
> 
>  
> 
> I have worked with Struts at a few different companies now and I noticed
> none of them try
> 
> to do any checks to see that only POST methods can successfully make it to
> Actions
> 
> which handle forms submittals.  Struts allows GETs and POSTs to make it to
> every Action
> 
> so it seems like this would be something to think about (or maybe not,
that
> is one reason
> 
> I am asking).
> 
>  
> 
> So I guess I have a few questions then:
> 
>  
> 
> 1.Shouldn't I worry about (and defend against) which request methods
> types (GET, POST, etc.) can make it to which actions?
> 2.If so, does Struts have a built in mechanism like  path="/whatever" requestMethod="POST"> or if not 
> 3.Should I be doing something like this at the top of my execute()
> method: 
> 
>   if( ! "POST" == request.getMethod() ){ return
> mapping.findForward("failure"); }  for Actions which should require a POST
> only
> 
>  
> 
>  
> 
> With #1 I mean should it matter if someone can go to the URL field in the
> browser and type in all the field / value pairs for a form
> 
> and hit enter (I am thinking it does matter) compared to HAVING to do a
POST
> for it to succeed?
> 
>  
> 
> I am just thinking back to the Servlet programming days when you put the
> form submittal handling code in the doPost() and the
> 
> other code in the doGet() methods.
> 
>  
> 
> Any thoughts on this?
> 
> 




-
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: LookupDispatchAction error

2003-08-14 Thread Bailey, Shane C.


I think you could do it a couple different ways...

1. 
JSP:

 
...


2. 
JSP:
...

struts config:
  
  
  


I've done similar so either way should work.



-Original Message-
From: OFlaherty, Colm [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 11:35 AM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction error

I am getting the following error on , which I can't figure out:

HTTP ERROR: 500 Request[/test] does not contain handler parameter named
updateMethod
RequestURI=/clientdb/test.do


I am following a couple of decent examples using the LookupDispatchAction
class (pages 128 -130 in "Programming Jakarta Struts" by Chuck Cavaness). My
config is basically the same as what he has, but I have a couple of minor
differences, which I don't think should be causing any issues, but maybe
someone can put me right: 

The JSP link that gives me the error is the following: 



My action mappings section has the following action:





...




I also have a section for the testForm: 




...



My /pages/test.jsp uses a template, which points at /pages/testcontent.jsp,
which contains the following: 







As u would expect, the "insert.label" key is contained in the properties
file (as well as the "test.maintain.label"  from the initial link)


insert.label=Insert
test.maintain.label=Maintain Tests



My TestUpdateAction class has the following hierarchy and methods



LookupDispatchAction
  |
BaseLookupDispatchAction
  |
BaseUpdateAction (methods: getKeyMethodMap (),getKeyMethodMap (params),
insert (params), update (params), delete ()
  (Maps "insert.label" to "insert")
  |
TestUpdateAction


My TestForm was generated using Xdoclet from the Test.java source code, and
has a protected "updateMethod" string variable, with a getter and setter.
TestForm is inherited from ActionForm


The kind of thing that I'm thinking might be causing the issue include: 

1.  The hierarchy of TestUpdateAction
2.  The fact that /pages/testcontent.jsp is not referenced directly, but
via the following lines in /pages/test.jsp: 

 ...
3.  The calling link does NOT in a Form.  Its entire contents looks like
this: 

<%@ include file="/tags/taglibs.jsp" %>









Can anyone see anything I'm missing, or anything that I'm just doing
incorrectly?  Any help is much appreciated.

Colm


**
This message is sent in confidence for the addressee
only.  The contents are not allowed to be disclosed to
anyone other than the addressee.  Unauthorised 
recipients must preserve this confidentiality and should 
please advise the sender immediately of any error in
transmission.
**


-
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: Is this a bug with struts config file?

2003-08-14 Thread Bailey, Shane C.


You have my question backwards.  I am saying because of the fact that you
can have any extension you want for struts (as set by the servlet mapping)
then should you not have to hard code the extension (I used .do as an
example) in the struts config forwards.  This makes it more than just
changing the web.xml from url-pattern *.do to *.yup, struts makes it so you
have to change the web.xml AND the struts config files.  I do it with
all the s at the end because I use modules so then I would have to
change many struts config files if I want to change the extension.
That is what I wanted to avoid (strictly for future possibilities).


-Original Message-
From: Rohit Aeron [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 6:37 AM
To: Struts Users Mailing List
Subject: RE: Is this a bug with struts config file?

I don't think you need to put .do.
Actually in the web.xml file you have following code 

  
action
*.do
  

here you can configure as you want you can configure *.yup also & it works.

Regards
Rohit



-Original Message-
From: Aguirre Carlos Federico [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 5:28 AM
To: [EMAIL PROTECTED]
Subject: Re: Is this a bug with struts config file?

Hi.



the ".do" in forwards to actions is necessary because when you make a
forward, the request is processed again by application server,  if you not
add .do in forwards  to struts actions then the application server do not
map the request to action servlet of struts.


"Richard J. Duncan" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> My experience is the same as yours. That while the ".do" can be omitted
> in the action definition, it may not be omitted in the forward. FWIW, I
> think this is proper behavior. Certainly if you html:link to the forward
> your html pages will be do-less. Also, you can change to another scheme
> (e.g., "/action/login") simply by modifying the structs-config.
>
>
>
> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 6:00 PM
> To: [EMAIL PROTECTED]
> Subject: Is this a bug with struts config file?
>
>
>
> Short version:
>
> I would think that I could do this then  path="/home"/>
> and Struts
>
> would know to add the .do for me.  When a  is
> rendered it does not
>
> have the .do on it.  I have to make it  path="/home.do"/>
>
>
>
> Is that a bug?
>
>
>
> Since Struts determines extensions on the fly (at Servlet startup based
> on
> URL pattern in web.xml)
>
> it just seems defeating that you would have to hard code an extension
> anywhere in the system.
>
>
>
>
>
> Longer version:
>
> In my crusade to wipe out all hard coded ".do" extensions in the app for
> future upgradability
>
> (for instance all my links are like this 
> instead of "login.do"
>
>
>
> I found that (unless something is not right) the global-forwardS don't
> act
> as I would expect.
>
> It implies in the struts config dtd that if contextRelative not true
> then
> the path is module relative.
>
>
>
> It seems minor but if I need to change the extension to ".go" or
> something
> else,
>
> say, because if a hacker doesn't know you are using Struts because the
> extension is ".poo" then
>
> it may help the system.  But in order to make the change I would have to
> go
> into all my many
>
> struts config files and globally replace ".do".  Not too bad if I am
> doing
> it but when someone else
>
> in the group with less experience does it then it could be a pain.




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



*--
This message and any attachment(s) is intended only for the use of the
addressee(s) and may contain information that is PRIVILEGED and
CONFIDENTIAL. If you are not the intended addressee(s), you are hereby
notified that any use, distribution, disclosure or copying of this
communication is strictly prohibited. If you have received this
communication in error, please erase all copies of the message and its
attachment(s) and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and
not of Kanbay.

Although we have taken steps to ensure that this e-mail and any
attachment(s) are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.


-
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: [OT] Interesting JSF info

2003-08-14 Thread Bailey, Shane C.


Actually this is seems like good reading:
http://java.sun.com/webservices/docs/1.2/tutorial/doc/JSFIntro.html


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 1:25 PM
To: [EMAIL PROTECTED]
Subject: [OT] Interesting JSF info

 

Start here:

http://java.sun.com/webservices/docs/1.2/tutorial/doc/IntroIWA6.html
<http://java.sun.com/webservices/docs/1.2/tutorial/doc/IntroIWA6.html> 

hit the TUTORIAL'S back button.  Read the last paragraph.  

 

HeHe.

It sure sounds like JSF is here to conquer not to co-exist.

 :-)


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



[FRIDAY] [JOKE] Here is an old one

2003-08-14 Thread Bailey, Shane C.
 

Can anyone name the book the following joke appeared in?  

I have cleaned it up a little (the punch line) and I am typing it from
memory so it isn't exactly like the book.

 

 

There once was a native American Chief who named everybody in his tribe.
One of the young boys who was a

member of the tribe asked one day...

 

Boy: How do you come up with all of the names of each member of the tribe?

 

Chief: At the moment of birth I look to our surroundings and see what is
happening in nature and that is how I know.

 For instance, if the weather is violent and restless the name I
give may be "Thunder-Cloud".

 If the animals are at play the name may be "Running-Deer"

 

So why do you ask, Two-Dogs-Mating???

 

:-)



RE: Tiles related question

2003-08-14 Thread Bailey, Shane C.

Maybe I am missing something but the link below THAT I SENT in my PREVIOUS
post gives the archive of a couple different links to tutorials.  I didn't
know which was the best because I didn't use any of them personally but here
is one from Cedric:
http://marc.theaimsgroup.com/?l=struts-user&m=103069759832394&w=2

Maybe you didn't notice the link in my last post or I am not understanding
what you are looking for.

  

-Original Message-
From: JavaXML Developer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 6:00 PM
To: Struts Users Mailing List
Subject: RE: Tiles related question

I know that. But i am looking for a simple example or tutorial particularly
for tiles. If anyone knows, let me know.

"Bailey, Shane C." <[EMAIL PROTECTED]> wrote:
You are practically there; you know Java and XML and that's all you need to
know with Tiles.






http://marc.theaimsgroup.com/?t=10306302322&r=1&w=2
Check out the post by Cedric, I believe he wrote Tiles.


-Original Message-
From: JavaXML Developer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 5:51 PM
To: [EMAIL PROTECTED]
Subject: Tiles related question

I am new to tiles and want to learn it quickly. Is there any tutorial ,
sample program anywhere including introduction to tiles?

Thanks,
Vicky


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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



RE: modules, somethings missing

2003-08-14 Thread Bailey, Shane C.

You are correct.  I know this from looking at the Struts ActionServlet
source code that it is Struts looking for the 1 URL mapping.  How else
could Struts know to add the .do at the end (or /do/ at the beginning)
of every request? 

It parses the URL mapping in the web.xml and knows that is what needs
to be appended.  If there were multiple mappings I think it just takes
the last one in the first or last one specified (can't remember off hand).

If you wanted you could the URL mapping for "*.cool" or something and
you will see Struts append that to your path.  That way people would
not know you are using Struts (maybe to fake out hackers).

Glad to here it is working.



-Original Message-
From: Travis Stevens [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 6:04 PM
To: Struts Users Mailing List
Subject: Re: modules, somethings missing

I cna't say that I really understand why my way didn't work.  I really 
don't see a problem with having multiple
mappings to an ActionServlet, at least on the tomcat side of things. 
 Now that I think about it,  struts accesses
the web.xml file for some configuration information, maybe struts itself 
only looks for one action mapping when it
does its internal configuration.

Anyhow, I changed the mapping to *.do and everything works great, thanks 
Shane!

-Trav

Bailey, Shane C. wrote:

>
>I believe the problem is that you can only have 1 URL mapping to the Struts
>Servlet.
>
>All you have to have is your first servlet-mapping.  Struts will then take
>care of everything automatically from then on out.  The thing you will have
>to keep in mind is that if you are in the "main" module to access you link
>to module actions by doing  and
>  or if you want to go to an action
>with the same name in the "main" module you just do action="someAction">
>
>One you have linked to the desired action and JSPs served up by those
>modules will then be accessed like such  but
>Struts will automatically figure you are in a JSP served by, say, private
so
>it makes the URL "whatever.com/nmmr/private/someAction".
>
>When you are in say the public module (meaning in a JSP which was served up
>by an action within that module) and you want to get to a private modules
>action then you do something like this:
>
>public module struts config:
>
>path="/private/privateHomeAction"/>
>
>
>then inside a public module JSP you would link to the private area by doing
>Private Home
>
>
>To be honest with you I use the ".do" instead of "/do/*" (meaning like your
>/nmmr/ prefix) so that part is kinda sketchy with me as to when you need to
>add "/nmmr" to the front of the action link etc.
>
>But you should get the idea I hope.
>
>-Original Message-
>From: Travis Stevens [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, August 06, 2003 5:08 PM
>To: [EMAIL PROTECTED]
>Subject: modules, somethings missing
>
>I am doing something wrong with modules, and am not quite sure what.
>
>Basically, the rui requested is always being routed to default.  Here 
>are my settings:
>
>web.xml:
>
>   NmmrActionServlet
>   org.apache.struts.action.ActionServlet
>   
>   config
>   /WEB-INF/conf/nmmr-struts-config.xml
>   
>   
>   config/public
>   /WEB-INF/conf/public-struts-config.xml
>   
>   
>   config/private
>   /WEB-INF/conf/private-struts-config.xml
>   
>   2
> 
>
> 
>   NmmrActionServlet
>   /nmmr/*
> 
> 
>   NmmrActionServlet
>   /public/*
> 
> 
>   NmmrActionServlet
>   /private/*
> 
>
>When I request a url of: /public/someAction i get this:
>Thread-4 DEBUG util.RequestUtils - Get module name for path /private
>Thread-4 DEBUG util.RequestUtils - Module name found: default
>
>any ideas?
>
>thanks,
>-Trav
>
>
>
>
>
>-
>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: JSTL ot struts taglibs?

2003-08-14 Thread Bailey, Shane C.

You're right, ant does have $var in it I use my IDE to build and forgot.

I just think that is a step backwards doing tags that way.

So many things are a step backwards like config files for instance.  J2EE is
supposed to be for the Enterprise which means there is at least a DB and
maybe the LDAP at your disposal yet people go back to storing stuff in
files.

I am just trying to point out when things seem backwards.  Certain things
(like tags) should be getting more XML like and not more UNIX script like. 

Let's put our config in a datastore and let's either have programmers doing
the UI and accept things like scriptlets or have UI specialist and make it
easier on them but not having $var in the tags.  That's all I am saying.

I definitely was wrong about Ant, sorry.



-Original Message-
From: Stephen Brown [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 11:41 AM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?

Maybe you could post this to the ECS users group.  Scriptlets are fine, but
tend to lend themselves to having lots of lines of code in a page that
doesn't actually generate html, which is tough to read if you are trying to
lay things out.

> 
> Why do you think Ant is so popular??? It got rid of all the 
> $var UNIX script
> like crap and made it more like tags should be!!!
> 
What are you talking about?  ${var} is pretty standard in Ant.  

> 
> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> Sent: August 8, 2003 11:21 AM
> To: 'Struts Users Mailing List'
> Subject: RE: JSTL ot struts taglibs?
> 
> 
> 
> Scriptlets are more powerful (you can do ANYTHING Java can 
> do), faster, is a
> standard (it is the Java language you know) and if you are 
> going to spend
> time learning a new language (${var} == "pooPoo") then you 
> would be better
> off learning Java (assuming you don't already know it) cause 
> then you could
> do scriptlets and middle tier coding and more whereas if you 
> use your time
> learning JSTL all you will know is JSTL.  
> 
> Believe me, JSTL will be easy to replace if someone comes out with an
> alternative.  I am a programmer but I understand the 
> importance of having
> the tags be similar to HTML tags and not like tags containing 
> scriptlets.
> 
> If it makes you happy $var is a legal Java variable name so 
> you could just
> write scriptlets with $var and no one would realize you 
> weren't writing JSTL
> 
> 
> :)
> 
> Why do you think Ant is so popular??? It got rid of all the 
> $var UNIX script
> like crap and made it more like tags should be!!!
> 
> Bottom line is, yes, Struts tags aren't the best but JSTL is 
> not much better
> and will probably be replaced with something not so ugly in 
> the future.
> 
> 
> Just my .02 sense.
> 
> I like it how some people don't get disturbed by questions 
> about connecting
> to a database with JDBC to the Struts user list but get mad 
> if you post a
> differing opinion about the crappy way some tags were written that
> interfaces with Struts code.  What an ACE!
> 
> 
> 
> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 10:28 AM
> To: Struts Users Mailing List
> Subject: Re: JSTL ot struts taglibs?
> 
> --- David Thielen <[EMAIL PROTECTED]> wrote:
> > Hi;
> > 
> > For the logic and I18N taglibs - what do you recommend - using the
> > struts taglibs or the JSTL taglibs?
> 
> Definitely JSTL.  They're more powerful, easier to use, potentially
> faster, and a Java standard.
> 
> David
> 
> > 
> > thanks - dave
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> -
> 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: LookupDispatchAction error

2003-08-14 Thread Bailey, Shane C.


Yes, you can do it without the ".do" and it is safer to do so.

You can even do this which is nice:


...


Note the /test? instead of /test.do? 


I remember looking at the source code before and the URL comes in in pieces
so that the query string is separate from the path and so struts
automatically puts on the filter (.do or whatever it may be).




-Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 12:07 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction error



Sorry, solution #1 should read:
 ... 

Not sure if you need the .do part but I do and that can be bad if you change
the extension later.  So if you can do it with just action="/test" then I
suggest to do it.  I will look at mine now to see if I can change it.




-----Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 12:01 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction error



I think you could do it a couple different ways...

1. 
JSP:

 
...


2. 
JSP:
...

struts config:
  
  
  


I've done similar so either way should work.



-Original Message-
From: OFlaherty, Colm [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 11:35 AM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction error

I am getting the following error on , which I can't figure out:

HTTP ERROR: 500 Request[/test] does not contain handler parameter named
updateMethod
RequestURI=/clientdb/test.do


I am following a couple of decent examples using the LookupDispatchAction
class (pages 128 -130 in "Programming Jakarta Struts" by Chuck Cavaness). My
config is basically the same as what he has, but I have a couple of minor
differences, which I don't think should be causing any issues, but maybe
someone can put me right: 

The JSP link that gives me the error is the following: 



My action mappings section has the following action:





...




I also have a section for the testForm: 




...



My /pages/test.jsp uses a template, which points at /pages/testcontent.jsp,
which contains the following: 







As u would expect, the "insert.label" key is contained in the properties
file (as well as the "test.maintain.label"  from the initial link)


insert.label=Insert
test.maintain.label=Maintain Tests



My TestUpdateAction class has the following hierarchy and methods



LookupDispatchAction
  |
BaseLookupDispatchAction
  |
BaseUpdateAction (methods: getKeyMethodMap (),getKeyMethodMap (params),
insert (params), update (params), delete ()
  (Maps "insert.label" to "insert")
  |
TestUpdateAction


My TestForm was generated using Xdoclet from the Test.java source code, and
has a protected "updateMethod" string variable, with a getter and setter.
TestForm is inherited from ActionForm


The kind of thing that I'm thinking might be causing the issue include: 

1.  The hierarchy of TestUpdateAction
2.  The fact that /pages/testcontent.jsp is not referenced directly, but
via the following lines in /pages/test.jsp: 

 ...
3.  The calling link does NOT in a Form.  Its entire contents looks like
this: 

<%@ include file="/tags/taglibs.jsp" %>









Can anyone see anything I'm missing, or anything that I'm just doing
incorrectly?  Any help is much appreciated.

Colm


**
This message is sent in confidence for the addressee
only.  The contents are not allowed to be disclosed to
anyone other than the addressee.  Unauthorised 
recipients must preserve this confidentiality and should 
please advise the sender immediately of any error in
transmission.
**


-
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: JSTL ot struts taglibs?

2003-08-14 Thread Bailey, Shane C.

But, what I really meant about JSTL being replaced was in popularity.

JSP tags are being replaced (in popularity) with Struts tags, your JSTL, and
alike.


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 4:02 PM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?



-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 3:45 PM
To: Struts Users Mailing List
Subject: Re: JSTL ot struts taglibs?



Bailey, Shane C. wrote:

[Snip]
Why should build files be composed of tags at all?  I think Ant is great 
too (a lot better than make), but does the fact that it is tag-based 
have anything to do with it?  No.  The reason that the original author 
went with XML for the structure of Ant build files had nothing to do 
with tags -- it had to do with hierarchy.  See <http://tinyurl.com/jg0d> 
to read his thoughts on the matter (sorry for the cachelink but I can't 
find the official permalink).
[/Snip]

I don't know why a build file should be composed of tags either.  My point
was that Ant is nicer and more recently popular than make and the developer
could have thought, "You know, most people that will be using Any will
probably know make so I am going to throw a bunch of "==" in there and that
would be fine.  Ant has more of an excuse to have "==" in the darn thing
than a View (geared toward UI and graphic artist specialist) tag set does.
And the Ant developer must have seen the light. (All my opinion, of course).

[Snip]
Faster?  Given a programmer with equal knowledge of scriptlets and JSTL, 
scriptlets are definitely not faster for development.  Since when are 
they faster for performance?  Plus they tend to be difficult to read -- 
and I say this as a former PHP programmer.
[/Snip]

If they aren't faster in performance then something is wrong.  All the JSP
rendering practically has to do is put the code as is into the Servlet which
is a Java class.  No interpretation.  I haven't looked at the source but I
am sure the optimization for rendering code for Scriptlets vs JSTL has to be
there.  I know more Java programmers that could get a JSP page drawn if you
simple told them <% ... %> for multiple code segments and do <%= ... %> to
return an expression given all they knew was Java and no Web stuff
(including JSTL at all).

[Snip]
Okay, first of all, JSTL is a JCP specification (JSR-52, for more info 
see <http://jcp.org/aboutJava/communityprocess/final/jsr052/>).  It's 
not just some 3rd-party library that is going to be "replaced" any time 
soon.  Second of all, it is actually a part of the JSP 2.0 specification 
(just as scriptlets are part of an earlier JSP specification).  While 
scriptlets are still supported in JSP 2.0, it is clear that Sun and the 
JCP are trying to provide alternatives to scriptlets and at some point 
they might even be deprecated.
[/Snip]

Nothing is impossible.  I remember being devastated after getting pretty
efficient with AWT and then the model changed and then Swing came out. And
you even mention how scriptlets WERE part of the spec and are now close to
deprecation.  So what is so ridiculous about my statement???

[Snip]
So sorry, but I had to ask - what the crap were you talking about.
[/Snip]

No problem.



-
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: Mapping Struts controller servlet to webapp root: trouble

2003-08-14 Thread Bailey, Shane C.


If I remember correctly, from looking at the source code, Struts determines
what extension (or prefix) to add to the request. If /* is used I could see
how it could screw things up.  You don't want images and things like that
going through Struts anyway, I wouldn't think.

Why do you want to do /* (at least for Struts URL pattern)?


-Original Message-
From: Paul Yunusov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: Mapping Struts controller servlet to webapp root: trouble

I was wondering if anyone has heard of issues arising when the contoller is 
mapped to a webapp's root.

I am talking about this:


  action
  /*


where "action" is the Struts controller.

Struts seems to return a 400 error with such mapping when it tries to make a

forward from an Action instance saying that "the request was syntactically 
incorrect".

/struts/* or *.do are 
commong but I was wondering about the "/*" mapping. Anyone heard of any 
issues with this?
Thanks,

Paul


-
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]



Is this a bug with struts config file?

2003-08-14 Thread Bailey, Shane C.
 

Short version:

I would think that I could do this then 
and Struts

would know to add the .do for me.  When a  is
rendered it does not

have the .do on it.  I have to make it  

 

Is that a bug?

 

Since Struts determines extensions on the fly (at Servlet startup based on
URL pattern in web.xml)

it just seems defeating that you would have to hard code an extension
anywhere in the system.

 

 

Longer version: 

In my crusade to wipe out all hard coded ".do" extensions in the app for
future upgradability

(for instance all my links are like this 
instead of "login.do" 

 

I found that (unless something is not right) the global-forwardS don't act
as I would expect.

It implies in the struts config dtd that if contextRelative not true then
the path is module relative.

 

It seems minor but if I need to change the extension to ".go" or something
else,

say, because if a hacker doesn't know you are using Struts because the
extension is ".poo" then

it may help the system.  But in order to make the change I would have to go
into all my many

struts config files and globally replace ".do".  Not too bad if I am doing
it but when someone else

in the group with less experience does it then it could be a pain.



RE: ForwardAction and modules

2003-08-14 Thread Bailey, Shane C.


I use Tiles and so all my forward actions look simply like this:

 
 

Because doc.moduleHome is in the tiles-defs.xml for the current module it
looks nicer in the struts config.  

That way, in the tiles-defs.xml you have the non module specific path listed
and so it will be of what you are looking for it sounds like.  So in all my
tiles-defs.xml no matter if they are in the "main" module or in submodules
then I simply refer to any JSP as (in my case) 
/WEB-INF/wherever/whatever.jsp  You don't have to think about modules in the
tiles-defs.

You should think about using Tiles.


-Original Message-
From: Travis Stevens [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 2:40 PM
To: [EMAIL PROTECTED]
Subject: ForwardAction and modules

I have a module in which I have a forward action, and it seems that I 
have to add the module name to the parameter of the forward page.
(actual example)


 I would think that the ForwardAction should take into consideration 
that the forward page is in the specified module:
(envisioned example)


In my example there is an "admin" module and a file: /admin/adminIndex.jsp.

Any thoughts on this?

-Trav


-
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: Netscape vs. IE link problem

2003-08-14 Thread Bailey, Shane C.

I have made Struts work pretty successfully on both browsers.  Let me make
sure I understand what you are saying here...

When you say you link to and from these tiles defs you just mean that your
input="tile.def1" and your action's forward path="tile.def2" is that
correct?  If so, this is what I do as well.

How do you do your hrefs, struts html:link or actual HTML anchors?

I am not sure about the sentence where NS, "searches for the forward in the
same directory as the calling page (paying no attention to the
action-mapping)".

The only forwards my links access are global-forwards as in   
are you saying that you are linking to a forward in the action mapping from
a JSP?

That doesn't sound right, so please fill in what I am missing.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 3:54 PM
To: [EMAIL PROTECTED]
Subject: Netscape vs. IE link problem

Hi,

In one of our Struts applications, we have created tile definitions for
every page and action-mappings that link to and from these definitions
instead of the JSPs themselves. The rationale for this approach is to make
it easy to replicate a site using the same, or mostly the same, pages. But
an interesting snafu employing Netscape (as opposed to IE) has arisen with
this schema: you can evoke the appropriate forward from both browsers when
submitting a form, yet if you attempt to link to the same page via an href,
IE finds its way to the correct page but Netscape apparently searches for
the forward in the same directory as the calling page (paying no attention
to the action-mapping). I was wondering if anyone had encountered this
problem and knew of a work-around.

Thanks



-
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: modules, somethings missing

2003-08-14 Thread Bailey, Shane C.


That would be great, if all the Struts users changed their mapping to *.asp
Bill G. would think the whole world is using ASP and he would get a real
Viagra moment from that.




-Original Message-
From: Travis Stevens [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 6:32 PM
To: Struts Users Mailing List
Subject: Re: modules, somethings missing

>
>
>If you wanted you could the URL mapping for "*.cool" or something and
>you will see Struts append that to your path.  That way people would
>not know you are using Struts (maybe to fake out hackers).
>
>G
>

I think i'll us a *.asp, althought that would probably not deter hackers 
very much.

-Trav



-
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 form multiple Action mapping

2003-08-14 Thread Bailey, Shane C.


What about:





 







-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:04 AM
To: 'Struts Users Mailing List'
Subject: One form multiple Action mapping

I have a registration form (RegForm) which based on the method/mode I
want to direct it to a different action mapping in order to assign
different roles or security restrictions. I have a single RegAction
extending the DispatchAction class, with parameter 'method' as the
dispatch parameter. 

I thought of maybe put a  and based on the 'method' put the
correct  one. But then again maybe this will harm the
javascript validation, cause the name of the form will be different.

How can this be done? 

Registration.jsp:

 
...



Thanks,
Erez



-
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: Mapping Struts controller servlet to webapp root: trouble

2003-08-14 Thread Bailey, Shane C.


I guess I am more saying, I'm pretty sure, by looking at Struts source code
(granted a week or so ago), that you can't do /*.  So I am suggesting to use
a filter.

But looking at a different piece of the source maybe the solution is to not
have a mapping specified at all.  Sounds ugly, dangerous; but there is a
comment in the source that states, " Use our servlet mapping, if one is
specified":



/**
 * Return the form action converted into a server-relative URL.
 */
public static String getActionMappingURL(String action, PageContext
pageContext) {

HttpServletRequest request = (HttpServletRequest)
pageContext.getRequest();
StringBuffer value = new StringBuffer(request.getContextPath());
ModuleConfig config =
(ModuleConfig)
pageContext.getRequest().getAttribute(Globals.MODULE_KEY);
if (config != null) {
value.append(config.getPrefix());
}

// Use our servlet mapping, if one is specified
String servletMapping =
(String) pageContext.getAttribute(Globals.SERVLET_KEY,
PageContext.APPLICATION_SCOPE);
if (servletMapping != null) {
String queryString = null;
int question = action.indexOf("?");
if (question >= 0) {
queryString = action.substring(question);
}
String actionMapping = getActionMappingName(action);
if (servletMapping.startsWith("*.")) {
value.append(actionMapping);
value.append(servletMapping.substring(1));
} else if (servletMapping.endsWith("/*")) {
value.append(servletMapping.substring(0,
servletMapping.length() - 2));
value.append(actionMapping);
} else if (servletMapping.equals("/")) {
value.append(actionMapping);
}
if (queryString != null) {
value.append(queryString);
}
}

// Otherwise, assume extension mapping is in use and extension is
// already included in the action property
else {
if (!action.startsWith("/")) {
value.append("/");
}
value.append(action);
}

// Return the completed value
return (value.toString());
 }

-Original Message-
From: Paul Yunusov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 6:02 PM
To: Struts Users Mailing List
Subject: Re: Mapping Struts controller servlet to webapp root: trouble

On August 13, 2003 05:40 pm, Bailey, Shane C. wrote:
> Do you want to add a filter which will look over every request prior to
> Struts getting any requests?  That might be one possibility.
>
> If you have never written a filter then one I know where you can get
source
> for is at securityfilter.sourceforge.net that one isn't doing necessarily
> what you want but it is a (working with source) example.

No, all I want is to route every request to a webapp through a Struts 
controller servlet. The only obvious option, which is mapping the servlet to

the "/*" pattern in web.xml, doesn't seem to work. That's why I am wondering

if Struts supports this kind of mapping or not, or if this is a bug.
Thanks,

Paul


>
> - Original Message -
> From: "Paul Yunusov" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, August 13, 2003 11:51 AM
> Subject: Re: Mapping Struts controller servlet to webapp root: trouble
>
> > Thanks, I see how the way Struts parses URLs could confuse it. I want to
>
> map
>
> > Struts to the webapp's root because my webapp doesn't contain any static
> > content and I want to limit all requests to Struts-defined actions.
> >
> > Can anyone confirm Struts does not support "/*" mapping for its
> > controller servlet?
> >
> > Thank you,
> >
> > Paul
> >
> > > -Original Message-
> > > From: Paul Yunusov [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, August 13, 2003 11:05 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Mapping Struts controller servlet to webapp root: trouble
> > >
> > > I was wondering if anyone has heard of issues arising when the
> > > contoller
>
> is
>
> > > mapped to a webapp's root.
> > >
> > > I am talking about this:
> > >
> > > 
> > >   action
> > >   /*
> > > 
> > >
> > > where "action" is the Struts controller.
> > >
> > > Struts seems to return a 400 error with such mapping when it tries to
>
> make
&

RE: using modules versus simply using multiple struts-config file s

2003-08-14 Thread Bailey, Shane C.


I think if you are going to use messages like that then one place you may
run into problems is with the Validator.  I can't remember if not all or
none of the elements in the Validator (which had the "key" attribute) didn't
have a "bundle" attribute (so I don't know how it would determine which
bundle to look up and I can't imagine it goes through every one
automatically).  At least I ran into a problem when I first started using
Validator and attempting something similar.

If you are not using Validator (or it works differently now or I just was
not using it right) then disregard, of course.


-Original Message-
From: Van Riper, Mike [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 5:55 PM
To: '[EMAIL PROTECTED]'
Subject: RE: using modules versus simply using multiple struts-config file s

> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 13, 2003 12:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: using modules versus simply using multiple struts-config
> file s
> 
> Very interesting. I didn't know you could now have multiple 
> struts-configs
> and no modules.  
> 
> The two problems I had with using modules was (at first) the switching
> between them as mentioned. I never took to the SwitchAction 
> so I use global
> forwards which do my module prefixes for me.  And second, having to
> duplicate my (commonly used) messages in each modules 
> resource file (this
> problem is more of a problem of "why can't I inherit them" 
> than anything
> else.
> 
> It seems like multi configs with no modules solves problem 1. 
>  I take it
> that you will still have problem 2.  But I did see a post 
> recently about
> someone who made a code change so that resource files could inherit.

My current plan is to have the default resource file contain common
resources shared by all my modules (here I use "module" to refer to a
subdirectory of my web root that has its own separate struts-config file for
action mappings, form beans and anything else specific to that subsection of
the webapp) and then have a separate resource file associated by module name
with each specific module. A person working logically in only one module
would access their module-specific resources using the module name and any
common resources in the default manner that doesn't require specifying the
name associated with the resource file in the struts-config file
configuration for it.

I am planning to have one struts-config for common configuration and a
separate struts-config for each major subsection of my webapp. The common
resource file configuration goes in the common struts-config file. The
resource file specific to each subsection of the webapp would be configured
in the separate struts-config file for that subsection. I think this is
where one of the differences in my approach comes in. I believe each module
can have its own default resource file configuration that can be different
when modules are configured separately in the web.xml file. Since I don't
use separate web.xml entries, I can only have one common default resource
file configured across all my logical modules.

This just means that for most resources, I will be specifying the module
resources file by its associated configuration name as a parameter to my
resource file property lookups. Since there will be a direct one-to-one
mapping between each subsection of the webapp and the resource file specific
to that subsection, I think this will be something that will be easy to
remember. For example, a logical "report" module would specify the "report"
bundle in  tag instances that used the "report" module
resource file like so:

  

I am inferring this from the main Struts 1.1 example application where an
"alternate" resource file is accessed like so in logon.jsp:

  

I think you should be able to do the inverse of this when using separate
module configurations. For your module related property lookups, you could
use the default resource file configured for that module. For the common
ones that you wanted to use across all modules, you would have a
configuration entry for the default resource file in each module
struts-config file and make that your alternate resource file for the
module. So, for you it would be the property lookup of a shared resource
that would need to supply the bundle attribute to the  tag.
Assuming you used "common" as the key for your shared properties, your
lookups in the common resource file would be the ones that needed to supply
the bundle attribute:

  

This isn't as transparent as a patch to Struts that supports inheriting
common properties into the default resource file for each module, but, it
would allow reuse of common properties acro

RE: [OT] Interesting JSF info

2003-08-12 Thread Bailey, Shane C.

Yes, but more so now than ever.  AFAIK, there hasn't been a non-proprietary,
standardized, free framework which does what Struts does until now.  At
least out of the starting gate JSF won't have it all but...



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 12:37 PM
To: Struts Users Mailing List
Subject: RE: [OT] Interesting JSF info

On Tue, 12 Aug 2003, Bailey, Shane C. wrote:

> Dude, where have you been.  What you have said has already been posted.
> But, you also have to remember that the JCP members are going to want
their
> product (their name is associated with) to be as complete and strong as
.NET
> so I still think that JSF will have everything Struts does within a year
or
> so.  Which can be an eternity, I do realize.  I am not saying Struts is
done
> right now.  I just think it is going to be like do I choose the Camaro or
> the Firebird (two things that are that closely related in what they
offer),
> though, Struts and JSF won't come off the same assembly line (in Canada
and
> this won't be the last year of production, but other than that... :) .

If you're really saying "Struts needs to grow or die" I would totally
agree with that.  But that's true with or without JavaServer Faces in the
picture.

Craig

-
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: [OT] Interesting JSF info

2003-08-12 Thread Bailey, Shane C.

So, does Sun have final say since Java does have their named more strongly
tied to Java?

And does Sun have more control over what goes into the core Java, like
java.lang, than it does javax.xx ??


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 4:42 PM
To: Struts Users Mailing List
Subject: RE: [OT] Interesting JSF info

On Mon, 11 Aug 2003, Bailey, Shane C. wrote:

> I guess my problem is that I think of Java as being a Sun only product and
I
> forget about the committees involved in the process of deciding what goes
> into the different Java specifications or editions (EE,SE,ME).

Yep ... thinking that Sun "controls" the evolution of Java specs the same
way that Microsoft controls the evolution of .Net is way way WAY off the
mark :-).

A look at the list of companies and individuals that are involved in the
development of JavaServer Faces itself might be illuminating:

  http://jcp.org/en/jsr/detail?id=127

Craig

-
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

2003-08-11 Thread Bailey, Shane C.


Just copy and past it into your new validation class:

/**
 *  
 *
 *  Return true if the specified object is a String or a
null
 *  value.
 *
 [EMAIL PROTECTED]  o  Object to be tested
 [EMAIL PROTECTED]The string value
 */
private static boolean isString(Object o) {

if (o == null) {
return (true);
}
return (String.class.isInstance(o));
}


One reason I can think of your validator needing to know the difference
between if validating for a String or say a String[] (returned if a
multi-select or if someone uses logic iterate to create 20 inputs with the
same name and that would use a String[])

The isString() method would tell you whether you need to test if the object
is a String[] because it wouldn't be a String (unless it is null by this
methods definition) so then you would do a check on the String[].length and
determine that nothing is there and throw the user back to the form.




-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 7:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Validator

It's in the code of FieldsCheck.java. I was trying to create one of my
own validator and I saw these lines  there.

Erez

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 12:10 AM
To: 'Struts Users Mailing List'
Subject: RE: Validator

???

I don't see it in my validation-rules.xml.  Which version are you using?

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: August 6, 2003 3:33 PM
To: 'Struts Users Mailing List'
Subject: Validator



I am trying to figure out the code in struts.validator.FieldsCheck.java
in order to write one of my own.
Can someone explain what the purpose of the following lines of code in
all of the validateXXX() in Struts:

validateIntRange (...) {

if (isString(bean)) {
value = (String) bean;
}
...
}

Is this really necessary?

Erez



-
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: struts 1.1 question

2003-08-11 Thread Bailey, Shane C.

HeHe.

We got a wild one here.  WooWoo.

A lot of stuff is said on this site which is opinion and stated as if it
were fact.  It can get kinda confusing.

The fact is that it is more like: you don't have to drive on the right
(since this list is multi-countried you can read right as correct and in
U.S. read it as the opposite of left :) side of the road but in the long run
it is a much better thing to do.

You don't HAVE to front all your JSPs but it is the right (or is it left)
thing to do.



-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 4:48 PM
To: [EMAIL PROTECTED]
Subject: Re: struts 1.1 question

Where exactly did you read that all jsps must be fronted by actions?  I'm 
using 1.1, and assuredly have NOT (nor will I) front them all with actions.


From: e <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: struts 1.1 question
Date: Mon, 11 Aug 2003 16:37:28 -0400


I am about to upgrade to struts 1.1 and I have a question.
I have a site with a decent amount of content stored in a content manager.
I want to use tiles, but I read that in struts 1.1, all jsps have to be 
fronted by actions.
Does this mean that I have to write forwards in strutsconfig.xml for every 
single jsp on the site?
This could add up to a lot of pages.

Am I interpreting this correctly?

Thanks.

-e



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

_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
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-config_1_1.dtd description incorrect?

2003-08-11 Thread Bailey, Shane C.
 

Should the struts-config_1_1.dtd describing the global-forwards "redirect"
attribute state that for redirects = true 

response.sendRedirect() is called and not as stated,
"RequestDispatcher.Redirect" is called ? 

 

 

 

 



RE: Forward to the same page

2003-08-11 Thread Bailey, Shane C.

Translated:

JSP:

">
  ChangeLanguage


Which creates an HTML version like this:

ChangeLanguage

I think you could also use request.getServletPath() instead of
request.getRequestURI().


It seems like then, though, you are still in a quandary.  You can't do
mapping.findForward(request.getParameter("cameFrom"));

So what is the best next step?  Will just a simple redirect do which the
value of request.getParameter("cameFrom") ??

Not sure. I haven't had to do anything but a mapping.findForward() from
within an action so I'm not 100% sure the best way to get to your
destination next.  I'm sure someone could help.  I am guessing since you
have a handle on the Response though that would be your answer but like I
said, there could be a better way, may be a way to forward to a non-mapped
page with a method already in the Action.




-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 9:06 AM
To: Struts Users Mailing List
Subject: RE: Forward to the same page

Well if several page can submit to the same action , only way you are going
to know which one the submission came from in the action (and thus know
where to forward back to) is if that information  is itself also submitted
(or some other parameter that can identify the page you came from and so
allow you to extrapolate the appropriate url or forward name to forward to).

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, 11 August 2003 20:26
To: [EMAIL PROTECTED]
Subject: Forward to the same page


Hello!

I am still searching for a possibility to forward to the same page.
I want, that the user can switch the language at runtime. After choosing
the LanguageAction Class is called and switches the Locale. But it is
necessary to give a forward.


Example:
(before forward --> after forward)
site1.jsp -->  site1.jsp
site2.jsp -->  site2.jsp
site3.jsp -->  site3.jsp
and so on

With one page it is no problem, I can point to this page. But with
several pages it is not possible, because, I don't know which page is
actually used.

There must be a way to point to the same page!

Dirk



 




-
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: JSTL ot struts taglibs?

2003-08-10 Thread Bailey, Shane C.

If I knew then I would be selling you some awesome piece of software that
solved all your problems, now wouldn't I?

I'm trying state my opinion and learn (from replies).

About the only thing in that statement that I know is verifiably screwed up
is that Ant has no $var and I apologized and rectified what I meant in one
of my recent posts.

"Whachu talkin' 'bout Willis?"


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 2:53 PM
To: Struts Users Mailing List
Subject: Re: JSTL ot struts taglibs?



Bailey, Shane C. wrote:

> Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is
a
> standard (it is the Java language you know) and if you are going to spend
> time learning a new language (${var} == "pooPoo") then you would be better
> off learning Java (assuming you don't already know it) cause then you
could
> do scriptlets and middle tier coding and more whereas if you use your time
> learning JSTL all you will know is JSTL.  
> 
> Believe me, JSTL will be easy to replace if someone comes out with an
> alternative.  I am a programmer but I understand the importance of having
> the tags be similar to HTML tags and not like tags containing scriptlets.
> 
> If it makes you happy $var is a legal Java variable name so you could just
> write scriptlets with $var and no one would realize you weren't writing
JSTL
> 
> 
> :)
> 
> Why do you think Ant is so popular??? It got rid of all the $var UNIX
script
> like crap and made it more like tags should be!!!


What the crap are you talking about.




Erik


-
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: JSTL ot struts taglibs?

2003-08-10 Thread Bailey, Shane C.

Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a
standard (it is the Java language you know) and if you are going to spend
time learning a new language (${var} == "pooPoo") then you would be better
off learning Java (assuming you don't already know it) cause then you could
do scriptlets and middle tier coding and more whereas if you use your time
learning JSTL all you will know is JSTL.  

Believe me, JSTL will be easy to replace if someone comes out with an
alternative.  I am a programmer but I understand the importance of having
the tags be similar to HTML tags and not like tags containing scriptlets.

If it makes you happy $var is a legal Java variable name so you could just
write scriptlets with $var and no one would realize you weren't writing JSTL


:)

Why do you think Ant is so popular??? It got rid of all the $var UNIX script
like crap and made it more like tags should be!!!

Bottom line is, yes, Struts tags aren't the best but JSTL is not much better
and will probably be replaced with something not so ugly in the future.


Just my .02 sense.

I like it how some people don't get disturbed by questions about connecting
to a database with JDBC to the Struts user list but get mad if you post a
differing opinion about the crappy way some tags were written that
interfaces with Struts code.  What an ACE!




-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 10:28 AM
To: Struts Users Mailing List
Subject: Re: JSTL ot struts taglibs?

--- David Thielen <[EMAIL PROTECTED]> wrote:
> Hi;
> 
> For the logic and I18N taglibs - what do you recommend - using the
> struts taglibs or the JSTL taglibs?

Definitely JSTL.  They're more powerful, easier to use, potentially
faster, and a Java standard.

David

> 
> thanks - dave


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: method to get new Id to next action when old Id is in request?

2003-08-10 Thread Bailey, Shane C.

I forgot to add the line of code in the edit method that inserts into form
bean.

Also, I should have assumed that you are going to re-use the sectionEdit...

sectionEdit_execute()
{
int id = form.getId();

if(id==0)
{
try{
Integer idInt =
(Integer)request.getAttribute("my.NewId");
id =idInt.intValue();
}catch(Exception e){
//do whatEver
}
}

if(id==0){ return mapping.findForward("cantEditBadId"); }

form.setId(id);

return mapping.findForward("displayEdit");
}







-----Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 5:30 PM
To: 'Struts Users Mailing List'
Subject: RE: method to get new Id to next action when old Id is in request?



I guess you could do this:

sectionInsert_execute()
{
insert into DB
int id = someHowGetTheNewId();

request.setAttribute("my.NewId", new Integer(id));
return mapping.findForward("success");
}


sectionEdit_execute()
{
int newId = 0;
try{
newId =
((Integer)request.getAttribute("my.NewId")).intValue();
}catch(Exception e){
//do whatEver
}

return mapping.findForward("displayEdit");
}


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 5:26 PM
To: Struts Users Mailing List
Subject: method to get new Id to next action when old Id is in request?

I have two actions chained together. They both take the same formbean. 
The first is sectionInsert.do and the second, which sectionInsert 
forwards to on success, is sectionEdit.do

sectionInsert.do receives the properties of a Section in the request 
parameters, including id=0 where it is 0 because it does not exist in 
the DB yet. So it inserts the new Section into the DB and returns the 
new id, which is needed by sectionEdit to put into the html for the edit 
page.

I originally thought I could save the new id to the formbean and this 
would get passed on, but sectionEdit instantiates its own formbean and 
fills it with the request parameters - include id=0.

Is there an intuitive way of passing on the new id?

I already use sectionEdit.do as a first action by calling it with an id 
on a querystring, where the formbean picks it up. I would like to use a 
method that is easy for both these situations.

I'd appreciate any inspiration.
Adam


-
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: JSTL ot struts taglibs?

2003-08-10 Thread Bailey, Shane C.


Another debate.  Your debate was to make me feel like I was doing something
wrong by posting my opinion.  There was no debate.

The tags do speak for themselves and if you think that $var which Java
allows but is NEVER used is acceptable syntax for a tag then that speaks
volumes as well.

Never said, "JSF will replace JSTL".  I just said let's see what that
technology and others has in store in the near future.  Java didn't have
every API and package when it first came out so, like I said, we will see
what JSF has to offer in the near future.  I'm just hoping it is some
replacement for those step backwards tags.


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 11:51 AM
To: Struts Users Mailing List
Subject: RE: JSTL ot struts taglibs?

--- "Bailey, Shane C." <[EMAIL PROTECTED]> wrote:
> 
> Don't get me wrong, I think scriptlets are ugly and shouldn't be used
> but
> like I said JSTL is not da bomb and if already know Struts tags I
> wouldn't
> go rewriting my code to JSTL until I have seen what JSF and any new
> technology near by has in store.

JSF is not a replacement for JSTL.  They complement each other.

> 
> I'm just saying all the reasons listed do not necessarily mean a whole
> lot
> since scriptlets can fit nearly everything said about JSTL but yet
> everybody
> agrees not to use scriptlets.  I am just giving another opinion.

The question had nothing to do with scriptlets.  It was about using JSTL
or Struts tags.  I'm not going to participate in another JSTL debate.  The
tags speak for themselves.

David


> 
> 
> 
> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 11:21 AM
> To: 'Struts Users Mailing List'
> Subject: RE: JSTL ot struts taglibs?
> 
> 
> Scriptlets are more powerful (you can do ANYTHING Java can do), faster,
> is a
> standard (it is the Java language you know) and if you are going to
> spend
> time learning a new language (${var} == "pooPoo") then you would be
> better
> off learning Java (assuming you don't already know it) cause then you
> could
> do scriptlets and middle tier coding and more whereas if you use your
> time
> learning JSTL all you will know is JSTL.  
> 
> Believe me, JSTL will be easy to replace if someone comes out with an
> alternative.  I am a programmer but I understand the importance of
> having
> the tags be similar to HTML tags and not like tags containing
> scriptlets.
> 
> If it makes you happy $var is a legal Java variable name so you could
> just
> write scriptlets with $var and no one would realize you weren't writing
> JSTL
> 
> 
> :)
> 
> Why do you think Ant is so popular??? It got rid of all the $var UNIX
> script
> like crap and made it more like tags should be!!!
> 
> Bottom line is, yes, Struts tags aren't the best but JSTL is not much
> better
> and will probably be replaced with something not so ugly in the future.
> 
> 
> Just my .02 sense.
> 
> I like it how some people don't get disturbed by questions about
> connecting
> to a database with JDBC to the Struts user list but get mad if you post
> a
> differing opinion about the crappy way some tags were written that
> interfaces with Struts code.  What an ACE!
> 
> 
> 
> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 10:28 AM
> To: Struts Users Mailing List
> Subject: Re: JSTL ot struts taglibs?
> 
> --- David Thielen <[EMAIL PROTECTED]> wrote:
> > Hi;
> > 
> > For the logic and I18N taglibs - what do you recommend - using the
> > struts taglibs or the JSTL taglibs?
> 
> Definitely JSTL.  They're more powerful, easier to use, potentially
> faster, and a Java standard.
> 
> David
> 
> > 
> > thanks - dave
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> -
> 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]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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: JSTL ot struts taglibs?

2003-08-10 Thread Bailey, Shane C.


Going by this statement that you replied to and didn't correct anything
about it:

> there's a good chance that (in the future) containers 
> will have their own optimized versions of the JSTL-tags, there are 
> already some
> implemented in TC5.x

It doesn't sound like the optimization is totally there and everywhere.  

Anyway, I'm not saying that scriptlets are the way to go if you reread all
my posts.  I am saying the guys who were assigned to write the JSTL tags (at
least the logic ones) really dropped the ball by appearing to not know their
intended audience (UI specialist which are used to HTML like tags and not
${var} ==).

More of a philosophical disagreement than anything.

I'm sure I'll end up using JSTL but I am hoping for a little better
implementation of some of the tags.  That's all.

:)


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 4:32 PM
To: Struts Users Mailing List
Subject: RE: JSTL ot struts taglibs?

> If they aren't faster in performance then something is wrong.  All the
> JSP
> rendering practically has to do is put the code as is into the Servlet
> which
> is a Java class.  No interpretation.  I haven't looked at the source but
> I
> am sure the optimization for rendering code for Scriptlets vs JSTL has
> to be
> there.  

Don't be so sure.  Because the JSTL is standard, containers can optimize
the java code generated from JSTL tags.  This means a  tag can be
converted into a real Java if statement instead of creating tag instances
and invoking the tag's lifecyle.  My understanding is that the Jasper JSP
compiler (comes with Tomcat) actually generates faster Java code if you
*don't* use scriptlets at all.  Resin and Tomcat both optimize JSTL tag
usage.

So, with the JSTL we get the best of both worlds:  Fast page rendering and
standardized, powerful and easy to use markup tags.

David


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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]



Allowing only POST for form submittal ????

2003-08-09 Thread Bailey, Shane C.
 

 

I have worked with Struts at a few different companies now and I noticed
none of them try

to do any checks to see that only POST methods can successfully make it to
Actions

which handle forms submittals.  Struts allows GETs and POSTs to make it to
every Action

so it seems like this would be something to think about (or maybe not, that
is one reason

I am asking).

 

So I guess I have a few questions then:

 

1.  Shouldn't I worry about (and defend against) which request methods
types (GET, POST, etc.) can make it to which actions?
2.  If so, does Struts have a built in mechanism like  or if not 
3.  Should I be doing something like this at the top of my execute()
method: 

  if( ! "POST" == request.getMethod() ){ return
mapping.findForward("failure"); }  for Actions which should require a POST
only

 

 

With #1 I mean should it matter if someone can go to the URL field in the
browser and type in all the field / value pairs for a form

and hit enter (I am thinking it does matter) compared to HAVING to do a POST
for it to succeed?

 

I am just thinking back to the Servlet programming days when you put the
form submittal handling code in the doPost() and the

other code in the doGet() methods.

 

Any thoughts on this?



RE: method to get new Id to next action when old Id is in request?

2003-08-09 Thread Bailey, Shane C.


I guess you could do this:

sectionInsert_execute()
{
insert into DB
int id = someHowGetTheNewId();

request.setAttribute("my.NewId", new Integer(id));
return mapping.findForward("success");
}


sectionEdit_execute()
{
int newId = 0;
try{
newId =
((Integer)request.getAttribute("my.NewId")).intValue();
}catch(Exception e){
//do whatEver
}

return mapping.findForward("displayEdit");
}


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 5:26 PM
To: Struts Users Mailing List
Subject: method to get new Id to next action when old Id is in request?

I have two actions chained together. They both take the same formbean. 
The first is sectionInsert.do and the second, which sectionInsert 
forwards to on success, is sectionEdit.do

sectionInsert.do receives the properties of a Section in the request 
parameters, including id=0 where it is 0 because it does not exist in 
the DB yet. So it inserts the new Section into the DB and returns the 
new id, which is needed by sectionEdit to put into the html for the edit 
page.

I originally thought I could save the new id to the formbean and this 
would get passed on, but sectionEdit instantiates its own formbean and 
fills it with the request parameters - include id=0.

Is there an intuitive way of passing on the new id?

I already use sectionEdit.do as a first action by calling it with an id 
on a querystring, where the formbean picks it up. I would like to use a 
method that is easy for both these situations.

I'd appreciate any inspiration.
Adam


-
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]



[OT] RE: JSTL ot struts taglibs?

2003-08-08 Thread Bailey, Shane C.

When I say I don't like $var in tags I mean more like I don't like script
like code in tags.  That is why I was confused for a second that Ant didn't
have $var, I meant I am not used to seeing real script like code in Ant
e.g.  , note "==" in the tag.  Ant has
no "==" (that I have had to use).  You do need to be able to differentiate
between "take this string literally" or "evaluate it" so I do see why ant
does that.  I meant Ant was able to make "make" files so much better without
having to have this: .

I think seeing "==" in JSTL tags really just turned me off because it makes
me think JSTL is a wolf (scriptlet code) in sheeps clothing.

I just don't think that



is easier to read (for a UI person) than



Then a JSTL guy will probably say you don't have to use "==" you can use
"eq" or something but then I say that leaves it open so that "==" will be
used by some and it will be harder for UI people who are used to html.

In theory it seems like there should be no logic in the View since 1. who
sees what and when could be considered business logic and 2. you would want
to try and make that who sees what where logic exist in a place where both
your Web app and Swing app (for instance) can get to it.



-Original Message-
From: Stephen Brown [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 1:20 PM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?

The nice thing about those $var style tags is that they are very easy to
read, if you use nice names for things, most people can understand the
relationships and get something out of them.  Also these translate well to
my email templates which are in Velocity macros.  But I guess the real issue
is that XML tends to be pretty long winded, nice for data transport, not so
nice when you're trying to read the file on screen.  I'm sorry about being
jaded against scriptlets, I've had a bad experience with inheriting software
with rough ones.

The good thing about scriptlets is that they compile, however.  >>>>> Has
anyone written something that wil reflect classes used in JSTL tags to at
least ensure that the relationships in the tags are possible? <<<<< I would
totally be in to getting more out of compilers that way - this would make
refactoring so much better too.


> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> Sent: August 8, 2003 11:43 AM
> To: 'Struts Users Mailing List'
> Subject: RE: JSTL ot struts taglibs?
> 
> 
> 
> You're right, ant does have $var in it I use my IDE to build 
> and forgot.
> 
> I just think that is a step backwards doing tags that way.
> 
> So many things are a step backwards like config files for 
> instance.  J2EE is
> supposed to be for the Enterprise which means there is at 
> least a DB and
> maybe the LDAP at your disposal yet people go back to storing stuff in
> files.
> 
> I am just trying to point out when things seem backwards.  
> Certain things
> (like tags) should be getting more XML like and not more UNIX 
> script like. 
> 
> Let's put our config in a datastore and let's either have 
> programmers doing
> the UI and accept things like scriptlets or have UI 
> specialist and make it
> easier on them but not having $var in the tags.  That's all I 
> am saying.
> 
> I definitely was wrong about Ant, sorry.
> 
> 
> 
> -Original Message-
> From: Stephen Brown [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 11:41 AM
> To: 'Struts Users Mailing List'
> Subject: RE: JSTL ot struts taglibs?
> 
> Maybe you could post this to the ECS users group.  Scriptlets 
> are fine, but
> tend to lend themselves to having lots of lines of code in a page that
> doesn't actually generate html, which is tough to read if you 
> are trying to
> lay things out.
> 
> > 
> > Why do you think Ant is so popular??? It got rid of all the 
> > $var UNIX script
> > like crap and made it more like tags should be!!!
> > 
> What are you talking about?  ${var} is pretty standard in Ant.  
> 
> > 
> > -Original Message-
> > From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
> > Sent: August 8, 2003 11:21 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: JSTL ot struts taglibs?
> > 
> > 
> > 
> > Scriptlets are more powerful (you can do ANYTHING Java can 
> > do), faster, is a
> > standard (it is the Java language you know) and if you are 
> > going to spend
> > time learning a new language (${var} == "pooPoo") then you 
> > would be better
> > off learnin

RE: JSTL ot struts taglibs?

2003-08-08 Thread Bailey, Shane C.




As long as they keep this part of the tag libraries:
http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl-p5.html
JSTL will be an asset to all MVC architectures out there!!!

:-(

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



RE: [OT] RE: JSTL ot struts taglibs?

2003-08-08 Thread Bailey, Shane C.



I didn't mean to imply that who sees what and when and logic in the JSP is
always a form of business logic.  That is a good example.

I am just trying to figure out a way so that all the logic in the JSPs isn't
duplicated if you need to also support the same functionality in a Swing
app.

I think I heard about a framework which attempts to determine views for Web
and Swing based apps already out there.  Was it Eclipse?

Anyway, in Swing I don't think you need that "drawing" logic.  Once the
components are set, you have an event which triggers showing the correct
tab.  So, I am wondering if you can get rid of that in the JSPs with an
already written or future framework?



-Original Message-
From: Brown, Melonie S. - Contractor [mailto:[EMAIL PROTECTED]

Sent: Friday, August 08, 2003 2:26 PM
To: '[EMAIL PROTECTED]'
Subject: [OT] RE: JSTL ot struts taglibs?

I agree that *business* logic shouldn't be in the view, but what about
formatting logic that is specific to web pages?

As an example, let's say that you had the following html code to do tabbed
menus:  [borrowed from http://www.clagnut.com/writings/csstabs/]


  
Home
About
News   
  



Would you consider the following to be "bad"?  

  



  
   


  
  



  



   


 Original Message 
Subject: [OT] RE: JSTL ot struts taglibs?
Date: Fri, 8 Aug 2003 13:47:02 -0400
From: Bailey, Shane C. <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.struts.user

[snip]

In theory it seems like there should be no logic in the View since 1. who
sees what and when could be considered business logic and 2. you would want
to try and make that who sees what where logic exist in a place where both
your Web app and Swing app (for instance) can get to 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: [OT] RE: JSTL ot struts taglibs?

2003-08-08 Thread Bailey, Shane C.

You got me there. lol


-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 12:24 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] RE: JSTL ot struts taglibs?

Just like you never said JSF will replace JSTL I never said I was going to
eat a bunny. ;)

-Tim

-Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 12:05 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] RE: JSTL ot struts taglibs?



It is nice to follow the heard sometimes but other times you just have to
step back and say, "Can't we do any better?".  I am not THAT closed minded
if I am convinced that the only real way to write tags to do what JSTL does
is to do it the current way then I will gladly use them I just think if
there is a better way then we should be about to talk about it.

The Big 3 car execs didn't want to talk about the future of the industry and
what was more user friendly and now look how they are paying.

I'm not mad.  Just not convinced.

BTW, how could you eat those poor defenseless bunnies

:)

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 12:07 PM
To: 'Struts Users Mailing List'
Subject: [OT] RE: JSTL ot struts taglibs?

Everyone take a deep breath and think of bunny rabbits.
Cute little bunnies

()()
('.')
(")(")

Hmm.. I'm getting hungry now.

-Tim


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 11:50 AM
To: 'Struts Users Mailing List'
Subject: RE: JSTL ot struts taglibs?




Another debate.  Your debate was to make me feel like I was doing something
wrong by posting my opinion.  There was no debate.

The tags do speak for themselves and if you think that $var which Java
allows but is NEVER used is acceptable syntax for a tag then that speaks
volumes as well.

Never said, "JSF will replace JSTL".  I just said let's see what that
technology and others has in store in the near future.  Java didn't have
every API and package when it first came out so, like I said, we will see
what JSF has to offer in the near future.  I'm just hoping it is some
replacement for those step backwards tags.


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 11:51 AM
To: Struts Users Mailing List
Subject: RE: JSTL ot struts taglibs?

--- "Bailey, Shane C." <[EMAIL PROTECTED]> wrote:
> 
> Don't get me wrong, I think scriptlets are ugly and shouldn't be used
> but
> like I said JSTL is not da bomb and if already know Struts tags I
> wouldn't
> go rewriting my code to JSTL until I have seen what JSF and any new
> technology near by has in store.

JSF is not a replacement for JSTL.  They complement each other.

> 
> I'm just saying all the reasons listed do not necessarily mean a whole
> lot
> since scriptlets can fit nearly everything said about JSTL but yet
> everybody
> agrees not to use scriptlets.  I am just giving another opinion.

The question had nothing to do with scriptlets.  It was about using JSTL
or Struts tags.  I'm not going to participate in another JSTL debate.  The
tags speak for themselves.

David


> 
> 
> 
> -Original Message-
> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 11:21 AM
> To: 'Struts Users Mailing List'
> Subject: RE: JSTL ot struts taglibs?
> 
> 
> Scriptlets are more powerful (you can do ANYTHING Java can do), faster,
> is a
> standard (it is the Java language you know) and if you are going to
> spend
> time learning a new language (${var} == "pooPoo") then you would be
> better
> off learning Java (assuming you don't already know it) cause then you
> could
> do scriptlets and middle tier coding and more whereas if you use your
> time
> learning JSTL all you will know is JSTL.  
> 
> Believe me, JSTL will be easy to replace if someone comes out with an
> alternative.  I am a programmer but I understand the importance of
> having
> the tags be similar to HTML tags and not like tags containing
> scriptlets.
> 
> If it makes you happy $var is a legal Java variable name so you could
> just
> write scriptlets with $var and no one would realize you weren't writing
> JSTL
> 
> 
> :)
> 
> Why do you think Ant is so popular??? It got rid of all the $var UNIX
> script
> like crap and made it more like tags should be!!!
> 
> Bottom line is, yes, Struts tags aren't the best but JSTL is not much
> better
> and will probably be replaced with something not so ugly in the future.
> 
> 
> Just my .02 sense.
> 
> I like it how some peo

Tiles and action input question

2003-08-08 Thread Bailey, Shane C.
 

What I need to do the equivalent of this (note the significant piece is the
input attribute):

 









 

If validation fails I would like to go to an anchor I have in the middle of
the page.  Not anything dynamic

like to the exact field where the error occurred or anything just to an
anchor on the middle of the page.

 

Is this possible?

 

If I wasn't using Tiles would this work:
input="/somedir/some.jsp#pageMiddle"???

Not that I would do it that way but I am curious.

 

 



RE: [Q] Struts and date formatters

2003-08-07 Thread Bailey, Shane C.


You could think of it as a business logic function and do it (the
date/String conversion)in the middle tier and pass it to the view already to
go.  It seems like the date format would be the same if you were printing it
to a JSP page or a Swing GUI.  If you ever had to support two or more front
end types then you wouldn't have to change the format in multiple places
because it would be sent to the view as it would be displayed.

Just a thought since I am working on, for the first time, a project which
actually has a Web part and a Swing part and many components are shared (at
least I am trying, others here are not so into sharing :)

-Original Message-
From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 8:41 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: [Q] Struts and date formatters

Is there a solution without using JSTL? I run on BEA
WebLogic 6.1sp2 and there is a known bug which limits
the number of external jars you can import into an
application. Do a google search for
CR064391_610sp2.jar for more details on that.

Anyway, we cannot upgrade to a new version soon, which
means we have to reduce the number of libs we import.
It sucks, but its reality. :(



--- Alex Shneyderman <[EMAIL PROTECTED]> wrote:
> Use JSTL's formatDate tag. Very easy to use and lets
> you format your
> date any way you want it. Example:
> 
>  pattern="-MM-dd HH:mm" />
> 
> it is that simple.
> Alex.
> 
> > -Original Message-
> > From: Riaan Oberholzer
> [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 06, 2003 8:30 AM
> > To: [EMAIL PROTECTED]
> > Subject: [Q] Struts and date formatters
> > 
> > I am using the  tag and for date
> fields
> > (java.util.Date), I get the (rather ugly) full:
> > 
> > Wed Aug 06 12:08:07 CEST 2003
> > 
> > I have tried to do:
> > 
> > DateFormdat df = DateFormat.getDateTimeInstance();
> > SimpleDateFormat sdf = (SimpleDateFormat)df;
> > sdf.applyPattern("-MM-dd hh:mm");
> > 
> > But it gets ignored how/where can I change the
> > default pattern that struts uses to format dates
> with?
> > 
> > Thanks.
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> > 
> >
>
-
> > 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]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
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

2003-08-07 Thread Bailey, Shane C.

I don't think it is the formbean that is checked for isString() it is the
data members of the formbean.  Since it is http I guess there is only 2
choices: String and String[] and so the test determines how the validation
for a value is to be done. 

Kinda goes back to that old question posted here...

It would be the difference between testing .length and .length() !!

:-)


-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 6:30 PM
To: 'Struts Users Mailing List'
Subject: RE: Validator

I guess it's more efficient if bean is a String type.  (Damn, I just cannot
see
when you would have a FormBean of type String only).

Anyway, I don't think it's needed...  This is going to bug me for the whole
evening:).

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: August 6, 2003 5:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Validator


It's in the code of FieldsCheck.java. I was trying to create one of my
own validator and I saw these lines  there.

Erez

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 12:10 AM
To: 'Struts Users Mailing List'
Subject: RE: Validator

???

I don't see it in my validation-rules.xml.  Which version are you using?

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: August 6, 2003 3:33 PM
To: 'Struts Users Mailing List'
Subject: Validator



I am trying to figure out the code in struts.validator.FieldsCheck.java
in order to write one of my own.
Can someone explain what the purpose of the following lines of code in
all of the validateXXX() in Struts:

validateIntRange (...) {

if (isString(bean)) {
value = (String) bean;
}
...
}

Is this really necessary?

Erez



-
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]



RE: modules, somethings missing

2003-08-06 Thread Bailey, Shane C.



I believe the problem is that you can only have 1 URL mapping to the Struts
Servlet.

All you have to have is your first servlet-mapping.  Struts will then take
care of everything automatically from then on out.  The thing you will have
to keep in mind is that if you are in the "main" module to access you link
to module actions by doing  and
  or if you want to go to an action
with the same name in the "main" module you just do 

One you have linked to the desired action and JSPs served up by those
modules will then be accessed like such  but
Struts will automatically figure you are in a JSP served by, say, private so
it makes the URL "whatever.com/nmmr/private/someAction".

When you are in say the public module (meaning in a JSP which was served up
by an action within that module) and you want to get to a private modules
action then you do something like this:

public module struts config:




then inside a public module JSP you would link to the private area by doing
Private Home


To be honest with you I use the ".do" instead of "/do/*" (meaning like your
/nmmr/ prefix) so that part is kinda sketchy with me as to when you need to
add "/nmmr" to the front of the action link etc.

But you should get the idea I hope.

-Original Message-
From: Travis Stevens [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 5:08 PM
To: [EMAIL PROTECTED]
Subject: modules, somethings missing

I am doing something wrong with modules, and am not quite sure what.

Basically, the rui requested is always being routed to default.  Here 
are my settings:

web.xml:

   NmmrActionServlet
   org.apache.struts.action.ActionServlet
   
   config
   /WEB-INF/conf/nmmr-struts-config.xml
   
   
   config/public
   /WEB-INF/conf/public-struts-config.xml
   
   
   config/private
   /WEB-INF/conf/private-struts-config.xml
   
   2
 

 
   NmmrActionServlet
   /nmmr/*
 
 
   NmmrActionServlet
   /public/*
 
 
   NmmrActionServlet
   /private/*
 

When I request a url of: /public/someAction i get this:
Thread-4 DEBUG util.RequestUtils - Get module name for path /private
Thread-4 DEBUG util.RequestUtils - Module name found: default

any ideas?

thanks,
-Trav





-
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: current year in JSP

2003-08-05 Thread Bailey, Shane C.


The problem is that something like that (determining current date) should be
done somewhere else besides the JSP if you want scriptlets totally out of
your JSP.

But if you don't want to do it somewhere else then the single expression
scriptlets aren't too bad to have in your JSP:


<%=(new
java.util.GregorianCalendar()).get(java.util.Calendar.YEAR)%>


This is untested code but it should work (or a variation).



-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 2:54 PM
To: 'Struts Users Mailing List'
Subject: current year in JSP


I have a scriptlet in my JSP which I wish to rewrite using JSTL and tags
and to get rid of the java code. How can I perform this?  

<%
for (int i = 30; i < 90; i++) {
%>
<%=2003-i%>
<%
}
%>


I wish to do something like:





How to compute the CurrentYear?

Thanks a lot,
Erez



-
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: Caching JSP / Tiles

2003-08-04 Thread Bailey, Shane C.

Is it free?


-Original Message-
From: Holman, Cal [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 6:24 PM
To: Struts Users Mailing List
Subject: RE: Caching JSP / Tiles

Have you looked at OSCache (http://www.opensymphony.com/oscache ).  You can
place caching tags in your template around the header and footer insert
tags.

Cal

http://www.calandva.com/Last update 08/01/03


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2003 15:42
To: [EMAIL PROTECTED]
Subject: Caching JSP / Tiles



Is it possible to have the header of a Tile be from cache but the body of a
tile to never be cached?



For example, given this definition:



  

  

  

  

  

  

  





Is it possible for the header JSP (in the above case it is described in
doc.classicLayout because it is on the top of every page)

to always be from cache and all others to be non-cached pages.



An even better idea for my situation would be to have only the body JSP to
not be cached and all others pages to be cached.



Either way, any ideas?



I need the solution to be able to work on both NS and IE.
  
Learn more about Paymentech's payment processing services at
www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are
proprietary and confidential information intended only for the use of the
recipient(s) named above.  If you are not the intended recipient, you may
not print, distribute, or copy this message or any attachments.  If you have
received this communication in error, please notify the sender by return
e-mail and delete this message and any attachments from your computer.

-
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 required not working with String[] multi-select

2003-08-04 Thread Bailey, Shane C.

I've never done this before with apache bugzilla so let me know if I did Ok.
View bug number 22121.


-Original Message-
From: Rob Leland [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 5:17 PM
To: Struts Users Mailing List
Subject: Re: Validator required not working with String[] multi-select

Please do file a bug report.

Thanks,

Rob

Bailey, Shane C. wrote:

>It sure appears that way from my code analysis.
>
>I JUST made it work though with a simple update of the commons source code.
>I guess I could look into submitting my update if they / anyone is
>interested in incorporating it in the commons code.
>
>
>I changed the org.apache.commons.validator.ValidatorUtil.getValueAsString()
>method from:
>
>  public static String getValueAsString(Object bean, String property) {
>  Object value = null;
>
>  try {
> value = PropertyUtils.getProperty(bean, property);
>  } catch (Exception e) {
> log.error(e.getMessage(), e);
>  }
>  return (value != null ? value.toString() : null);
>   }
>
>to:
>
>  public static String getValueAsString(Object bean, String property) {
>  Object value = null;
>
>  try {
> value = PropertyUtils.getProperty(bean, property);
>  } catch (Exception e) {
> log.error(e.getMessage(), e);
>  }
>   //Special case, check if String[]
>try
>{
>   String[] valueArray = (String[])value; 
>  if(valueArray==null || valueArray.length==0)
>  {
>   value = null;
>  }
>}
>catch(ClassCastException cce)
>{
>   //Then it wasn't a String[]
>}  
>  return (value != null ? value.toString() : null);
>   }
>
>
>I guess, just to be safe the second catch could catch Exception.
>
>Anyway, it fixed my validation problem for String[] and doesn't appear to
>have broken and validations which worked before.
>
>
>
>
>-Original Message-
>From: Kris Schneider [mailto:[EMAIL PROTECTED] 
>Sent: Monday, August 04, 2003 3:52 PM
>To: Struts Users Mailing List
>Subject: Re: Validator required not working with String[] multi-select
>
>AFAIK, the standard "required" validator doesn't work with arrays. Or, if
it
>does, I wasted time writing a custom validator ;-). I'd be intersted to
hear
>if
>anyone really has used the "required" validator successfully for an array
>field.
>I suppose I should check to see if there's a bug/RFE for an array validator
>and
>submit it...
>
>Quoting "Bailey, Shane C." <[EMAIL PROTECTED]>:
>
>  
>
>>I sort of already sent this message to the list but I made a mistake
>>(didn't
>>proof read my message) so here it is again but corrected ...
>>
>>Validator "required" validation is NOT working for my String[] (in a
>>dynaform.  I have seen others on the list say it works for them.
>>
>>Anyone else experiencing the same problem? Possibly it is because I am
>>using
>>a multi-select?
>>
>>Basically, if nothing is selected then instead of null be sent back for
>>that
>>parameter I am getting a zero length String[]and it's toString() value is
>>"[Ljava.lang.String;@3cfaab" which is important because of the way the
>>validateRequired() method works...
>>
>>I looked at the source code (of my commons-validator.jar using jad).
>>Maybe I am using an older version of the commons-validator jar and this
>>
>>
>was
>  
>
>>fixed or I am doing something else wrong?
>>
>>If so, where is the latest commons-validator.jar?
>>
>>Here is how my field is declared on the JSP:
>>
>>
>>  >  property="roleName"/>
>>
>>
>> 
>>
>>Here is how it is declared in the struts config:
>>
>>
>>
>>
>>
>>
>---
-
>  
>
>>
>>Struts source Code:
>>
>>public static boolean validateRequired(Object bean,
>>   ValidatorAction va, Field
>>
>>
>field,
>  
>
>>   ActionErrors errors,
>>   HttpServletRequest request) { 
>>
>>String value = null;
>>
>>if (isString(bean)) {
>>
>>value = (String) bean;
>>
>>} else {
>>
>>

RE: / /OREF:CPTF3B3C Refresh jsp exactly once

2003-08-04 Thread Bailey, Shane C.

I would be curious if this works the same as the scriptlet version:






Or to be more like the scriptlet in it's test (but with a safey check for
null in case the session attribute doesn't exist whereas the code below
would throw an exception on the JSP page if the session attribute wasn't
set, which is always on the firt try):













The second version using tags is longer but the first version should
suffice.



-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 4:24 PM
To: Struts Users Mailing List
Subject: RE: / /OREF:CPTF3B3C Refresh jsp exactly once


In JSP:


<% if
(!((String)session.getAttribute("alreadySubmitted")).equalsIgnoreCase("yup")
) { %>

<% session.setAttribute("alreadySubmitted", "yup");
} %>


Crude, but functional.

-= J

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 04, 2003 9:29 AM
> To: [EMAIL PROTECTED]
> Subject: / /OREF:CPTF3B3C Refresh jsp exactly once
> 
> 
> 
> Does anyone know how to refresh a jsp once exactly without user
> intervention?
> I have an applet that load before a table in the same jsp is
> rendered. I need to refresh in order to display the table.
> 
> I've trawled but there's no satisfactory solution - I've tried
> devshed's and e-e in addition to the meta tag but with the latter and
> some of the javascript, the page just loops.
> 
> Any ideas?
> 
> Tx
> 
> 
> 
> -
> 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 required not working with String[] multi-select

2003-08-04 Thread Bailey, Shane C.

It sure appears that way from my code analysis.

I JUST made it work though with a simple update of the commons source code.
I guess I could look into submitting my update if they / anyone is
interested in incorporating it in the commons code.


I changed the org.apache.commons.validator.ValidatorUtil.getValueAsString()
method from:

  public static String getValueAsString(Object bean, String property) {
  Object value = null;

  try {
 value = PropertyUtils.getProperty(bean, property); 
  } catch (Exception e) {
 log.error(e.getMessage(), e);
  }
  return (value != null ? value.toString() : null); 
   }

to:

  public static String getValueAsString(Object bean, String property) {
  Object value = null;

  try {
 value = PropertyUtils.getProperty(bean, property); 
  } catch (Exception e) {
 log.error(e.getMessage(), e);
  }
//Special case, check if String[]
try
{
   String[] valueArray = (String[])value; 
   if(valueArray==null || valueArray.length==0)
   {
value = null;
   }
}
catch(ClassCastException cce)
{
//Then it wasn't a String[]
}   
  return (value != null ? value.toString() : null); 
   }


I guess, just to be safe the second catch could catch Exception.

Anyway, it fixed my validation problem for String[] and doesn't appear to
have broken and validations which worked before.




-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 3:52 PM
To: Struts Users Mailing List
Subject: Re: Validator required not working with String[] multi-select

AFAIK, the standard "required" validator doesn't work with arrays. Or, if it
does, I wasted time writing a custom validator ;-). I'd be intersted to hear
if
anyone really has used the "required" validator successfully for an array
field.
I suppose I should check to see if there's a bug/RFE for an array validator
and
submit it...

Quoting "Bailey, Shane C." <[EMAIL PROTECTED]>:

> 
> I sort of already sent this message to the list but I made a mistake
> (didn't
> proof read my message) so here it is again but corrected ...
> 
> Validator "required" validation is NOT working for my String[] (in a
> dynaform.  I have seen others on the list say it works for them.
> 
> Anyone else experiencing the same problem? Possibly it is because I am
> using
> a multi-select?
> 
> Basically, if nothing is selected then instead of null be sent back for
> that
> parameter I am getting a zero length String[]and it's toString() value is
> "[Ljava.lang.String;@3cfaab" which is important because of the way the
> validateRequired() method works...
> 
> I looked at the source code (of my commons-validator.jar using jad).
> Maybe I am using an older version of the commons-validator jar and this
was
> fixed or I am doing something else wrong?
> 
> If so, where is the latest commons-validator.jar?
> 
> Here is how my field is declared on the JSP:
> 
> 
>  property="roleName"/>
> 
> 
>  
> 
> Here is how it is declared in the struts config:
> 
> 
> 
>

> 
> 
> 
> Struts source Code:
> 
> public static boolean validateRequired(Object bean,
>ValidatorAction va, Field
field,
>ActionErrors errors,
>HttpServletRequest request) { 
> 
> String value = null;
> 
> if (isString(bean)) {
> 
> value = (String) bean;
> 
> } else {
> 
> value = ValidatorUtil.getValueAsString(bean,
>  field.getProperty());
> 
> }
> 
> if (GenericValidator.isBlankOrNull(value)) {
> 
> errors.add(field.getKey(),
> 
> Resources.getActionError(request, va, field));
> 
> return false;
> 
> } else {
> 
> return true;
> 
> }
> 
>  
> 
> }
> 
>  
> 
>  
> 
> Problem:
> 
> ValidatorUtil.getValueAsString(bean, field.getProperty()) does a
toString()
> on the value and a toString() on a String[] 
> which isn't null it is some String like "[Ljava.lang.String;@3cfaab"  and
> so
> then isBlankOrNull() is checking for null OR value.trim().length==0 and so
> neither is true and so validation passes.

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

-
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]



Caching JSP / Tiles

2003-08-04 Thread Bailey, Shane C.
 

Is it possible to have the header of a Tile be from cache but the body of a
tile to never be cached?

 

For example, given this definition:

 

  

  

  

  

  

  

  

 

 

Is it possible for the header JSP (in the above case it is described in
doc.classicLayout because it is on the top of every page)

to always be from cache and all others to be non-cached pages.

 

An even better idea for my situation would be to have only the body JSP to
not be cached and all others pages to be cached.

 

Either way, any ideas?

 

I need the solution to be able to work on both NS and IE.



Validator required not working with String[] multi-select

2003-08-04 Thread Bailey, Shane C.

I sort of already sent this message to the list but I made a mistake (didn't
proof read my message) so here it is again but corrected ...

Validator "required" validation is NOT working for my String[] (in a
dynaform.  I have seen others on the list say it works for them.

Anyone else experiencing the same problem? Possibly it is because I am using
a multi-select?

Basically, if nothing is selected then instead of null be sent back for that
parameter I am getting a zero length String[]and it's toString() value is
"[Ljava.lang.String;@3cfaab" which is important because of the way the
validateRequired() method works...

I looked at the source code (of my commons-validator.jar using jad).
Maybe I am using an older version of the commons-validator jar and this was
fixed or I am doing something else wrong?

If so, where is the latest commons-validator.jar?

Here is how my field is declared on the JSP:


  


 

Here is how it is declared in the struts config:







Struts source Code:

public static boolean validateRequired(Object bean,
   ValidatorAction va, Field field,
   ActionErrors errors,
   HttpServletRequest request) { 

String value = null;

if (isString(bean)) {

value = (String) bean;

} else {

value = ValidatorUtil.getValueAsString(bean,
 field.getProperty());

}

if (GenericValidator.isBlankOrNull(value)) {

errors.add(field.getKey(),

Resources.getActionError(request, va, field));

return false;

} else {

return true;

}

 

}

 

 

Problem:

ValidatorUtil.getValueAsString(bean, field.getProperty()) does a toString()
on the value and a toString() on a String[] 
which isn't null it is some String like "[Ljava.lang.String;@3cfaab"  and so
then isBlankOrNull() is checking for null OR value.trim().length==0 and so
neither is true and so validation passes.



 


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



Using the wrong version of valiator?

2003-08-04 Thread Bailey, Shane C.
 

Validation is working for my String[] dynaform attributes.  I have seen
others on the list say it works for them.

So I looked at the source code (of my commons-validator.jar using jad).
Either it can't be working or I am using

the wrong version of that jar.   Do I need to get the latest
commons-validator.jar?  If so, I don't remember where I

retrieved the one I have now.  Did it come with Struts download?

 

Source Code:

public static boolean validateRequired(Object bean,

   ValidatorAction va, Field field,

   ActionErrors errors,

   HttpServletRequest request) {

 

String value = null;

if (isString(bean)) {

value = (String) bean;

} else {

value = ValidatorUtil.getValueAsString(bean,
field.getProperty());

}

if (GenericValidator.isBlankOrNull(value)) {

errors.add(field.getKey(),

 Resources.getActionError(request, va,
field));

 

return false;

} else {

return true;

}

 

}

 

 

Problem:

ValidatorUtil.getValueAsString(bean, field.getProperty()) does a toString()
on the value and a toString() on a String[] 

which isn't null is some String like "[Ljava.lang.String;@3cfaab"   and so
then isBlankOrNull() is checking for null or

value.trim().length==0

 

Here is how my field is declared on the JSP:

   





 

Here is how it is declared in the struts config:





 



RE: specifing subclass of forward in just one place

2003-08-04 Thread Bailey, Shane C.


Are the things that are being done in AppForward class things that can be
done in the processForward() method of the request processor?

Struts-config change:



public class my.RequestProcessor extends RequestProcessor
//or org.apache.struts.tiles.TilesRequestProcessor
//if using Tiles
{

protected boolean processForward(HttpServletRequest request,
 HttpServletResponse response,
 ActionMapping mapping)
throws IOException, ServletException {

doPreForwardStuff();
super.processForward(request, response, mapping);
}
}





-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 4:17 AM
To: [EMAIL PROTECTED]
Subject: specifing subclass of forward in just one place

Hi All,

we would like to make every single forward in our app to extend from a 
AppForward. In such a way we would like to configure this in just one single

place in the config files rather that for every forward.

We know that it could be done for global forwards as:






but for local forwards, we do not find any other solution that:



and this makes maintainance more difficult and struts-config size 
increasing.

Is there any parameter in the config files where the forward could be 
specified for the whole app?

Thanks in advance,

Adolfo.

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


-
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: Best place to hook the Security Call

2003-08-04 Thread Bailey, Shane C.


Please take a look at implementing JRun4 CMA with an OODB (like the one I am
using, Objectivity, oh, and no (Container) support contract).  It is not as
simple as you say -- just like a JNDI lookup.

So I look into and start using SecurityFilter.  No matter what DB (even
OODB) you do the same thing (implement a couple a methods, and set up 2
config files: one is just an addition to web.xml and the other is a config
file for security filter which I think mine is about 10 or so longs long).

BTW, no using vendor specific implementation either.  Not to mention the
support is free and probably as good as you could expect (free or not free).


I use SecurityFilter and I still am able to use the struts role attribute in
the Action element of the struts config as in:



without any changes to SecurityFilter.


I agree my case (of using OODB) is no the norm but I know the place I work
at would not have predicted even 6 months ago they would be using
Objectivity (for storage of the large objects they decided to go that
route). My point is that SecurityFilter took me less time to figure out and
implement and therefore, not only more portable than CMA but also more
flexible.

Just my .02sense



-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 9:16 AM
To: [EMAIL PROTECTED]
Subject: Re: Best place to hook the Security Call

There are no additional classes required.
Just like you use JNDI to look up a containers connection pool.
I think it best practice to use container security.
.V

Alen Ribic wrote:
> Security is really my week side but AFAIK your Container Manager Security
> does have certain container specific configurations and even requirement
for
> additional java classes to be coded.
> 
> As I said "Security Filter" component has a small, simple realm interface
> that is portable across different servers.
> 
> --Alen
> 
> 
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, August 04, 2003 2:34 PM
> Subject: Re: Best place to hook the Security Call
> 
> 
> 
>>I agree with Alen, but at the same time if all the containers are
>>supporting J2EE security standards then porting to different containers
>>should not be an issue. SecurityFilter as I just browsed through seems
>>interesting but all the latest J2EE containers will have to support
> 
> Servlet
> 
>>2.3 for using the same. Alternatively whatif I write my own security piece
>>by looking up LDAP for A&A (authentication and authorization) and this
>>piece would be called from some place in the STRUTS control flow so that
>>for everyrequest security would be validated.
>>
>>Thanks
>>Sreekant G.
>>TCS AMBATTUR
>>
>>
>>
>>  "Alen Ribic"
>>  <[EMAIL PROTECTED]To:   "Struts Users
> 
> Mailing List"
> 
>>  >
> 
> <[EMAIL PROTECTED]>
> 
>>   cc:
>>  08/04/2003 04:25 Subject:  Re: Best place to
> 
> hook the Security Call
> 
>>  PM
>>  Please respond to
>>  "Struts Users
>>  Mailing List"
>>
>>
>>
>>
>>
>>
>>If I'm not mistaken, this approach is container specific hence would make
>>deployment on difference container(s) not as smooth as one would wish.
>>I may be wrong so please correct me! I'm not very clued up in this area.
> 
> ;)
> 
>>I have privilege working with servlet 2.3 and am now using SecurityFilter
>>component (www.securityfilter.org)  to handle my auth. Very simple!
>>
>>--Alen
>>
>>
>>
>>>Best place would be using container J2EE security, such as JDBC realms.
>>
>>>[EMAIL PROTECTED] wrote:
>>>Which is the best place to hook the security call for an application in
>>
>>the
>>
>>>STRUTS framework so that for every request security check is made. Does
>>>STRUTS provide integration with any Security framework ?
>>>
>>>thanks in advance.
>>>Sreekant G.
>>>
>>>
>>>
>>>
>>>
>>>
>>>This mail was scanned by Interscan Virus Wall of Mailserver at Cathedral
>>
>>Road TCS Chennai
>>
>>>
>>>
>>>
>>>
>>>-
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>--
>>Vic Cekvenich,
>>Struts Instructor,
>>1-800-917-JAVA
>>
>>Advanced Struts Training, mentoring and
>>project recovery in North East.
>>Open Source Portal Content Management
>>basicPortal  software.
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For

RE: Html Form Tag Question

2003-08-01 Thread Bailey, Shane C.

Take out the type and name attributes out of the form tag.  They should
already be mapped in the struts-config and you don't need them in the JSP.



-Original Message-
From: Jones, Marty B. [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 11:34 AM
To: [EMAIL PROTECTED]
Subject: Html Form Tag Question

I have the following tag declaration in a jsp file:



The jsp compiles correct and views correctly.  The issue that I am having is
that the action attribute in the html form that is created is an empty
string!  It is as if the FormTag class is not setting the action string.

Any help would be greatly appreciated.


Marty B. Jones
Senior Software Engineer
DailyAccess.Com


-
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: Repost: Clicking "Submit" returns a blank page

2003-07-31 Thread Bailey, Shane C.


BTW, to debug have you tried to do mapping.findForward("success") and
mapping.findForward("fail") to see what happends?


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 5:35 PM
To: 'Struts Users Mailing List'
Subject: RE: Repost: Clicking "Submit" returns a blank page


A couple of observations:


1. Not that it is the solution but could you do  ?  Only because Logon.do is a forward (action
anyway).

2. Again, probably not necessary but add method="post" to the form tag.

3. I doubt it is a problem but I am so used to seeing the action attributes
on the same line you could move all the attributes like name="logonForm"
onto their own line.  You just never know when things should work and
aren't.

You already verified that LogonSuccess.jsp exists and isn't blank.  

I agree though with the post about verifying that the constant is the right
value. I have seen the blank page problem when I changed the name of my
forward in the struts config and didn't rename it in my action.

There is no null pointer exceptions or other exceptions being thrown in your
container output window?

I have exhausted everything I could think of for now.


-Original Message-
From: todd thorner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 4:40 PM
To: [EMAIL PROTECTED]
Subject: Repost: Clicking "Submit" returns a blank page

I have reached this far in my debut logon page
development...
 
The first JSP page comes up fine, showing me a form
 with a rendered
 tag for each required field (username
and password), plus a "Reset" and a "Submit" button.
Code sample below comes from my struts-config.xml
file:
 

 

 

 



 
 


 

 
** struts-config.xml code above
**

I can enter data into the  fields and
they will erase if I click "Reset"
I can click "Submit" with nothing filled in (passing
nulls with the request), and the proper
 are displayed.

However...

If I enter any values for the "username" and
"password" fields, then click "Submit," a blank page
is always returned (neither "LogonSuccess.jsp" nor "LogonFail.jsp" are
blank).

What's up with that?  The browser says it's trying
to display results from "LogonSubmit.do" (which is
what I expect).  I have a file called
"users.properties" in the directory
"WEB-INF/classes" and in my LogonAction.java code:

public final class LogonAction extends Action {
 
   public ActionForward execute( ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response )
  throws Exception {
  
  String username = ( ( LogonForm ) form ).getUsername();
  String password = ( ( LogonForm ) form ).getPassword();
  boolean validated = false;

  try {
  
  validated = isUserLoggedOn( username, password );
  }
  catch ( SimpleUserDirectoryException sudexc ) {
  ActionErrors errors = new ActionErrors();
  errors.add( ActionErrors.GLOBAL_ERROR,
 new ActionError( "error.logon.connect" ) );
  saveErrors( request, errors );
  return ( new ActionForward( mapping.getInput() ) );
  }
  
  if ( !validated ) {
  
  ActionErrors errors = new ActionErrors();
  errors.add( ActionErrors.GLOBAL_ERROR,
 new ActionError( "error.logon.invalid" ) );
  saveErrors( request, errors );
  return ( new ActionForward( mapping.getInput() ) );
  }
  
  HttpSession session = request.getSession();
  session.setAttribute( Constants.USER_KEY, form );

  return ( mapping.findForward( Constants.SUCCESS ) );
  }
  
  public boolean isUserLoggedOn( String username,
  String password ) throws SimpleUserDirectoryException {
  
  return ( SimpleUserDirectory.getInstance().passwordIsValid(
username, password ) );
  }
  }
  
** mystrutsactions.LogonAction.java code above
**
  
Note: The LogonAction.java file above makes use of the following
SimpleUserDirectory.java code:
  
 private static final String SimpleUserDirectoryFilepath =
"users.properties";
InputStream ips =
this.getClass().getClassLoader().getResourceAsStream(
SimpleUserDirectoryFilepath );

** mystrutsforms.LogonForm.java code above
**
 
Also, my web.xml file has:
 
 
  application
  application
 
 
** web.xml code above
**
 
Any suggestions or guesses are appreciated.




Get advanced S

RE: Repost: Clicking "Submit" returns a blank page

2003-07-31 Thread Bailey, Shane C.

A couple of observations:


1. Not that it is the solution but could you do  ?  Only because Logon.do is a forward (action
anyway).

2. Again, probably not necessary but add method="post" to the form tag.

3. I doubt it is a problem but I am so used to seeing the action attributes
on the same line you could move all the attributes like name="logonForm"
onto their own line.  You just never know when things should work and
aren't.

You already verified that LogonSuccess.jsp exists and isn't blank.  

I agree though with the post about verifying that the constant is the right
value. I have seen the blank page problem when I changed the name of my
forward in the struts config and didn't rename it in my action.

There is no null pointer exceptions or other exceptions being thrown in your
container output window?

I have exhausted everything I could think of for now.


-Original Message-
From: todd thorner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 4:40 PM
To: [EMAIL PROTECTED]
Subject: Repost: Clicking "Submit" returns a blank page

I have reached this far in my debut logon page
development...
 
The first JSP page comes up fine, showing me a form
 with a rendered
 tag for each required field (username
and password), plus a "Reset" and a "Submit" button.
Code sample below comes from my struts-config.xml
file:
 

 

 

 



 
 


 

 
** struts-config.xml code above
**

I can enter data into the  fields and
they will erase if I click "Reset"
I can click "Submit" with nothing filled in (passing
nulls with the request), and the proper
 are displayed.

However...

If I enter any values for the "username" and
"password" fields, then click "Submit," a blank page
is always returned (neither "LogonSuccess.jsp" nor "LogonFail.jsp" are
blank).

What's up with that?  The browser says it's trying
to display results from "LogonSubmit.do" (which is
what I expect).  I have a file called
"users.properties" in the directory
"WEB-INF/classes" and in my LogonAction.java code:

public final class LogonAction extends Action {
 
   public ActionForward execute( ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response )
  throws Exception {
  
  String username = ( ( LogonForm ) form ).getUsername();
  String password = ( ( LogonForm ) form ).getPassword();
  boolean validated = false;

  try {
  
  validated = isUserLoggedOn( username, password );
  }
  catch ( SimpleUserDirectoryException sudexc ) {
  ActionErrors errors = new ActionErrors();
  errors.add( ActionErrors.GLOBAL_ERROR,
 new ActionError( "error.logon.connect" ) );
  saveErrors( request, errors );
  return ( new ActionForward( mapping.getInput() ) );
  }
  
  if ( !validated ) {
  
  ActionErrors errors = new ActionErrors();
  errors.add( ActionErrors.GLOBAL_ERROR,
 new ActionError( "error.logon.invalid" ) );
  saveErrors( request, errors );
  return ( new ActionForward( mapping.getInput() ) );
  }
  
  HttpSession session = request.getSession();
  session.setAttribute( Constants.USER_KEY, form );

  return ( mapping.findForward( Constants.SUCCESS ) );
  }
  
  public boolean isUserLoggedOn( String username,
  String password ) throws SimpleUserDirectoryException {
  
  return ( SimpleUserDirectory.getInstance().passwordIsValid(
username, password ) );
  }
  }
  
** mystrutsactions.LogonAction.java code above
**
  
Note: The LogonAction.java file above makes use of the following
SimpleUserDirectory.java code:
  
 private static final String SimpleUserDirectoryFilepath =
"users.properties";
InputStream ips =
this.getClass().getClassLoader().getResourceAsStream(
SimpleUserDirectoryFilepath );

** mystrutsforms.LogonForm.java code above
**
 
Also, my web.xml file has:
 
 
  application
  application
 
 
** web.xml code above
**
 
Any suggestions or guesses are appreciated.




Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

-
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: Dynamic Tree Menus --- HELP!!!

2003-07-31 Thread Bailey, Shane C.

I know about javascript: but in Netscape you have the nice Java and
JavaScript consoles from the menu bar.

I meant more like, I'm surprised that it doesn't work on both and if there
was a specific reason why Netscape wasn't tested or cared to be tested to
work for such a thing. The code is generated so I assume not just this
example breaks in NS but all struts menus must break.  

Is document.all usage the only way to get menus to work in a browser?  

Netscape invented JavaScript (for gosh sakes) so I would think it could be
done (cross browser menu framework).

Maybe I will have to look into it and submit some code to the framework.

I guess I am just a dinosaur for always testing my web apps in both
browsers.



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 2:23 PM
To: Struts Users Mailing List
Subject: RE: Dynamic Tree Menus --- HELP!!!

It's not common for them not to work, but there might be a JavaScript error.
You can tell this if you type "javascript:" in your address bar, it will
show a console of errors for the NS browser. Plus the NS browsers are (IMHO)
historically very strict about the validity of the page, bad HTML won't
render in many cases.  Although I don't know what problem you are having
specifically.

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 2:06 PM
To: 'Struts Users Mailing List'
Subject: RE: Dynamic Tree Menus --- HELP!!!




How come the example doesn't work with Netscape (v7.02 and my JavaScript is
turned on)??

I was thinking about using the Struts menus but I have users that are on
UNIX work workstations (Intranet app).  Is this common for the menus not to
work on Netscape?



-Original Message-
From: Todd Fuller [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 2:09 PM
To: [EMAIL PROTECTED]
Cc: Pat Quinn
Subject: RE: Dynamic Tree Menus --- HELP!!!

Pat,

Check out the Multi-level tree example at the URL below.

http://www2.metanology.com:8080/struts-examples-web/index.jsp

Todd Fuller
Metanology Corporation
4625 Alexander Dr., Ste 105
Alpharetta, GA 30022
770.475.1301 Office
404.561.0294 Cell
www.metanology.com


-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: RE: Dynamic Tree Menus --- HELP!!!


I appreciate your kind offer my details are as follows:

I've broken it down into a very basic example once you view this the third
node will appear with a series of plus images.

---
Menu-Config.xml
---


  

  
  


   
   


   


  



-
JSP Code
-
<%@ taglib uri="/WEB-INF/struts-menu.tld" prefix="menu"%>






>From: "Raible, Matt" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Dynamic Tree Menus --- HELP!!!
>Date: Thu, 31 Jul 2003 09:22:04 -0600
>
>I'm willing to help if you send me the code.  Which Displayer are you
>using?
>
>Matt
>
>-Original Message-
>From: Pat Quinn [mailto:[EMAIL PROTECTED]
>Sent: Thursday, July 31, 2003 9:20 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Dynamic Tree Menus --- HELP!!!
>
>
>Is anyone out there working with dynamic HTML trees at the moment (i.e.
>displaying data loaded from a data base) as i'm pulling my hair out here at
>the moment.
>
>I downloaded the source for Struts Menu and implemented a change to allow
>me
>
>to place a java bean with my tree menu details into HttpSession rather than
>loading it from the menu xml file. Every thing works fine until i tried to
>add triple nested node to the tree and it totally screws up presentation
>i.e. The node image is repeatedly displayed. Its not due to my changes as i
>tested it in the latest stable version and it fails also to render with the
>same results.
>
>I've also taken a look into using http://www.kobrix.com/ offering but their
>configuration requirements to integrate with struts seems abit too much for
>my liking.
>
>
>
>
>Any suggestions, or should i just go find the JavaScript i require
>elsewhere
>
>and wrap it with my own custom tag library
>
>
>
> >From: "Pat Quinn" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Dynamic Html Tree Menus - Java Beans.
> >Date: Thu, 31 Jul 2003 10:22:51 +0100
> >
> >I'm looking for a ta

RE: Dynamic Tree Menus --- HELP!!!

2003-07-31 Thread Bailey, Shane C.


How come the example doesn't work with Netscape (v7.02 and my JavaScript is
turned on)??

I was thinking about using the Struts menus but I have users that are on
UNIX work workstations (Intranet app).  Is this common for the menus not to
work on Netscape?



-Original Message-
From: Todd Fuller [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 2:09 PM
To: [EMAIL PROTECTED]
Cc: Pat Quinn
Subject: RE: Dynamic Tree Menus --- HELP!!!

Pat,

Check out the Multi-level tree example at the URL below.

http://www2.metanology.com:8080/struts-examples-web/index.jsp

Todd Fuller
Metanology Corporation
4625 Alexander Dr., Ste 105
Alpharetta, GA 30022
770.475.1301 Office
404.561.0294 Cell
www.metanology.com


-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: RE: Dynamic Tree Menus --- HELP!!!


I appreciate your kind offer my details are as follows:

I've broken it down into a very basic example once you view this the third
node will appear with a series of plus images.

---
Menu-Config.xml
---


  

  
  


   
   


   


  



-
JSP Code
-
<%@ taglib uri="/WEB-INF/struts-menu.tld" prefix="menu"%>






>From: "Raible, Matt" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Dynamic Tree Menus --- HELP!!!
>Date: Thu, 31 Jul 2003 09:22:04 -0600
>
>I'm willing to help if you send me the code.  Which Displayer are you
>using?
>
>Matt
>
>-Original Message-
>From: Pat Quinn [mailto:[EMAIL PROTECTED]
>Sent: Thursday, July 31, 2003 9:20 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Dynamic Tree Menus --- HELP!!!
>
>
>Is anyone out there working with dynamic HTML trees at the moment (i.e.
>displaying data loaded from a data base) as i'm pulling my hair out here at
>the moment.
>
>I downloaded the source for Struts Menu and implemented a change to allow
>me
>
>to place a java bean with my tree menu details into HttpSession rather than
>loading it from the menu xml file. Every thing works fine until i tried to
>add triple nested node to the tree and it totally screws up presentation
>i.e. The node image is repeatedly displayed. Its not due to my changes as i
>tested it in the latest stable version and it fails also to render with the
>same results.
>
>I've also taken a look into using http://www.kobrix.com/ offering but their
>configuration requirements to integrate with struts seems abit too much for
>my liking.
>
>
>
>
>Any suggestions, or should i just go find the JavaScript i require
>elsewhere
>
>and wrap it with my own custom tag library
>
>
>
> >From: "Pat Quinn" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Dynamic Html Tree Menus - Java Beans.
> >Date: Thu, 31 Jul 2003 10:22:51 +0100
> >
> >I'm looking for a tag library to aid the rendering of a Tree Menu using
> >session/request stored objects.
> >I want to included the menu data as a Java Bean in HttpSession for each
> >user and then use tag libs in my JSP's. I've looked into the StrutsMenu
> >Offering for Dynamic Menus but it loads menu data from an XML file.
> >
> >Any ideas or am i better off to develop my own custom tag lib?
> >
> >_
> >MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> >http://join.msn.com/?page=features/virus
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>_
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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]
>

_
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus



-
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: Session issue

2003-07-31 Thread Bailey, Shane C.


I solved the problem...
Dev and Prod should have the same environment  
:-)

Looks like the URL you are trying to rewrite is null.
Just a guess.


-Original Message-
From: Peter Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 2:04 PM
To: Struts Users Mailing List
Subject: Session issue

Hi all,

I am having problems with a new struts application in a production
environment.  The stacktrace below seems to indicate a session problem.  In
development, I am using a filestore, in production, its a jdbc store.  Has
anyone come across a stack trace like this?

Thanks in advance, 

Peter

2003-07-31 15:04:11 ApplicationDispatcher[/pos] Servlet.service() for
servlet 
jsp threw exception
org.apache.jasper.JasperException
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:254)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:432)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:356)
at 
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
a:430)
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
textImpl.java:501)
at 
org.apache.jsp.wrapperLayout_jsp._jspService(wrapperLayout_jsp.java:2
45)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:210)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:432)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:356)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.
java:1069)
at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestP
rocessor.java:274)
at 
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
TilesRequestProcessor.java:254)
at 
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Ti
lesRequestProcessor.java:309)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:279)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:432)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:356)
at 
org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatche
rValve.java:420)
at 
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatche
rValve.java:327)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:181)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466
)
at 
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585)
at java.lang.Thread.run(Thread.java:536)

- Root Cause -
java.lang.NullPoint

RE: Cannot find bean error in any scope

2003-07-31 Thread Bailey, Shane C.


Does this fix the problem:

 

  
 
 


???



-Original Message-
From: Altug B. Altintas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 6:37 AM
To: 'Struts Users Mailing List'
Subject: RE: Cannot find bean error in any scope 

Strange ! Now i have got no custom validation



***
public ActionErrors validate(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request) {

ActionErrors errors  = null ;
errors = super.validate(mapping,request);
return errors;
}

***

only call parent's validation method, but again it gives me

"javax.servlet.jsp.JspException: Cannot find bean error in any scope " 

Error occurs because of the code below, but why ? 


***
 

  
 
  
 


***

if change above code like this


***


***

Everything works fine.. 







-Original Message-
From: Altug B. Altintas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 12:16 PM
To: 'Struts Users Mailing List'
Subject: Cannot find bean error in any scope 


Hi, 
 
My form extends ValidationForm, and of course i have got validator-rules
and validation.xml. 
But when i want to make a custom valition in validate() method ,  i took
"javax.servlet.jsp.JspException: Cannot find bean error in any scope " 
 

My jsp page includes the code below to show the errors: 
 
*
 

  
 
  
 

*


overriding validate() method
 

*
 public ActionErrors validate(ActionMapping mapping,
 javax.servlet.http.HttpServletRequest request) {
 
  ActionErrors errors  = null ;
  errors = super.validate(mapping,request);
  try {
 
   
   if (errors == null) {
errors = new ActionErrors();
   }   
   
 
   Calendar c1 = dUtils.str2Calendar(startdate);
 
   Calendar c2 = dUtils.str2Calendar(enddate);
 
   // if enddate bigger then startdate then add error
   if ( !c1.before(c2) ) { // custom validation
errors.add(ActionErrors.GLOBAL_ERROR ,new
ActionError("errors.dateerror","test");
   }
  
// print out the errors
   Iterator it = errors.get();
   while ( it.hasNext() ) {
ActionError ae = (ActionError) it.next();
System.out.println("Errors  : " + ae.getKey() + " " );
int length = ae.getValues().length;
Object[] o = ae.getValues();
for (int i=0; i

RE: Need help for design

2003-07-31 Thread Bailey, Shane C.

Take a look: securityfilter.sourceforge.net
I am using it successfully.


-Original Message-
From: manglu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 7:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Need help for design

Anubhav

This should be simple

Use Container managed Security as specified in (J2EE)

Use Form based Login - login.jsp

and secure the JSPs which you want to by specifiying hte constraints in 
Web.xml
If the user accesses these secured JSPs then he would be automatically 
routed to login.jsp (if he/she has not been authenticated before)

The standard samples with TOmcat should show how this is done.

HTH
Manglu



-
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]



  1   2   3   >