R: [OT] Good env for struts-based-web-tier and ejb components development

2004-06-03 Thread Andrea M.
Mah
Sincerely... there are features in IDEs that I don't know how would I do
without.. like code insight... web descriptor (and even struts descriptor)
editing.. and so on

Of course I could do everything with notepad, but that often means getting
crazy just to find a simple syntax error, or event to remember which methods
are you inheriting up to the three.
Noway.. I'll be a geek if you like but I don’t like to suffer with no
reason.



-Messaggio originale-
Da: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 3 giugno 2004 15.50
A: 'Struts Users Mailing List'
Oggetto: RE: [OT] Good env for struts-based-web-tier and ejb components
development

Hi there,
Jedit+xdoclet+mysql+junit+dbunit+maven

And u would write code, generate what u need, test it and deploy
It with one click..

IDE r powerful, no doubt on that, but I prefer plain old notepad..
If u end up getting acquainted with a powerful IDE, then as soon
As u change it u get lost

My 2 cents

Regards
marco




-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED] 
Sent: 03 June 2004 06:12
To: Struts Users Mailing List
Subject: [OT] Good env for struts-based-web-tier and ejb components
development

Hi List,

I am about to start development work on some auction site which in
principle
is similar to e-bay but not of that scale. I will be using J2EE+Jboss.

What kind of IDE development environment do you guys use for the
development?

I just tried Eclipse + EasyStruts + Lomboz. Lomboz is good but not good
enough.

1. I still have to carefully edit ejb-jar and jboss files to make my
things
run.
2. The directory structure that it creates in the background is not
good.
3. The xdoclet tags that it generates is for all servers. e.g JOnAs
jboss,
weblogic. but i need for only jboss.
4. The build files that it generates are bit obscure.

Easy Struts is just OK and doesn't provide much time saving to me. I can
live without it also. Moreover, EasyStruts doesn't work with Eclipse
3.0.

In nutshell, the entire development environment becomes unorganized, if
not
complex.

I wish to know what kinda env do you use? How do streamline your
development
process?

TIA
Navjot Singh


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



R: Servlet filter

2004-06-03 Thread Andrea M.
Hi Shilpa
I'm not sure you really need to use Filters for this purpose with Struts.
I think if you make sure you never access pages directly (maybe putting them
under WEB-INF... I've never done this but I know it's possible) but always
thru actions, then it shouldn't be difficult to implement a call to an
authentication component in your execute() method.

Should you absolutely need to authenticate thru a Filter, then it's not
difficult either

You first need to declare it in your web.xml like this:
  
AuthFilter
com.mypackage.AuthFilter
  
  
 AuthFilter 
/*
  

Then in your doFilter() method you call

   filterChain.doFilter(request, response)

if your user has authenticated successfully

otherwise you can redirect to some error page

-Messaggio originale-
Da: Shilpa Vaidya [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 3 giugno 2004 12.11
A: 'Struts Users Mailing List'
Oggetto: Servlet filter

hey all,
Preventing users from accesing action. I am writing a web app to manage
administrators and profiles.
Administrators may access to the web app based on the profiles they have.
The profiles, determine which pages the administrator might access. The
profiles, and authorizations, might change online during work, so I need to
check authorization to access a page (Action) on each access.If I understand
correct, then, the actionServlet, first process the form bean, and then the
action..
But, if the user is not authorized to access a specific page (Action), I
need to forward him to an UnAuthorized error page, before thr formAction
bean is filled.
I would like to use a servlet filter. This filter checks the users rights
and instanciates a HttpServletRequest-Wrapper.But am not sure how - .Can
anyone help.Till then me trying to study the ServletFilter examples here n
there.
Shilpa





-- 


"This e-mail message may contain confidential, proprietary or legally
privileged information. It 
should not be used by anyone who is not the original intended recipient. If
you have erroneously 
received this message, please delete it immediately and notify the sender.
The recipient 
acknowledges that ICICI Bank or its subsidiaries and associated companies,
(collectively "ICICI 
Group"), are unable to exercise control or ensure or guarantee the integrity
of/over the contents of the information contained in e-mail transmissions
and further acknowledges that any views 
expressed in this message are those of the individual sender and no binding
nature of the message shall be implied or assumed unless the sender does so
expressly with due authority of ICICI Group.Before opening any attachments
please check them for viruses and defects." 




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



R: Struts Tag Library

2004-06-02 Thread Andrea M
Yes.. if you plan to use MVC use Struts (or Spring or whatever framework you
please)
However.. Taglibs are just the View part, so you can use Struts with
whatever presentation components you prefer, still staying inside MVC model.
Actually.. there's nothing that prevents you to not use JSP at all as
presentation layer with Struts.

You have lots of option for your presentation:
- You can use pure JSP with (yuck) scriptlets
- you can use legacy struts tags
- you can use JSTL
- you can use Velocity
- You can use XML + XSLT
- you can use JSF
- you can ever mix Struts with non-java technologies like Flash (There are
several tutorials out there about how to integrate struts with flash
gateways like Macromedia's one or Open AMF)



-Messaggio originale-
Da: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Inviato: mercoledì 2 giugno 2004 12.31
A: Struts Users Mailing List
Oggetto: AW: Struts Tag Library

<2cents>
If you plan to use model 1 -> use jstl

If you plan to use model 2 -> use struts 


:-)
Leon

> -Ursprüngliche Nachricht-
> Von: Andrea M [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 2. Juni 2004 11:55
> An: 'Struts Users Mailing List'
> Betreff: R: Struts Tag Library
> 
> I agree with Rick
> Of corse you could use struts tags without Struts framework, but there's
> no
> point in doing so:
> Tags like bean, logic and iterate are almost entirely supplanted by JSTL
> The only struts tag that is still useful is  but is designed to
> work
> together with ActionServlet, so using it outside the framework would
> probably be more trouble than it's worth.
> 
> So the answer is: yes you can, but it's useless.
> 
> 
> -Messaggio originale-
> Da: Rick Reumann [mailto:[EMAIL PROTECTED]
> Inviato: mercoledì 2 giugno 2004 2.04
> A: Struts Users Mailing List
> Oggetto: Re: Struts Tag Library
> 
> Srinivasa Jagannadh Gade wrote:
> 
> > I've a question with Tag Library.
> >
> > Can we use only the Struts Tag Library without using Struts Framework as
> > a whole(Controller ,Action,Form etc).
> 
> It does you no good to use the Struts tags without using tags. The ones
> you need from Struts are used in conjunction with ActionForms, which you
> wouldn't be using if not using the framework.
> 
> Any other tags you 'think' are useful from the Struts tag library you
> cold get from using JSTL.
> 
> --
> Rick
> 
> -
> 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]



R: Struts Tag Library

2004-06-02 Thread Andrea M
I agree with Rick
Of corse you could use struts tags without Struts framework, but there's no
point in doing so:
Tags like bean, logic and iterate are almost entirely supplanted by JSTL
The only struts tag that is still useful is  but is designed to work
together with ActionServlet, so using it outside the framework would
probably be more trouble than it's worth.

So the answer is: yes you can, but it's useless.


-Messaggio originale-
Da: Rick Reumann [mailto:[EMAIL PROTECTED] 
Inviato: mercoledì 2 giugno 2004 2.04
A: Struts Users Mailing List
Oggetto: Re: Struts Tag Library

Srinivasa Jagannadh Gade wrote:

> I've a question with Tag Library.
> 
> Can we use only the Struts Tag Library without using Struts Framework as 
> a whole(Controller ,Action,Form etc).

It does you no good to use the Struts tags without using tags. The ones 
you need from Struts are used in conjunction with ActionForms, which you 
wouldn't be using if not using the framework.

Any other tags you 'think' are useful from the Struts tag library you 
cold get from using JSTL.

-- 
Rick

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



R: From bean into "for" loop

2004-05-24 Thread Andrea M.
Hi Andy
I'm afraid you are mixing jsp scriptlet with JSTL grammar
You can use two approaches:
If you want to use scriptlet (like you are doing now)
You must of course declare it, 
e.g. like


Then if tou want to use "someCount" property in you scriptlet you have to
stick with usual java syntax:  
<% for(int i = 0; i < productData.getSomeCount(); i++){ %>
  <%= productBean.getMyText() %>
<% } %>

otherwise you may consider uring JSTL, that is much cleaner than mixing java
code with HTML



-Messaggio originale-
Da: Andy Engle [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 24 maggio 2004 5.50
A: [EMAIL PROTECTED]
Oggetto: From bean into "for" loop

Hi all,

I am trying to do something as simple as writing a FOR loop with some
information that I have in a bean, but this is proving to be quite a
bit more cumbersome and difficult than I thought it would be.  For some
reason, everything I try seems to fail.  Here is a short example of
what I'm trying to do:

<% for(int i = 0; i < ${productData.someCount}; i++) {  %>
   // Write my text here
<% } %>

What am I missing here?  If you could help me I'd appreciate it --
enough time wasted on this thing already.


Thanks,
Andy


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



R: Multiple Databases.

2004-05-20 Thread Andrea M
Hi
I don't use Tomcat personally, but in almost all of the appservers out of
there you find an implementation of javax.sql.DataSource.
What you do usually is to configure your pools in the appserver's
configuration file, where you put all of the coordinates, then you access
them thru JNDI 
e.g.  DataSource myDataSource = new
InitialContext().lookup(myDataSourceJndiName)

With Struts I made a simple plugIn that does the necessary JNDI lookup at
startup, and then puts the references to the datasources in servletContext.

I believe Tomcat 4x+ has a JNDI provider too.

-Messaggio originale-
Da: Geeta Ramani [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 20 maggio 2004 14.52
A: Struts Users Mailing List
Oggetto: RE: Multiple Databases.

Vishal:

If you are using tomcat, then I believe you can use dbcp. (I think that's
what Riyad Kalla was talking about too..) We use dbcp but only for
connecting to one pool (and this turned out to be quite simple: just
configure the server.xml), but I think I read that you can create multiple
pools, which seems to be what you need. (My guess is you add more http://www.midrangeserver.com/mpo/mpo081502-story04.html

And here's a detailed how-to:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html

Regards,
Geeta

> -Original Message-
> From: Vishal Arora [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 20, 2004 1:22 AM
> To: Struts Users Mailing List
> Subject: Re: Multiple Databases.
> 
> 
> well  that not the problem  but my problem is that i want to 
> connect to
> different databases  in my application and i m using 
> datasource object  and
> in my xml file i have given the details of my database
> url,username,password  etc etc. but now i want to connect to another
> database and if in struts-config.xml i give information abt 
> other database
> .but when in my controller when i will give call to my 
> datasource object to
> which database the connection will be made and how can i handle
> it..like if i want to make connection to Database A and after 
> sometime in
> the same file if i want to make connection to DatabaseB how 
> will it work and
> what all changes i will have to make.and where. Pleaseif 
> anybody can provide
> an example it will be very helpfull.
> 
> 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]



R: and tags

2004-05-20 Thread Andrea M
Ops..typed it wrong
Correction:



-Messaggio originale-
Da: Andrea M [mailto:[EMAIL PROTECTED] 
Inviato: venerdì 21 maggio 2004 7.39
A: 'Struts Users Mailing List'
Oggetto: R:  and  tags

Hi Padala
Why don't you use


instead of manually cycling thru with  mailto:[EMAIL PROTECTED] 
Inviato: giovedì 20 maggio 2004 22.41
A: Struts Users Mailing List
Oggetto: RE:  and  tags

Thanks Tim, I could solve my issue with the el tags. Now I am using el
tags in other places, Life is easy now.

Sandhya

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 1:25 PM
To: 'Struts Users Mailing List'
Subject: RE:  and  tags


> Hello ,
> I have a question on how to use  tag as the value 
> to the value attribute of  tag
> 
> On my JSP
> 
> 
>var="optionList">
>
>
>

That's the problem right there, you *cannot* nest tags. So use the el
version of the tag:




--
Tim Slattery
[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]



R: and tags

2004-05-20 Thread Andrea M
Hi Padala
Why don't you use


instead of manually cycling thru with  mailto:[EMAIL PROTECTED] 
Inviato: giovedì 20 maggio 2004 22.41
A: Struts Users Mailing List
Oggetto: RE:  and  tags

Thanks Tim, I could solve my issue with the el tags. Now I am using el
tags in other places, Life is easy now.

Sandhya

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 1:25 PM
To: 'Struts Users Mailing List'
Subject: RE:  and  tags


> Hello ,
> I have a question on how to use  tag as the value 
> to the value attribute of  tag
> 
> On my JSP
> 
> 
>var="optionList">
>
>
>

That's the problem right there, you *cannot* nest tags. So use the el
version of the tag:




--
Tim Slattery
[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]



R: R: Struts and JAAS

2004-05-18 Thread Andrea M.
Could you provide an example of how to do it?
I think if it's a matter of application configuration then the appserver
should not make any difference, as long as I use jdk 1.4 and j2ee 1.3



-Messaggio originale-
Da: Sean Radford [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 11.36
A: Struts Users Mailing List
Oggetto: Re: R: Struts and JAAS

Never used jrun but on the other app servers I have used (and prefer
jboss) you can independently configure each app as to which JAAS realm
to use.



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



R: R: Struts Taglib recommendations

2004-05-18 Thread Andrea M.
You can find them at
http://www.displaytag.org
and
http://cewolf.sourceforge.net/


-Messaggio originale-
Da: Dean A. Hoover [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 15.05
A: Struts Users Mailing List
Oggetto: Re: R: Struts Taglib recommendations

Andrea M. wrote:

>Other taglibs that might be of interest for you are
>Displaytag for automatic generation of html tables, with paging and sorting
>CeWolf: for charts generation
>Jakarta String: for string manipulation
>etc
>There are many more to be used.. those are the ones I've been using most so
>far
>  
>
Do you have URLs for them?
Dean Hoover



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


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



R: Filtering ApplicationResources.properties file

2004-05-18 Thread Andrea M.
Ok, then you can filter what comes from your  ActionServlet.
You don't "filter properties", but requests and response.
You tell to the actionservlet that all the requests are from iso-8859-9
forms.
In alternative you might convert your file with native2ascii tool

I found something that might be of interest for you here:
http://www.anassina.com/struts/i18n/i18n.html

-Messaggio originale-
Da: Ramil Mirhasanov [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 15.03
A: Struts Users Mailing List
Oggetto: Re: Filtering ApplicationResources.properties file

Andrea,
Content type of the pages is ok it is  iso-8859-9,
but when i use 
tag to display my errors,
some characters are not properly displayed.
Maybe there is a way to filter the strut tags to accept requests in given
character encoding??
or must I somehow filter the encoding of .properties file??

- Original Message -
From: "Andrea M." <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 18, 2004 3:47 PM
Subject: R: Filtering ApplicationResources.properties file


> Ramil
> I don't think you need to filter your properties
> You display your errormessages thru your jsps, so Having iso-8850-9
encoding
> set in your jsps should be enough
>
>
> -Messaggio originale-
> Da: Ramil Mirhasanov [mailto:[EMAIL PROTECTED]
> Inviato: martedì 18 maggio 2004 14.40
> A: Struts Users Mailing List
> Oggetto: Re: Filtering ApplicationResources.properties file
>
> Andrea,
> I need that error messages are displayed properly in iso-8859-9 encoding,
> as all my classes and jsps.
> My error messages are stored in ApplicationResources.properties file.
>
> I will be gratefull if you help!
> Ramil
> - Original Message -
> From: "Andrea M." <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 18, 2004 3:22 PM
> Subject: R: Filtering ApplicationResources.properties file
>
>
> > Hi Ramil
> > I don't quite understand what you are trying to achieve
> > Why should you want to filter properties?
> >
> >
> >
> > -Messaggio originale-
> > Da: Ramil Mirhasanov [mailto:[EMAIL PROTECTED]
> > Inviato: martedì 18 maggio 2004 12.46
> > A: Struts Users Mailing List
> > Oggetto: Filtering ApplicationResources.properties file
> >
> > Hi,
> > I want to ask you,
> > how is it possible to create mapping for filter and *.properties??
> >
> > So that character encoding filter would apply for
> > ApplicationResources.properties file.
> >
> > I have allready done filtering for Actions, by modifiying web.xml:
> >
> >   
> > Set Character Encoding
> > action
> >   
> >
> > My ApplicationResources.properties file is in WEB-INF/classes
> >
> > Thank you in advance!
> > Regards,
> > Ramil
> >
> >
> > -
> > 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]



R: Filtering ApplicationResources.properties file

2004-05-18 Thread Andrea M.
Ramil
I don't think you need to filter your properties
You display your errormessages thru your jsps, so Having iso-8850-9 encoding
set in your jsps should be enough


-Messaggio originale-
Da: Ramil Mirhasanov [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 14.40
A: Struts Users Mailing List
Oggetto: Re: Filtering ApplicationResources.properties file

Andrea,
I need that error messages are displayed properly in iso-8859-9 encoding,
as all my classes and jsps.
My error messages are stored in ApplicationResources.properties file.

I will be gratefull if you help!
Ramil
- Original Message -
From: "Andrea M." <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 18, 2004 3:22 PM
Subject: R: Filtering ApplicationResources.properties file


> Hi Ramil
> I don't quite understand what you are trying to achieve
> Why should you want to filter properties?
>
>
>
> -Messaggio originale-
> Da: Ramil Mirhasanov [mailto:[EMAIL PROTECTED]
> Inviato: martedì 18 maggio 2004 12.46
> A: Struts Users Mailing List
> Oggetto: Filtering ApplicationResources.properties file
>
> Hi,
> I want to ask you,
> how is it possible to create mapping for filter and *.properties??
>
> So that character encoding filter would apply for
> ApplicationResources.properties file.
>
> I have allready done filtering for Actions, by modifiying web.xml:
>
>   
> Set Character Encoding
> action
>   
>
> My ApplicationResources.properties file is in WEB-INF/classes
>
> Thank you in advance!
> Regards,
> Ramil
>
>
> -
> 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]



R: Filtering ApplicationResources.properties file

2004-05-18 Thread Andrea M.
Hi Ramil
I don't quite understand what you are trying to achieve
Why should you want to filter properties?



-Messaggio originale-
Da: Ramil Mirhasanov [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 12.46
A: Struts Users Mailing List
Oggetto: Filtering ApplicationResources.properties file

Hi,
I want to ask you, 
how is it possible to create mapping for filter and *.properties??

So that character encoding filter would apply for 
ApplicationResources.properties file.
 
I have allready done filtering for Actions, by modifiying web.xml:

  
Set Character Encoding
action
  

My ApplicationResources.properties file is in WEB-INF/classes

Thank you in advance!
Regards,
Ramil


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



R: Struts Taglib recommendations

2004-05-18 Thread Andrea M.
Why that?
I use currently Struts + JSTL
Actually the only struts taglib I use is html or html-el
What have "using the mvc" and "build 3 tier" to do with using struts taglib
vs JSTL???


-Messaggio originale-
Da: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 14.06
A: Struts Users Mailing List
Oggetto: AW: Struts Taglib recommendations

That depends. If you want to use the mvc from struts then use struts
taglibs. If you build a 3 tier use struts taglibs. If you want manageable
jsps use struts taglibs. 
Otherwise use jstl or struts-el.

:-)
Leon

> -Ursprüngliche Nachricht-
> Von: Linus Nikander [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 18. Mai 2004 11:08
> An: [EMAIL PROTECTED]
> Betreff: Struts Taglib recommendations
> 
> Has anyone made a comparison of the various taglibs out there that can be
> used with struts ? I'm about to start working on a project and have been
> asked to evaluate our options. Which taglib (or combinations of different
> taglibs) do you use when developing ? What are the advantages of one over
> another (or of one combination over another)?
> 
> //Linus Nikander
> 
> 
> 
> 
> -
> 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]



R: Struts Taglib recommendations

2004-05-18 Thread Andrea M.
Hi
As somebody else suggested JSTL may be what you want
One of the most used implementation is jakarta's one (standard taglib)
There are 2 versions:  
Standard 1.0 that works with JSP 1.2 and servlet 2.3
Standard 1.1 that works with JSP 2.0 and servlet 2.4
I've replaced almost all of struts taglibs (except html) with jstl ones.

Other taglibs that might be of interest for you are
Displaytag for automatic generation of html tables, with paging and sorting
CeWolf: for charts generation
Jakarta String: for string manipulation
etc
There are many more to be used.. those are the ones I've been using most so
far



-Messaggio originale-
Da: news [mailto:[EMAIL PROTECTED] Per conto di Linus Nikander
Inviato: martedì 18 maggio 2004 12.34
A: [EMAIL PROTECTED]
Oggetto: Re: Struts Taglib recommendations

Point taken ;)

>From what I know right now we'll be using taglibs mostly to iterate and
display collections of beans. There might be some logical branching (
equals, bigger than, smaller than ) involved. I've used the struts taglibs
extensively but find some parts of it, beans nested several levels for
example, quite tedious to work with.

//Linus


"Andrea M." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
That's a pretty vague question
There's plenty of taglib out there
Please specify what you are looking for, cause I don't think you'll find
people here writing you a comprehensive list of all of the taglibs existent
:)

Andrea


-Messaggio originale-
Da: news [mailto:[EMAIL PROTECTED] Per conto di Linus Nikander
Inviato: martedì 18 maggio 2004 11.08
A: [EMAIL PROTECTED]
Oggetto: Struts Taglib recommendations

Has anyone made a comparison of the various taglibs out there that can be
used with struts ? I'm about to start working on a project and have been
asked to evaluate our options. Which taglib (or combinations of different
taglibs) do you use when developing ? What are the advantages of one over
another (or of one combination over another)?

//Linus Nikander




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



R: Struts Taglib recommendations

2004-05-18 Thread Andrea M.
That's a pretty vague question
There's plenty of taglib out there
Please specify what you are looking for, cause I don't think you'll find
people here writing you a comprehensive list of all of the taglibs existent
:)

Andrea


-Messaggio originale-
Da: news [mailto:[EMAIL PROTECTED] Per conto di Linus Nikander
Inviato: martedì 18 maggio 2004 11.08
A: [EMAIL PROTECTED]
Oggetto: Struts Taglib recommendations

Has anyone made a comparison of the various taglibs out there that can be
used with struts ? I'm about to start working on a project and have been
asked to evaluate our options. Which taglib (or combinations of different
taglibs) do you use when developing ? What are the advantages of one over
another (or of one combination over another)?

//Linus Nikander




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



R: Struts and JAAS

2004-05-18 Thread Andrea M.
Yes
I need application A using module 1
And application B using module 2
I need isolation, so A cannot access m2 and B cannot access m1
In Jrun actually I can configure jaas modules for users and roles, but
that's server instance wide.
I'm pretty new to JAAS, and I don't know if I have to find a way to
configure my server in order to bind each module to the app I want,
Or it's the application that needs to know which module to use.
So far the only examples and  tutorials I found are about standalone
applications, or single signon.
Cannot use the first because I need policy files don't suit my needs
And cannot use the second because I don't want to share the modules.
There is not (at least I didn't find any) concept of realm in Jrun
configuration.. so I'm pretty confused

-Messaggio originale-
Da: Sean Radford [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 11.05
A: Struts Users Mailing List
Oggetto: Re: Struts and JAAS

Each application just logs into a different JAAS realm (each of these
has its own stack of login modules, but sounds like you only need one
per realm).

Hope that guides you a little.

regards,

Sean


On Tue, 2004-05-18 at 09:22, Andrea M. wrote:
> Hello all
> I've got a dilemma trying to implement JAAS in my struts applications.
> 
> This is the problem:
> I have more applications running in the same instance of the appserver
(jrun
> 4 in my case, but I think the same thing is applicable to the others).
> Each application has its own database with its own roles, users, and
> authentication rules.
> What I'd like to do is to implement many login modules, and to apply to
each
> application its specific module.
> The point is, for what I understand the login modules in JAAS are
stackable,
> so it goes thru all of them looking which one passes.
> So, if you set all of them as required every authentication will fail,
> because of the logic difference, and if you set them as optional then you
> may pass a login just because you have an account in the other one, which
> passes. In that case I will have a user logging in the application A, but
> authenticated with the login module tailored for the application B!
> 
> Anyone with a better clue than me about this?
> 
> Thanks
> Andrea
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/


-
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 and JAAS

2004-05-18 Thread Andrea M.
Hello all
I've got a dilemma trying to implement JAAS in my struts applications.

This is the problem:
I have more applications running in the same instance of the appserver (jrun
4 in my case, but I think the same thing is applicable to the others).
Each application has its own database with its own roles, users, and
authentication rules.
What I'd like to do is to implement many login modules, and to apply to each
application its specific module.
The point is, for what I understand the login modules in JAAS are stackable,
so it goes thru all of them looking which one passes.
So, if you set all of them as required every authentication will fail,
because of the logic difference, and if you set them as optional then you
may pass a login just because you have an account in the other one, which
passes. In that case I will have a user logging in the application A, but
authenticated with the login module tailored for the application B!

Anyone with a better clue than me about this?

Thanks
Andrea


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



R: java.lang.IllegalArgumentException: No bean specified

2004-05-17 Thread Andrea M
Hi Paraman
These are the two actions you're talkin' about:


  





Now I see that the first one forwards a processAreasForm to the second,
which in turn accepts evaluationForm

That's very likely to be your problem
So.. you have three options I guess
- The one you found: setting the "redirect" attribute to true you will not
forward the request so there will be no processAreasForm
- You make sure the actionforms for the two actions match (either changing
one of the two, or implementing another action that takes processAreasForm)
- You don't specify any bean in the first action


-Messaggio originale-
Da: Paraman [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 3.15
A: Struts Users Mailing List
Oggetto: Re: java.lang.IllegalArgumentException: No bean specified

Richard,
Firstly I should apologize for disturbing you. I have solved this problem by
setting the 'redirect' attribute of the forward element which invoked the
executeEvaluation action to 'true'. This forward is nested in another action
called 'selectProcessAreas', thus, without setting the  'redirect'
attribute, Struts will try to mapping the request parameters of this action
to the form properties of the 'executeEvaluation' action and therefore
caused the exception.

By the way, I can not understand your meaning well. According to the struts
documentation, the 'input' attribute of an action mapping is described as
"Context-relative path of the input form to which control should be returned
if a validation error is encountered. Required if "name" is specified and
the input bean returns validation errors." Is it necessary to set it every
time I submit a form to an action, in addition to the 'name' attribute?

Regards,

Paraman
  
- Original Message - 
From: "Richard Yee" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 18, 2004 6:03 AM
Subject: Re: java.lang.IllegalArgumentException: No bean specified


> Paraman,
> Are you submitting a form to the action? If so, you
> don't have the name of the form-bean as the 'input'
> argument to your executeEvaluation action.
> 
> Regards,
> 
> Richard
> 


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



R: use of session object in Action Form?

2004-05-17 Thread Andrea M
Correct
Whatever the reason you need to access the session, you can do that using
the request passed to the two methods Atta mentions.
Getting a reference to the session from the request is trivial:
HttpSession session = request.getSession();


-Messaggio originale-
Da: atta-ur rehman [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 20.57
A: Struts Users Mailing List
Oggetto: Re: use of session object in Action Form?

Hi,

As far as I know, both the reset() and validate() method are passed the
request object. You could get the session from this request object.

HTH,

ATTA

- Original Message - 
From: "Shyamal Shah" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, May 17, 2004 12:13 AM
Subject: use of session object in Action Form?


I need to use session object in my Action Form class. Can I use either
session or request object in my form class? If yes can someone please
suggest how can I do that?

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]



R: Indexed property throws exception - HELP!

2004-05-17 Thread Andrea M
I've seen in another list someone resolving a problem like this using
ArrayList instead of the interface List
It's odd but the guy claims it worked. Maybe a bug in PropertyUtils.. don't
honestly know.
This is the link if you are interested
http://www.junlu.com/msg/45025.html


-Messaggio originale-
Da: Phan, Hienthuc T (Rosetta) [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 18.59
A: [EMAIL PROTECTED]
Oggetto: Indexed property throws exception - HELP!
Priorità: Alta

Hi,

I encountered an index out of bound exception when using the indexed
property.  The problem I'm facing is that I can't debug this.  The exception
is not thrown either in the the form or the action.  Do you know what cause
this?


   <101017>
<[ServletContext(id=4601745,name=scheduler,context-path=/scheduler)] Root
cause of ServletException
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:486)
at java.util.ArrayList.get(ArrayList.java:302)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:521)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:428)
at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
ava:770)
at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80
1)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1096)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:816)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1058)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:401)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:306)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5445)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3105)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
>



--
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
Jersey, USA 08889), and/or its affiliates (which may be known outside the
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
Banyu) that may be confidential, proprietary copyrighted and/or legally
privileged. It is intended solely for the use of the individual or entity
named on this message.  If you are not the intended recipient, and have
received this message in error, please notify us immediately by reply e-mail
and then delete it from your system.

--

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



R: App-level globals

2004-05-17 Thread Andrea M
Yeah
Probably Struts' plugins are the most straightforward thing for you.
Plugins are components that Struts loads once at startup, and they are often
used (I use them in that way too) to load shared resources (like
datasources) in servletcontext before every other component is load.



-Messaggio originale-
Da: Joe Germuska [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 18.47
A: Struts Users Mailing List
Oggetto: RE: App-level globals

At 5:33 PM +0100 5/17/04, Paul McCulloch wrote:
>Struts has plugins which, I think do the kind of thing you are after.
>Personally I've never used them  - I just implement a
ServletContextListener
>to do that sort of thing.

This is exactly right:  if you're using Servlet 2.2 (which doesn't 
have ServletContextListener), you can use PlugIn.  If you're using 
Servlet 2.3 or newer, about the only other thing that PlugIn gets you 
which an SCL doesn't is that its init() method receives a reference 
to the Struts ModuleConfig for which the plugin is being initialized 
-- so if you need a handle on that object, using a PlugIn is probably 
the most straightforward way to get one.

Joe


>Paul
>
>>  -Original Message-
>>  From: None None [mailto:[EMAIL PROTECTED]
>>  Sent: Monday, May 17, 2004 5:17 PM
>>  To: [EMAIL PROTECTED]
>>  Subject: App-level globals
>>
>>
>>  Hello again everyone... I am starting conversion of a
>>  none-Struts app to
>>  Struts, and mostly it's straight-forward, but two things I
>>  have questions
>>  about...
>>
>>  The home-grown framework this app was written with has the
>>  notion of an App
>>  Loader.  Basically, this is a class that runs at startup and
>>  reads in some
>>  config information and stores it in a static config object. 
>>  The properties
>>  of this object are referenced throughout the app.
>>
>>  The other concern is that this same process spawns a couple
>>  of low-priority
>>  background threads to do some various things throughout the
>>  lifetime of the
>>  app.
>>
>>  My question, which I have been unable to find an answer to on
>>  my own, is if
>>  Struts has a similar startup "initialization" mechanism?  If
>>  not, do I
>>  simply create my own servlet to do all this work and set it to run on
>>  startup in web.xml?  I have no problem with the later
>>  approach, but I'm
>>  wondering if Struts has a mechanism for this, like our custom
>>  framework
>>  does?
>>
>>  Thanks all!
>>
>>  _
>>  Express yourself with the new version of MSN Messenger!
>>  Download today -
>>  it's FREE!
>>  http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>**
>Axios Email Confidentiality Footer
>Privileged/Confidential Information may be contained in this 
>message. If you are not the addressee indicated in this message (or 
>responsible for delivery of the message to such person), you may not 
>copy or deliver this message to anyone. In such case, you should 
>destroy this message, and notify us immediately. If you or your 
>employer does not consent to Internet email messages of this kind, 
>please advise us immediately. Opinions, conclusions and other 
>information expressed in this message are not given or endorsed by 
>my Company or employer unless otherwise indicated by an authorised 
>representative independent of this message.
>WARNING:
>While Axios Systems Ltd takes steps to prevent computer viruses from 
>being transmitted via electronic mail attachments we cannot 
>guarantee that attachments do not contain computer virus code.  You 
>are therefore strongly advised to undertake anti virus checks prior 
>to accessing the attachment to this electronic mail.  Axios Systems 
>Ltd grants no warranties regarding performance use or quality of any 
>attachment and undertakes no liability for loss or damage howsoever 
>caused.
>**
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


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

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


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



R: R: Sharing what I've learned: locale switching

2004-05-17 Thread Andrea M
Hi again
I'm afraid I was kind of inaccurate in my previous answer
you can retrieve session from the request, but that's only with forwards of
course, and forwards work only in the same application.

What you can do  is to share your objects putting them in JNDI. JNDI tree is
shared between all of your contexts, and it's replicated, so it's
cluster-safe.

Of course you should make sure to have set your object before accessing it
from another app, but that's obvious.

Hope that helps



-Messaggio originale-
Da: Jan Normann Nielsen [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 14.31
A: Struts Users Mailing List
Oggetto: Re: R: Sharing what I've learned: locale switching

Andrea M. wrote:

>Hi Jan
>What do you mean with "sharing user chosen locale"?
>Does your user access thru a common login application?
>If it's something like that, then you might share your Locale putting it in
>session
>Session.setAttribute("myLocale", myLocale);
>
>Then retrieving it in the other applications with
>(Locale)request.getSession().getAttribute("myLocale);
>
>This usually works pretty well since Session is a serializable object.
>Not sure it would work in a clustered environment though
>  
>
I have no problem putting the locale in the session if it wasn't for the 
fact that each deployed web application has its own session handler, so 
the locale is not shared between web applications. It this possible?

Best regards,
Jan Nielsen

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



R: JSTL 1.1 EL not working :(

2004-05-17 Thread Andrea M.
Hi Daniel
Please tell us which container you are using
JSTL 1.1 require JSP 2.0 + servlet 2.4

AFAIK the only ones that actually implement those specs are:
Tomcat 5
SunOne 8
Jboss 4

If you are using other containers (e.g. Tomcat 4x) you need to use JSTL 1.0,
that only require JSP 1.2 + servlet 2.3

PS: anyways ensure that the URI you use in web.xml is the same you declare
in your page

Andrea

-Messaggio originale-
Da: Daniel Perry [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 15.50
A: Struts User List
Oggetto: JSTL 1.1 EL not working :(

I've tried to use JSTL with my web app, and it's not working!
I downloaded jstl 1.1, and copied jstl.jar, and standard.jar to WEB-INF/lib.
I put the f.tld, fmt.tld, fn.tld in WEB-INF/.

In my web.xml i've got:
  
/WEB-INF/c.tld
/WEB-INF/c.tld
  

  
/WEB-INF/fn.tld
/WEB-INF/fn.tld
  

  
/WEB-INF/fmt.tld
/WEB-INF/fmt.tld
  

If i try and use c:out, it doesnt work!

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core";  prefix="c" %>


gives:
${1+1}

Any idea what's going on?
It looks like the taglib is working fine, but not using el!

Any ideas?

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]



R: [very OT] 16 kb limit in XML from Tomcat?

2004-05-17 Thread Andrea M.
Hmm
I don't know about this 16k limit, but AFAIK you can set any kind of content
type in your jsp.
JSPs are ultimately servlets (once translated), so  you have no limit in
content types

e.g. I used to set "text/xml" for creating dynamic JNLP files with jsps


-Messaggio originale-
Da: Kransen, J. [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 12.32
A: 'Struts Users Mailing List'
Oggetto: [very OT] 16 kb limit in XML from Tomcat?

Hello, I generate an XML file from within a JSP in Tomcat. Especially after
16384 bytes the contents are really interesting. Unfortunately, Tomcat
disagrees and truncates it. It can't be coincidence that this is 16k
precisely, so I hoped to find a configuration item set to 16k (in fact I
hoped not to have a limit at all), but I can't find one. There are also no
stack traces or any errors/warnings, it just gets truncated and that's it.
It can't be the browser, because it happens with IE6 and Opera 7.23.

By the way, do I have to (can I) set a content type "text/xml" in JSP? 

Regards, Jeroen


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



R: Struts 1.1 & XHTML [html:form]

2004-05-17 Thread Andrea M.
Hi Yoann
Why do you need a "name" on your form?
In Struts it usually identifies the name of the actionForm it uses, but that
is usually set in struts-config.
If a unique identifier of the  then 'styleId' attribute might be what
you want, since it renders an 'id' attribute (ibid
http://jakarta.apache.org/struts/userGuide/struts-html.html)


-Messaggio originale-
Da: Le Goff, Yoann [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 11.55
A: 'Struts Users Mailing List'
Oggetto: Struts 1.1 & XHTML [html:form]

Hi,

My  render a form with a name="toto" attribute corresponding to
my struts-config bean.
All is right,
But XHTML 1.1 do-not accept name attribute in a form tag ...

Is somebody got an idea ?

I've ever try  in my jsp.
It works form  tag but for form tag, it doesn't.

Thx !


Yoann 



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



R: About multiple Resourcebundles

2004-05-17 Thread Andrea M.
Yes that's the way you access the bundles. 
Your web.xml has nothing to do with message resources 

However... instead of asking "will it work?" perhaps it would be a better
idea to try it out first, and eventually ask "why didn't it work?" then  :)

Andrea

-Messaggio originale-
Da: SMETS Thomas [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 11.33
A: Struts Users Mailing List
Oggetto: About multiple Resourcebundles


Dear,

I am struggling a bit with the usage of more than one Resourcebundle in
Struts-config.xml.
I have defined two "property" files in my classpath : 
_ ApplicationResources.properties
_ ApplicationResources2.properties


The bottom line is (I think) how do I access the messages when I have the
following in my struts-config :

  


  



What do I write in my jsp's ?
 

Do I need to add something in my web.xml ?

\T,





--
Thomas SMETS
Architect reengineering OEIL
T. : 44375 

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



R: Sharing what I've learned: locale switching

2004-05-17 Thread Andrea M.
Hi Jan
What do you mean with "sharing user chosen locale"?
Does your user access thru a common login application?
If it's something like that, then you might share your Locale putting it in
session
Session.setAttribute("myLocale", myLocale);

Then retrieving it in the other applications with
(Locale)request.getSession().getAttribute("myLocale);

This usually works pretty well since Session is a serializable object.
Not sure it would work in a clustered environment though

-Messaggio originale-
Da: Jan Normann Nielsen [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 10.42
A: Struts Users Mailing List
Oggetto: Re: Sharing what I've learned: locale switching

None None wrote:

> Because this might be helpful to others, and because I probably would 
> have spent another couple of hours figuring it out on my own without 
> the help of some people on this lsit, I wanted to give back as much as 
> I could.  So, here's a consolidated bit of info I've learned about 
> switching language in your Struts apps...
>
> What I have is a file manager application, more or less just for me to 
> learn Struts.  I wanted to have the ability to switch languages 
> on-the-fly.  To do this, I've done the following:

Does anyone know how to make the Locale settings global for all web 
applications deployed in a web container? Is it at all possible? I have 
four web applications deployed in Jetty and I want to have them share 
the user chosen locale.

Best regards,
Jan Nielsen

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



R: Maintaining form data across pages...

2004-05-16 Thread Andrea M
Yes that's the way it works
It does not matter in which scope the form is set
1. JSP submits the form
2. Struts goes to find one in the scope you told him
3. if it finds one, then it calls reset() (so to avoid having stale data),
then populates it
4. it it doesn't find any form in the scope, then istantiates a new one then
carries on

This is because Struts doesn't know if the actionform it founds is being
populated by a multiple-page form, or is simply a stale one.

And this is why reset() takes httpServletRequest as parameter: so you can
implement your own reset logic depending on your particular application flow


-Messaggio originale-
Da: ayouaa0a [mailto:[EMAIL PROTECTED] 
Inviato: domenica 16 maggio 2004 12.40
A: 'Struts Users Mailing List'
Oggetto: RE: Maintaining form data across pages...

Yes, that's what I want, I will give it a try.

but what do u mean struts "always calls reset()" everytime it access the
form, this is very strange, even the form is in session!!

Plz domonstrate more, as far as I understood:
1- When a JSP submits a form.
2- Struts calls reset for the form.
3- Try to populate the form from the JSP controls, even it was in session.


-Original Message-
From: Andrea M [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 16, 2004 1:11 PM
To: 'Struts Users Mailing List'
Subject: R: Maintaining form data across pages...

Hi
I'm not sure I've understood properly what you need
What I understand is that you are trying to populate the same actionform
using several pages.
The problem is that struts *always calls reset()* every time it access the
form.
What you can do is making your pages set a flag in the request, so your form
can know where it's called from.
Reset() method takes httpServletRequest as parameter, so you can implement
conditional logic there... sometimes like:

public void reset(ActionMapping mapping, HttpServletRequest request) {
// first time accessed so I can set everything to null 
if (request.getParameter("flag") == null) { 
// set all properties to null here
}
else if (request.getParameter("flag").equals("page1") {
// set to null only properties not present in page1
}
else if (request.getParameter("flag").equals("page2") {
// set to null only properties not present in page2
}
...
}

-Messaggio originale-
Da: Ayoub, Ashraf A [mailto:[EMAIL PROTECTED] 
Inviato: domenica 16 maggio 2004 11.58
A: Struts Users Mailing List
Oggetto: Maintaining form data across pages...

Dears,

I am trying to setup a series of jsp pages (requestForm, confrimation
jsp). 

I set the scope of my requestForm to "session" as to maintain the data
across the various jsps, but I get it as if reset is called, after  the
confirmation page submits.

What is the best way to maintain the request data across several jsp
pages, speically I have lots of pages as step 1, step 2, step 3 before
submiting the action, with different form beans.

 

 

Thanks, best regards

 

Ashraf Fouad

 



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



R: Maintaining form data across pages...

2004-05-16 Thread Andrea M
Hi
I'm not sure I've understood properly what you need
What I understand is that you are trying to populate the same actionform
using several pages.
The problem is that struts *always calls reset()* every time it access the
form.
What you can do is making your pages set a flag in the request, so your form
can know where it's called from.
Reset() method takes httpServletRequest as parameter, so you can implement
conditional logic there... sometimes like:

public void reset(ActionMapping mapping, HttpServletRequest request) {
// first time accessed so I can set everything to null 
if (request.getParameter("flag") == null) { 
// set all properties to null here
}
else if (request.getParameter("flag").equals("page1") {
// set to null only properties not present in page1
}
else if (request.getParameter("flag").equals("page2") {
// set to null only properties not present in page2
}
...
}

-Messaggio originale-
Da: Ayoub, Ashraf A [mailto:[EMAIL PROTECTED] 
Inviato: domenica 16 maggio 2004 11.58
A: Struts Users Mailing List
Oggetto: Maintaining form data across pages...

Dears,

I am trying to setup a series of jsp pages (requestForm, confrimation
jsp). 

I set the scope of my requestForm to "session" as to maintain the data
across the various jsps, but I get it as if reset is called, after  the
confirmation page submits.

What is the best way to maintain the request data across several jsp
pages, speically I have lots of pages as step 1, step 2, step 3 before
submiting the action, with different form beans.

 

 

Thanks, best regards

 

Ashraf Fouad

 



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



R:

2004-05-16 Thread Andrea M
Hi Raman
I would rather suggest you to put in your scope an ArrayList of beans, each
one eventually with getName() and getLabel()  (or whatever you like)

So.. in that case, if your collection is stored as "dummyList" then you
could access it like this:


Where property attribute will be the value (and the property you will
eventually set in your actionform) and labelProperty will be the text
displayed


Another chance if you don't want make a javabean of your own is to use a
HashMap. In that case it will be the same, except that you will have to use
"key" and "value".
e.g:
<%
   java.util.HashMap myMap = new java.util.HashMap();
   myMap.put("TEXT1", "1");
   myMap.put("TEXT2", "2");
   session.setAttribute("myMap", myMap);
%>





-Messaggio originale-
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Inviato: sabato 15 maggio 2004 14.43
A: [EMAIL PROTECTED]
Oggetto: 

R: **--Message Resource problem--**

2004-05-16 Thread Andrea M
Hi Raman
Can you post here your Properties file?
Maybe it's a matter of caps

Another chance is that you have more than one message-resources entries in
your config, and that ApplicationResources.properties is not the default
one: if it's so, then you have to specify which one to use with "bundle"
attribute, otherwise struts will use the default one.

Hope that helps


-Messaggio originale-
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Inviato: sabato 15 maggio 2004 14.32
A: [EMAIL PROTECTED]
Oggetto: **--Message Resource problem--**

Hi all,
 
I m facing problem in configuring my properties files for messages
 
i am using IBM's WSAD 5.0 
 
i have done following to configure Message resources in my application
 
in struts-config.xml file i have following entry


i have my ApplicationResources.properties file at
com/stat/mw/mwoweb/resources folder
 
and my jsp page i am using it as

 
Is there any other settings that i need to do.
 
I am gettign following error:   Missing message for key
admin.textlabel.userid'
I have this entry in my properties file
 
Pls advice what can be the problem... 
 
thanks and take care
Raman Garg
 
 


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



R: How to set an ActionForm to null

2004-05-15 Thread Andrea M
Well.. this is how it usually works:
- Your jsp posts the data to the mapped Action
- The ActionServlet intercepts the request, checks on your struts-config.xml
which actionform it needs to use and in which scope it can be found.
- If there's no such actionform in the scope then the ActionServlet
instantiates a new one, populates it, calles its validate(), and if it
returns null then forwardes it to its Action, otherwise forwards the request
back to your "input jsp" together with the ActionErrors you eventually
created.
- If there's already such actionform in the scope, then it retrieves it,
*calles its reset() method* and  then carries on as above.
ActionServlet *ALWAYS* calls the reset() method before using an actionform,
so to avoid having stale data in it

I think the better thing for you is just implement your reset() in the
proper way (i.e. setting to null all the properties you need to) instead of
messing up with strange iterations.

Regards
Andrea

-Messaggio originale-
Da: Richard Yee [mailto:[EMAIL PROTECTED] 
Inviato: sabato 15 maggio 2004 0.01
A: Struts Users Mailing List; pls
Oggetto: Re: How to set an ActionForm to null

pls,
You won't get an null ActionForm in your Action, you
will just get an empty one. I think because you are
testing for null, you are always populating it from
the DB.

Regards,

Richard

--- pls <[EMAIL PROTECTED]> wrote:
> Hi Richard,
> 
>I thought this one would work for sure..  but no
> dice..  the values still
> reappear (except for the multiboxes whcih are
> cleared in the reset() method)
> after
> request.getSession().removeAttribute("MBForm");  and
> a forward to the
> next action.
> 
> 
> "Richard Yee" <[EMAIL PROTECTED]> wrote in message
>
news:[EMAIL PROTECTED]
> > pls,
> > If the form exists in session scope, then you need
> to
> > remove it from session using the
> > request.getSession.removeAttribute()
> method
> > call. Otherwise, when the JSP page is executed,
> struts
> > will use the form from the session.
> >
> > Regards,
> >
> > Richard
> >
> > --- pls <[EMAIL PROTECTED]> wrote:
> > > that won't change the form as it exists in
> session
> > > scope, only temporarily
> > > in the action.. thanks anyways
> > >
> > > "Kiran Kumar" <[EMAIL PROTECTED]> wrote in
> message
> > >
> >
>
news:[EMAIL PROTECTED]
> > > > just a guess in ur execute method try this
> > > >
> > > > form = null;
> > > >
> > > >
> > > >
> > > > --- pls <[EMAIL PROTECTED]> wrote:
> > > > > thanks for the suggestion Amol, but that
> returns
> > > an
> > > > > IllegalStateException..
> > > > > thanks for trying anyways.
> > > > >
> > > > >
> > > > > "Amol Yadwadkar" <[EMAIL PROTECTED]> wrote
> in
> > > > > message
> > > > >
> > > >
> > >
> >
>
news:[EMAIL PROTECTED]
> > > > > > Hi,
> > > > > > I havn't tried this but just try this in
> the
> > > > > execute method :--
> > > > > > public ActionForward execute(ActionMapping
> > > > > mapping, ActionForm form,
> > > > > > HttpServletRequest req,
> HttpServletResponse
> > > res) {
> > > > > > 
> > > > > > ...
> > > > > > ...
> > > > > > mapping.setAttribute(null);
> > > > > >
> > > > > > }
> > > > > >
> > > > > > Hope this may help you!!!
> > > > > > --Amol
> > > > > >
> > > > > > -Original Message-
> > > > > > From: pls [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Friday, May 14, 2004 10:03 AM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: How to set an ActionForm to null
> > > > > >
> > > > > >
> > > > > > hi there,
> > > > > >
> > > > > > i am trying to set an actionform to null
> after
> > > > > inserting it's properties
> > > > > > into a DB.
> > > > > > then, control is forwarded to a different
> > > action
> > > > > and the info is read from
> > > > > > the DB back into the actionform for
> display by
> > > a
> > > > > JSP.
> > > > > >
> > > > > > the only part that is giving me trouble is
> > > with
> > > > > explicitly setting my
> > > > > > actionform "MBForm" to null.  After
> several
> > > form
> > > > > submissions and a DB
> > > > > > update, the first Action attempts to clear
> the
> > > > > values in MBForm:
> > > > > >
> > > > > >
> > > request.getSession().setAttribute("MBForm",
> > > > > null);
> > > > > >
> > > > > > after this, control is forwarded to the
> second
> > > > > Action which handles the
> > > > > > display.  it checks to see if MBForm is
> null
> > > and,
> > > > > if it is, it fills
> > > > > MBForm
> > > > > > from a DB.   in between these two actions,
> the
> > > > > controller servlet is
> > > > > > automatically refilling the MBForm with
> the
> > > values
> > > > > that I just nullified..
> > > > > > the only bean property that stays empty is
> > > myHash
> > > > > which represents several
> > > > > > groups of multiboxes.  i believe this is a
> > > result
> > > > > of the MBForm reset()
> > > > > > method which contains the following:
> > > > > >
> > > > > >  myHash.put(multiBoxCategories, new
> > > > > Integer[0]);  //resets several
> > > > > > groups of multiboxes
>