Re: How to run struts examples in Tomcat

2002-08-31 Thread micael

Sorry, misunderstood your question.  mea culpa, mea maxima culpa.

At 09:34 PM 8/31/2002 -0700, you wrote:
>You just need http://localhost:8080.  Didn't it work?
>
>At 10:02 PM 8/29/2002 -0400, you wrote:
>>Dear all:
>>
>>I have deployed struts-example.war on tomcat successfully. I want to run the
>>example. But what URL should I use? I know the URL should be something like
>>http://localhost:8080/???What should put after http://localhost:8080/?
>>
>>Thank you for your help
>>
>>
>>
>>__
>>Post your ad for free now! http://personals.yahoo.ca
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



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




Re: How to run struts examples in Tomcat

2002-08-31 Thread micael

You just need http://localhost:8080.  Didn't it work?

At 10:02 PM 8/29/2002 -0400, you wrote:
>Dear all:
>
>I have deployed struts-example.war on tomcat successfully. I want to run the
>example. But what URL should I use? I know the URL should be something like
>http://localhost:8080/???What should put after http://localhost:8080/?
>
>Thank you for your help
>
>
>
>__
>Post your ad for free now! http://personals.yahoo.ca
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 



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




Re: want to have errors to be dispalyed in diffrent page

2002-08-31 Thread Vivian

Thank you, Aaron. The explaination is very clear. I still not clear about
one thing. In the following part of your code, you use id="error". Where
should define "error"? I tried to clear it by myself, but it seems not easy
for me to find answer by myself. Please give me a hint.

Thank you so much

regards

Jenny

 
>
>
>
> 


- Original Message -
From: "Aaron Oathout" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, August 31, 2002 6:10 PM
Subject: Re: want to have errors to be dispalyed in diffrent page


> No problem, in struts-config.xml you should have an action defined like
the
> following (different values of course):
>
>  type="org.ifmc.struts.action.AuthenticationAction"
> name="logonForm"
> scope="request"
> validate="true"
> input="template.logon.layout"
> parameter="process">
> 
> 
>
> The "input" attribute is used by the action when validation fails. Instead
> of having it point to "login.jsp" in your case, have it point to
> "errorpage.jsp". In errorpage.jsp, put something like the following where
> you want the errors displayed (this is assuming struts 1.1x, can't
> remember syntax for 1.0, but there is something similar):
>
> 
> 
> 
>
>
>
> 
> 
>
> Hopefully this helps. Maybe this link will help clear it up also ( take a
> look at section 3.3.4 ).
> http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_view.html
>
> Aaron
>
>
> On Thu, 29 Aug 2002, Jenny wrote:
>
> > Aaron:
> >
> > Thank you for your reply. But I am not sure I get what you mean. You
said
> > "change the "input" attribute for your action to point to the page you
want
> > your errors displayed on.". In my login.jsp page, I have:
> > ...
> > 
> > ...
> > 
> > ..
> >
> > How can change the "input" attribute to point to my errorpage.jsp. What
do
> > you mean by "input attribute"? Could you explain in a little bit detail?
> >
> > Thank you very much
> >
> > Jenny
> >
> > - Original Message -
> > From: "Aaron Oathout" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Saturday, August 31, 2002 5:26 PM
> > Subject: Re: want to have errors to be dispalyed in diffrent page
> >
> >
> > > Just a guess as I haven't tried this, but it would seem to me you
could
> > > change the "input" attribute for your action to point to the page you
want
> > > your errors displayed on. Anybody thats tried this care to confirm or
> > > correct my assumption?
> > >
> > > Aaron
> > >
> > > On Thu, 29 Aug 2002, Jenny wrote:
> > >
> > > > Dear friends:
> > > >
> > > > I am using struts to develope web application. I use 
in
> > > > login.jsp, and I implemented validate(..) method in LoginActionForm
> > class.
> > > > If user enter invalid username or password in login page(login.jsp),
I
> > want
> > > > the errors to be displayed in another page(errorpage.jsp), other
than in
> > > > login page. Is there a way to fulfill this? Your help is
appreciated.
> > > >
> > > > Thanks,
> > > >
> > > > Jenny
> > > >
> > > >
__
> > > > Post your ad for free now! http://personals.yahoo.ca
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > 
> > > > For additional commands, e-mail:
> > 
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> >
> > __
> > Post your ad for free now! http://personals.yahoo.ca
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

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

> For additional commands, e-mail:


__ 
Post your free ad now! http://personals.yahoo.ca

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




Re: [I18N] Locale Mysteriously Reverts to null

2002-08-31 Thread David Geary

Resin 2.1.2. I hadn't thought to try it with another container, so I 
tried it with Tomcat 4.1.3, and it works as expected, that is, the 
locale doesn't revert back to null.

I assumed it was something I was doing wrong, but evidently it must be a 
Resin bug.

Thanks,


david

James Mitchell wrote:

>That sounds a bit odd.  What container are you using?
>
>James Mitchell
>Software Engineer\Struts Evangelist
>Struts-Atlanta, the "Open Minded Developer Network"
>http://www.open-tools.org/struts-atlanta
>  
>
>>-Original Message-
>>From: David Geary [mailto:[EMAIL PROTECTED]]
>>Sent: Saturday, August 31, 2002 10:51 PM
>>To: [EMAIL PROTECTED]
>>Subject: [I18N] Locale Mysteriously Reverts to null
>>
>>
>>I have an action that sets the user's locale with Action.setLocale(). 
>>After I set the locale, I verify that it's been set with 
>>request.getSession().getAttribute(Action.LOCALE_KEY). It has.
>>
>>Then the action forwards to a JSP page and within that JSP page, the 
>>locale is null, which I verify with
>><%= session.getAttribute(Action.LOCALE_KEY) %>.
>>
>>How do I make the locale stick, and why does it revert to null?
>>
>>Thanks,
>>
>>
>>david
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>
>>For additional commands, e-mail: 
>>
>>
>>
>>
>>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>




Re: [I18N] Locale Mysteriously Reverts to null

2002-08-31 Thread David Geary

Resin 2.1.2. I hadn't thought to try it with another container, so I 
tried it with Tomcat 4.1.3, and it works as expected, that is, the 
locale doesn't revert back to null.

I just assumed it was something I was doing wrong, but evidently it's a 
Resin bug.

Thanks,


david

James Mitchell wrote:

>That sounds a bit odd.  What container are you using?
>
>James Mitchell
>Software Engineer\Struts Evangelist
>Struts-Atlanta, the "Open Minded Developer Network"
>http://www.open-tools.org/struts-atlanta
>  
>
>>-Original Message-
>>From: David Geary [mailto:[EMAIL PROTECTED]]
>>Sent: Saturday, August 31, 2002 10:51 PM
>>To: [EMAIL PROTECTED]
>>Subject: [I18N] Locale Mysteriously Reverts to null
>>
>>
>>I have an action that sets the user's locale with Action.setLocale(). 
>>After I set the locale, I verify that it's been set with 
>>request.getSession().getAttribute(Action.LOCALE_KEY). It has.
>>
>>Then the action forwards to a JSP page and within that JSP page, the 
>>locale is null, which I verify with
>><%= session.getAttribute(Action.LOCALE_KEY) %>.
>>
>>How do I make the locale stick, and why does it revert to null?
>>
>>Thanks,
>>
>>
>>david
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>
>>For additional commands, e-mail: 
>>
>>
>>
>>
>>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>




Re: How to run struts examples in Tomcat

2002-08-31 Thread Vivian

It works!
Thank you very much, Joel.

Vivian

- Original Message -
From: "Joel Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, August 31, 2002 10:25 PM
Subject: Re: How to run struts examples in Tomcat


> Vivian wrote:
> > I have deployed struts-example.war on tomcat successfully. I want to run
the
> > example. But what URL should I use? I know the URL should be something
like
> > http://localhost:8080/???What should put after http://localhost:8080/?
>
> Try http://localhost:8080/struts-example/
>
> --
> Joel SchneiderNational Marrow Donor Program
> Software Developer3433 Broadway Street NE, Suite 500
> phone: 612-617-8321   Minneapolis, MN 55413
> email: [EMAIL PROTECTED]  http://www.marrow.org/
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


__ 
Post your ad for free now! http://personals.yahoo.ca

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




RE: [I18N] Locale Mysteriously Reverts to null

2002-08-31 Thread James Mitchell

That sounds a bit odd.  What container are you using?

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: David Geary [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 31, 2002 10:51 PM
> To: [EMAIL PROTECTED]
> Subject: [I18N] Locale Mysteriously Reverts to null
> 
> 
> I have an action that sets the user's locale with Action.setLocale(). 
> After I set the locale, I verify that it's been set with 
> request.getSession().getAttribute(Action.LOCALE_KEY). It has.
> 
> Then the action forwards to a JSP page and within that JSP page, the 
> locale is null, which I verify with
> <%= session.getAttribute(Action.LOCALE_KEY) %>.
> 
> How do I make the locale stick, and why does it revert to null?
> 
> Thanks,
> 
> 
> david
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




[I18N] Locale Mysteriously Reverts to null

2002-08-31 Thread David Geary

I have an action that sets the user's locale with Action.setLocale(). 
After I set the locale, I verify that it's been set with 
request.getSession().getAttribute(Action.LOCALE_KEY). It has.

Then the action forwards to a JSP page and within that JSP page, the 
locale is null, which I verify with
<%= session.getAttribute(Action.LOCALE_KEY) %>.

How do I make the locale stick, and why does it revert to null?

Thanks,


david


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




Re: How to run struts examples in Tomcat

2002-08-31 Thread Joel Schneider

Vivian wrote:
> I have deployed struts-example.war on tomcat successfully. I want to run the
> example. But what URL should I use? I know the URL should be something like
> http://localhost:8080/???What should put after http://localhost:8080/?

Try http://localhost:8080/struts-example/

--
Joel SchneiderNational Marrow Donor Program
Software Developer3433 Broadway Street NE, Suite 500
phone: 612-617-8321   Minneapolis, MN 55413
email: [EMAIL PROTECTED]  http://www.marrow.org/

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




How to run struts examples in Tomcat

2002-08-31 Thread Vivian

Dear all:

I have deployed struts-example.war on tomcat successfully. I want to run the
example. But what URL should I use? I know the URL should be something like
http://localhost:8080/???What should put after http://localhost:8080/?

Thank you for your help



__ 
Post your ad for free now! http://personals.yahoo.ca

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




RE: Java Server Faces and Developer Life Comments

2002-08-31 Thread Bill Willis

Hi Tiago,

"... I don't understand why IDE like Jbuilder don't come with support
for frameworks like struts. In version 8 or 9 maybe there will be
integration with JSF, by then JSF 2 will be out..."

That support already exists. Try ObjectAssembler, Struts Console, etc.
Remember that most IDEs will give you okay support for ten zillion
different things but rarely deep support for anything. Try one of the
Struts tools that plugs into JBuilder and other IDEs seamlessly and get
deep, intelligent support for Struts. You won't have to wait around for
mediocre Struts support. :-)

Regards,
Bill



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




Re: Java Server Faces and Developer Life Comments

2002-08-31 Thread Tiago Nodari


The thing with .NET and Microsoft is that you normally have little choice 
on how to do things; you have all in one IDE, which is something I wish we 
had.  As with J2EE you have tons of choices, is that good or 
bad?  Sometimes I think its what makes developing in java a pain, you have 
tons of IDEs, but none are complete, instead of working together we have 
tons of different open source tools for the same purpose, and each one 
lacks something the other has, which makes me wonder why dont they just 
join forces and create something with the best of the two solutions, and I 
come up with the answer that this is a democracy, and like a democracy, all 
we do is argue, as for .NET you get what they ship out :)  J2EE containers 
have been fighting against each other while .NET has been growing its 
impossible that they didnt see that.

How many frameworks like struts are there?(no need to answer, I now there 
are tons) And now we have JSF, from which I have seen overlaps with Struts, 
and yet its different, here is my point why not use a framework that is 
already out, to make life easier for developers.  The constant changes in 
Java are a real pain, when you finally get the hang of something they 
something comes out that is sometimes totally different.  I like new 
things, but there has to be a limit, we have JSP 2, JSTL, JSF, and etc etc 
etc.  It seems that we need to spend more time finding out what is new and 
out there and less time developing.
And we don’t have a all-in-one-to-everything IDE, we have to hope some 
really nice developer takes the time to develop a plug-in, I don’t 
understand why IDE like Jbuilder don’t come with support for frameworks 
like struts.
In version 8 or 9  maybe there will be integration with JSF, by then JSF 2 
will be out….

Pls don’t flame me :) just my opinion, I know a lot ppl put really hard 
work into Struts, JSF, JSTL, JSP, J2EE and etc.

tiago

> > -Original Message-
> > From: Elderclei R Reami [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 30, 2002 9:36 AM
> > To: [EMAIL PROTECTED]
> > Subject: Java Server Faces and Developer Life Comments
> >
> >
> > Hi,
> >
> > I've just finished my first Struts project, and it's been a
> > great experience on how to do and not to do things. This
> > list has been of great help, as well.
> >
> > Anyway, I have some comments to make. Please, don't flame me,
> > because it's just a view someone that needs
> > to be productive.
> >
> > I've developed a project some time ago using .Net framework
> > and Visual Studio. Wonderful experience, very very
> > much productive. Creation of a web interface is just a matter
> > of point and click. First impression: "that's what I
> > need for mass production, short 'sell, implement, bill'
> > cycles". Graphical components do keep state during calls,
> > integration is event-oriented, which makes it easy like
> > Visual Basic or Delphi traditional dev. Really easy to learn
> > and use.
> >
> > About Struts: hard to use, lack of good development tools,
> > but years light ahead of pure JSP development. Struts
> > has all the chances of being the way to go. It just needs to
> > be made easier to use, what means: GUI
> > development. I've seen some options: "Eclipse+EasyStruts",
> > StrutsBuilder, StrutsConsole - great tools, but none
> > of them really make GUI+Struts integration easy, they are
> > more like wizards, and need a lot of work yet.
> >
> > Even though, I'm passionate about Java, I need to recognize:
> > M$ really makes UI development a lot easier than
> > Sun/Java/Open Source Community. If you ever developed a VB
> > app and a Swing-based Java app, knows what I
> > mean. The point is: M$ approach is make it easy, our approach
> > is make it generic, and conceptually beautiful. M$
> > approach is "sell it, do it fast with small costs, have more profit".
> >
> > I haven't read the entire JSF spec, but I've seen the
> > tutorial, and as far as I understand it, JSF does not make
> > programming UI interface much easier than Struts.
> >
> > Any comments? The matter is: I have a family, and want to get
> > home earlier, not 4:00AM. A lot of philosophy and
> > online psychoterapy for FRIDAY, but... :)
> >
> > Cheers,
> > Elderclei R Reami
> > Vertis Tecnologia
> > +55 11 3887-0835
> > www.vertisnet.com.br
> >
> >
> > --
> > To unsubscribe, e-mail:
> >  [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: 
> >
> >
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 



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




Re: want to have errors to be dispalyed in diffrent page

2002-08-31 Thread Aaron Oathout

No problem, in struts-config.xml you should have an action defined like the 
following (different values of course):


 


The "input" attribute is used by the action when validation fails. Instead 
of having it point to "login.jsp" in your case, have it point to 
"errorpage.jsp". In errorpage.jsp, put something like the following where 
you want the errors displayed (this is assuming struts 1.1x, can't 
remember syntax for 1.0, but there is something similar):




   
   
   



Hopefully this helps. Maybe this link will help clear it up also ( take a 
look at section 3.3.4 ). 
http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_view.html

Aaron


On Thu, 29 Aug 2002, Jenny wrote:

> Aaron:
> 
> Thank you for your reply. But I am not sure I get what you mean. You said
> "change the "input" attribute for your action to point to the page you want
> your errors displayed on.". In my login.jsp page, I have:
> ...
> 
> ...
> 
> ..
> 
> How can change the "input" attribute to point to my errorpage.jsp. What do
> you mean by "input attribute"? Could you explain in a little bit detail?
> 
> Thank you very much
> 
> Jenny
> 
> - Original Message -
> From: "Aaron Oathout" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Saturday, August 31, 2002 5:26 PM
> Subject: Re: want to have errors to be dispalyed in diffrent page
> 
> 
> > Just a guess as I haven't tried this, but it would seem to me you could
> > change the "input" attribute for your action to point to the page you want
> > your errors displayed on. Anybody thats tried this care to confirm or
> > correct my assumption?
> >
> > Aaron
> >
> > On Thu, 29 Aug 2002, Jenny wrote:
> >
> > > Dear friends:
> > >
> > > I am using struts to develope web application. I use  in
> > > login.jsp, and I implemented validate(..) method in LoginActionForm
> class.
> > > If user enter invalid username or password in login page(login.jsp), I
> want
> > > the errors to be displayed in another page(errorpage.jsp), other than in
> > > login page. Is there a way to fulfill this? Your help is appreciated.
> > >
> > > Thanks,
> > >
> > > Jenny
> > >
> > > __
> > > Post your ad for free now! http://personals.yahoo.ca
> > >
> > > --
> > > To unsubscribe, e-mail:
> 
> > > For additional commands, e-mail:
> 
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> 
> __ 
> Post your ad for free now! http://personals.yahoo.ca
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


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




Re: want to have errors to be dispalyed in diffrent page

2002-08-31 Thread Jenny

Aaron:

I figure out you must mean this- to change input attribute in
struts-config.xml. I have done this. The following
is part of my struts-config.xml file:




.



  

Note: I have input="/errorspage.jsp". It is point to errorpage, not login
page. But in errorpage, I only get "Please correct the following errors
before you proceed:", there is no specific error message showed, so user
don't know which field is wrong. Does anyone know what could cause the
problem?

Thanks.

Jenny
- Original Message -
From: "Jenny" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 5:42 PM
Subject: Re: want to have errors to be dispalyed in diffrent page


> Aaron:
>
> Thank you for your reply. But I am not sure I get what you mean. You said
> "change the "input" attribute for your action to point to the page you
want
> your errors displayed on.". In my login.jsp page, I have:
> ...
> 
> ...
> 
> ..
>
> How can change the "input" attribute to point to my errorpage.jsp. What do
> you mean by "input attribute"? Could you explain in a little bit detail?
>
> Thank you very much
>
> Jenny
>
> - Original Message -
> From: "Aaron Oathout" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Saturday, August 31, 2002 5:26 PM
> Subject: Re: want to have errors to be dispalyed in diffrent page
>
>
> > Just a guess as I haven't tried this, but it would seem to me you could
> > change the "input" attribute for your action to point to the page you
want
> > your errors displayed on. Anybody thats tried this care to confirm or
> > correct my assumption?
> >
> > Aaron
> >
> > On Thu, 29 Aug 2002, Jenny wrote:
> >
> > > Dear friends:
> > >
> > > I am using struts to develope web application. I use  in
> > > login.jsp, and I implemented validate(..) method in LoginActionForm
> class.
> > > If user enter invalid username or password in login page(login.jsp), I
> want
> > > the errors to be displayed in another page(errorpage.jsp), other than
in
> > > login page. Is there a way to fulfill this? Your help is appreciated.
> > >
> > > Thanks,
> > >
> > > Jenny
> > >
> > > __
> > > Post your ad for free now! http://personals.yahoo.ca
> > >
> > > --
> > > To unsubscribe, e-mail:
> 
> > > For additional commands, e-mail:
> 
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
> __
> Post your ad for free now! http://personals.yahoo.ca
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


__ 
Post your free ad now! http://personals.yahoo.ca

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




Re: want to have errors to be dispalyed in diffrent page

2002-08-31 Thread Jenny

Aaron:

Thank you for your reply. But I am not sure I get what you mean. You said
"change the "input" attribute for your action to point to the page you want
your errors displayed on.". In my login.jsp page, I have:
...

...

..

How can change the "input" attribute to point to my errorpage.jsp. What do
you mean by "input attribute"? Could you explain in a little bit detail?

Thank you very much

Jenny

- Original Message -
From: "Aaron Oathout" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, August 31, 2002 5:26 PM
Subject: Re: want to have errors to be dispalyed in diffrent page


> Just a guess as I haven't tried this, but it would seem to me you could
> change the "input" attribute for your action to point to the page you want
> your errors displayed on. Anybody thats tried this care to confirm or
> correct my assumption?
>
> Aaron
>
> On Thu, 29 Aug 2002, Jenny wrote:
>
> > Dear friends:
> >
> > I am using struts to develope web application. I use  in
> > login.jsp, and I implemented validate(..) method in LoginActionForm
class.
> > If user enter invalid username or password in login page(login.jsp), I
want
> > the errors to be displayed in another page(errorpage.jsp), other than in
> > login page. Is there a way to fulfill this? Your help is appreciated.
> >
> > Thanks,
> >
> > Jenny
> >
> > __
> > Post your ad for free now! http://personals.yahoo.ca
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

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

> For additional commands, e-mail:


__ 
Post your ad for free now! http://personals.yahoo.ca

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




Re: [VOTE] Should this list discontinue it's long, treasured heritageof "relaxed fridays"?

2002-08-31 Thread Aaron Oathout

+1 for keeping "relaxed fridays"

On 31 Aug 2002, Andreas Mack wrote:

> On Fri, 2002-08-30 at 16:47, Eddie Bush wrote:
> > Do you feel this list should discontinue it's long heritage of "relaxed 
> > fridays"?
> > 
> > (   )  Yes
> > ( X )  No
> > 
> 
> 


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




Re: want to have errors to be dispalyed in diffrent page

2002-08-31 Thread Aaron Oathout

Just a guess as I haven't tried this, but it would seem to me you could 
change the "input" attribute for your action to point to the page you want 
your errors displayed on. Anybody thats tried this care to confirm or 
correct my assumption?

Aaron

On Thu, 29 Aug 2002, Jenny wrote:

> Dear friends:
> 
> I am using struts to develope web application. I use  in
> login.jsp, and I implemented validate(..) method in LoginActionForm class.
> If user enter invalid username or password in login page(login.jsp), I want
> the errors to be displayed in another page(errorpage.jsp), other than in
> login page. Is there a way to fulfill this? Your help is appreciated.
> 
> Thanks,
> 
> Jenny
> 
> __ 
> Post your ad for free now! http://personals.yahoo.ca
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


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




want to have errors to be dispalyed in diffrent page

2002-08-31 Thread Jenny

Dear friends:

I am using struts to develope web application. I use  in
login.jsp, and I implemented validate(..) method in LoginActionForm class.
If user enter invalid username or password in login page(login.jsp), I want
the errors to be displayed in another page(errorpage.jsp), other than in
login page. Is there a way to fulfill this? Your help is appreciated.

Thanks,

Jenny

__ 
Post your ad for free now! http://personals.yahoo.ca

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




Re: Using the template tag library with parameters like jsp:param

2002-08-31 Thread jw

Hi All

Sorry for the bother - but, who knew - i.e., The issue was apparently
related to the struts "version" I was using (i.e.,
"jakarta-struts-1.0.2")...

Apparently, the examples will work only with jakarta-struts-1.1-b2.At
least in my current environment (winXP/j2sdk1.4.0_01/jakarta-tomcat-4.0.4)

Thanks!

jw
- Original Message -
From: "jw" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, August 31, 2002 1:28 PM
Subject: Re: Using the template tag library with parameters like jsp:param


Hi All!

I've seen a number of posts looking for help/info on the this type of error
message (i.e., "javax.servlet.ServletException: Exception creating bean of
class ???.???.xxxForm: java.lang.ClassNotFoundException: ???.???.xxxForm")
that occurs when they attempt to test their "struts" application.

I have not seen a solution/ explanation, thus far, as to why this occurs.

Any help or insight as to why this happens, would be much appreciated.
Once again, I'm cutting and pasting a code example - that theoretically
should work "out-of-the-box", and once again its not working (whaddya gonna
do?)..

Here is the information/example code that I'm trying to get working when
this error occurs... (NOTE: I'm using jakarta-tomcat-4.0.4,
j2sdk1.4.0_01,jakarta-struts-1.0.2)

*** SubmitForm.java***
package hansen.playground;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

public final class SubmitForm extends ActionForm {

  /* Last Name */
  private String lastName = "Hansen"; // default value
  public String getLastName() {
return (this.lastName);
  }
  public void setLastName(String lastName) {
this.lastName = lastName;
  }

  /* Address */
  private String address = null;
  public String getAddress() {
return (this.address);
  }
  public void setAddress(String address) {
this.address = address;
  }

  /* Sex */
  private String sex = null;
  public String getSex() {
return (this.sex);
  }
  public void setSex(String sex) {
this.sex = sex;
  }

  /* Married status */
  private String married = null;
  public String getMarried() {
return (this.married);
  }
  public void setMarried(String married) {
this.married = married;
  }

  /* Age */
  private String age = null;
  public String getAge() {
return (this.age);
  }
  public void setAge(String age) {
this.age = age;
  }

}


*** SubmitAction.java ***
package hansen.playground;

import javax.servlet.http.*;
import org.apache.struts.action.*;

public final class SubmitAction extends Action {

  public ActionForward perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) {

SubmitForm f = (SubmitForm) form; // get the form bean
// and take the last name value
String lastName = f.getLastName();
// Translate the name to upper case
//and save it in the request object
request.setAttribute("lastName", lastName.toUpperCase());

// Forward control to the specified success target
return (mapping.findForward("success"));
  }
}

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


Submit example


Example Submit Page




Last Name: 
Address:   
Sex:   Male
   Female
Married:   
Age:   
 0-19
 20-49
 50-
   
   






*** struts-config.xml ***

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




  
  


  


  
  
  


  
  







  



*** ***

jw


*** error that I receive ***

javax.servlet.ServletException: Exception creating bean of class
hansen.playground.SubmitForm: java.lang.ClassNotFoundException:
hansen.playground.SubmitForm
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:471)
at org.apache.jsp.submit$jsp._jspService(submit$jsp.java:485)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.

No form parsing when file upload exceeds maxFileSize

2002-08-31 Thread Wellie W. Chao

I have a form with several  input fields and a couple of
 input fields. In web.xml, I also specify a value for
maxFileSize (currently set to a really small value of 5K for testing).
Here is the portion of my JSP with the input form:

-



Job Name:
Job Type:
Due Date:
Thumbnail 1:
Thumbnail 2:
Thumbnail 3:
Thumbnail 4:
Thumbnail 5:



-

My action class uses the actionClass hidden variable to determine when
to display the input form vs. when to process the inputs.

[1] If I enter valid inputs and upload a file smaller than maxFileSize,
everything works fine.

[2] If I enter an invalid input and upload a file smaller than
maxFileSize, the input page gets redisplayed with the form errors at the
top, which is also fine.

[3] If I upload a file larger than maxFileSize, the problem occurs. I
don't get the actionClass form variable set. None of the other form
variables are set either. Thus, the input page redisplays as if the user
just pulled it up. None of what the user typed before is preserved, and
even more importantly, the user gets no indication that it was the size
of the file that caused the input page to redisplay. In fact, the user
gets no mention whatsoever that an error occurred. It just appears to
the user that the application has a bug and is being stubborn.

How do I get the values that the user entered (and also the hidden HTML
fields) when Struts detects a larger than allowed file in a file upload
field? I don't seem to get any indication that Struts decided not to
parse things because the size of a file upload field exceeded the
maxFileSize setting.


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




Re: Using the template tag library with parameters like jsp:param

2002-08-31 Thread jw

Hi All!

I've seen a number of posts looking for help/info on the this type of error message 
(i.e., "javax.servlet.ServletException: Exception creating bean of class 
???.???.xxxForm: java.lang.ClassNotFoundException: ???.???.xxxForm") that occurs when 
they attempt to test their "struts" application.

I have not seen a solution/ explanation, thus far, as to why this occurs.

Any help or insight as to why this happens, would be much appreciated.   Once again, 
I'm cutting and pasting a code example - that theoretically should work 
"out-of-the-box", and once again its not working (whaddya gonna do?)..

Here is the information/example code that I'm trying to get working when this error 
occurs... (NOTE: I'm using jakarta-tomcat-4.0.4,j2sdk1.4.0_01,
jakarta-struts-1.0.2)

*** SubmitForm.java***
package hansen.playground;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

public final class SubmitForm extends ActionForm {

  /* Last Name */
  private String lastName = "Hansen"; // default value
  public String getLastName() {
return (this.lastName);
  }
  public void setLastName(String lastName) {
this.lastName = lastName;
  }

  /* Address */
  private String address = null;
  public String getAddress() {
return (this.address);
  }
  public void setAddress(String address) {
this.address = address;
  }

  /* Sex */
  private String sex = null;
  public String getSex() {
return (this.sex);
  }
  public void setSex(String sex) {
this.sex = sex;
  }

  /* Married status */
  private String married = null;
  public String getMarried() {
return (this.married);
  }
  public void setMarried(String married) {
this.married = married;
  }

  /* Age */
  private String age = null;
  public String getAge() {
return (this.age);
  }
  public void setAge(String age) {
this.age = age;
  }

}


*** SubmitAction.java ***
package hansen.playground;

import javax.servlet.http.*;
import org.apache.struts.action.*;

public final class SubmitAction extends Action {

  public ActionForward perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) {

SubmitForm f = (SubmitForm) form; // get the form bean
// and take the last name value
String lastName = f.getLastName();
// Translate the name to upper case
//and save it in the request object
request.setAttribute("lastName", lastName.toUpperCase());

// Forward control to the specified success target
return (mapping.findForward("success"));
  }
}

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


Submit example


Example Submit Page




Last Name: 
Address:   
Sex:   Male
   Female
Married:   
Age:   
 0-19
 20-49
 50-
   
   






*** struts-config.xml ***

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




  
  


  


  
  
  


  
  


  
  



  



*** ***

jw


*** error that I receive ***

javax.servlet.ServletException: Exception creating bean of class 
hansen.playground.SubmitForm: java.lang.ClassNotFoundException: 
hansen.playground.SubmitForm
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.submit$jsp._jspService(submit$jsp.java:485)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

multiple html:select boxes on the page

2002-08-31 Thread Hemanth Setty

Hello,
I am trying to figure about a good way to use multiple select boxes with the
same data on the same page. The page contains
and bunch of questions and select box with the type of question(EASY,
MEDIUM, HARD). The question are variable and I get them from the database
along with the type for the question. The problem I am having is this, I
cannot define multiple select boxes with the same name using a DynaForm. I
could use the DynaForm.get(i) method to get a particular index of value.
But is the order of parameters coming from the page guranteed to be in the
same order as the values that were set on the selectbox?
Ex

Q1 Blah Blah?  ...

Q2 Foo bar ? ...

Before the page get displayed i will get the form and set("type", 1,
"EASY"); and set("type", 2, "MEDIUM");

When the page shows up, I assume the order will be in the right order..

Now when I click on submit on the page..will I get the Q1's type in
get("type", 1) and q2's type in get("type", 2)??

Another alternative, not very elegant though, is to have a hidden fields
associated with each select box and the value of the hidden field will have
the name of the select box. Then use the http request object to get the
value from the select box. But this way I cannot use form beans to manage
the select boxes..because the names on the selectboxes will be dynamic.

A good way that would be nice is to have the dynaformbean take something
like this

 and ..to 
will automatically work with get("type1")... get("type5")...etc...
Maybe im going a little overboard here...I think the DynaBean will not
support that.

So anybody enlighten me a little bit here?
Thanks in advance and have a good weekend..for those of you celebrating
Labor Day

-hemanth




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




Re: Java Server Faces and Developer Life Comments

2002-08-31 Thread V. Cekvenich


"James Higginbotham" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 1. NetDynamics is alive and well, see:
> http://developer.iplanet.com/tech/appserver/framework/index.jsp
> They have a nice sample app as well.
> But since I Planet has a bad rap, so does the Sun framework.

Ummm... What am I missing? Sounds like they are using Jato instead of
Struts, but I'm not seeing a GUI environment, just a really crude
NetBeans integration... Did I miss a link or something?

Vic:
James, I Think NetDynamics became Jato.
A previous poster mentioned NetD in the thread, so I just said here is where
it lives.

V.





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




Re: Using the template tag library with parameters like jsp:param

2002-08-31 Thread Eddie Bush

There is also Tiles for this sort of thing.

David Geary wrote:

> CB Thomas wrote:
>
>> With jsp:include, I can pass parameter values to the included page by 
>> using jsp:param.
>>
>> Can I get this functionality using the Struts template tag library?
>
> Yes. Use the direct attribute, like this: 

Tiles is a more feature-rich version of the template mechanism in 
Struts.  It supports this as well.

> 
>
> Then in your template, you can access that value; for example, like this:
>
> ...
>
> Normally, the  tag will include content associated with 
> the named parameter, but if you
> specify direct='true' with , the  tag will 
> just retrieve the value.
>
> See 
> http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html 
> for more information about templates and the direct attribute.
>
> btw, if at all possible, I suggest that you use Tiles instead of 
> templates. The former, which is an extension of the latter, has more 
> functionality.
>
>>   If so, can I use request.getParameter to retrieve values in the 
>> included page? 
>
> No, but you can use  as illustrated above.
>
> david 

Regards,

Eddie



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




RE: [MessageResources] URGENT!!! Dynamic parameters in App Resources for error handling

2002-08-31 Thread James Mitchell

> -Original Message-
> From: Tarun Sainanee [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 31, 2002 11:05 AM
>
> Hi all,
> I have been pretty happy using struts 1.0.2 for some time now. But now i
> have a problem. Please help.
>
> I know that we can use parameterized messages in the App Resources file
> for error messages. Depending on the no of parameters i can have an
> errors.add() method pass the parameters.
> But the problem is that i do not know in advance how many
> parameters i may
> need to pass? Any workaround guys?

Instead of using getMessage(key, arg0, arg1, etc, etc

use getMessage(key, args[])


>
> Also is there a way that i can access the message in App Resources File
> and modify it at runtime???


The default implementation of MessageResources (PropertyMessageResources)
does not provide for any way to manipulate the underlying HashMap at
runtime.

However, I guess you could hack around this with your own implementation
(not recommended).  Myself and a few others are looking at creating a
JDBCMessageResources that will probably provide a reload method.  So, I
guess, in a way that would allow someone to modify at runtime.


>
> Pointers to a working code would be excellent.
>
>
> Regards,
> Tarun Sainanee
> TCS Delhi


Hope that helps

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta


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




Re: Help me shake the cobwebs out... (also http://www.computer-programmer.org/articles/struts/ is back up)

2002-08-31 Thread Craig Tataryn

Thanks!  Makes sense.

Craig.

- Original Message -
From: "Jason Rosen" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, August 30, 2002 6:17 PM
Subject: RE: Help me shake the cobwebs out... (also
http://www.computer-programmer.org/articles/struts/ is back up)


> I created a Plug-in to initialize a connection to a proprietary Data
Access
> layer for a CRM package I have to use.  On initialization, my Plug-in just
> creates a connection to my datasource (using the CRM package's Java API)
and
> stashes a reference to the connection in the ServletContext.  Then I have
a
> BaseAction class that retrieves the reference and makes it available to
all
> Actions that subclass the BaseAction.  When my app is shut down, the
Plug-in
> ensures there are no more transactions for the connection, and destroys
the
> connection when all transactions are finished.
>
> Worked out pretty well - gives me the ability to have connection pooling
for
> all my Actions using the CRM proprietary Data Access APIs.
>
> -Original Message-
> From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 30, 2002 2:02 PM
> To: Struts Users Mailing List
> Subject: Re: Help me shake the cobwebs out... (also
> http://www.computer-programmer.org/articles/struts/ is back up)
>
>
> That's ok Joe, I understand.
>
> The one thing I do when I subscribe to a mail group is say to myself "Am I
> here to help myself or to help others?"  Nine times out of ten it ends up
> being both.  If I respond to someone's query I only do so if I
legitimately
> have something to contribute, I never respond if it is going to be
> condesending.  When I dedicate myself to helping a mailing list, I answer
> people's questions in hopes that they may one day answer some of mine.
Yes,
> I should have queried the manuals closer, my bad.  Remember sarcasim
should
> be left for Usenet :)  If I respond with an RTFM type post, I usually
> provide a link to the document I wish the user to read, or atleast a
quote.
> I know some people abuse this level of help, but on a whole it helps the
> group.
>
> In my RTFM'ing I understand the concept behind Dynaforms, but was
wondering
> if someone could provide an example?
>
> And Plugins, still not clear on how/when I would use such a thing.  Is
there
> a specific example someone has at the top of their head?
>
> Thanks,
>
> Craig.
>
> - Original Message -
> From: "Joe Barefoot" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, August 30, 2002 4:11 PM
> Subject: RE: Help me shake the cobwebs out... (also
> http://www.computer-programmer.org/articles/struts/ is back up)
>
>
> > You're welcome.  Sorry I was a bit terse/militant, but this list has
been
> spammed with so much crap lately it's starting to overwhelm my usually
> pacific demeanour. :)
> >
> > peace,
> > Joe
> >
> > > -Original Message-
> > > From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, August 30, 2002 1:12 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Help me shake the cobwebs out... (also
> > > http://www.computer-programmer.org/articles/struts/ is back up)
> > >
> > >
> > > Thank you for your answer.  I actually found the answer in the taglib
> > > documentation for html:form, I hadn't seen it before.
> > >
> > > Craig.
> > >
> > >
> > > - Original Message -
> > > From: "Joe Barefoot" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Friday, August 30, 2002 2:10 PM
> > > Subject: RE: Help me shake the cobwebs out...
> > >
> > >
> > > > The Struts controller knows what form bean to instantiate
> > > because you put
> > > a form bean name reference in your action mapping.  The
> > > mapping must contain
> > > the URL for your action.  In your JSP  tag, you
> > > reference an
> > > action's URL.  The controller simply matches this URL to your
> > > form bean
> > > reference through the actionMapping, then grabs the form bean
> > > class type
> > > from your  declaration in your struts-config, and
> > > instantiates
> > > that class to populate with values from your request.  If you
> > > have no form
> > > bean reference in your action mapping, then you cannot use an
> > > 
> > > tag which refers to that action mapping's URL, as Sri already
> > > pointed out
> > > below.
> > > >
> > > > b.t..w, if you had take the time to RTFM since yesterday,
> > > you could have
> > > answered your own question and then some.  The Struts user
> > > manual is a nice
> > > quick start for configuration, and the JavaDocs are quite
> > > comprehensive.
> > > Click on a package, then it's description, and you will get plenty of
> > > documentation, particularly with the tag packages.
> > > >
> > > > peace,
> > > > Joe
> > > >
> > > > -Original Message-
> > > > From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> > > > Sent: Fri 8/30/2002 10:47 AM
> > > > To: Struts Users Mailing List
> > > > Cc:
>

Re: [VALIDATOR] Bad Error Message when Validating a Range

2002-08-31 Thread David Geary

Thanks for the suggestion, but that didn't work either.

It's strange because I'm validating other fields in the same form and 
the error messages are correct for those fields. Also, If I change the 
range message in the resource bundle, that change is reflected in the 
message, but it always displays null for both the min and max values, 
even though the validator correctly uses those values to perform the 
validation.


david

micael wrote:

> David, should you be adding the  as I have below  AND, 
> shouldn't login.number.displayName=Number be 
> login.number.displayName=number?
>
> At 08:40 AM 8/30/2002 -0600, you wrote:
>
>> Sorry to repost this, but it got buried in a bunch of biere messages 
>> yesterday...
>>
>> I'm trying to validate a range using the validator. I've got this in 
>> validation.xml...
>>
>> 
>>   
>>   
>>   
>
>
> <<
>
>>   
>>   
>>   
>>   
>>   min
>>   5
>>   
>>   
>>   max
>>   10
>>   
>>   
>>   
>>   
>> 
>>
>> ...and this is how the field is defined in the form:
>>
>> The validation works: If I enter a value outside of the range, I get 
>> an error, and if not, I don't. But it's the error message that's the 
>> problem: Number is not in the range null through null. For some 
>> reason, even though the validator uses the correct min and max for 
>> validation, the error message doesn't reflect that. I've got the 
>> field display name and error message defined in my resource bundle, 
>> like this: login.number.displayName=Number errors.range={0} is not in 
>> the range {1} through {2}. Does anyone know what's wrong? Thanks, david
>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
>
>



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




Re: Using the template tag library with parameters like jsp:param

2002-08-31 Thread David Geary

CB Thomas wrote:

> With jsp:include, I can pass parameter values to the included page by 
> using jsp:param.
>
> Can I get this functionality using the Struts template tag library?

Yes. Use the direct attribute, like this:



Then in your template, you can access that value; for example, like this:

...

Normally, the  tag will include content associated with 
the named parameter, but if you
specify direct='true' with , the  tag will 
just retrieve the value.

See http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html 
for more information about templates and the direct attribute.

btw, if at all possible, I suggest that you use Tiles instead of 
templates. The former, which is an extension of the latter, has more 
functionality.

>   If so, can I use request.getParameter to retrieve values in the 
> included page? 

No, but you can use  as illustrated above.


david

>
>
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
>
>



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




Using the template tag library with parameters like jsp:param

2002-08-31 Thread CB Thomas

With jsp:include, I can pass parameter values to the included page by using 
jsp:param.

Can I get this functionality using the Struts template tag library?  If so, 
can I use request.getParameter to retrieve values in the included page?

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




URGENT!!! Dynamic parameters in App Resources for error handling

2002-08-31 Thread Tarun Sainanee

Hi all,
I have been pretty happy using struts 1.0.2 for some time now. But now i 
have a problem. Please help.

I know that we can user parameterized messages in the App Resources file 
for error messages. Depending on the no of parameters i can have an 
errors.add() method pass the parameters.
But the problem is that i do not know in advance how many parameters i may 
need to pass? Any workaround guys?

Also is there a way that i can access the message in App Resources File 
and modify it at runtime???

Pointers to a working code would be excellent.


Regards,
Tarun Sainanee
TCS Delhi
--
Finance is the art of passing money from hand to hand until it finally 
disappears.
-- Robert W. Sarnoff



RE: Java Server Faces and Developer Life Comments

2002-08-31 Thread James Higginbotham

> 1. NetDynamics is alive and well, see: 
> http://developer.iplanet.com/tech/appserver/framework/index.jsp
> They have a nice sample app as well.
> But since I Planet has a bad rap, so does the Sun framework.

Ummm... What am I missing? Sounds like they are using Jato instead of
Struts, but I'm not seeing a GUI environment, just a really crude
NetBeans integration... Did I miss a link or something? 
 
> My conclusion: If .NET or C# or anything becomes more 
> prodctive than Struts with DAO, I will switch. I chase 
> profit, and profit to me is showing clients how they can 
> develop fast and productive for very low cost, and operate 
> high volume at low cost. Open Source beats .NET. However is 
> there is more high end consulting in .NET... I have to switch.
> 
> 

Interesting comments. As for this one above - I agree. You have to go
where the money is when you are consulting. I co-founded a Java-focused
consulting company and have since pursued other things, but have noticed
that they are starting to do .Net training (internal and external) just
as we did Java training back in '97, '98 when Java 1.0 and 1.1 was
starting to gain favor. It's the only smart thing to do. Hope all goes
well with your business.. 

Best Regards,
James

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




RE: Is having serveral actions mappings to one Action bad design?

2002-08-31 Thread Robert Taylor

> DispatchAction is a hyrbrid of the two usages of Actions but it
> makes validation for different types of actions a lot
> tricker---eg. same strut mapping different parameter meaning you
> can only have one form bean for all actions and your validate
> needs to do a big if else check on parameter to see which
> validition to execute.
I use DispatchAction almost exclusively. Each subclass of DispatchAction
serves as a proxy to a set of related events. So for example, if my
site had a user account section, a store section, a product section, and
a support section, I would have AccountDispatchAction, StoreDispatchAction,
ProductDispatchAction, and SupportDispatchAction. Each DispatchAction
operation delegates to the appropriate business service where all the
processing take place. In this fashion, I reduce the number of physical
Action classes that really cannot be reused. By grouping them into
related event handlers they become more cohesive and easier to maintain.
By delegating to business services, I can leverage reusable business
components.

As far as ActionForms. It is quite simple. I have a single
DynaValidatorActionForm per DispatchAction. It contains all the fields
that
will be used to process the related events. Since they implement
the DynaBean interface, I can simply pass the DynaBean to my business
service and remove any business logic from the DispatchAction class
without fear of coupling the business layer to the web layer.

As far as validation. It is also quite simple. I leverage the use of
Struts validation and identify the fields to validate using the action
mapping path +
the operation which uniquely identifies the fields to be validated. Very
clean.
So I end up with something like the following in the name attribute of the
form
element in the validation.xml file.



robert


>
> Does anybody have any ideas on which design they preferor are
> there other ways as well to design web apps with struts.
>
> Thanks
>
> Francis
>
>
>
> -
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes


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




Re: Driver-Specific JDBC Functionality

2002-08-31 Thread Vic

It ssems you just wnat Clob or Blob, so use the new postgresql drivers or
http://jxdbcon.sourceforge.net/ the other pgsql driver.
Vic


"Dan Rudman" <[EMAIL PROTECTED]> wrote in message
000501c24ff4$3504b270$6501a8c0@diablomob">news:000501c24ff4$3504b270$6501a8c0@diablomob...
> I'm working with postgresql 7.2.1 and want to leverage Large Objects in
> my Struts application using oid's.  I have the typical struts-config.xml
> configuration specifying a connection pool with the postgresql driver.
> I'm using Struts 1.0.2.
>
> According to the documentation for postgresql, I need to obtain direct
> access to the native postgresql Connection object to use its Large
> Object API, i.e.:
>
> LargeObjectManager lobjManager =
> ((org.postgresql.Connection)conn).getLargeObjectAPI();
>
>
> However, the code below results in a ClassCastException on
> GenericConnection
>
> DataSource dataSource = servlet.findDataSource("pfdb");
> Connection conn = dataSource.getConnection();
> LargeObjectManager lobjManager =
> ((org.postgresql.Connection)conn).getLargeObjectAPI();
>
>
> I read through the mailing list archives and came across a similar
> request by David Noll from back in 2001 where he wanted to use
> MySQL-specific features ( See
> http://nagoya.apache.org/eyebrowse/ReadMsg?listName=struts-user@jakarta.
> apache.org&msgId=143539 ).
>
> The reply to that message, from Matthius Bauer, explained,
>
> >>You must not cast GenericConnection to  What you really want to do is
> call
> >>DataSource.getConnection which returns a Connection object like so:
> >>
> >>  DataSource ds = getServlet().findDataSource(null);
> >>  Connection con = ds.getConnection();
> >>
> >>You can cast this connection to org.gjt.mm.mysql.Connection without
> any
> >>problems!
>
> So, this is what I did, but alas, to no avail -- the ClassCastException
> problem.  No further responses were shown to illuminate a solution.
>
> Digging into the GenericDataSource and GenericDataConnection, it becomes
> clear that they are wrappers and do not expose the underlying
> Connection.  What I would appear to need is the ability to cast my
> Connection to a GenericConnection, and then call getConnection(), and
> then cast that to the database-specific Connection.
>
> Unfortunately, GenericConnection.getConnection() has protected
> visibility.  I don't see a way to extract the native Connection... but
> then again I'm 31 and have chicken pox and it's 3am on a work day.
>
> I'm about ready to extract the 1.0.2 source, change the visibility to
> public, and stick it back into struts.jar, but that seems a bit
> barbaric.
>
> Could someone point me in the right direction?
>
> Sincere thanks,
> Dan Rudman





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




Re: Java Server Faces and Developer Life Comments

2002-08-31 Thread Vic

1. NetDynamics is alive and well, see:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
They have a nice sample app as well.
But since I Planet has a bad rap, so does the Sun framework.

2. .NET can be improved via a MVC framework, Maverick. (most of you know of
Maverick as a Struts competitor)
http://mavnet.sourceforge.net/
There are lots of .NET versions on sf.net of Jakarta type tools for .net
(Like JUnit, etc.), just search sf.net
If your goal is to generate profit, M$ looks good (they are inexpensive and
productive).
A neat feature of .NET is webForms, they are neat.

Also, C# is a ECMA standard and here is the open source version:
http://www.infoworld.com/articles/hn/xml/02/07/22/020722hnoreilly.xml

And most important, MS is MUCH cheaper than BEA or IBM J2EE servers.
(Sun does not care about this. Sun is interested in selling $500,000
SlowLaris machines that are slower sometimes than $2,000 Linux machines. See
tpc.org.)

3. These people claimed that they are the reference implementation of Java
Server Faces (and I mentioned it to the JSR and now they backed of a bit,
but I suspect that they have something to do with Sun on JSF)
http://www.qbizm.cz/newsletter.html
( I looked at it and was disappointed so I as well wrote a letter to the JSR
for what it's worth. My point was the same, Struts is more productive.)

4. Corporate developers need GUI IDE. Things that expand the tag in JSP.
Things that bind text fields to Bean. IBM is one IDE that does most of this.
However, commercial developers, need to be able to get to the code. It is
possible to do both.

slow
HW. I think they will go the way of Digital, Data General, MIPS, etc. and
fade away.
Let Sun go out of business, we will take the licks, and then compete.
This IMHO is good for Java, Java without SUN (we have IBM VM, Jikes, open
source Java, many Java alternatives). This would allow Java to compete on
SW. (and anything that was meant to sell more HW, such as EJB or the web
server + app server + EJB server concept goes out the door, Tomcat or Resin,
etc can do all 3 just fine. I found EJB limits the number of concurrent
users you can have per box severely compared to other DAO implementations).

c. I have urged my clients to stop using SUN VM and use the faster IBM VM.
(Sun has GC and other issues under load. There are lots of faster VMs, like
JRockit or TowerJ) My clients, some of them quite large are leaving Sun HW
and Sun Java to Linux and IBM VM. Other example is the Apple Java on OS X.



I. I think .NET is better than J2EE. However, open source is better than
.NET.

II. I have tried to create a competitor to ADO, using a DAO design at
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/src_05d/basicPort
al/src/org/apache/commons/DAO/ (basicDAO)
Idea is that you can implement a DAO interfaces using JDO, EJB (if you are
new to J2EE, people first try EJB on their first J2EE project, then never
again), RowSet, OJB, or any other way.
This way, it is easy to change how your DAO is implemented. (my
implementation uses Disconnected RowSet)

III. Still the best practice, better than .NET is to use Struts, with JSTL,
with Tiles and with DAO interfaces. I tried to document best practices for
web site development and implement those in code at basicPortal.sf.net.
(it uses for example declarative security and has verticals samples)

Feel free to contribute to free and open source "best practices" for web
development.



To me this is similar to this:
Oracle is more complex and more expensive than MS SQL. So M$ SQL is better.
However OpenSource PostgreSQL is better and cheaper than M$SQL.
J2EE is more complex and expensive than J2EE (IBM, BEA, EJB). So .Net is
better. However, OpenSource Struts + JSTL  is better and more productive
than .NET.

Or Windows vs Linux. Problem is that managers are scared of Linux and
managers are scared of Open Source.
http://www.opensource.org/advocacy/case_for_business.php


My conclusion: If .NET or C# or anything becomes more prodctive than Struts
with DAO, I will switch. I chase profit, and profit to me is showing clients
how they can develop fast and productive for very low cost, and operate high
volume at low cost. Open Source beats .NET. However is there is more high
end consulting in .NET... I have to switch.


Enjoy the gasoline,

Vic
"Struts mentor"
[EMAIL PROTECTED]



"James Higginbotham" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have to agree with your assessment: Struts is a fabulous framework,
and now we need a real application development environment to sit on top
of it. Kudos to all those writing graphical interfaces to struts, but
most of them are just GUI panels on top of the config files. I saw one
(can't recall the name) that was commercial and offered page flow mgmt
as well - nice addition, but still not where I want to be.

My preferred way of working would be simliar to the old days of
NetDynamics (before Sun bought them and cl

Re: [VALIDATOR] Bad Error Message when Validating a Range

2002-08-31 Thread micael

David, should you be adding the  as I have below  AND, shouldn't 
login.number.displayName=Number be login.number.displayName=number?

At 08:40 AM 8/30/2002 -0600, you wrote:
>Sorry to repost this, but it got buried in a bunch of biere messages 
>yesterday...
>
>I'm trying to validate a range using the validator. I've got this in 
>validation.xml...
>
>
>   
>   
>   

 <<

>   
>   
>   
>   
>   min
>   5
>   
>   
>   max
>   10
>   
>   
>   
>   
>
>
>...and this is how the field is defined in the form:
>
>The validation works: If I enter a value outside of the range, I get an 
>error, and if not, I don't. But it's the error message that's the problem: 
>Number is not in the range null through null. For some reason, even though 
>the validator uses the correct min and max for validation, the error 
>message doesn't reflect that. I've got the field display name and error 
>message defined in my resource bundle, like this: 
>login.number.displayName=Number errors.range={0} is not in the range {1} 
>through {2}. Does anyone know what's wrong? Thanks, david



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




Re: [VALIDATOR] Bad Error Message when Validating a Range

2002-08-31 Thread micael

Should:
 login.number.displayName=Number
be:
 login.number.displayName=number
?


At 08:40 AM 8/30/2002 -0600, you wrote:
>Sorry to repost this, but it got buried in a bunch of biere messages 
>yesterday...
>
>I'm trying to validate a range using the validator. I've got this in 
>validation.xml...
>
>
>   
>   
>   
>   
>   
>   
>   
>   min
>   5
>   
>   
>   max
>   10
>   
>   
>   
>   
>
>
>...and this is how the field is defined in the form:
>
>The validation works: If I enter a value outside of the range, I get an 
>error, and if not, I don't. But it's the error message that's the problem: 
>Number is not in the range null through null. For some reason, even though 
>the validator uses the correct min and max for validation, the error 
>message doesn't reflect that. I've got the field display name and error 
>message defined in my resource bundle, like this: 
>login.number.displayName=Number errors.range={0} is not in the range {1} 
>through {2}. Does anyone know what's wrong? Thanks, david



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




VLR (very large resultset) problem : just an idea

2002-08-31 Thread flare

Ok, I know anyone has a custom solution for this very problem but I think we should 
find a 
general one, why reinventing the wheel? We've a couple of great paging taglib so I 
think 
we need to interface to them instead of recode everything.

1- The taglibs need the data stored in the session (which is not that bad, perhaps it 
doesn't 
scale exceptionally) 
2- The data should be a collection of beans (usually) 
3- the user really doesn't need more than 15/30 records at once

so I think we need to code a "virtual collection", this object simulates millions of 
records but 
only has 30/40 records cached, when the taglib request a record and the collection 
gets a 
miss (a not cached data) it should retrieve new data from the db (using the 
application db 
pool), same thing when the taglib request a sort.
The code should be general enough to interface to various db and pools.

What do you think?



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




Re: Documentation for writing custom validators available?

2002-08-31 Thread micael



At 07:43 PM 8/30/2002 -0600, you wrote:
>Is there any documentation available that shows how to implement a custom 
>validator for a field form with the validator? I've read the section in 
>the O'Reilly book, but I found it to be more confusing than helpful.
>
>Thanks,
>
>
>david
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>


Don't know exactly what you have in mind, David, but there is this general 
statement which I have found useful and is probably completely off the 
point you are trying to get to.  Won't hurt to try, I suppose.

Extending the scope of the struts validation
From: Frangois Rey
Subject: Extending the scope of the struts validation
Date: Sat, 23 Jun 2001 07:32:15 -0700

You may remember some of my earlier postings about a mapper framework that 
we use as a
validation framework. I now have the support in my company to make it open 
source.
However, I first would prefer to:

1- Invite the community to realize that a validation framework, definitely 
required in
Struts, is only part of a larger requirement.
2- Propose the extension of the scope of the TO DO item for validation so 
that is does
a bit more than just validation but also convert the value and transfer 
them to where
they should end up.

I know I've already approached this topic in my previous postings, but I 
there hasn't
been much follow up on this. However I still believe those that have 
developed web
applications with Struts have been confronted to the same problems we have 
been trying
to solve. So instead of submitting a big zip file that may or may not get 
interest, I
first would like to share the reasons that led us to developing the mapper 
framework.

In our company, after evaluating a few options, we have chosen Struts as 
the base
framework for developing web applications. We have developed our own simple 
extensions
to Struts in order to provide added support for things like i18n and 
transaction
integrity. Form validation was also a top item in our list of needed 
extensions, but
looking at the Struts 1.1 TO DO list we decided to wait and see what the 
community
would come up with. For one of our customer project, we have looked at the 
validation
framework from David Winterfeldt in order to implement form validation. We 
were very
attracted to that framework because it offered configuration-based 
validation and also
client-side validation. However beyond the simple need to validate form 
properties, we
also needed to do type conversion (text->object) on each field and populate 
another
bean (a command bean) with the converted values. Having a framework that only
addressed the validation part meant that we would still need to do a lot of 
custom
coding in order to convert values and populate our command beans. And in 
addition to
this, we also needed to do type conversion and populate presentation beans 
when
receiving result messages from the backend, which means even more custom 
coding.

I think by now you should understand and hopefully agree with me that 
validation is
actually only the first part of larger need: once values have been 
validated, you need
to do something with them. Whatever is needed to do, it should not be the
responsibility of the ActionForm. The latter should remain a View object 
that is only
a placeholder for user input. Business logic should be separated into 
another set of
objects. Actions seem to be a good place for implementing this business 
logic. However
doing so ties the logic to the web application framework in a way that 
makes the reuse
of this logic outside of a web application difficult. So a good application 
architect
would usually factor this business logic into another set of objects that 
is not
dependent from the web application. Often these objects are actually just 
sending
requests to a backend where the real business logic resides. But whatever 
these
objects are (the real Model, a PreparedStatement, or a proxy to a Model layer
implemented on another server), the point is that these are objects which 
need to be
initialized and populated with the user input.

Coming back to our project: we have an EJB backend accessed with a messaging
framework: you send command messages (objects), and you get result messages 
(objects).
And of course we wanted to avoid lots of custom code in our actions because 
it's
tedious, not so fun to write, and increases the maintenance burden (more 
lines of
code). So we took the decision to develop the mapper framework. What we now 
have is
used almost all over the place in the application we're developing, for the 
things I
mentioned above: validation, type conversion, and bean population, and for 
both
directions: forms -> command messages and result messages -> presentation 
beans. The
code in our Actions.perform() has decreased dramatically to just a few 
things. When we
get to the Action, the ActionForm.validate() has successfully validated the 
user