How to take object from the Action to jsp

2002-04-03 Thread Konstantina Stamopoulou

Hello,
My question might sound naive but I really eed your answer.

I'm storing an object in ServletContext with the following code :

   servlet.getServletContext().setAttribute(treemodel,root);
where root is an object of type Node(myclass). 

In my jsp I want to retrieve this object from the Servletontext so I do the following:

%= new DirectoryModel((Node)servlet.getServletContext().getAttribute(treemodel) %.

I'm wondering why I get the Exception:

org.apache.jasper.compiler.ParseException: 
C:\jakarta\jakarta-tomcat-3.2.3\webapps\teach\main_menu.jsp(77,99) Attribute treemodel 
has no value
at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:519)
at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:635)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:798)

My problem is that I cannot handle this object as a javabean since I want to use the 
object as it is and not to get the values of its properties.

I would really appreciated your help.

Thank you,
Konstantina






ApplicationResources searchs

2002-04-03 Thread Adolfo Miguelez

Hi guys,

just a question about ApplicationResources file. Is there any chance to 
speed up key searchs in resource files by alphabetically ordering of the 
keys within the file. Could be helpful for long keyed files.

Any other way to improve performance in fetching the right value for a key?

Thanks in advance,

Adolfo Rodriguez

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




struts-config path

2002-04-03 Thread Adolfo Miguelez

Hi guys,

my question is concerned with struts-config location. I know it use to be 
/Web-inf/struts-config as a init parameter for the ActionServlet specified 
in the web.xml.

Is it possible to place the config file anywhere in the filesystem and 
specify the path in the config param of web.xml?

Can it be an absolute path rather than a relative one?

My company use to group all the config files for web apps in a centralized 
directory in the filesystem of the particular application path. Can it be 
accessed by, say, the class-path?

Thanks in advance,

Adolfo Rodriguez

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: ApplicationResources searchs

2002-04-03 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B

 Hi guys,
 
 just a question about ApplicationResources file. Is there any chance to 
 speed up key searchs in resource files by alphabetically ordering of the 
 keys within the file. Could be helpful for long keyed files.
 
 Any other way to improve performance in fetching the right value for a key?

I am curious to know if you are having performance problems with reading the 
ApplicationResources file, do
you have so many entries in it that it is slow to access?

You might consider writting the values in the ApplicationResources file to a bean and 
getting the properties from
the bean each time you want them.  Then again, if your ApplicationResources file is 
that big, maybe this bean
will be VERY large.




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Forward from one webapp to another

2002-04-03 Thread Arnaud Chiaberge

Hi all,

I'm looking for a way to forward control from one webapp to another with
passing
some parameters.
What I actually have is a webapp A, where a user first authenticate, and
then does his job.
Later, the user can switch, via an html link, to a another webapp B. The
fact
is that I don't want the user to authenticate again in this webapp B so, for
the moment I'm
using a REDIRECTION in the webapp A action with some URL parameters: login,
password
(argh, they are in cleartext !)

To better understand what I mean, here's how I'm currently doing :

BrowserServer
|   |
|GET  switchwebapp.do   |
|   | webappA
|   |
|   |
|   REDIRECT to webapp B |
|   | webappA
|   |
|   |
|   GET action.do of webapp B |
|   | webappB
|   |
|   |
|   OK - Result page |
|  | webappB


But, what I'D LIKE TO HAVE is this :

Browser   Server
|   |
|GET  switchwebapp.do   |
|   | webappA
|   |   |
|   |   | pass user's
parameters
|   |   |
|   |   v
|   | getting in webappB
|   | get user's
credentials
|   OK - Result page |
|   | webappB


Is it possible to do so with Tomcat-Struts ?

Thanks in advance for any contribution/idea about this issue.

Regards,

Arnaud Chiaberge


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




HTTPS + Struts

2002-04-03 Thread rizvan . katchera



Can you advice on how you manage to redirect the http request from http to
https?

I have following scenario (typical of a shopping site).

1) User search and place item into shopping cart (eg calls
http://www.acmeshop.com/addtoshoppingcart.do)
2) addtoshoppingcart.do do some processing and redirects user back to
shopping search page (eg http://www.acmeshop.com/shoppingsearch.jsp )
3) User clicks on the check out page URL. (eg calls
http://www.acmeshop.com/showshoppingcart.do and return the results to
http://www.acmeshop.com/showcartcheckout.jsp).
4) User clicks on make payment. On the shwowcartcheckout.jsp, I need to be
able to set the form action attribute to call
https://www.acmeshop.com/makepayment.do (where makepayment.do will redirect
to the https://www.acmeshop.com/enterpaymentdetail.jsp). The form action
attribute on the enterpaymentdetail.jsp will call
https://www.acmeshop.com/processpayment.do )

What I am trying to find out is how do I set the https:// in the form action
attribute of showcartcheckout.jsp. The form tag does not have any attribute
will will create the https://...  string. Do I have to hard code the form
action in this page? Or am I total off the track?

Thanks in advance

Rizvan



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




Re: ApplicationResources searchs

2002-04-03 Thread Adolfo Miguelez

Thanks for your fast response. We are planing development of large 
internacionalized web applications and we are considering this issue just in 
case.

Anyhow would be interesting since our applications could hold a large amount 
of multilanguage keys.

Right to say that loading in memory would speed up searchs.

Any other advice related?

Adolfo

From: ƒAƒ“ƒgƒj[ ƒXƒeƒCƒX [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: ApplicationResources searchs
Date: Wed, 3 Apr 2002 17:46:48 +0900

  Hi guys,
 
  just a question about ApplicationResources file. Is there any chance to
  speed up key searchs in resource files by alphabetically ordering of the
  keys within the file. Could be helpful for long keyed files.
 
  Any other way to improve performance in fetching the right value for a 
key?

I am curious to know if you are having performance problems with reading 
the ApplicationResources file, do
you have so many entries in it that it is slow to access?

You might consider writting the values in the ApplicationResources file to 
a bean and getting the properties from
the bean each time you want them.  Then again, if your ApplicationResources 
file is that big, maybe this bean
will be VERY large.




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



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


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




Re: Forward from one webapp to another

2002-04-03 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B


 Hi all,
 
 I'm looking for a way to forward control from one webapp to another with
 passing
 some parameters.

I am not sure if you can have data sharing between different webapps managed by the 
servlet container, that is for someone else to answer.  But you could have webappA 
store some values in a database. When you go from webappA to webAppB you could pass a  
hash(which you store in the database).  When webappB gets this  hash it can check to 
see if it is in the database, if it is then all is happy and webappB can proceed.  
Obviously you can store other info in the database beside the hash like the userId, 
etc.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re[2]: ApplicationResources searchs

2002-04-03 Thread rizvan . katchera



If you load in memory it would take some time the first times
I suggest you to load just a part of the file in memory
Rizvan

__ Reply Separator _



[EMAIL PROTECTED]
03/04/2002 11:02:00



|---+--|
|   |Return Receipt: No|
| To:[EMAIL PROTECTED] |Importance: Normal|
| cc: (bcc: Rizvan KATCHERA/fr/socgen)  |  |
|   |  |
|---+--|




SUBJECT: Re: ApplicationResources searchs


Thanks for your fast response. We are planing development of large
internacionalized web applications and we are considering this issue just in
case.

Anyhow would be interesting since our applications could hold a large amount
of multilanguage keys.

Right to say that loading in memory would speed up searchs.

Any other advice related?

Adolfo

From: âAâôâgâjü[ âXâeâCâX [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: ApplicationResources searchs
Date: Wed, 3 Apr 2002 17:46:48 +0900

  Hi guys,
 
  just a question about ApplicationResources file. Is there any chance to
  speed up key searchs in resource files by alphabetically ordering of the
  keys within the file. Could be helpful for long keyed files.
 
  Any other way to improve performance in fetching the right value for a
key?

I am curious to know if you are having performance problems with reading
the ApplicationResources file, do
you have so many entries in it that it is slow to access?

You might consider writting the values in the ApplicationResources file to
a bean and getting the properties from
the bean each time you want them.  Then again, if your ApplicationResources
file is that big, maybe this bean
will be VERY large.




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



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


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





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




Re: Re[2]: ApplicationResources searchs

2002-04-03 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B

Its a design question - where do you want to speed up things.  I think a little extra 
time starting up the application is OK.  When the application I have starts up it 
loads lots of reasonabally static information from a database into beans.  It may take 
a little longer for the application to start up.  But it pays off later when I want to 
access that data since I don't have to hit the database, same would go for the 
ApplicationResources file.



On Wed, 3 Apr 2002 11:08:46 +0200
[EMAIL PROTECTED] wrote:

 
 
 If you load in memory it would take some time the first times
 I suggest you to load just a part of the file in memory

How would you work out which part of the file to load into memory?

 Rizvan
 

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Struts.tld or Struts-form.tld ?

2002-04-03 Thread Nicolas De Loof

What the differences in 1.0.2 distribution of Struts between Struts.tld and
the two Struts-html / Struts-form tlds ? Is it only refactoring of taglibs ?


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




RE: Preview OReilly Struts Chapters Online - Soon

2002-04-03 Thread Eric Ma

In order to reach the largest audience possible, I suggest you post the chapters at 
TheServerSide.com.  Post as many chapters as you can.

Eric Ma


--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




Help needing regarding implementing JAAS for a Web application

2002-04-03 Thread Sudhir S. Shetty

Hello Everyone,
 I need your help regarding Implementing JAAS for a
web app based on Struts, I have made a class which instantiates the Login
context, and has an inner class callback handler(for receiving  the user
name and password).
But I get an error when the login context is instantaiated , that the Config
file cant be found.
Could anyone please send me some code which depicts clearly how JAAS can be
implemented in a Web app (my application server is Weblogic).
I need it urgently as I have a deadline to meet.
Thanks in advance,
regards,
Sudhir


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




RE: JSP optimiser that works with Struts

2002-04-03 Thread Galbreath, Mark

He may save a nibble or two

Mark

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 8:32 PM

Not sure if I'm the first, but I have to ask (in a polite voice) why?

Chuck

p.s. Not sure if JPretty does JSP also, but here's the link:
http://www.mmsindia.com/JPretty.html


At 02:08 PM 3/27/2002 +1100, you wrote:
Hi list,

I'm looking for a jsp optimiser (open source/free) that will strip all
white
spaces from my jsp file. I have tried tidy but it doesn't work well with
Struts tags. Is there a way to use tidy for Struts jsp?

My jsp page contains a lot of indentation and formatting to make it human
readable, so what I'm planning to do is before building the war file I want
to run this optimiser over the jsp files and use the output on the war
file.

Anyone got any neat tricks/tools?

cheers,

--
Victor Hadianto
---
Plastic... Aluminum... These are the inheritors of the Universe! Flesh and
Blood have had their day... and that day is past! -- Green Lantern Comics

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


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

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




RE: JavaServerFaces (JSF) replacement for Struts?

2002-04-03 Thread Galbreath, Mark

JSF was introduced at last year's JavaOne at the Monday PM Keynote.  It's
simply Sun's strategy for a comprehensive integrated application development
environment built with frameworks.  I'm sure Struts will be incorporated
into JSF (as will most other Java technologies, like J2ME and J2EE), but it
will not lose its identity anytime soon.

Mark

-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 9:23 PM
To: Struts Users Mailing List
Subject: RE: JavaServerFaces (JSF) replacement for Struts?


I, for one, am excited to see JSF (based upon what paltry info I have
read about it). I've done several hellishly complicated pages in JSP,
doing all kinds of crazy stuff like generating dynamic JavaScript for
the client, and invoking Struts actions (with different parameters)
depending upon what the user clicked on. It sounds like JSF is made for
building those kinds of pages (so I hope). And for it to fit well with
Struts is a bonus.

Bryan


On Tue, 2002-04-02 at 19:11, Sandeep Takhar wrote:

I went to the BOF following this session where Craig
McLanahan was the main speaker.

He basically finished off by saying that we will use
whatever we want to from JSF.  Just as there are
pieces we use from the Servlet  JSP specification.

He is part of the expert group and is keen on making
the jsf framework work for whichever frameworks are
out there and specifically struts. 

He mentioned he had a working model with Struts  JSF.

I think that maybe there will be some releases of
struts that incorporate JSF.  Maybe there will be some
that take advantage of jsp 1.2  servlet 2.3... I
guess this is more a discussion for the dev group.

I wouldn't count on JSF being a silver bullet.  I
think it has a long way to go and Struts will still be
around and just end up incorporating the new JSF
stuff.

Craig said it -- and it is the truth: It is up to
us...

Sandeep
--- Bryan Field-Elliot [EMAIL PROTECTED]
wrote:
 I imagine that it would be a relatively simple task,
 to write an adaptor
 of some sort to map the JSF event model onto Struts
 actions.
 
 Bryan
 
 
 On Tue, 2002-04-02 at 12:41, Robert wrote:
 
 I went to the JSF session at JavaOne and the
 most asked question for the
 JSR group was What about Struts?. Their answer
 is that JSF will be
 flexible enough to work with whatever framework
 you want, including
 struts. JSF has an event model as well as the
 widgets, but you don't
 have to use them (events), so in that scenario,
 JSF HTML widgets would
 be a front-end for the Struts controller,
 effectively
 replacing/complimenting the Struts taglibs for
 presentation. 
 
 Their idea was to have a flexible UI framework
 that could stand on its
 own with the event model, or work with whatever
 controller you wanted.
 
 Having said that, JSF is also supposed to have
 support for other client
 types, such as PDAs and phones, supplying a
 different widget set for
 each. They had a nice demo of using Dreamweaver
 to build the JSF
 portion, much like there is a Struts extension
 out there. 
 
 - Robert
 
 -Original Message-
 From: Melanie Harris
 [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, April 02, 2002 1:37 PM
 To: [EMAIL PROTECTED]
 Subject: JavaServerFaces (JSF) replacement for
 Struts?
 
 
 Hi All,
 
 Out on


http://www.javaworld.com/javaworld/jw-03-2002/j1-02-grapevine2.html
 today there is mention of the following: 
 
 JavaServer Faces 
 Sun Microsystems' Senior Software Engineer Roger
 Kitain from the JSF
 team outlined the one project I really hoped
 would release a
 specification and RI this week. JSF's
 functionality, layered on top of
 the JSP specification, includes change listeners
 on client-side widgets
 and a standard tag library (including a
 tree-view control). I'm working
 on a project in which such features would come
 in handy, so if you're
 listening guys, please release the RI as soon as
 you can! 
 
 This sounds to me like JSF might be something
 that would be similar to
 Struts with added client-side widgets.   I'd
 like to know what others
 think of JSF and if you think it might
 eventually become a preferred
 framework over struts, etc... ?
 
 Thanks in advance for your comments.
 
 -mel h
 
  
 
 
 
 -
 Do You Yahoo!?
 

RE: JavaServerFaces (JSF) replacement for Struts?

2002-04-03 Thread Lister, Tom (ANTS)

hey
there's new technology already

:-)
Tom Lister
* 020 7612 3030
* [EMAIL PROTECTED]


-Original Message-
From: Melanie Harris [mailto:[EMAIL PROTECTED]]
Sent: 02 April 2002 20:37
To: [EMAIL PROTECTED]
Subject: JavaServerFaces (JSF) replacement for Struts?



Hi All,

Out on http://www.javaworld.com/javaworld/jw-03-2002/j1-02-grapevine2.html
today there is mention of the following: 

JavaServer Faces 
Sun Microsystems' Senior Software Engineer Roger Kitain from the JSF team
outlined the one project I really hoped would release a specification and RI
this week. JSF's functionality, layered on top of the JSP specification,
includes change listeners on client-side widgets and a standard tag library
(including a tree-view control). I'm working on a project in which such
features would come in handy, so if you're listening guys, please release
the RI as soon as you can! 

This sounds to me like JSF might be something that would be similar to
Struts with added client-side widgets.   I'd like to know what others think
of JSF and if you think it might eventually become a preferred framework
over struts, etc... ?

Thanks in advance for your comments.

-mel h

 



-
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax


***
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the FSA
***


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




Don't anderstand jsp:usebean mecanism

2002-04-03 Thread Nicolas De Loof

On tomcat 3.3.1 I tried the following JSP code:

jsp:usebean id=logonForm class=java.lang.String/

%
 Object toto = pageContext.getAttribute(logonForm);
 Object titi = pageContext.getRequest().getAttribute(logonForm);
 Object tutu = pageContext.getSession().getAttribute(logonForm);
%
%= toto %
%= titi %
%= tutu %

JSP 1.1 spec says this jsp:usebean syntax would instanciate a new bean (here
a simple String). Where is it ?


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




RE: Help needing regarding implementing JAAS for a Web application

2002-04-03 Thread Mike Finn

Sudhir,
Are you deploying your webapp outside of WebLogic? The answer to your
question really depends on the web container you are using. For example, I
don't *think* there is any 'production' ready support for a JAAS Realm in
Tomcat. If you are deploying to the WebLogic web container, then RTFM the
WebLogic security docs. They are pretty good. JAAS is an integral part of
J2EE and is provided by the container ( I don't think WL 6.x provides
*authorization* with their JAAS implementation, however  - only
authentication ). If you are using/can use container security, there should
be no need to write your own LoginContext and callback handler, AFAIK. Also,
if you are using container (declarative) security, if your security
requirements are simple enough, you won't have to write ANY code. That's the
idea behind JAAS being in the J2EE spec.

BTW - your JAAS config file is located by
using: -Djava.security.auth.login.config=file://path/to/a/config/file on the
command line.

HTH,
Mike


-Original Message-
From: Sudhir S. Shetty [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 7:20 AM
To: Struts Users Mailing List
Subject: Help needing regarding implementing JAAS for a Web application


Hello Everyone,
 I need your help regarding Implementing JAAS for a
web app based on Struts, I have made a class which instantiates the Login
context, and has an inner class callback handler(for receiving  the user
name and password).
But I get an error when the login context is instantaiated , that the Config
file cant be found.
Could anyone please send me some code which depicts clearly how JAAS can be
implemented in a Web app (my application server is Weblogic).
I need it urgently as I have a deadline to meet.
Thanks in advance,
regards,
Sudhir


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



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




RE: ApplicationResources searchs

2002-04-03 Thread Galbreath, Mark
This is what we are doing.  And the bigger the properties file, the more
justified caching it in a bean.  I don't know what sorting algorithm the JVM
uses for beans or resource bundles, but I'd bet alphabetizing the keys would
make a difference in a large sort.

Mark

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 3:47 AM
To: Struts Users Mailing List
Subject: Re: ApplicationResources searchs


 Hi guys,
 
 just a question about ApplicationResources file. Is there any chance to 
 speed up key searchs in resource files by alphabetically ordering of the 
 keys within the file. Could be helpful for long keyed files.
 
 Any other way to improve performance in fetching the right value for a
key?

I am curious to know if you are having performance problems with reading the
ApplicationResources file, do
you have so many entries in it that it is slow to access?

You might consider writting the values in the ApplicationResources file to a
bean and getting the properties from
the bean each time you want them.  Then again, if your ApplicationResources
file is that big, maybe this bean
will be VERY large.





_

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com




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

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


Re: Don't anderstand jsp:usebean mecanism :sory, I'm realy stupid

2002-04-03 Thread Nicolas De Loof

Sorry, I found I've to use jsp:useBean (with uppercase B) !




- Original Message -
From: Nicolas De Loof [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, April 03, 2002 3:09 PM
Subject: Don't anderstand jsp:usebean mecanism


 On tomcat 3.3.1 I tried the following JSP code:

 jsp:usebean id=logonForm class=java.lang.String/

 %
  Object toto = pageContext.getAttribute(logonForm);
  Object titi = pageContext.getRequest().getAttribute(logonForm);
  Object tutu = pageContext.getSession().getAttribute(logonForm);
 %
 %= toto %
 %= titi %
 %= tutu %

 JSP 1.1 spec says this jsp:usebean syntax would instanciate a new bean
(here
 a simple String). Where is it ?


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


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




RE: Installation on OS-390 and Websphere 3.5.3: - ErrorApplication unavailable for service

2002-04-03 Thread Steven Banks

I have found mention is several articles that this can be caused by errors in the 
train.webapp and web.xml.

Could anyone look at the attached and see if there are any errors? 

I have gone into the struts code and comented out everything in the init() routine of 
the ActionServlet, entered a System.out.println() statement in it, and the application 
will still not start.


 Steven Banks [EMAIL PROTECTED] 03/27/02 10:54AM 
Roger.   Thanks for the response.   Before trying the upgrade, I am going to try 
getting it to work on 3.5.3 just call me stubborn.  There is a set of notes from 
someone who has it working on this user group.   The latest I have tried was changing 
a WAS start-up parameter appserver.compliance.mode=true.  The result was the the 
servlet does not load at all.  It could not find the config file.  I have since 
discovered that one result of the parameter change  is that the location of the 
struts-config.xml file has to be moved as the following code from the Action Servlets 
initMapping routine no longer worked.

When  appserver.compliance.mode=false  the default value

 InputStream input = getServletContext().getResourceAsStream(config); 

found the xml file in the following directory:   
   u/mywebs/dev/train/WEB-INF/classes/WEB-INF/struts-config.xml


When  appserver.compliance.mode=true,   the xml file had to be moved to
 /u/mywebs/dev/train/web/WEB-INF/struts-config.xml


It would be nice if the main struts code would return 
getServletContext().getRealPath(config));   when it cannot find the config file, this 
would solve a lot of problems like this very quickly.  

Once I moved the file to this new location, the servlet starts OK, but returns the 
http 503 error again as soon as I try to access any file in the web application.

I am going to put a call in to IBM tech support to see if they can help, but any other 
help here would be appreciated.  

Steven


Steven Banks
902-368-0566

Steven Banks


 Roger Fortier [EMAIL PROTECTED] 03/26/02 04:32PM 
Below the dotted line is a message that was posted on IBM newsgroup for
WebSphere AS400 and basically Struts will not work with Websphere 3.5.3
on AS400. You must upgrade to 3.5.4.  Perhaps it's the same for
websphere on OS-390?

Also, check this link for a version of struts-jar that will work with
Websphere 4.0.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15143.html 



---

Good News:  Yes, it will work.
Bad News: You may have to jump through a few hoops, depending on just
what
it is you intend to do in the application, how you intend to deploy, and
what your AS400 configuration looks like.

3.5.5 hasn't really been out all that long, and when you consider that
anything like this for the 400 always comes poking along several weeks
or
months after the other platforms my guess would be that higher won't be
an
option for a while.

The way it has shaken out for me is that struts apps deploy fine on
versions
3.5.3, 3.5.4, and 3.5.5 for Windows.  I did do the documented hacks for
the
struts source and the parser.jar that are out on the Apache site.  This
may
not be necessary in version 3.5.5, but unfortunately I haven't had
adequate
time to investigate it.  If it isn't fixed, dock IBM several points for
not
walking it the way they talk it with regard to open source.  But don't
assume if it works on Windows it will work on the 400 - more on that
later.

In addition, I did have to change struts-config.xml and web.xml to use
system rather than public dtd's.  This was not necessary on my Windows
desktop, but when I deployed to the 400 I got numerous errors when the
webapp loaded.  Changing the dtd ref did the trick.  If your machine is
behind a firewall with no internet access you'll also have to make sure
the
dtd can be found, so you may need to specify an internal uri.  Don't
worry,
the system log will let you know right away if it doesn't like what you
picked.

I used the Struts connection pooling option because I used Tomcat as my
development server, and because I want to build in some monitoring that
is
currently not available in WSE for the 400.  I developed on Windows
using
the AS400 toolbox drivers, and switched over to the native DB2 drivers
when
moving up(Don't ask me why).  I ran into some issues there where I was
not
able to update certain files using SQL (support posts seem to point to
issues with non-journaled files), and switching back to the 400 drivers
cleared it up.  Not sure why, since connections using the WS connection
pool
and these same drivers seem to have no issues.

The big news is that while I got my apps to deploy to a 3.5.4
installation
on the 400, no amount of installing, finessing or tears/breastbeating
could
get them to run on 3.5.3.  Even though they ran alright on the same
number
release on Windows (and Linux for that matter ).  So my hunch is that as
long as you are on 3.5.4 on up you are OK.  But as to the 

exception on index.jsp

2002-04-03 Thread Fabien Lesire

Hello,

I made a little struts application on WSAD, but when i tried to access my
index.jsp, i have the following exception :

Error Message: Cannot create rewrite URL: java.net.MalformedURLException:
Cannot retrieve ActionForwards collection
Error Code: 500
Target Servlet: null
Error Stack: 
javax.servlet.jsp.JspException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrieve ActionForwards collection 
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:343) 
at _index_jsp_0._jspService(index.jsp :10) 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:300) 
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430) 
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827) 
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:167) 
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:297) 
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:110) 
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2) 
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012) 
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:523) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:282) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:112) 
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)

at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:184) 
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67) 
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:122) 
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315) 
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60) 
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252) 
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) 


Someone can help me ?




-
Lesire Fabien
JAVA developement
[EMAIL PROTECTED] 
IsaSoftware SA 
13/15 Bd de l'Impératrice 
B - 1000 Bruxelles 
Web : www.isabel.be 
DISCLAIMER : Confidential information may be contained in this message and
it may be legally privileged.  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 kindly notify the sender by reply email. Please
advise immediately if you or your employer does not consent to Internet
email for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official business of
Isabel shall be understood as neither given nor endorsed by it. Messages and
attachments are swept by a virusscanner. If this message contains
password-protected attachments, the files have not been scanned for viruses
by the Isabel mail domain. Always scan attachments before opening them.





RE: How to take object from the Action to jsp

2002-04-03 Thread Enrique Rodriguez

Hi Constantina,

Instead of servlet.getServletContext().setAttribute(treemodel,root);

I use request.setAttribute(treemodel,root);

In the JSP, instead of
DirectoryModel((Node)servlet.getServletContext().getAttribute(treemodel)
%.

I use bean:write name=treemodel property=propertyOfNodeClass / to
wirte one propierty into the generated html code,

or % DirectoryModel((Node)this.pageContext.getAttribute(treemodel));

Hope That Help, Enrique.

_
Enrique Rodriguez Lasterra



 -Mensaje original-
 De: Konstantina Stamopoulou [mailto:[EMAIL PROTECTED]]
 Enviado el: miercoles, 03 de abril de 2002 10:37
 Para: Struts Users Mailing List
 Asunto: How to take object from the Action to jsp


 Hello,
 My question might sound naive but I really eed your answer.

 I'm storing an object in ServletContext with the following code :

servlet.getServletContext().setAttribute(treemodel,root);
 where root is an object of type Node(myclass).

 In my jsp I want to retrieve this object from the Servletontext
 so I do the following:

 %= new
 DirectoryModel((Node)servlet.getServletContext().getAttribute(tre
emodel) %.

 I'm wondering why I get the Exception:

 org.apache.jasper.compiler.ParseException:
 C:\jakarta\jakarta-tomcat-3.2.3\webapps\teach\main_menu.jsp(77,99)
  Attribute treemodel has no value
   at
 org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader
 .java:519)
   at
 org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.
 java:635)
   at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:798)

 My problem is that I cannot handle this object as a javabean
 since I want to use the object as it is and not to get the values
 of its properties.

 I would really appreciated your help.

 Thank you,
 Konstantina






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




Re: How to take object from the Action to jsp

2002-04-03 Thread Konstantina Stamopoulou

Thanx,
It finally  worked by using bean.

Konstantina
- Original Message -
From: Enrique Rodriguez [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, April 03, 2002 4:50 PM
Subject: RE: How to take object from the Action to jsp


 Hi Constantina,

 Instead of servlet.getServletContext().setAttribute(treemodel,root);

 I use request.setAttribute(treemodel,root);

 In the JSP, instead of
 DirectoryModel((Node)servlet.getServletContext().getAttribute(treemodel)
 %.

 I use bean:write name=treemodel property=propertyOfNodeClass / to
 wirte one propierty into the generated html code,

 or % DirectoryModel((Node)this.pageContext.getAttribute(treemodel));

 Hope That Help, Enrique.

 _
 Enrique Rodriguez Lasterra



  -Mensaje original-
  De: Konstantina Stamopoulou [mailto:[EMAIL PROTECTED]]
  Enviado el: miercoles, 03 de abril de 2002 10:37
  Para: Struts Users Mailing List
  Asunto: How to take object from the Action to jsp
 
 
  Hello,
  My question might sound naive but I really eed your answer.
 
  I'm storing an object in ServletContext with the following code :
 
 servlet.getServletContext().setAttribute(treemodel,root);
  where root is an object of type Node(myclass).
 
  In my jsp I want to retrieve this object from the Servletontext
  so I do the following:
 
  %= new
  DirectoryModel((Node)servlet.getServletContext().getAttribute(tre
 emodel) %.
 
  I'm wondering why I get the Exception:
 
  org.apache.jasper.compiler.ParseException:
  C:\jakarta\jakarta-tomcat-3.2.3\webapps\teach\main_menu.jsp(77,99)
   Attribute treemodel has no value
  at
  org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader
  .java:519)
  at
  org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.
  java:635)
  at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:798)
 
  My problem is that I cannot handle this object as a javabean
  since I want to use the object as it is and not to get the values
  of its properties.
 
  I would really appreciated your help.
 
  Thank you,
  Konstantina
 
 
 
 


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




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




Re: JavaServerFaces (JSF) replacement for Struts?

2002-04-03 Thread @Basebeans.com

Subject: Re: JavaServerFaces (JSF) replacement for Struts?
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
The way it was explained to me, by HE who explains everything (Craig), 
is the other way around. I hope I got it right:

Struts can incorporate Java Faces (not JavaFaces incorporate Struts). 
Java Faces will require Servlet 2.4 (So some time from now before 
containers support it) and help render things like components. Tile 
will still be needed for Layout and you will still need MVC framework 
(ex: Struts) to get to the point of rendering components. So instead of 
html:text we might use a better version of an html:textbox. Struts 
1.1 is 2.2 based. The intermediate step is for Struts to go 2.3, and 
then be able to use the Standard Tags (that would replace and upgrade 
logic and bean tag, but not HTML tag). Struts is a lot more than tags, 
it is an MVC implementation. Even the standard Tags are a bit to hard 
work with yet.

So Struts future if I may looks like this:
Struts 1.1 with Portal Tiles, Validation, DynaBeans (ie-not need for 
getters and setters), etc. lots there.
Then some version that uses Standard Tags. once Struts does 2.3 (and 
Action controller becomes a filter) (If you have 2.3 container, you 
could start experimenting with Standard Tags.)
Then some version that can use JavaFaces, but after 2.4.

In summary, Struts will incorporate and co-exist with new future 
technologies, and not be replaced by them.

Vic

Galbreath, Mark wrote:

 JSF was introduced at last year's JavaOne at the Monday PM Keynote.  It's
 simply Sun's strategy for a comprehensive integrated application development
 environment built with frameworks.  I'm sure Struts will be incorporated
 into JSF (as will most other Java technologies, like J2ME and J2EE), but it
 will not lose its identity anytime soon.
 
 Mark
 
 -Original Message-
 From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 9:23 PM
 To: Struts Users Mailing List
 Subject: RE: JavaServerFaces (JSF) replacement for Struts?
 
 
 I, for one, am excited to see JSF (based upon what paltry info I have
 read about it). I've done several hellishly complicated pages in JSP,
 doing all kinds of crazy stuff like generating dynamic JavaScript for
 the client, and invoking Struts actions (with different parameters)
 depending upon what the user clicked on. It sounds like JSF is made for
 building those kinds of pages (so I hope). And for it to fit well with
 Struts is a bonus.
 
 Bryan
 
 
 On Tue, 2002-04-02 at 19:11, Sandeep Takhar wrote:
 
 I went to the BOF following this session where Craig
 McLanahan was the main speaker.
 
 He basically finished off by saying that we will use
 whatever we want to from JSF.  Just as there are
 pieces we use from the Servlet  JSP specification.
 
 He is part of the expert group and is keen on making
 the jsf framework work for whichever frameworks are
 out there and specifically struts. 
 
 He mentioned he had a working model with Struts  JSF.
 
 I think that maybe there will be some releases of
 struts that incorporate JSF.  Maybe there will be some
 that take advantage of jsp 1.2  servlet 2.3... I
 guess this is more a discussion for the dev group.
 
 I wouldn't count on JSF being a silver bullet.  I
 think it has a long way to go and Struts will still be
 around and just end up incorporating the new JSF
 stuff.
 
 Craig said it -- and it is the truth: It is up to
 us...
 
 Sandeep
 --- Bryan Field-Elliot [EMAIL PROTECTED]
 wrote:
  I imagine that it would be a relatively simple task,
  to write an adaptor
  of some sort to map the JSF event model onto Struts
  actions.
  
  Bryan
  
  
  On Tue, 2002-04-02 at 12:41, Robert wrote:
  
  I went to the JSF session at JavaOne and the
  most asked question for the
  JSR group was What about Struts?. Their answer
  is that JSF will be
  flexible enough to work with whatever framework
  you want, including
  struts. JSF has an event model as well as the
  widgets, but you don't
  have to use them (events), so in that scenario,
  JSF HTML widgets would
  be a front-end for the Struts controller,
  effectively
  replacing/complimenting the Struts taglibs for
  presentation. 
  
  Their idea was to have a flexible UI framework
  that could stand on its
  own with the event model, or work with whatever
  controller you wanted.
  
  Having said that, JSF is also supposed to have
  support for other client
  types, such as PDAs and phones, supplying a
  different widget set for
  each. They had a nice demo of using Dreamweaver
  to build the JSF
  portion, much like there is a Struts extension
  out there. 
  
  - 

RE: Installation on OS-390 and Websphere 3.5.3: - ErrorApplication unavailable for service

2002-04-03 Thread Steven Banks

It works better when you remember to attach the files.



Steven Banks


 Steven Banks [EMAIL PROTECTED] 04/03/02 09:27AM 
I have found mention is several articles that this can be caused by errors in the 
train.webapp and web.xml.

Could anyone look at the attached and see if there are any errors? 

I have gone into the struts code and comented out everything in the init() routine of 
the ActionServlet, entered a System.out.println() statement in it, and the application 
will still not start.


 Steven Banks [EMAIL PROTECTED] 03/27/02 10:54AM 
Roger.   Thanks for the response.   Before trying the upgrade, I am going to try 
getting it to work on 3.5.3 just call me stubborn.  There is a set of notes from 
someone who has it working on this user group.   The latest I have tried was changing 
a WAS start-up parameter appserver.compliance.mode=true.  The result was the the 
servlet does not load at all.  It could not find the config file.  I have since 
discovered that one result of the parameter change  is that the location of the 
struts-config.xml file has to be moved as the following code from the Action Servlets 
initMapping routine no longer worked.

When  appserver.compliance.mode=false  the default value

 InputStream input = getServletContext().getResourceAsStream(config); 

found the xml file in the following directory:   
   u/mywebs/dev/train/WEB-INF/classes/WEB-INF/struts-config.xml


When  appserver.compliance.mode=true,   the xml file had to be moved to
 /u/mywebs/dev/train/web/WEB-INF/struts-config.xml


It would be nice if the main struts code would return 
getServletContext().getRealPath(config));   when it cannot find the config file, this 
would solve a lot of problems like this very quickly.  

Once I moved the file to this new location, the servlet starts OK, but returns the 
http 503 error again as soon as I try to access any file in the web application.

I am going to put a call in to IBM tech support to see if they can help, but any other 
help here would be appreciated.  

Steven


Steven Banks
902-368-0566

Steven Banks


 Roger Fortier [EMAIL PROTECTED] 03/26/02 04:32PM 
Below the dotted line is a message that was posted on IBM newsgroup for
WebSphere AS400 and basically Struts will not work with Websphere 3.5.3
on AS400. You must upgrade to 3.5.4.  Perhaps it's the same for
websphere on OS-390?

Also, check this link for a version of struts-jar that will work with
Websphere 4.0.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15143.html 



---

Good News:  Yes, it will work.
Bad News: You may have to jump through a few hoops, depending on just
what
it is you intend to do in the application, how you intend to deploy, and
what your AS400 configuration looks like.

3.5.5 hasn't really been out all that long, and when you consider that
anything like this for the 400 always comes poking along several weeks
or
months after the other platforms my guess would be that higher won't be
an
option for a while.

The way it has shaken out for me is that struts apps deploy fine on
versions
3.5.3, 3.5.4, and 3.5.5 for Windows.  I did do the documented hacks for
the
struts source and the parser.jar that are out on the Apache site.  This
may
not be necessary in version 3.5.5, but unfortunately I haven't had
adequate
time to investigate it.  If it isn't fixed, dock IBM several points for
not
walking it the way they talk it with regard to open source.  But don't
assume if it works on Windows it will work on the 400 - more on that
later.

In addition, I did have to change struts-config.xml and web.xml to use
system rather than public dtd's.  This was not necessary on my Windows
desktop, but when I deployed to the 400 I got numerous errors when the
webapp loaded.  Changing the dtd ref did the trick.  If your machine is
behind a firewall with no internet access you'll also have to make sure
the
dtd can be found, so you may need to specify an internal uri.  Don't
worry,
the system log will let you know right away if it doesn't like what you
picked.

I used the Struts connection pooling option because I used Tomcat as my
development server, and because I want to build in some monitoring that
is
currently not available in WSE for the 400.  I developed on Windows
using
the AS400 toolbox drivers, and switched over to the native DB2 drivers
when
moving up(Don't ask me why).  I ran into some issues there where I was
not
able to update certain files using SQL (support posts seem to point to
issues with non-journaled files), and switching back to the 400 drivers
cleared it up.  Not sure why, since connections using the WS connection
pool
and these same drivers seem to have no issues.

The big news is that while I got my apps to deploy to a 3.5.4
installation
on the 400, no amount of installing, finessing or tears/breastbeating
could
get them to run on 3.5.3.  Even though they ran alright on the same
number
release on 

RE: problem with arraylist and iterate

2002-04-03 Thread Yu, Yanhui

Arron. 

We are using version 1.0.2 here and I seem unable to convince to get 1.1beta
here, is there any work around to do this in version 1.0.2?  Thank you very
much indeed.

Yanhui

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 6:24 PM
To: Struts Users Mailing List
Subject: Re: problem with arraylist and iterate


What has to happen is the properties for each of the inputs in the list, 
have to get the correct indexed property to update correctly every 
time. The nested taglib in the current 1.1beta Struts can help you do 
this with ease.

If want a tutorial to walk you through it, or you're running an older 
version of Struts and need teh nested taglib library, go here...
http://www.keyboardmonkey.com/struts

After that, you shouldn't have iterating problems again.

Arron.


Yu, Yanhui wrote:

Hi Jeff,

I am similar problems here with ArrayList, could you please post the
solution if you find any?  Appreciate it very much.

Yanhui



-Original Message-
From: Jefferson Rodrigues de Oliveira e Silva
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 6:29 AM
To: Struts Users Mailing List
Subject: problem with arraylist and iterate


Hi all,

I have the following problem:

I have a bean User which has a hashtable attribute bets. The
getBets method returns a Bet[]  array.

The Bet class has 6 attributes.

In the bets.jsp page, I show in a table all the values from the Bet objects
(using iterate), one row for each object, and two of these values from each
object
the user is able to edit.

The bets.jsp page is ok, all the values are being displayed, and
the user can edit the two fields for each row.

My problem is when the user submit this bets.jsp.

How can I get all the fields (two for each table row) in a
Form bean ?

I want that the FormBean to handle the submit is the BetsForm ?
I implemented the BetsForm with a single attribute, an ArrayList
called bets.

How should I implement this BetsForm bean ? How can it
receive all the fields from the bets.jsp page in the
arraylist attribute ?


Thanks in advance
Jefferson

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





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




Re: Editor aware of Struts

2002-04-03 Thread @Basebeans.com

Subject: Re: Editor aware of Struts
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
You can do Struts with just JSP, you have to edit Java as well.
(I use OmniCore.com CodeGuide 4 now, after NetBeans.org)

To do things like table iterate of a resuult set, they will have to be 
OK with writing HTML tdtr

Vic


Yu, Yanhui wrote:

 Hi all,
 
 Does anyone out there who can recommend us a tool that is Struts aware?  We
 are using WSAD and it can't recognize any struts tags in the Page Designer
 that comes with WSAD.  The developers don't really like to edit the Source
 page (the text editor).  We would very much appreciate any suggestions to
 any tool that can visually edit a JSP page with Struts.  Thank you very much
 in advance,
 
 Yanhui
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




storing data beyond single page scope without commiting to database

2002-04-03 Thread @Basebeans.com

Subject: storing data beyond single page scope without commiting to database
From: Simon Kirk [EMAIL PROTECTED]
 ===
Hello all,
I have a system where I am creating an object with a certain amount of 
data, let's call it object A. It references to one or more object Bs that 
can be said to 'belong' to it. Let's say that there are not any object Bs 
that fit the criteria of what I want, so in my form to input an object A, I 
have a button to add an object B to go with it.

What I could do is when I click the button to create a new 
object B, I submit the data so far entered for object A and store the data 
in a database. I then enter my data for object B, submit, and get taken 
back to object A where my form entries are restored, together with the new 
object B in, say, a drop down list. However this raises the problem that 
the data for the incomplete object A could become available to other users 
unless I put in an 'active' flag or something like it so that until I 
finally submit the data for object A other users can't see it.

What I would *like* to do is store the data for object A in the form bean 
for it and retrieve it later on after creating object B. This seems to be 
an issue of scope. I feel this is probably something people have done a lot 
before, but I can't find anything that concisely and clearly explains it on 
the struts website. Can anybody suggest something, or point me in the 
direction of things to read?

Incidentally, I suppose one way around it would be to maintain a database 
connection and only commit my changes for the object A on completion of 
submission for both A and B, but I'm using a database connection pool 
anyway which would negate this, no?

Many thanks for any help.
Simon

-- 
Simon Kirk
perception|be.developer(java)
t. +44 (0) 20 7689 1200

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




Websphere 4 Tiles

2002-04-03 Thread Daemi, Anusch

Hi

I'm trying to get Tiles working under Websphere 4 with no luck yet.
Tiles version is that for Struts 1.0.2.

I get the following error message (in using definitions):
Error 500: Can't get definitions factory from context. 


I've tried the application under tomcat 4.0.3 and it works fine.
Have i missed something in the websphere configuration or does tiles don't
work with websphere?!?!

Thnx 4 your help
Anusch Daemi

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




How to create the map for multiple parameters with html:link?

2002-04-03 Thread Markus Neifer

Hi, is there any way to create the java.util.Map required for the 
html:link tag when using more than one parameter without using 
scriptlets?

Thanks in advance.

Markus



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




RE: storing data beyond single page scope without commiting to database

2002-04-03 Thread Karim D. Saloojee

Hi

Note, I am a newbie.

Nonetheless, have you tried storing the form-bean for Object A in the
session (struts-config)? Then in another action say ten screens down the
line you can retrieve it from the session and work with it there.  Once you
are finished, you can remove it from the session if you want.

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: 03 April 2002 16:55
To: [EMAIL PROTECTED]
Subject: storing data beyond single page scope without commiting to
database


Subject: storing data beyond single page scope without commiting to database
From: Simon Kirk [EMAIL PROTECTED]
 ===
Hello all,
I have a system where I am creating an object with a certain amount of
data, let's call it object A. It references to one or more object Bs that
can be said to 'belong' to it. Let's say that there are not any object Bs
that fit the criteria of what I want, so in my form to input an object A, I
have a button to add an object B to go with it.

What I could do is when I click the button to create a new
object B, I submit the data so far entered for object A and store the data
in a database. I then enter my data for object B, submit, and get taken
back to object A where my form entries are restored, together with the new
object B in, say, a drop down list. However this raises the problem that
the data for the incomplete object A could become available to other users
unless I put in an 'active' flag or something like it so that until I
finally submit the data for object A other users can't see it.

What I would *like* to do is store the data for object A in the form bean
for it and retrieve it later on after creating object B. This seems to be
an issue of scope. I feel this is probably something people have done a lot
before, but I can't find anything that concisely and clearly explains it on
the struts website. Can anybody suggest something, or point me in the
direction of things to read?

Incidentally, I suppose one way around it would be to maintain a database
connection and only commit my changes for the object A on completion of
submission for both A and B, but I'm using a database connection pool
anyway which would negate this, no?

Many thanks for any help.
Simon

--
Simon Kirk
perception|be.developer(java)
t. +44 (0) 20 7689 1200

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


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




RE: Websphere 4 Tiles

2002-04-03 Thread Steve Hupert

I do not know what is causing your error, but I can tell you we have an
application running using Websphere 4.0 with struts 1.0.2 and tiles.


-Original Message-
From: Daemi, Anusch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 9:05 AM
To: '[EMAIL PROTECTED]'
Subject: Websphere 4  Tiles


Hi

I'm trying to get Tiles working under Websphere 4 with no luck yet.
Tiles version is that for Struts 1.0.2.

I get the following error message (in using definitions):
Error 500: Can't get definitions factory from context.


I've tried the application under tomcat 4.0.3 and it works fine.
Have i missed something in the websphere configuration or does tiles don't
work with websphere?!?!

Thnx 4 your help
Anusch Daemi

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



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




Frustrating ClassCastException

2002-04-03 Thread hemant

I am currently using Tomcat 4.0.1 in a VisualAge 3.5.3 environment with struts 1.0.2. 

Here is the scenario. 

I run both struts-example webapp and my application webapp, everything works out 
fine. JSP's and Java files are created in the work directory in Tomcat and everything 
is hunky dory.

Now I stop Tomcat and bring it backup and then attempt to test the struts-example 
webapp. It works well. 

Now when I run my web app, I get a ClassCast Exception. Looks like it is caused by 
ActionForm. But All my ActionForm's blissfully extend 
org.apache.struts.action.ActionForm.

Everything except struts-config and web.xml is the same in both webapps. What could be 
wrong?

Thanks for your time
hemant

--

java.lang.ClassCastException
java.lang.Throwable()
java.lang.Exception()
java.lang.RuntimeException()
java.lang.ClassCastException()
org.apache.struts.action.ActionForm 
org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.action.ActionMapping,
 javax.servlet.http.HttpServletRequest)
org.apache.struts.action.ActionForm 
org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.action.ActionMapping,
 javax.servlet.http.HttpServletRequest)
void 
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
void 
org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response, org.apache.catalina.ValveContext)
void 
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response, org.apache.catalina.ValveContext)
void 
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response, org.apache.catalina.ValveContext)
void 
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response, org.apache.catalina.ValveContext)
void 
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response, org.apache.catalina.ValveContext)
void 
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.valves.AccessLogValve.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response, org.apache.catalina.ValveContext)
void 
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response)
void 
org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.Request, 
org.apache.catalina.Response, org.apache.catalina.ValveContext)
void 
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, 
org.apache.catalina.Response)

RE: storing data beyond single page scope without commiting to database

2002-04-03 Thread Wellie W. Chao

Why don't you store the temporary object in the session object and check to
see if the object exists when rendering the form?

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 9:55 AM
To: [EMAIL PROTECTED]
Subject: storing data beyond single page scope without commiting to
database


Subject: storing data beyond single page scope without commiting to database
From: Simon Kirk [EMAIL PROTECTED]
 ===
Hello all,
I have a system where I am creating an object with a certain amount of
data, let's call it object A. It references to one or more object Bs that
can be said to 'belong' to it. Let's say that there are not any object Bs
that fit the criteria of what I want, so in my form to input an object A, I
have a button to add an object B to go with it.

What I could do is when I click the button to create a new
object B, I submit the data so far entered for object A and store the data
in a database. I then enter my data for object B, submit, and get taken
back to object A where my form entries are restored, together with the new
object B in, say, a drop down list. However this raises the problem that
the data for the incomplete object A could become available to other users
unless I put in an 'active' flag or something like it so that until I
finally submit the data for object A other users can't see it.

What I would *like* to do is store the data for object A in the form bean
for it and retrieve it later on after creating object B. This seems to be
an issue of scope. I feel this is probably something people have done a lot
before, but I can't find anything that concisely and clearly explains it on
the struts website. Can anybody suggest something, or point me in the
direction of things to read?

Incidentally, I suppose one way around it would be to maintain a database
connection and only commit my changes for the object A on completion of
submission for both A and B, but I'm using a database connection pool
anyway which would negate this, no?

Many thanks for any help.
Simon

--
Simon Kirk
perception|be.developer(java)
t. +44 (0) 20 7689 1200

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


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




visual Struts editor

2002-04-03 Thread Yu, Yanhui

Arron,

I am new to Struts but I have been following the emails on this list for a
while so I think you may be a good candidate for me to post this question:

We use WSAD here and the developers like the Designer it comes with that
provides gui interfaces, so the developers can see where is this button and
where is that table when developing a JSP page.  Now we are trying to use
Struts,  WSAD's Designer is not Struts-aware, i.e., the Designer would show
all the Struts buttons/all tags as a small red icon without any labels and
so it is difficult to recognize where the buttons/components are.  The
developers have to edit the source code (just like using a TextPad or
Notepad).  My question is, does any one out there who can recommend us an
editing tool that would recognize Struts buttons and such, so our developers
can visually see what is on where in the JSP page during the developing
stage?  

Thank you all very much in advance for any suggestion,
Yanhui



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




RE: How to create the map for multiple parameters with html:link?

2002-04-03 Thread Alex Paransky

Markus,

To implement a suitable map, we created a new tag called URI.  By using this
tag and specifying the id= attribute, a new scriplet object is created in
the appropriate scope.  Then, we are
able to pass this object into the html:link tag.

This is one way of doing it.

The Struts way would probably be to execute an action which puts such a
map into the request scope, and then forward to the page you want to go to.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127

-Original Message-
From: Markus Neifer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 7:04 AM
To: [EMAIL PROTECTED]
Subject: How to create the map for multiple parameters with html:link?


Hi, is there any way to create the java.util.Map required for the
html:link tag when using more than one parameter without using
scriptlets?

Thanks in advance.

Markus



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



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




RE: Frustrating ClassCastException

2002-04-03 Thread Zeltser, Mark

Take a look at your jar files, specifically for struts.jar. Make sure it is
only available in yourApp/WEB-INF/lib directory and not in you
JDK_PATH/jre/lib/ext or TOMCAT_ROOT/lib or TOMCAT_ROOT/commons/lib.

Mark.

-Original Message-
From: hemant [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 10:29 AM
To: struts
Subject: Frustrating ClassCastException


I am currently using Tomcat 4.0.1 in a VisualAge 3.5.3 environment with
struts 1.0.2. 

Here is the scenario. 

I run both struts-example webapp and my application webapp, everything
works out fine. JSP's and Java files are created in the work directory in
Tomcat and everything is hunky dory.

Now I stop Tomcat and bring it backup and then attempt to test the
struts-example webapp. It works well. 

Now when I run my web app, I get a ClassCast Exception. Looks like it is
caused by ActionForm. But All my ActionForm's blissfully extend 
org.apache.struts.action.ActionForm.

Everything except struts-config and web.xml is the same in both webapps.
What could be wrong?

Thanks for your time
hemant


--

java.lang.ClassCastException
java.lang.Throwable()
java.lang.Exception()
java.lang.RuntimeException()
java.lang.ClassCastException()
org.apache.struts.action.ActionForm
org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.a
ction.ActionMapping, javax.servlet.http.HttpServletRequest)
org.apache.struts.action.ActionForm
org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.a
ction.ActionMapping, javax.servlet.http.HttpServletRequest)
void
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle
tRequest, javax.servlet.http.HttpServletResponse)
void
org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServlet
Request, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest
, javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servl
et.ServletRequest, javax.servlet.ServletResponse)
void
org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.Servl
etRequest, javax.servlet.ServletResponse)
void
org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Req
uest, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Req
uest, org.apache.catalina.Response)
void
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request
, org.apache.catalina.Response)
void
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request,
org.apache.catalina.Response)
void
org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Req
uest, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Req
uest, org.apache.catalina.Response)
void
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request
, org.apache.catalina.Response)
void
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request,
org.apache.catalina.Response)
void
org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Request,
org.apache.catalina.Response)
void
org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Reques
t, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Req
uest, org.apache.catalina.Response)
void
org.apache.catalina.valves.ErrorDispatcherValve.invoke(org.apache.catalina.R
equest, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Req
uest, org.apache.catalina.Response)
void
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Reque
st, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Req
uest, org.apache.catalina.Response)
void
org.apache.catalina.valves.AccessLogValve.invoke(org.apache.catalina.Request
, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Req
uest, org.apache.catalina.Response)
void
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request
, org.apache.catalina.Response)
void

struts 1.1-b1 - ActionMappingFactory.java appears to be missing from source distribution

2002-04-03 Thread @Basebeans.com

Subject: struts 1.1-b1 - ActionMappingFactory.java appears to be missing from source 
distribution
From: Steve Hupert [EMAIL PROTECTED]
 ===
I am attempting to debug a problem I am having with struts 1.1-b1.  The
problem I am debugging results in a null pointer exception that seems to be
caused by an object of type org.apache.struts.config.ActionMappingFactory.
If I look at struts.jar in jakarta-struts-1.1-b1-lib.zip, I find an
ActionMappingFactory.class.  However, if I look at the contents of
jakarta-struts-1.1-b1-src.zip no corresponding .java file exists.

Where is this file?  Am I correct in assuming this ActionMappingFactory.java
should be in jakarta-struts-1.1-b1-src.zip?

Is this the proper mailing list to post this question to?  Or should it be
posted to the developer mailing list?

Thanks in advance for any feedback on this item.



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




RE: I'm stuck on the html:submit

2002-04-03 Thread theron . kousek


Hi James:

But what if you have multiple html:submit's in your jsp...
And supposing only 1 of those submit button's need to have this javascript
confirm() popup.   How does the onSubmit() at the form level know which
submit button-property was set?It would need to do an if statement and
only popup the question if a certain submit was set:

For example:
Suppose I have the following in my html form:

html:form onSubmit=checkDeleteConfirmation()
 
 table ...
 tr
 td ID=smallhtml:submit property=add value=Add /td
 td ID=smallhtml:submit property=update value=Update /td
 td ID=smallhtml:submit property=delete value=Delete /td
 ...
 /table
/html:form

Supposing I only want to pop the question when they hit delete:

script language=JavaScript
 function checkDeleteConfirmation() {
  //
  // How can I determine if they clicked on the delete button
since onSubmit()
  // gets called for every single submit type button?
 }
/script

thanks,
Theron



   
 
James  
 
Mitchell To: Struts Users Mailing List 
 
jmitchtx@tel[EMAIL PROTECTED]  
 
ocity.com   cc:   
 
 Subject: RE: I'm stuck on the html:submit 
 
04/02/02   
 
08:52 PM   
 
Please 
 
respond to 
 
Struts Users   
 
Mailing List   
 
   
 
   
 



Ok.  I was going to make another suggestion based on what you posted
earlier.
You don't actually need any javascript in your html:submit tag.
The onSubmit action is handled by the html:form onSubmit=return
callMyFunction()


Anyway, you could have tested your function call by substituting html:form
action=/whatever onSubmit=return true

then change it to false and test again
if that passes, then put return true on the first line of your javascript
function.

Working example:
--
!-- pieces taken from the struts example --
%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/app.tldprefix=app %
%@ 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 %

html:form action=/saveRegistration onsubmit=return doMeFirst('what you
need')
table border=0 width=100%
  tr
th align=right
  bean:message key=prompt.fullName/
/th
td align=left
  html:text property=fullName size=50/
/td
  /tr
/table
html:submit value=Submit/
/html:form

SCRIPT LANGUAGE=javascript
!--
function doMeFirst( param ){
 if (param == what I was expecting) {
   return true;
 }else{
   return false;
 }

}
//--
/SCRIPT





JM


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 10:58 PM
 To: Struts Users Mailing List
 Cc: [EMAIL PROTECTED]
 Subject: RE: I'm stuck on the html:submit



 I apologize James, I ended up doing it a totally different way (without
 using html:button) which seems to work nowI did not save the
prior
 way that I was having problems with  :-(

 theron




 James

 Mitchell To: Struts Users
 Mailing List
 jmitchtx@tel
 [EMAIL PROTECTED]
 ocity.com   cc:

  Subject: RE: I'm
 stuck on the html:submit
 04/02/02

 07:26 PM

 Please

 respond to

 Struts Users

 Mailing List








 Could you post your entire jsp code to have a better look?

 JM

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, April 02, 2002 8:51 PM
  To: Struts Users Mailing List
  Subject: I'm stuck on the 

How to avoid a separate .jsp page for body definition when usingTemplates?

2002-04-03 Thread Alex Paransky

I am currently using Templates (not Tiles) to layout our pages.  While
general components such as menu, header, footer are well defined, same for
all pages, and are included from a global single location, the body is
always different.  So, for every page, we wind up with 2 pages.

page.jsp - uses the template tags to define the layout
pageContent.jsp - used from page.jsp to define the body content

This is quite cumbersome.  Is there a way to put the layout definition and
the contents of at least the body into the same page?  Other things such
as the title, and help text change on a page  by page basis, so it would be
nice to package these two items in to the same page as well.

Is this easier done with Tiles?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127


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




RE: I'm stuck on the html:submit

2002-04-03 Thread Leonardo Maciel

This is how I would do:

html:form action=/whatever.do 
 
 table ...
 tr
 td ID=smallhtml:submit property=add value=Add /td
 td ID=smallhtml:submit property=update value=Update /td
 td ID=smallhtml:submit onclick=return confirm('Confirm
Delete?'); property=delete value=Delete /td
 ...
 /table
/html:form


This way, only delete button will pop the confirm window. 

Leo.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:12 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: I'm stuck on the html:submit



Hi James:

But what if you have multiple html:submit's in your jsp...
And supposing only 1 of those submit button's need to have this javascript
confirm() popup.   How does the onSubmit() at the form level know which
submit button-property was set?It would need to do an if statement and
only popup the question if a certain submit was set:

For example:
Suppose I have the following in my html form:

html:form onSubmit=checkDeleteConfirmation()
 
 table ...
 tr
 td ID=smallhtml:submit property=add value=Add /td
 td ID=smallhtml:submit property=update value=Update /td
 td ID=smallhtml:submit property=delete value=Delete /td
 ...
 /table
/html:form

Supposing I only want to pop the question when they hit delete:

script language=JavaScript
 function checkDeleteConfirmation() {
  //
  // How can I determine if they clicked on the delete button
since onSubmit()
  // gets called for every single submit type button?
 }
/script

thanks,
Theron



 

James

Mitchell To: Struts Users Mailing List

jmitchtx@tel[EMAIL PROTECTED]

ocity.com   cc:

 Subject: RE: I'm stuck on the
html:submit  
04/02/02

08:52 PM

Please

respond to

Struts Users

Mailing List

 

 




Ok.  I was going to make another suggestion based on what you posted
earlier.
You don't actually need any javascript in your html:submit tag.
The onSubmit action is handled by the html:form onSubmit=return
callMyFunction()


Anyway, you could have tested your function call by substituting html:form
action=/whatever onSubmit=return true

then change it to false and test again
if that passes, then put return true on the first line of your javascript
function.

Working example:
--
!-- pieces taken from the struts example --
%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/app.tldprefix=app %
%@ 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 %

html:form action=/saveRegistration onsubmit=return doMeFirst('what you
need')
table border=0 width=100%
  tr
th align=right
  bean:message key=prompt.fullName/
/th
td align=left
  html:text property=fullName size=50/
/td
  /tr
/table
html:submit value=Submit/
/html:form

SCRIPT LANGUAGE=javascript
!--
function doMeFirst( param ){
 if (param == what I was expecting) {
   return true;
 }else{
   return false;
 }

}
//--
/SCRIPT





JM


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 10:58 PM
 To: Struts Users Mailing List
 Cc: [EMAIL PROTECTED]
 Subject: RE: I'm stuck on the html:submit



 I apologize James, I ended up doing it a totally different way (without
 using html:button) which seems to work nowI did not save the
prior
 way that I was having problems with  :-(

 theron




 James

 Mitchell To: Struts Users
 Mailing List
 jmitchtx@tel
 [EMAIL PROTECTED]
 ocity.com   cc:

  Subject: RE: I'm
 stuck on the html:submit
 04/02/02

 07:26 PM

 Please

 respond to

 Struts Users

 Mailing List








 Could you post your entire jsp code to have a better look?

 JM

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, April 02, 2002 8:51 PM
  To: Struts Users Mailing List
  Subject: I'm stuck on the html:submit
 
 
 
  I know with the html:form you have the onSubmit() javascript
 handler in
  which the following will work:
 
  script language=JavaScript
   function unlinkConfirmation() {
if (confirm(Remove employee link?))
 return true;
else
 return false;
   }
  

RE: How to avoid a separate .jsp page for body definition whenus ing Templates?

2002-04-03 Thread Zeltser, Mark

Hi Alex,

That was one of the reasons I used Tiles. You can put all your page
definitions in tiles-defs.xml. This single configuration files will replace
all your page.jsp(s).

Mark.

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:19 AM
To: 'Struts Users'
Subject: How to avoid a separate .jsp page for body definition when
using Templates?


I am currently using Templates (not Tiles) to layout our pages.  While
general components such as menu, header, footer are well defined, same for
all pages, and are included from a global single location, the body is
always different.  So, for every page, we wind up with 2 pages.

page.jsp - uses the template tags to define the layout
pageContent.jsp - used from page.jsp to define the body content

This is quite cumbersome.  Is there a way to put the layout definition and
the contents of at least the body into the same page?  Other things such
as the title, and help text change on a page  by page basis, so it would be
nice to package these two items in to the same page as well.

Is this easier done with Tiles?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127


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



--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.



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




RE: Editor aware of Struts

2002-04-03 Thread Rajesh Gaikwad (EHS)


I think DreamWeaver Ultradev with CTLX  extension from Apache works good

Rajesh

-Original Message-
From:   Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 03, 2002 8:10 PM
To: [EMAIL PROTECTED]
Subject:Re: Editor aware of Struts

Subject: Re: Editor aware of Struts
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
You can do Struts with just JSP, you have to edit Java as
well.
(I use OmniCore.com CodeGuide 4 now, after NetBeans.org)

To do things like table iterate of a resuult set, they will
have to be 
OK with writing HTML tdtr

Vic


Yu, Yanhui wrote:

 Hi all,
 
 Does anyone out there who can recommend us a tool that is
Struts aware?  We
 are using WSAD and it can't recognize any struts tags in
the Page Designer
 that comes with WSAD.  The developers don't really like to
edit the Source
 page (the text editor).  We would very much appreciate any
suggestions to
 any tool that can visually edit a JSP page with Struts.
Thank you very much
 in advance,
 
 Yanhui
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 


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




RE: Editor aware of Struts

2002-04-03 Thread Yu, Yanhui

Vic,

is OmniCore.com CodeGuide 4 a Java IDE?  We are using IBM's WSAD (combines
Java IDE, like VAJ and JSP editors like Websphere studio) to edit Java code
(such as the Action and ActionForm classes).  

WSAD has a page Designer (like Websphere Studio) which offers visual
desgning for JSP page, somewhat like FrontPage, where the developer can
visually see the buttons, tables, images and such during development.  WSAD
also comes with a Source editor (just like Textpad) which only shows the JSP
source code.  The developer can choose to use either the Designer or the
Source editor to compose a JSP page.  Now we are trying to use Struts, the
Designer from WSAD no longer recongnize the struts componnets such as Struts
buttons.  It shows a red triangular icon for any of the Struts component
without any face value shown (like a button's value).  

What I am looking for is an editing tool that will recognize Struts
components, e.g., Struts button and show the button during editing, i.e.,
before rendering with a browser.

Hope I explained what I am looking for and appreciate for any suggestions.

Yanhui


-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 8:40 AM
To: [EMAIL PROTECTED]
Subject: Re: Editor aware of Struts


Subject: Re: Editor aware of Struts
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
You can do Struts with just JSP, you have to edit Java as well.
(I use OmniCore.com CodeGuide 4 now, after NetBeans.org)

To do things like table iterate of a resuult set, they will have to be 
OK with writing HTML tdtr

Vic


Yu, Yanhui wrote:

 Hi all,
 
 Does anyone out there who can recommend us a tool that is Struts aware?
We
 are using WSAD and it can't recognize any struts tags in the Page Designer
 that comes with WSAD.  The developers don't really like to edit the Source
 page (the text editor).  We would very much appreciate any suggestions to
 any tool that can visually edit a JSP page with Struts.  Thank you very
much
 in advance,
 
 Yanhui
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 


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




RE: How to avoid a separate .jsp page for body definition when us ing Templates?

2002-04-03 Thread Wellie W. Chao

Hi Alex,

I agree with Mark. I had your same problem a while back and decided to
switch to Tiles, which is much more flexible. For each page, I have an entry
in struts-config.xml and one in tiles-defs.xml. A really simple page looks
like this:

struts-config.xml:
action path=/security/authIndex forward=site.page.security.authIndex/

tiles-defs.xml:
definition name=site.page.security.authIndex
path=/security/authIndex.jsp/

/security/authIndex.jsp:
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
logic:present role=guest
  logic:redirect page=/guest/index.do/
/logic:present
logic:present role=admin
  logic:redirect page=/admin/index.do/
/logic:present
logic:present role=candidate
  logic:redirect page=/candidate/index.do/
/logic:present
logic:present role=employer
  logic:redirect page=/employer/index.do/
/logic:present

You could put whatever you wanted in /security/authIndex.jsp. Also, you can
have the site.page.security.authIndex inherit from a base layout if you
wanted to. You no longer need two files per page. It's one master layout
file plus a file for each logical content page (a page body).

-Original Message-
From: Zeltser, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:21 AM
To: 'Struts Users Mailing List'
Subject: RE: How to avoid a separate .jsp page for body definition when
us ing Templates?


Hi Alex,

That was one of the reasons I used Tiles. You can put all your page
definitions in tiles-defs.xml. This single configuration files will replace
all your page.jsp(s).

Mark.

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:19 AM
To: 'Struts Users'
Subject: How to avoid a separate .jsp page for body definition when
using Templates?


I am currently using Templates (not Tiles) to layout our pages.  While
general components such as menu, header, footer are well defined, same for
all pages, and are included from a global single location, the body is
always different.  So, for every page, we wind up with 2 pages.

page.jsp - uses the template tags to define the layout
pageContent.jsp - used from page.jsp to define the body content

This is quite cumbersome.  Is there a way to put the layout definition and
the contents of at least the body into the same page?  Other things such
as the title, and help text change on a page  by page basis, so it would be
nice to package these two items in to the same page as well.

Is this easier done with Tiles?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127


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




--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.



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


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




RE: How to avoid a separate .jsp page for body definition when us ingTemplates?

2002-04-03 Thread Alex Paransky

I guess putting the layout for all the pages in tiles-defs.xml is a
solution, however, I am still hoping that the layout of the page can be kept
with the page.  There are other aspects which differ for each page.  For
example, I would like to include a help text with each page that is
displayed.  Currently, that's either a) another file, or b) ugly long line
of HTML formatted data in the information.jsp (page which defines the
template layout).  For example, one of my pages looks like this:

%@ page language=java %
%@ taglib uri=struts-template prefix=template %

template:insert template=/common/template.html
  template:put name=title content=Member direct=true /
  template:put name=content
content=/private/member/informationContent.html /
  template:put name=help direct=true content=br/This page shows some
informationbr//
/template:insert

I would really want to include this layout, the help information, the title
information and the informationContent.html in to one page called
information.jsp.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127

-Original Message-
From: Zeltser, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 8:21 AM
To: 'Struts Users Mailing List'
Subject: RE: How to avoid a separate .jsp page for body definition when
us ing Templates?


Hi Alex,

That was one of the reasons I used Tiles. You can put all your page
definitions in tiles-defs.xml. This single configuration files will replace
all your page.jsp(s).

Mark.

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:19 AM
To: 'Struts Users'
Subject: How to avoid a separate .jsp page for body definition when
using Templates?


I am currently using Templates (not Tiles) to layout our pages.  While
general components such as menu, header, footer are well defined, same for
all pages, and are included from a global single location, the body is
always different.  So, for every page, we wind up with 2 pages.

page.jsp - uses the template tags to define the layout
pageContent.jsp - used from page.jsp to define the body content

This is quite cumbersome.  Is there a way to put the layout definition and
the contents of at least the body into the same page?  Other things such
as the title, and help text change on a page  by page basis, so it would be
nice to package these two items in to the same page as well.

Is this easier done with Tiles?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127


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




--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.



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



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




Re: lost form data when validate returns errors

2002-04-03 Thread mtStruts

Dan, 

I am having the exact same problem!  In my struts-config.xml I have my formBeans set 
to request scope, so I suspect that this causes the information in my form to 
disappear.  I don't want to have the bean persist for the whole session because users 
will be coming back to this page.  Have you solved this problem already?

Thanks, 
mturner

 I'm having the problem of losing form data when my action class returns 
 errors.  The error displays properly, but I lose all the form data.

 Looking at older posts, I've seen the same problem, but haven't seen a 
 fix or workaround yet.  I've included the relevant code snippets.




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


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




RE: How to avoid a separate .jsp page for body definition whenus ing Templates?

2002-04-03 Thread Zeltser, Mark

If I understand you correctly you are trying to mix content and layout. I
would create main layout and would include the body for each definition. 

  !-- Main page layout used as a root for other pages definition.
--
  definition name=site.mainLayout path=/jsp/common/classicLayout.jsp
  put name=menu   value=/jsp/common/menu.jsp /
  put name=body   value=/jsp/specificPage.jsp /
  /definition

where classicLayout.jsp will define your sites look and feel and
sepecificPage.jsp will contain body of the page including help information.

Mark.

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:50 AM
To: Struts Users Mailing List
Subject: RE: How to avoid a separate .jsp page for body definition when
us ing Templates?


I guess putting the layout for all the pages in tiles-defs.xml is a
solution, however, I am still hoping that the layout of the page can be kept
with the page.  There are other aspects which differ for each page.  For
example, I would like to include a help text with each page that is
displayed.  Currently, that's either a) another file, or b) ugly long line
of HTML formatted data in the information.jsp (page which defines the
template layout).  For example, one of my pages looks like this:

%@ page language=java %
%@ taglib uri=struts-template prefix=template %

template:insert template=/common/template.html
  template:put name=title content=Member direct=true /
  template:put name=content
content=/private/member/informationContent.html /
  template:put name=help direct=true content=br/This page shows some
informationbr//
/template:insert

I would really want to include this layout, the help information, the title
information and the informationContent.html in to one page called
information.jsp.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127

-Original Message-
From: Zeltser, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 8:21 AM
To: 'Struts Users Mailing List'
Subject: RE: How to avoid a separate .jsp page for body definition when
us ing Templates?


Hi Alex,

That was one of the reasons I used Tiles. You can put all your page
definitions in tiles-defs.xml. This single configuration files will replace
all your page.jsp(s).

Mark.

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:19 AM
To: 'Struts Users'
Subject: How to avoid a separate .jsp page for body definition when
using Templates?


I am currently using Templates (not Tiles) to layout our pages.  While
general components such as menu, header, footer are well defined, same for
all pages, and are included from a global single location, the body is
always different.  So, for every page, we wind up with 2 pages.

page.jsp - uses the template tags to define the layout
pageContent.jsp - used from page.jsp to define the body content

This is quite cumbersome.  Is there a way to put the layout definition and
the contents of at least the body into the same page?  Other things such
as the title, and help text change on a page  by page basis, so it would be
nice to package these two items in to the same page as well.

Is this easier done with Tiles?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127


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




--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.



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



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



--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly 

alternative jsp compiler?

2002-04-03 Thread Robert J. Sanford, Jr.

i don't know if this sort of thing even exists or if it is even feasible but
asking never hurts...

what i want is to not have my jsp's compiled into servlets but into beans.
with struts i already have a nice framework that allows multi-threaded
access to a centralized controller with the ability to route requests
to/through a series of actors. why can't the presentation actors be beans
instead of servlets? wouldn't creating a nifty little jspBean class be
reasonably easy to do?

rjsjr


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




RE: I'm stuck on the html:submit

2002-04-03 Thread theron . kousek


thanks Leonardo!

Theron



   
 
Leonardo   
 
Maciel   To: Struts Users Mailing List 
 
LMaciel@Scie[EMAIL PROTECTED]  
 
nt.com  cc:   
 
 Subject: RE: I'm stuck on the html:submit 
 
04/03/02   
 
08:16 AM   
 
Please 
 
respond to 
 
Struts Users   
 
Mailing List   
 
   
 
   
 



This is how I would do:

html:form action=/whatever.do 
 
 table ...
 tr
 td ID=smallhtml:submit property=add value=Add /td
 td ID=smallhtml:submit property=update value=Update /td
 td ID=smallhtml:submit onclick=return confirm('Confirm
Delete?'); property=delete value=Delete /td
 ...
 /table
/html:form


This way, only delete button will pop the confirm window.

Leo.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:12 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: I'm stuck on the html:submit



Hi James:

But what if you have multiple html:submit's in your jsp...
And supposing only 1 of those submit button's need to have this javascript
confirm() popup.   How does the onSubmit() at the form level know which
submit button-property was set?It would need to do an if statement and
only popup the question if a certain submit was set:

For example:
Suppose I have the following in my html form:

html:form onSubmit=checkDeleteConfirmation()
 
 table ...
 tr
 td ID=smallhtml:submit property=add value=Add /td
 td ID=smallhtml:submit property=update value=Update /td
 td ID=smallhtml:submit property=delete value=Delete /td
 ...
 /table
/html:form

Supposing I only want to pop the question when they hit delete:

script language=JavaScript
 function checkDeleteConfirmation() {
  //
  // How can I determine if they clicked on the delete button
since onSubmit()
  // gets called for every single submit type button?
 }
/script

thanks,
Theron





James

Mitchell To: Struts Users Mailing List

jmitchtx@tel[EMAIL PROTECTED]

ocity.com   cc:

 Subject: RE: I'm stuck on the
html:submit
04/02/02

08:52 PM

Please

respond to

Struts Users

Mailing List








Ok.  I was going to make another suggestion based on what you posted
earlier.
You don't actually need any javascript in your html:submit tag.
The onSubmit action is handled by the html:form onSubmit=return
callMyFunction()


Anyway, you could have tested your function call by substituting html:form
action=/whatever onSubmit=return true

then change it to false and test again
if that passes, then put return true on the first line of your javascript
function.

Working example:
--
!-- pieces taken from the struts example --
%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/app.tldprefix=app %
%@ 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 %

html:form action=/saveRegistration onsubmit=return doMeFirst('what you
need')
table border=0 width=100%
  tr
th align=right
  bean:message key=prompt.fullName/
/th
td align=left
  html:text property=fullName size=50/
/td
  /tr
/table
html:submit value=Submit/
/html:form

SCRIPT LANGUAGE=javascript
!--
function doMeFirst( param ){
 if (param == what I was expecting) {
   return true;
 }else{
   return false;
 }

}
//--
/SCRIPT





JM


 -Original 

Re: alternative jsp compiler?

2002-04-03 Thread Giuseppe Galli

Hi Robert,
how these bean could be invoked by http requests even if they are not 
servlet? the only way I know alternative to servlet to handle http 
interactions is SOAP.
Pino

At 11.11 03/04/2002, Robert J. Sanford, Jr. wrote:
i don't know if this sort of thing even exists or if it is even feasible but
asking never hurts...

what i want is to not have my jsp's compiled into servlets but into beans.
with struts i already have a nice framework that allows multi-threaded
access to a centralized controller with the ability to route requests
to/through a series of actors. why can't the presentation actors be beans
instead of servlets? wouldn't creating a nifty little jspBean class be
reasonably easy to do?

rjsjr


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


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




RE: lost form data when validate returns errors

2002-04-03 Thread Maturo, Larry

Hi,

What we do is put the form beans in the session, but each
one has a clear method we call before filling in data on
the form.  This keeps the data from being lost, and also
keeps it from showing up when not wanted.  The clear just
sets the member variables in the form bean back to nothing.

-- Larry Maturo
   [EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:04 AM
To: Struts Users Mailing List
Subject: Re: lost form data when validate returns errors


Dan, 

I am having the exact same problem!  In my struts-config.xml I have my
formBeans set to request scope, so I suspect that this causes the
information in my form to disappear.  I don't want to have the bean persist
for the whole session because users will be coming back to this page.  Have
you solved this problem already?

Thanks, 
mturner

 I'm having the problem of losing form data when my action class returns 
 errors.  The error displays properly, but I lose all the form data.

 Looking at older posts, I've seen the same problem, but haven't seen a 
 fix or workaround yet.  I've included the relevant code snippets.




__
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


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


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




Announce Struts E-Book for less than $10

2002-04-03 Thread @Basebeans.com

Subject: Announce Struts E-Book for less than $10
From: Vic Cekvenich [EMAIL PROTECTED]
 ===
go to basebeans.com/book.jsp and click in. (this is the same old Struts 
book in EBook).
It will help you understand the Struts DB examample (with options, CRUD, 
tiles, validation, masterdetail, etc. also available for Free at 
baseBeans.com downlods page)
hth,
Vic


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




RE: alternative jsp compiler?

2002-04-03 Thread Robert J. Sanford, Jr.

struts provides the controller servlet. all requests from any page that
is being managed by struts goes first through the controller. instead
of having the struts controller servlet forward a request to another
servlet (instantiated by compiling .jsp-.java-.class) the controller
servlet simply invokes a method on the newly defined bean.

does that make sense to anyone other than myself?

is what i'm asking a reasonable thing or am i off in left field?

rjsjr

 -Original Message-
 From: Giuseppe Galli [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 03, 2002 11:12 AM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: Re: alternative jsp compiler?


 Hi Robert,
 how these bean could be invoked by http requests even if they are not
 servlet? the only way I know alternative to servlet to handle http
 interactions is SOAP.
 Pino

 At 11.11 03/04/2002, Robert J. Sanford, Jr. wrote:
 i don't know if this sort of thing even exists or if it is even
 feasible but
 asking never hurts...
 
 what i want is to not have my jsp's compiled into servlets but
 into beans.
 with struts i already have a nice framework that allows multi-threaded
 access to a centralized controller with the ability to route requests
 to/through a series of actors. why can't the presentation actors be beans
 instead of servlets? wouldn't creating a nifty little jspBean class be
 reasonably easy to do?
 
 rjsjr
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]


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



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




Re: alternative jsp compiler?

2002-04-03 Thread Marcelo Vanzin

Robert J. Sanford, Jr. wrote:
 servlet (instantiated by compiling .jsp-.java-.class) the controller
 servlet simply invokes a method on the newly defined bean.

And how is this different from invoking a method in the newly defined 
servlet?

Your bean sounds too much like a servlet with a different name.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




RE: alternative jsp compiler?

2002-04-03 Thread Robert J. Sanford, Jr.

the difference is that a new servlet is actually a process (for
lack of a better term) in the container where the bean would not
be - it would be invoked from the thread accessing the controller
servlet.

like i said, i don't know if this is even a reasonable request, it
just sort of floated into my head one day.

rjsjr

 -Original Message-
 From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 03, 2002 11:30 AM
 To: Struts Users Mailing List
 Subject: Re: alternative jsp compiler?
 
 
 Robert J. Sanford, Jr. wrote:
  servlet (instantiated by compiling .jsp-.java-.class) the controller
  servlet simply invokes a method on the newly defined bean.
 
   And how is this different from invoking a method in the 
 newly defined 
 servlet?
 
   Your bean sounds too much like a servlet with a different name.
 
 -- 
 []'s
 Marcelo Vanzin
 Touch Tecnologia
 [EMAIL PROTECTED]
 Life is too short to drink cheap beer
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

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




Re: alternative jsp compiler?

2002-04-03 Thread Marcelo Vanzin

Robert J. Sanford, Jr. wrote:
 the difference is that a new servlet is actually a process (for
 lack of a better term) in the container where the bean would not
 be - it would be invoked from the thread accessing the controller
 servlet.

So you're substituting:

container - servlet - dispatch
  - servlet
( etc )

For:
container - servlet - bean (- bean?)

So everything runs in the same process tree instead of finishing the 
execution of one servlet, pass the control to other (thus freeing some 
resources from the previous one) and so on?

I don't know, it seems to me that the dispatch method used by the 
container is better...it may be slower (though I doubt it makes a big 
difference), but, it's a compromise.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




Re: alternative jsp compiler?

2002-04-03 Thread Marcelo Vanzin

Robert J. Sanford, Jr. wrote:
 the difference is that a new servlet is actually a process (for
 lack of a better term) in the container where the bean would not
 be - it would be invoked from the thread accessing the controller
 servlet.

BTW, if I understand you correctly, what you're proposing can be done 
easily with a templating engine like Velocity.

In your action class within Struts, call Velocity.merge(bla bla bla) 
(or whatever the method is called), which'll send the data of the 
template to te client, and then return null, so that Struts does not do 
any further dispatches.



-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




RE: Installation on OS-390 and Websphere 3.5.3: - Error Application unavailable for service

2002-04-03 Thread Galbreath, Mark

Nope.  I don't see a single error.

Of course, I don't see a single file, either.  :-)

Mark

-Original Message-
From: Steven Banks [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 8:27 AM
To: [EMAIL PROTECTED]
Subject: RE: Installation on OS-390 and Websphere 3.5.3: - Error
Application unavailable for service


I have found mention is several articles that this can be caused by errors
in the train.webapp and web.xml.

Could anyone look at the attached and see if there are any errors? 

I have gone into the struts code and comented out everything in the init()
routine of the ActionServlet, entered a System.out.println() statement in
it, and the application will still not start.


 Steven Banks [EMAIL PROTECTED] 03/27/02 10:54AM 
Roger.   Thanks for the response.   Before trying the upgrade, I am going to
try getting it to work on 3.5.3 just call me stubborn.  There is a set of
notes from someone who has it working on this user group.   The latest I
have tried was changing a WAS start-up parameter
appserver.compliance.mode=true.  The result was the the servlet does not
load at all.  It could not find the config file.  I have since discovered
that one result of the parameter change  is that the location of the
struts-config.xml file has to be moved as the following code from the Action
Servlets initMapping routine no longer worked.

When  appserver.compliance.mode=false  the default value

 InputStream input = getServletContext().getResourceAsStream(config); 
found the xml file in the following directory:   
   u/mywebs/dev/train/WEB-INF/classes/WEB-INF/struts-config.xml


When  appserver.compliance.mode=true,   the xml file had to be moved to
 /u/mywebs/dev/train/web/WEB-INF/struts-config.xml


It would be nice if the main struts code would return
getServletContext().getRealPath(config));   when it cannot find the config
file, this would solve a lot of problems like this very quickly.  

Once I moved the file to this new location, the servlet starts OK, but
returns the http 503 error again as soon as I try to access any file in the
web application.

I am going to put a call in to IBM tech support to see if they can help, but
any other help here would be appreciated.  

Steven


Steven Banks
902-368-0566

Steven Banks


 Roger Fortier [EMAIL PROTECTED] 03/26/02 04:32PM 
Below the dotted line is a message that was posted on IBM newsgroup for
WebSphere AS400 and basically Struts will not work with Websphere 3.5.3
on AS400. You must upgrade to 3.5.4.  Perhaps it's the same for
websphere on OS-390?

Also, check this link for a version of struts-jar that will work with
Websphere 4.0.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15143.html 



---

Good News:  Yes, it will work.
Bad News: You may have to jump through a few hoops, depending on just
what
it is you intend to do in the application, how you intend to deploy, and
what your AS400 configuration looks like.

3.5.5 hasn't really been out all that long, and when you consider that
anything like this for the 400 always comes poking along several weeks
or
months after the other platforms my guess would be that higher won't be
an
option for a while.

The way it has shaken out for me is that struts apps deploy fine on
versions
3.5.3, 3.5.4, and 3.5.5 for Windows.  I did do the documented hacks for
the
struts source and the parser.jar that are out on the Apache site.  This
may
not be necessary in version 3.5.5, but unfortunately I haven't had
adequate
time to investigate it.  If it isn't fixed, dock IBM several points for
not
walking it the way they talk it with regard to open source.  But don't
assume if it works on Windows it will work on the 400 - more on that
later.

In addition, I did have to change struts-config.xml and web.xml to use
system rather than public dtd's.  This was not necessary on my Windows
desktop, but when I deployed to the 400 I got numerous errors when the
webapp loaded.  Changing the dtd ref did the trick.  If your machine is
behind a firewall with no internet access you'll also have to make sure
the
dtd can be found, so you may need to specify an internal uri.  Don't
worry,
the system log will let you know right away if it doesn't like what you
picked.

I used the Struts connection pooling option because I used Tomcat as my
development server, and because I want to build in some monitoring that
is
currently not available in WSE for the 400.  I developed on Windows
using
the AS400 toolbox drivers, and switched over to the native DB2 drivers
when
moving up(Don't ask me why).  I ran into some issues there where I was
not
able to update certain files using SQL (support posts seem to point to
issues with non-journaled files), and switching back to the 400 drivers
cleared it up.  Not sure why, since connections using the WS connection
pool
and these same drivers seem to have no issues.

The big news is that while I got my apps 

Problem with javascript tag

2002-04-03 Thread Juan Alvarado \(Struts List\)

I am trying to use the html:javascript formName=formName/ tag with the
validator frame work, and all that is output to the browser is the actual
javascript code.

The reason is that at the beginning of the code, there is no script
language=javascript definition.

At the end of the code there is the following output:
//  End --
/SCRIPT

So the reason I see a whole bunch of javascript in my page is because there
is no beginning javascript tag. However I cannot figure out why this is
happening.

If anyone has any suggestions, please send them to me.

Thanks in advance,

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


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




RE: alternative jsp compiler?

2002-04-03 Thread Robert J. Sanford, Jr.

so velocity is using the same idea of a controller servlet with
a bean of some sort to actually render a page instead of
generating a new servlet for each displayed page? cool.

are there any sort of visual tools for creating the layout of
a velocity page? my designers are using dreamweaver to layout
jsp's and would want to continue along similar veins if we
switched over to a new template engine...

rjsjr

 -Original Message-
 From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 03, 2002 11:49 AM
 To: Struts Users Mailing List
 Subject: Re: alternative jsp compiler?
 
 
 Robert J. Sanford, Jr. wrote:
  the difference is that a new servlet is actually a process (for
  lack of a better term) in the container where the bean would not
  be - it would be invoked from the thread accessing the controller
  servlet.
 
   BTW, if I understand you correctly, what you're proposing 
 can be done 
 easily with a templating engine like Velocity.
 
   In your action class within Struts, call 
 Velocity.merge(bla bla bla) 
 (or whatever the method is called), which'll send the data of the 
 template to te client, and then return null, so that Struts does not do 
 any further dispatches.
 
 
 
 -- 
 []'s
 Marcelo Vanzin
 Touch Tecnologia
 [EMAIL PROTECTED]
 Life is too short to drink cheap beer
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]



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




Re: HTTPS + Struts

2002-04-03 Thread jorisumu

Have you already discovered this URL?

http://struts.ditlinger.com/

Is an Struts extension that solves this issue in a very elegant way.

For a more ilustrative reading you can also check the article by one of 
the authors of the extension:

http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html?

Jorge Ivan Suarez Murillo
Factoring Market
R+D
Medellin, Colombia

- Mensaje original -
De: [EMAIL PROTECTED]
Fecha: Miércoles, Abril 3, 2002 3:58 am
Asunto: HTTPS + Struts

 
 
 Can you advice on how you manage to redirect the http request from 
 http to
 https?
 
 I have following scenario (typical of a shopping site).
 
 1) User search and place item into shopping cart (eg calls
 http://www.acmeshop.co)
 2) addtoshoppingcart.do do some processing and redirects user back to
 shopping search page (eg 
 http://www.acmeshop.com/shoppingsearch.jsp )
 3) User clicks on the check out page URL. (eg calls
 http://www.acmeshop.com/showshoppingcart.do and return the results to
 http://www.acmeshop.com/showcartcheckout.jsp).
 4) User clicks on make payment. On the shwowcartcheckout.jsp, I 
 need to be
 able to set the form action attribute to call
 https://www.acmeshop.com/makepayment.do (where makepayment.do will 
 redirectto the https://www.acmeshop.com/enterpaymentdetail.jsp). 
 The form action
 attribute on the enterpaymentdetail.jsp will call
 https://www.acmeshop.com/processpayment.do )
 
 What I am trying to find out is how do I set the https:// in the 
 form action
 attribute of showcartcheckout.jsp. The form tag does not have any 
 attributewill will create the https://...  string. Do I have to 
 hard code the form
 action in this page? Or am I total off the track?
 
 Thanks in advance
 
 Rizvan
 
 
 
 --
 To unsubscribe, e-mail:   mailto:struts-user-
 [EMAIL PROTECTED]For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

 ___ 
Consigue tu e-mail gratuito TERRA.COM.CO
 Haz click en http://www1.terra.com.co/correo


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




RE: HTTPS + Struts

2002-04-03 Thread Ditlinger, Steve


Rizvan:

We have written an extension to Struts that does the things you are asking
about.  This extension allows you to specify certain actions to requested
via https.  Our extension to the html:form tag determines whether the
posting action should be requested via http or https.  If it should be
https, the https://and.so.on will be added to the posting URL in the form
tag generated as output.  See http://struts.ditlinger.com for some more info
or feel free to email me with your questions.

Steve

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 12:59 AM
To: [EMAIL PROTECTED]
Subject: HTTPS + Struts




Can you advice on how you manage to redirect the http request from http to
https?

I have following scenario (typical of a shopping site).

1) User search and place item into shopping cart (eg calls
http://www.acmeshop.com/addtoshoppingcart.do)
2) addtoshoppingcart.do do some processing and redirects user back to
shopping search page (eg http://www.acmeshop.com/shoppingsearch.jsp )
3) User clicks on the check out page URL. (eg calls
http://www.acmeshop.com/showshoppingcart.do and return the results to
http://www.acmeshop.com/showcartcheckout.jsp).
4) User clicks on make payment. On the shwowcartcheckout.jsp, I need to be
able to set the form action attribute to call
https://www.acmeshop.com/makepayment.do (where makepayment.do will redirect
to the https://www.acmeshop.com/enterpaymentdetail.jsp). The form action
attribute on the enterpaymentdetail.jsp will call
https://www.acmeshop.com/processpayment.do )

What I am trying to find out is how do I set the https:// in the form action
attribute of showcartcheckout.jsp. The form tag does not have any attribute
will will create the https://...  string. Do I have to hard code the form
action in this page? Or am I total off the track?

Thanks in advance

Rizvan



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




Authentication without JDBC Realms?

2002-04-03 Thread Preston Crawford


Hopefully someone can provide some insight on this. We're developing at my 
company a Struts application and we're trying to implement security. We're 
using iPlanet because it's what we already owned (version 6.0) and we're 
on a limited budget. We don't have money for another server for LDAP, and 
don't believe the existing server could handle both LDAP and the web 
server duties.

With all of that in mind we looked into JDBC Realms. Based on what I'd 
seen in some books an examples, JDBC Realms looked promising. However, 
it now appears, that JDBC Realms are only available in Tomcat currently.

So with that background, I'm wondering how others are implementing 
security if not using JDBC Realms. We'd prefer something like JDBC Realms 
since we're storing users and roles in the database anyway, but it appears 
that isn't available. So right now we're thinking we'll need to devise a 
custom solution. Problem is, since we have actions AND JSP pages we need 
to technically check for access at both a JSP and action servlet level. 
Thoughts on this?

Is it possible to lock down JSPs such that they can't be accessed 
directly, but only as a result of a forward from an action? Or is an 
action implicitly using an HTTP redirect, and thus locking down JSPs would 
be counter-productive?

Any help or advice would be greatly appreciated.

Preston



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




Action Trouble : Servlet Error: Connection reset by peer: socket write error

2002-04-03 Thread Struts Developer

All -

I am getting the log messages attached at the end of this e-mail when my 
action is initally instantiated. Once these messages post everything works 
fine. I am clueless as to what is causing this problem. Any help, 
suggestions, or rude comments welcome!

regards,
mark nichols

Struts version: 1.0
IDE: WebSphere Studio Application Developer 4.0
JSP spec: 1.1
Servlet Spec: 2.2
Favorite Ginger Ale: Vernor's


== START of messages ===
[02.04.03 13:30:36:568 CST] 2c8da636 WebGroup  I SRVE0091I: [Servlet 
LOG]: action:   Creating new Action instance
[02.04.03 13:35:51:121 CST] 2c822636 WebGroup  X Servlet Error: 
Connection reset by peer: socket write error: java.net.SocketException: 
Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:95)
at com.ibm.ws.io.Stream.write(Stream.java:26)
at com.ibm.ws.io.WriteStream.write(WriteStream.java:108)
at com.ibm.ws.http.ResponseStream.writeChunk(ResponseStream.java:303)
at com.ibm.ws.http.ResponseStream.write(ResponseStream.java:143)
at com.ibm.ws.io.WriteStream.flush(WriteStream.java:129)
at 
com.ibm.servlet.engine.http11.HttpConnection.flush(HttpConnection.java:384)
at com.ibm.servlet.engine.srp.SRPConnection.flush(SRPConnection.java:242)
at 
com.ibm.servlet.engine.srt.SRTOutputStream.flush(SRTOutputStream.java:41)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:251)
at 
com.ibm.servlet.engine.srt.BufferedWriter.flushChars(BufferedWriter.java:341)
at com.ibm.servlet.engine.srt.BufferedWriter.flush(BufferedWriter.java:322)
at 
com.ibm.servlet.engine.srt.BufferedWriter.flushBuffer(BufferedWriter.java:445)
at 
com.ibm.servlet.engine.srt.SRTServletResponse.flushBuffer(SRTServletResponse.java:579)
at 
com.ibm.servlet.engine.webapp.HttpServletResponseProxy.flushBuffer(HttpServletResponseProxy.java:116)
at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:235)
at welcomeContent_jsp_1._jspService(welcomeContent.jsp   :22)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:286)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
at 
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
at 
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at 
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at 
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
at 
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
at 
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
at 
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at 
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at 
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at 
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at 
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

[02.04.03 13:36:14:885 CST] 2c822636 WebGroup  I SRVE0091I: [Servlet 
LOG]: Error page exception  The server cannot use the error page specified 
for your application because of the exception printed below.
[02.04.03 13:36:14:955 CST] 2c822636 WebGroup  I SRVE0092I: [Servlet 
LOG]: Error Page Exception: : 
com.ibm.servlet.engine.webapp.WebAppErrorReport: JSPG0113E: JSP file 

Re: alternative jsp compiler?

2002-04-03 Thread Marcelo Vanzin

Robert J. Sanford, Jr. wrote:
 so velocity is using the same idea of a controller servlet with
 a bean of some sort to actually render a page instead of
 generating a new servlet for each displayed page? cool.

Kind of. :-) You're actually just calling a method that'll read a 
template with Velocity's tags, and passing a Context object (this is a 
Velocity object that kinda looks like a Hashtable) from where it'll take 
the beans to make the substitutions in the template.

But, you do not have a new servlet created for it, you're just executing 
a method in a class.

 are there any sort of visual tools for creating the layout of
 a velocity page? 

A Velocity template looks pretty much like plain HTML with some added 
syntax for the commmands and variable names. I don't think there's an 
environment ready for it, but, as it looks just like plain HTML (with 
just some added noise from the commands), Dreamweaver has a chance of 
showing them nicely.

Take a look at its page: http://jakarta.apache.org/velocity

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




RE: alternative jsp compiler?

2002-04-03 Thread Robert J. Sanford, Jr.

thanks!

and you're right about drinking cheap beer as well.

rjsjr

 -Original Message-
 From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 03, 2002 2:12 PM
 To: Struts Users Mailing List
 Subject: Re: alternative jsp compiler?


 Robert J. Sanford, Jr. wrote:
  so velocity is using the same idea of a controller servlet with
  a bean of some sort to actually render a page instead of
  generating a new servlet for each displayed page? cool.

   Kind of. :-) You're actually just calling a method that'll read a
 template with Velocity's tags, and passing a Context object (this is a
 Velocity object that kinda looks like a Hashtable) from where it'll take
 the beans to make the substitutions in the template.

   But, you do not have a new servlet created for it, you're
 just executing
 a method in a class.

  are there any sort of visual tools for creating the layout of
  a velocity page?

   A Velocity template looks pretty much like plain HTML with
 some added
 syntax for the commmands and variable names. I don't think there's an
 environment ready for it, but, as it looks just like plain HTML (with
 just some added noise from the commands), Dreamweaver has a chance of
 showing them nicely.

   Take a look at its page: http://jakarta.apache.org/velocity

 --
 []'s
 Marcelo Vanzin
 Touch Tecnologia
 [EMAIL PROTECTED]
 Life is too short to drink cheap beer


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



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




Re: Security Solution

2002-04-03 Thread Marcelo Vanzin


I have interesting news regarding security X EJBs, at least from the 
WebLogic camp. :-)

Since Tomcat did not propagate the authenticated user (even with 
container manager security), I asked BEA support about this issue and 
got some light from them. :-)

Craig R. McClanahan wrote:
I have heard some speak about ejb as thought they need the container-managed
security. This might be so. I don't know. I am hoping that someone might be
able to provide that functionality.
 
 The EJB layer *absolutely* requires container managed security. 

This is not true, at least speaking from the scenario of a Tomcat (or 
whatever other) client talking remotely to a Weblogic server.

When instantiating the InitialContext, you can put in the environment the 
property Context.SECURITY_CREDENTIALS to be an instance of T3User (the 
Weblogic user implementantion), that has name and a credential object 
(that is treated in the Weblogic security realm, depending on what it is).

So, all you need is a username and a password, regardless of where they 
come from.

-- 
[]'s
Marcelo Vanzin
Touch Tecnologia
[EMAIL PROTECTED]
Life is too short to drink cheap beer


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




Re: Strange error with logic:iterate

2002-04-03 Thread Michael Skariah

Hope this helps.

bean:define id=list name='localForm' property=myList scope=session/
logic:iterate id=myRow name=list
bean:write name=myRow property=myName/
/logic:iterate

Here in this example, 'myList' is a java.util.List kept as a attribute in
the ActionForm.

Cheers!,
-MS.


Abel Muiño Vizcaino [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hello.

   I'm receiving a weird error that I can't understand (I don't know if I'm
blind or if it is a really strange error).

   I have this code on a jsp page included from another one:

   tr valign=top
   th align=right width=50%
   bean:message key=UserProfile.interests/
   /th
   td align=left width=50%
   logic:iterate id=element name=interestsSet
   html:multibox property=interestsbean:write 
name=interest
property=value//html:multibox
   bean:write name=element property=label/br
   /logic:iterate
   /td
   /tr

   Where  interestsSet is a java.util.List of a custom made bean-class  with
getValue() and getLabel() methods, and interests is a property of the action
form that contains this tags.

   The problem I'm having is that the logic:iterate tag throws a lot of
exceptions (i think it's that tag, becouse if I comment out the inner tags
using % /* ... */ % it keeps failing, but if I comment out the whole
iterate block, the page loads without problems.


   Someone can give me a hint?

   Thanks a lot.
 --
 [ *** Non á L.O.U. *** ] [ *** No a la L.O.U. *** ]

 Abel Muiño Vizcaino (Futuro Ingeniero Informático F.I.C, U.D.C.)
 mailto:[EMAIL PROTECTED]   ICQ UIN: 145623385
 http://www.xente.mundo-r.com/abel.muinho/

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



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




Re: authentication and authorization with struts and ldap

2002-04-03 Thread @Basebeans.com

Subject: Re: authentication and authorization with struts and ldap
From: Matt Raible [EMAIL PROTECTED]
 ===
Tomcat works great with it's Realms if that's your appserver.  Most
appservers have this built in.  It's a little learning curve to do
container-managed authentication - but worth it.

Matt

Anthony W. Marino [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 On Tuesday 02 April 2002 11:38 am, Sriram Nookala wrote:
  I'm looking for resources and examples in order to integrate ldap with
  struts for authorization and authentication. thanks,
  sriram

 Check out TagLibs.
 Anthony

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




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




include tag

2002-04-03 Thread Ingo Bruell

Hi,

is there a way to use the jsp include tags ?
i have tried %@ include ... and always an error happens. with
jsp:include ... i always get white pages.

I am using struts 1.0.2 with tomcat 4.0.3 and jdk 1.4.


so long


Ingo Bruell

---
[EMAIL PROTECTED]
[EMAIL PROTECTED]
ICQ# 40377720
OldenburgPGP-Fingerprint: CB01 AE12 B359 87C4 BF1C  953C 8FE7 C648 169E E5FC
Germany  PGP-Public-Key available at pgpkeys.mit.edu



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




RE: include tag

2002-04-03 Thread Dimitar Stavrakov

Try this: 

jsp:include page=includes/logo.jsp flush=true/

It's a working example. 

Regards, 

Dimitar

-Original Message-
From: Ingo Bruell [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 03, 2002 3:42 PM
To: [EMAIL PROTECTED]
Subject: include tag

Hi,

is there a way to use the jsp include tags ?
i have tried %@ include ... and always an error happens. with
jsp:include ... i always get white pages.

I am using struts 1.0.2 with tomcat 4.0.3 and jdk 1.4.


so long


Ingo Bruell

---
[EMAIL PROTECTED]
[EMAIL PROTECTED]
ICQ# 40377720
OldenburgPGP-Fingerprint: CB01 AE12 B359 87C4 BF1C  953C 8FE7 C648 169E
E5FC
Germany  PGP-Public-Key available at pgpkeys.mit.edu



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

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




Re[2]: include tag

2002-04-03 Thread Ingo Bruell

Hi Struts,

DS jsp:include page=includes/logo.jsp flush=true/
DS It's a working example.

if i only include for example a complete table it works. But if i
divide the page into header, menu, main and footer with a table that
starts in header.jsp and ends in footer.jsp i get:

--- snip ---
org.apache.jasper.compiler.ParseException: End of content reached while more parsing 
required: tag nesting error?
at org.apache.jasper.compiler.JspReader.popFile(JspReader.java:293)
at org.apache.jasper.compiler.JspReader.hasMoreInput(JspReader.java:337)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1109)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:892)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
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)
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.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
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.StandardEngineValve.invoke(StandardEngineValve.java:174)
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.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)
--- snap ---


so long


Ingo Bruell

---
[EMAIL PROTECTED]
[EMAIL PROTECTED]
ICQ# 40377720
OldenburgPGP-Fingerprint: CB01 AE12 B359 87C4 BF1C  953C 8FE7 C648 169E E5FC
Germany  PGP-Public-Key available at pgpkeys.mit.edu



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




data connection limit

2002-04-03 Thread Bill Page

I spent awhile this afternoon trying to figure why I was hanging.  Turns out
that I was not closing 1 of several connections on each pass of a certain
page.  when I hit the maxcount, I hung.  I'm running struts as an NT service
but have a window up so I can see debugging I put in with system.out and
exceptions.  I'm not seeing anything here.  Does struts throw an exception?
We use acommon piece of code:
public static Connection getConnection(ActionServlet _servlet, String
_key)
throws SQLException
{
javax.sql.DataSource dataSource;
dataSource = _servlet.findDataSource(_key);
return dataSource.getConnection();
}

in a static utility class.  I've got catches for SQL and Throwable but don't
seem to be catching anything.

bill page
[EMAIL PROTECTED]
Digital Garden Software, Inc.
856 US Hwy 206 Bldg B Ste 15
Hillsborough, NJ 08844
908.904.0664



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




Re: Re[2]: include tag

2002-04-03 Thread David M. Karr

 Ingo == Ingo Bruell [EMAIL PROTECTED] writes:

Ingo Hi Struts,
DS jsp:include page=includes/logo.jsp flush=true/
DS It's a working example.

Ingo if i only include for example a complete table it works. But if i
Ingo divide the page into header, menu, main and footer with a table that
Ingo starts in header.jsp and ends in footer.jsp i get:

Ingo --- snip ---
Ingo org.apache.jasper.compiler.ParseException: End of content reached while more 
parsing required: tag nesting error?

Each of your pages, whether they're included from somewhere else or not, all
have to be well-formed, which among other things, means that a starting tag
has to have an ending tag, in the same file.  This is basically what that error
message is telling you.

You'll need to consider a structure where your table element begins and ends in
the same file, but the pieces of the table are what you include.  In addition,
all of the included pieces also have to be well-formed.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


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




JSP Include and tag lib declarations

2002-04-03 Thread Bryan P. Glennon

I'm seeing some strange (or maybe intended) behavior with taglibs and
included files. Here's what I do:

%@ taglib prefix=bean uri=/WEB-INF/struts-bean.tld %
%@ taglib prefix=html uri=/WEB-INF/struts-html.tld %

Normal JSP/HTML stuff...

html:form  action=/action.do style=margin-botton:0m 

TABLE
jsp:include page=/Common/foo1.jsp/
!-- Page specific rows go here --
/TABLE
HR
TABLE
jsp:include page=/Common/foo2.jsp/
!-- More page specific rows here --
/TABLE

/html:form

More standard jsp/html

(foo1 and foo2 just contain table rows but do use the struts bean tag.)

The problem is with the two include files. In foo1 I can omit the %@
taglib lines and it works fine. If I omit them from foo2, its contents
fail to display. Both foo1 and foo2 are well-formed, consisting only of
matching TR/TR and TD/TD elements. Both use the struts bean tag.

Any info is appreciated.

Cheers,
Bryan

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




usage of html:options

2002-04-03 Thread Slava_L

we have and ActionForm with Collection field (4xmpl list of smthing)
how should i use tag html:options to fill parent tag html:select with values of list 
(from our Collection) 
In uptodate we use this scheme: 
in jsp file we have
html:from  - related with ActionForm in struts-config.xml
bean:define id=locallist porperty formlist
html:select .
html:options collection=locallist ...
.

but how can u do the same thin' w/o bean:define ?

Thnx! 




DynaActionForm / DynaBean

2002-04-03 Thread Phase Web and Multimedia

I have read so much that talks about what the DynaBean DynaActionForm can
accomplish but have been unable to find concrete examples. Does anybody have
any code they could offer up to shed some light on the use.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




RE: Authentication without JDBC Realms?

2002-04-03 Thread Phase Web and Multimedia

Check the archives for the subject line RE:Security Solution.
I have some code that I developed that might give you the flexibility you
want.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Preston Crawford [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 1:03 PM
To: [EMAIL PROTECTED]
Subject: Authentication without JDBC Realms?



Hopefully someone can provide some insight on this. We're developing at my
company a Struts application and we're trying to implement security. We're
using iPlanet because it's what we already owned (version 6.0) and we're
on a limited budget. We don't have money for another server for LDAP, and
don't believe the existing server could handle both LDAP and the web
server duties.

With all of that in mind we looked into JDBC Realms. Based on what I'd
seen in some books an examples, JDBC Realms looked promising. However,
it now appears, that JDBC Realms are only available in Tomcat currently.

So with that background, I'm wondering how others are implementing
security if not using JDBC Realms. We'd prefer something like JDBC Realms
since we're storing users and roles in the database anyway, but it appears
that isn't available. So right now we're thinking we'll need to devise a
custom solution. Problem is, since we have actions AND JSP pages we need
to technically check for access at both a JSP and action servlet level.
Thoughts on this?

Is it possible to lock down JSPs such that they can't be accessed
directly, but only as a result of a forward from an action? Or is an
action implicitly using an HTTP redirect, and thus locking down JSPs would
be counter-productive?

Any help or advice would be greatly appreciated.

Preston



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



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




At wits end, questions JRun, Oracle9ias

2002-04-03 Thread Rick Reumann

Strutsters,

I've been playing around with struts on my local machine here at work
under Tomcat and everything is fine. In another local environment I've
been using JRun for some applications and I'd like to get the sample
app I was working under Tomcat to work under JRun. I'm not having any
luck. I've been searching these archives and whatever I could find but
I'm still stuck.

Here's the deal. I have a really really watered down basic app in a
directory called 'utilities' in the tomcat webapps folder. I now took
this whole directory and copied it into the default path for where I
have other JRun apps. ( I configured JRun to point to this new
application and even configured the servlet mapping). If I try to go
right to the page 'payrollChangeForm.jsp' I get an error that others
have gotten (not necessarily with JRun):

Exception thrown processing JSP page.
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans 
collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:781)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481
{cut}...

Now, I'm not sure what cause this error since the same files are
working fine under Tomcat. Another thing messed up which might help
some of you debug is I also have an index page with a simple link on
it that calls the action :
action path=/payrollChanges
forward=/formsStruts/test.jsp
/action

When this link is hit, I get a nice 500 Internal Error page with:

null
java.lang.NoSuchMethodError
at org.apache.commons.digester.Digester.parse(Digester.java:859)
at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1274)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:461)


What else do I need to get this running successfully under JRun? The
installation instructions with Struts mention the taglib issues but I
don't think this is really related to that. Couple comments: JRun is
pointing to the directory for this application on another network
directory. This means my local classpath that points to some XML xerces
stuff I have on my local classpath won't be valid so I put the
following files in my applications lib directory xmlParserAPIs.jar and
xercesImpl.jar. Somehow I think this is a parser issue or something because if I
remove this file and then click on the link I'll get:

org/xml/sax/helpers/DefaultHandler
java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
at java.lang.ClassLoader.defineClass0(Native Method)


I'm just guessing here but if the parsing isn't taking place correctly
that might explain the first problem of when I try to go straight to
the form.jsp page and get the Cannot find ActionMappings or
ActionFormBean collections' error, since maybe it can't parse the
struts-config.xml?

Any ideas what is wrong? I'm also concerned because I want to push for
using struts here at work but I know they'll have issues if it's going
to be hard to configure it to get it to work under Oracle9ias as well.
Are struts apps easy to configure under Oracle9ias as well? I didn't
think I'd have this problem with JRun so once I tackle that hurdle I
hope tackling the next one won't be as bad.

Thanks for any help.

-- 

Rick
mailto:[EMAIL PROTECTED]

One thing kids like is to be tricked. For instance, I was going to
take my little nephew to Disneyland, but instead I drove him to an old
burned-out warehouse. 'Oh, no,' I said. 'Disneyland burned down.' He
cried and cried, but I think that deep down, he thought it was a
pretty good joke. I started to drive over to the real Disneyland, but
it was getting pretty late. 
  -Jack Handey


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




Where can I do some application initialize work?

2002-04-03 Thread Annie Zhang

HI,

I'm using struts  torque together. I put some initialize code in one of my class as a 
static code. But these code is not executed until class DataModel is lodaded. So, if I 
call any function of Torque, it will report that Torque is not initialized. 

Where can I put some global initialize code for the application ? Thanks.

Annie 

public class DataModel {

  static {
  try{
  Torque.init(piso.properties);
  }
  catch (Exception e)
  {
  e.printStackTrace();
  }
  }





Problem with logic:equal tag

2002-04-03 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B

I have some code in a jsp page

logic:equal name=pageBean property=picExists value=false/
logic:equal tag returned true
/logic:equal

logic:notEqual name=pageBean property=picExists value=false/
logic:notEqual tag returned true
/logic:notEqual

When I access this page, I get the following

logic:equal tag returned true
logic:notEqual tag returned true



Am I missing the point about the logic:equal and logic:notEqual tags, or
is there a reason this might be happening?
How can I make it print out only if value=false ?



Regards

Antony





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re[2]: Struts Basic/Pooling DataSource Vs Poolman

2002-04-03 Thread Rick Reumann

On Tuesday, April 2, 2002, 7:42:27 PM, someone wrote:

 How is Poolman better than the database connection manager
 included with struts? Speed? Reliablity?

  I'm curious about this also. Also, where can I get Poolman and
  documentation if the site is down  I'm looking for fairly robust
  connection pooling, it doesn't have to be super industrial strength
  though, so maybe the one with struts will be fine?
  
--

Rick

mailto:[EMAIL PROTECTED]


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




Re: DynaActionForm / DynaBean

2002-04-03 Thread Chuck Cavaness

I doubt this will be enough, but I'll offer it up to get you started. 
Suppose I have the following form-bean:

form-beans
   form-bean
   name=itemDetailForm
   dynamic=true
   type=org.apache.struts.action.DynaActionForm
 form-property name=view 
type=com.oreilly.struts.catalog.view.ItemView/
   /form-bean
...
/form-beans

I have specified that the form will hold an object of type 
com.oreilly.struts.catalog.view.ItemView, using a name of view.

Further supposed that I have a GetItemDetailAction that has this execute 
method:

  ...
  public ActionForward executeAction(ActionMapping  mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response,
  UserContainer  userContainer) throws 
BaseException {
 String itemId = request.getParameter( IConstants.ID_KEY );
 ICatalogController catalogController = 
userContainer.getCatalogController();

 // Get a value object representing the item from the business tier
 ItemView itemView = catalogController.getItemView(itemId);

 // Set the ItemView into the Dynamic Action Form
 ((DynaActionForm)form).set(view, itemView);

 // The parameter name 'view' is what is defined in the Dynamic form
 // in struts-config. Maybe should use a constant there too?

 // Return to the success resource for this action
 return mapping.findForward(IConstants.SUCCESS_KEY);
}

Now, in the JSP page that the user is forwarded to, they can use all of the 
Struts tags to get at the ItemView data inside of the dynamic form. I won't 
show the JSP page, it's too long. Here's a couple of lines from it:

 bean:write name=itemDetailForm property=view.name/

 html:link
 page=/action/cart?method=addItem
 paramId=id
 paramName=itemDetailForm
 paramProperty=view.id
 paramId=id
 paramScope=request

Notice that view.name would be translated into getView().getName() like a 
standard ActionForm.

I hope this helps somewhat.

Chuck



At 06:06 PM 4/3/2002 -0700, you wrote:
I have read so much that talks about what the DynaBean DynaActionForm can
accomplish but have been unable to find concrete examples. Does anybody have
any code they could offer up to shed some light on the use.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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


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




Re: DynaActionForm / DynaBean

2002-04-03 Thread Chuck Cavaness

I doubt this will be enough, but I'll offer it up to get you started. 
Suppose I have the following form-bean:

form-beans
   form-bean
   name=itemDetailForm
   dynamic=true
   type=org.apache.struts.action.DynaActionForm
 form-property name=view 
type=com.oreilly.struts.catalog.view.ItemView/
   /form-bean
...
/form-beans

I have specified that the form will hold an object of type 
com.oreilly.struts.catalog.view.ItemView, using a name of view.

Further supposed that I have a GetItemDetailAction that has this execute 
method:

  ...
  public ActionForward executeAction(ActionMapping  mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response,
  UserContainer  userContainer) throws 
BaseException {
 String itemId = request.getParameter( IConstants.ID_KEY );
 ICatalogController catalogController = 
userContainer.getCatalogController();

 // Get a value object representing the item from the business tier
 ItemView itemView = catalogController.getItemView(itemId);

 // Set the ItemView into the Dynamic Action Form
 ((DynaActionForm)form).set(view, itemView);

 // The parameter name 'view' is what is defined in the Dynamic form
 // in struts-config. Maybe should use a constant there too?

 // Return to the success resource for this action
 return mapping.findForward(IConstants.SUCCESS_KEY);
}

Now, in the JSP page that the user is forwarded to, they can use all of the 
Struts tags to get at the ItemView data inside of the dynamic form. I won't 
show the JSP page, it's too long. Here's a couple of lines from it:

 bean:write name=itemDetailForm property=view.name/

 html:link
 page=/action/cart?method=addItem
 paramId=id
 paramName=itemDetailForm
 paramProperty=view.id
 paramId=id
 paramScope=request

Notice that view.name would be translated into getView().getName() like a 
standard ActionForm.

I hope this helps somewhat.

Chuck



At 06:06 PM 4/3/2002 -0700, you wrote:
I have read so much that talks about what the DynaBean DynaActionForm can
accomplish but have been unable to find concrete examples. Does anybody have
any code they could offer up to shed some light on the use.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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


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




DynaActionForm Examples

2002-04-03 Thread Phase Web and Multimedia

Are there any good examples of the DynaActionForm? I looked at the
struts-example login. I am not sure I see the advantage over creating an
ActionForm class apart from a little time savings. I thought the
DynaActionForm could be extended like the regular ActionForm so that I can
mix get/set methods (hard coded) with dynamic properties, that are
configured in the struts-config, then gathered and placed into a scope for
use in the view. Am I off base? Someone has to have some real code out
there. An official explanation of the DynaAction stuff would be nice. I know
developers are swamped. But, if someones using it... post your code or let
us know what you are doin with it.

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




Re: Problem with logic:equal tag

2002-04-03 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B

Found it!!!

I have a / at the end of

logic:equal name=pageBean property=picExists value=false/


 I have some code in a jsp page
 
 logic:equal name=pageBean property=picExists value=false/
 logic:equal tag returned true
 /logic:equal
 
 logic:notEqual name=pageBean property=picExists value=false/
 logic:notEqual tag returned true
 /logic:notEqual
 

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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