Where Do I Create Session, Set Attributes in Struts?

2003-10-17 Thread Caroline Jen
I use container-managed form-based authentication to
verify users (it works well).  

Now, I want to create a session and set user's name
after users successfully log in:

HttpSession session = request.getSession( true );
if ( session.isNew() ) 
{
   student.setName(request.getParameter(username));
   session.setAttribute(student, student);
   Student stud =
(Student)session.getAttribute(student);
}

First of all, in the context of container managed
authentication, can I write:
 
   student.setName(request.getParameter(username));

Second, what is the proper place to insert the
aforementioned codes.  

The container intercepts and takes care of the
authentication when

 forward
name=logon
redirect=true
path=/do/Menu/

and the action controller is in the scaffold folder:

action
path=/Menu
name=menuForm
   
type=org.apache.struts.scaffold.ExistsAttributeAction
parameter=application;HOURS
forward
name=success
path=.article.Menu/
forward
name=failure
path=/do/MenuCreate/
/action

where .article.Menu is a tile.
 

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: SSLExt and Struts Workflow?

2003-10-17 Thread Matthias Bauer
Tim,

what you are saying seems pretty reasonable. Even though not having 
looked at SSLExt, I don't expect any more collisions than the action 
mapping type and the request processor. When saying that, I am assuming 
that SSLExt correctly copes with session tracking when switching back 
and forth between SSL actions  and non-SSL actions. This is necessary, 
because the workflow state data is kept in the user's session.

If you have any questions or need some support when implementing the 
integration, feel free to come back to me.

--- Matthias

Tim Shadel wrote:

I know this thread is a couple weeks old, but I just started looking 
into this myself.

Actually, I don't think that they are currently compatible, but not 
because of the RequestProcessor.  Matthias has made it easier to write 
a RequestProcessor that includes others, so that should be possible 
(though I haven't done it).  The problem seems to be that they each 
require a custom ActionMappings class:

action-mappings type=org.apache.struts.config.SecureActionConfig

action-mappings type=com.livinglogic.struts.workflow.WorkflowMapping

I assume that you can't use both.  After looking at the code, it 
appears that it may not be hard to change SSLExt to expect an 
Interface instead of a class in most areas that the SecureActionConfig 
is really needed for the config.getSecure() call (WorkflowMapping 
seems to hold more than simple get/set methods).  It seems that the 
changes to SecureActionConfig are most in the checkSsl() and 
computerUrl() methods.  I may be missing something, but it doesn't 
seem like much would break.

Eclpse's Extract Interface... refactoring can't do it automatically, 
but gives a quick glance at the areas most affected.  If the SslExt 
code could use an interface, then it would be possible to extend the 
WorkflowMapping, add the needed methods, use the new class in the 
action-mapping and then use both SslExt and Struts Workflow together.

Steve and Matthias, do you see any glitches with this approach?  If 
not, I may try to start working at it (isn't that the general rule - 
don't propose something unless you want to volunteer to help? :-D).

Thanks for your great extentions to Struts!

Tim

Matthias Bauer wrote:

If you still want to use the sslext RequestProcessor you should be 
easily able to do that: It is fairly trivial to build an 
SSLExtWorkflowRequestProcessor in just the same way as the 
TilesWorkflowRequestProcesser is built, which is included in the 
Struts Workflow Extension. This is because all the workflow logic is 
extracted into a separate class WorkflowRequestProcessorLogic. If you 
are interested, have a look at the classes WorkflowRequestProcessor, 
TilesWorkflowRequestProcessor, WorkflowRequestProcessorLogic and 
WorkflowRequestProcessorLogicAdapter.

--- Matthias

Steve Ditlinger wrote:

I'll admit to not having used Struts Workflow.  But I don't know of any
reason why sslext should not work, as long as actions are defined in a
struts config file like other struts apps.
If Struts Workflow uses its own RequestProcessor, you would not be 
able to
use the sslext RequestProcessor (without creating your own custom
RequestProcessor).  However, that is OK.  You can use the sslext Plugin
without the sslext RequestProcessor.   Assuming the use of the 
sslext tags,
the sslext RequestProcessor is really only needed as a failsafe for
redirecting to the correct protocol if a URL is improperly 
hand-entered.

HTH,
Steve
- Original Message - From: Mick Knutson 
[EMAIL PROTECTED]
To: struts [EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 2:54 PM
Subject: SSLExt and Struts Workflow?

 

Does SSLExt and Struts Workflow work together?

---
Thanks
Mick Knutson
http://www.baselogic.com
---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  




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



/div





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


Re: [newbie] how does fmt:setBundle work?

2003-10-17 Thread Christian Martin
thanks!!!

sometimes you are not able to see the obvious (code blindness)
that problem took me nearly 2 hours
---
so much to learn so less time
Kris Schneider wrote:

code
 fmt:setBundle basename=ApplicationResources var=ares /
 fmt:message bundle=${ares} key=message.example.simple /
/code
Quoting Christian Martin [EMAIL PROTECTED]:

 

sorry i did a mistake in my code snipplet but it does not work either.

the corrected version:

the code snippet below works fine and i can see the message for the key 
message.example.simple from my ResourceBundle
code
fmt:bundle basename=ApplicationResources
  fmt:message key=message.example.simple /
/fmt:bundle
/code

but if i use the setBundle tag
code
fmt:setBundle basename=ApplicationResources var=ares /
fmt:message bundle=ares key=message.example.simple /
/code
following error occurs
error
An error occurred while evaluating custom action attribute bundle 
with value ares: Attempt to convert String ares to type 
javax.servlet.jsp.jstl.fmt.LocalizationContext, but there is no 
PropertyEditor for that type (null)
/error

thanks in advance

student from austria
(working on an struts project during internship)
-
sorry for my english but i am working hard to improve my english knowledge
Christian Martin wrote:

   

the code snippet below works fine and i can see the message for the 
key message.example.simple from my ResourceBundle
code
fmt:bundle basename=ApplicationResources
  fmt:message key=message.example.simple /
/fmt:bundle
/code

but if i use the setBundle tag
code
fmt:setBundle basename=${ApplicationResources} var=ares /
fmt:message bundle=ares key=message.example.simple /
/code
following error occurs
error
An error occurred while evaluating custom action attribute bundle 
with value ares: Attempt to convert String ares to type 
javax.servlet.jsp.jstl.fmt.LocalizationContext, but there is no 
PropertyEditor for that type (null)
/error

-
sorry for my english but i am working hard to improve my egnlish 
knowledge
 

 



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


struts-el and messages

2003-10-17 Thread Chris Searle

OK,

Had the problem with using the html:messages with struts-el from the
1.1RC1 build (NullPointerException) - so I've just upgraded to 1.1
(thought I'd already done so).

Now - I get no exception - but I get no message either.

The servlet code:


ActionErrors errors = new ActionErrors();

errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError(message.login.failed));

saveErrors(request, errors);

forward=mapping.findForward(loginfailed);

And in the jsp (note - this is using tiles - so the rest of the
tags (html etc) are not in this file:

%@ taglib uri=/struts-html-el.tld prefix=html%
%@ taglib uri=/struts-logic-el.tld prefix=logic%
%@ taglib uri=/c.tld prefix=c%

logic:messagesPresent
  html:messages id=error
p class=errorc:out value=${error}//p
  /html:messages
/logic:messagesPresent


I am getting sent to the loginfailed mapping - but the message is not
displayed - no p class=error tags in the HTML at all.

It must be something stupid on my part - this looks to me to be the
same as examples out on the net and in the docs.

Any hints welcome :-)

-- 
Chris Searle
[EMAIL PROTECTED]


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



RE: ArrayIndexOutOfBoundsException after resubmitting form

2003-10-17 Thread shirishchandra.sakhare
May be in the reset you have emptied the list..

Have a look at ListUtils.lazyList..That may solve your problem...

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 5:57 PM
To: [EMAIL PROTECTED]
Subject: ArrayIndexOutOfBoundsException after resubmitting form


Hi all,

I've searched the archive, but haven't found an occurrence of the exact
same problem I am encountering.

Here is a description of the problem:

My intention is to use transactional tokens to prevent duplicate posting of
a form where a user deletes a row in a list of search results. After the
delete is successful, I use the browser's back button to return to the list
of search results and attempt to submit the request to delete the same row
again. At this point, an ArrayIndexOutOfBoundsException is thrown (the
exception stack trace is provided below). After examining the debug log
statements, it appears that the logic to validate the transactional token
in the action has not yet been reached. The debug log statements indicate
that the form's reset method is invoked and the getter for the list is
called, but that is where it fails. The Struts logic is attempting to go
past the last valid index in the list and I have not found a way to catch
this nor prevent it.

If anyone has any ideas, it would be much appreciated.

Thanks in advance,

Christina



   
 
   Here is the Exception Stack Trace:  
 

com.ibm.servlet.engine.webapp.WebAppErrorReport

   
com.ibm.servlet.engine.webapp.WebAppErrorReport: BeanUtils.populate
  
at 
com.ibm.servlet.engine.webapp.WebApp.sendError(WebApp.java:597)
  
at 
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:188) 
  
at 
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)  
  
at 
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)

at 
 
   
com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
 
at 
 
   
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:154)
   
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:323)   
  
at 
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
  
at 
com.ibm.ws.util.CachedThread.run(ThreadPool.java:137)  
  
javax.servlet.ServletException
 
   javax.servlet.ServletException: 
BeanUtils.populate   
at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)   
  
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)   
  
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)   
  
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
  
at 
ca.toyota.core.controller.ControllerServlet.process(ControllerServlet.java:600)
   

Re: ArrayIndexOutOfBoundsException after resubmitting form

2003-10-17 Thread Raphaël di Cicco
Here's one thing I do to avoid resubmitting.
I put a flag on the user's session to tell whether or not he already has
done the transaction :
On preparing the form put the flag to true. When submitting, verify that
the flag is at true, if so then do the update in the database and put the
flag to false. The form won't be submitted again unless the user decides to
go to the form page again.
For the flag name I usually use the Action instance name, so when i'm in the
Action class I do session.setAttribute(this, true);

Raphaël
- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 9:31 AM
Subject: RE: ArrayIndexOutOfBoundsException after resubmitting form


 May be in the reset you have emptied the list..

 Have a look at ListUtils.lazyList..That may solve your problem...

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 16, 2003 5:57 PM
 To: [EMAIL PROTECTED]
 Subject: ArrayIndexOutOfBoundsException after resubmitting form


 Hi all,

 I've searched the archive, but haven't found an occurrence of the exact
 same problem I am encountering.

 Here is a description of the problem:

 My intention is to use transactional tokens to prevent duplicate posting
of
 a form where a user deletes a row in a list of search results. After the
 delete is successful, I use the browser's back button to return to the
list
 of search results and attempt to submit the request to delete the same row
 again. At this point, an ArrayIndexOutOfBoundsException is thrown (the
 exception stack trace is provided below). After examining the debug log
 statements, it appears that the logic to validate the transactional token
 in the action has not yet been reached. The debug log statements indicate
 that the form's reset method is invoked and the getter for the list is
 called, but that is where it fails. The Struts logic is attempting to go
 past the last valid index in the list and I have not found a way to catch
 this nor prevent it.

 If anyone has any ideas, it would be much appreciated.

 Thanks in advance,

 Christina




Here is the Exception Stack Trace:

com.ibm.servlet.engine.webapp.WebAppErrorReport

com.ibm.servlet.engine.webapp.WebAppErrorReport: BeanUtils.populate
 at
com.ibm.servlet.engine.webapp.WebApp.sendError(WebApp.java:597)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:188)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:239)
 at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
 at

com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl
eInvocationContext.java:106)
 at

com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:154)
 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:137)

javax.servlet.ServletException
javax.servlet.ServletException:
BeanUtils.populate
 at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
 at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:821)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at
ca.toyota.core.controller.ControllerServlet.process(ControllerServlet.java:6
00)
 at
org.apache.struts.action.ActionServlet.$BIP$doPost(ActionServlet.java:525)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

Re: Help setting up sslext

2003-10-17 Thread Adam Hardy
On 10/16/2003 05:13 PM Brian McSweeney wrote:
a) Change the action-mappings in the struts-config.xml file
action-mappings type=org.apache.struts.config.SecureActionConfig
b) Change the web.xml file as follows:

servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
!-- Struts Config --
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namemapping/param-name
 
param-valueorg.apache.struts.action.SecureActionMapping/param-value
/init-param

could someone tell me if either of these steps are necessary, or what
else is necessary?
Hi Brian,
your (a) is definitely necessary to enable this:
actionpath=/staticjavascriptssl
forward=/WEB-INF/general/staticjavascript.jsp
  set-property property=secure value=true/
/action
I have not used, or heard of before, your (b). Perhaps it has the same 
effect as (a).

So what's not working?

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


validation

2003-10-17 Thread [EMAIL PROTECTED]
Question: Is there an easy way to create a dummy field for 'retype pasword' ? And is 
it possible to validate this retype 'password field' with the validator plugin ? If so 
how ?
Thanks !



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



Re: struts-el and messages

2003-10-17 Thread Chris Searle
 Chris == Chris Searle [EMAIL PROTECTED] writes:

 Had the problem with using the html:messages with struts-el
 from the 1.1RC1 build (NullPointerException) - so I've just
 upgraded to 1.1 (thought I'd already done so).

 Now - I get no exception - but I get no message either.

Got it. The forward was set redirect=true so of course the messages
disappeared.

However - we do have a couple of (odd) places where a redirect is
desired but keeping the messages - is this possible? Can they be
propagated over a redirect by use of session or similar?

-- 
Chris Searle
[EMAIL PROTECTED]


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



Re: i18n - Chinese charactor problem

2003-10-17 Thread Adam Hardy
UTF-8

On 10/16/2003 07:25 PM ZYD wrote:
Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help.

I have another problem, hope can get some advice from you:

I used the following url to connect to MySQL:
mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312
use GB2312 in this string is not a good idea I think. 

Then what should the characterEncoding be?

-bruce

- Original Message - 
From: Jason Lea [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 11:34 AM
Subject: Re: i18n - Chinese charactor problem



If you are using UTF-8 everywhere it should work - I use it for english 
 Japanese and it works.
You mentioned in another message you had this:

filter-classSetCharacterEncodingFilter/filter-class
init-param
param-nameencoding/param-name
param-valueGB2312/param-value
Are you still using that?  or UTF-8?
Everything has to match.
ZYD wrote:


Hi Jason,

Thank you for your response.

I did exactly the same thing as the article said, but still, not working properly.

Chinese can be displayed, but not in the text box.  

If I change %@ page contentType=text/html; charset=UTF-8 % to
%@ page contentType=text/html; charset=GBK % 
then the Chinese charactors are handled properly.

Why is that?

- Original Message - 
From: Jason Lea [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 5:51 AM
Subject: Re: i18n - Chinese charactor problem





Here is a link that explains what is needed and a filter to do it...

http://www.anassina.com/struts/i18n/i18n.html

Greg Reddin wrote:

  


I don't remember the exact code, but a looong time ago we had to write 
a Filter that created a request wrapper that properly set the 
character encoding on request parameters.  Maybe googling that would 
turn up something.

Greg

ZYD wrote:




Hi,
I have a problem in getting the Chinese charactors from html:text,
The following is my jsp file:
%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
html:html
html:form action=/submit focus=email
head/head
body
html:text property=email/
html:submitbean:message key=button.logon//html:submit
/body
/html:form
/html:html
-
I have two property files, one is for englisn, the other is for 
chinese. Both english and chinese can be displayed properly on the 
page, except in the text box.

When I input chinese charactors in the text box and submit, I cannot 
get the chinese charactor in the form bean correctly. The chinese 
charactors become some unreadable charactors like .

There are no special process in the getEmail and setEmail method in 
the form bean.

Does anybody have similar problem? I need your advice.
Any response is appreciated.


--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: struts-el and messages

2003-10-17 Thread Steve Raeburn
The nightly build has a method that allows you to store messages in the
session.
They are automatically removed after being displayed.

Action:
protected void saveMessages(HttpSession session, ActionMessages
messages)

Steve

 -Original Message-
 From: Chris Searle [mailto:[EMAIL PROTECTED]
 Sent: October 17, 2003 1:44 AM
 To: [EMAIL PROTECTED]
 Subject: Re: struts-el and messages


  Chris == Chris Searle [EMAIL PROTECTED] writes:

  Had the problem with using the html:messages with struts-el
  from the 1.1RC1 build (NullPointerException) - so I've just
  upgraded to 1.1 (thought I'd already done so).

  Now - I get no exception - but I get no message either.

 Got it. The forward was set redirect=true so of course the messages
 disappeared.

 However - we do have a couple of (odd) places where a redirect is
 desired but keeping the messages - is this possible? Can they be
 propagated over a redirect by use of session or similar?

 --
 Chris Searle
 [EMAIL PROTECTED]


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






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



Re: struts-el and messages

2003-10-17 Thread Adam Hardy
Chris,
This works for me:
c:set var=GLOBAL_ERROR
  %=org.apache.struts.action.ActionErrors.GLOBAL_ERROR %
/c:set
html:messages id=errorMsgs
  message=true
 property=${GLOBAL_ERROR}
   header=errors.header
   footer=errors.footer
  c:out value=${errorMsgs} default=tag-error
 escapeXml=false/
/html:messages
I think by default your messages tag is not showing errors. That's what 
the 'property' attribute is for.

Also, although I've forgotten the details - I think that message=true 
means that it will pick up the ActionMessages object from the request 
using a particular key, but you may have to set it to false or use 
another attribute - because you save your object back to the request 
differently from me. This is what I do in my action:

// Save messages back to request  session (in case of redirects)
request.setAttribute(Globals.MESSAGE_KEY, messages);
Check out the taglib API.

Adam

On 10/17/2003 09:17 AM Chris Searle wrote:
OK,

Had the problem with using the html:messages with struts-el from the
1.1RC1 build (NullPointerException) - so I've just upgraded to 1.1
(thought I'd already done so).
Now - I get no exception - but I get no message either.

The servlet code:

ActionErrors errors = new ActionErrors();

errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError(message.login.failed));
saveErrors(request, errors);

forward=mapping.findForward(loginfailed);

And in the jsp (note - this is using tiles - so the rest of the
tags (html etc) are not in this file:
%@ taglib uri=/struts-html-el.tld prefix=html%
%@ taglib uri=/struts-logic-el.tld prefix=logic%
%@ taglib uri=/c.tld prefix=c%
logic:messagesPresent
  html:messages id=error
p class=errorc:out value=${error}//p
  /html:messages
/logic:messagesPresent
I am getting sent to the loginfailed mapping - but the message is not
displayed - no p class=error tags in the HTML at all.
It must be something stupid on my part - this looks to me to be the
same as examples out on the net and in the docs.
Any hints welcome :-)

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: struts-el and messages

2003-10-17 Thread Adam Hardy
On 10/17/2003 10:43 AM Chris Searle wrote:
Chris == Chris Searle [EMAIL PROTECTED] writes:


 Had the problem with using the html:messages with struts-el
 from the 1.1RC1 build (NullPointerException) - so I've just
 upgraded to 1.1 (thought I'd already done so).
 Now - I get no exception - but I get no message either.

Got it. The forward was set redirect=true so of course the messages
disappeared.
However - we do have a couple of (odd) places where a redirect is
desired but keeping the messages - is this possible? Can they be
propagated over a redirect by use of session or similar?
Perfect timing! Oh well.

I put my messages object in the session and then in every action, I 
check the session for it and if it's there, put it back in the request.

I found it's only safe to delete the messages from the session 
immediately after the tag where you display them in the JSP.

Hope this is more relevant than my last post. :)

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validation

2003-10-17 Thread Adam Hardy
On 10/17/2003 10:12 AM [EMAIL PROTECTED] wrote:
Question: Is there an easy way to create a dummy field for 'retype pasword' ? And is 
it possible to validate this retype 'password field' with the validator plugin ? If so 
how ?
Thanks !
Yes it's easy. Just duplicate the code for the password field, but 
rename it retypePassword.

You can validate it using the 'twofields' validator, but that is not in 
the struts 1.1 release. Check the archives for links to pages with 
instructions for installing it, or check the validator nightly builds, 
it might be in there. (I'm not sure).

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validation

2003-10-17 Thread struts
duplication and rename it is not working because then I need to create
getter and setter methods. It should be a dummy field and the validator does
the work...
Idea ?

- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 11:10 AM
Subject: Re: validation


 On 10/17/2003 10:12 AM [EMAIL PROTECTED] wrote:
  Question: Is there an easy way to create a dummy field for 'retype
pasword' ? And is it possible to validate this retype 'password field' with
the validator plugin ? If so how ?
  Thanks !

 Yes it's easy. Just duplicate the code for the password field, but
 rename it retypePassword.

 You can validate it using the 'twofields' validator, but that is not in
 the struts 1.1 release. Check the archives for links to pages with
 instructions for installing it, or check the validator nightly builds,
 it might be in there. (I'm not sure).

 Adam

 -- 
 struts 1.1 + tomcat 5.0.12 + java 1.4.2
 Linux 2.4.20 RH9


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






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



Re: validation

2003-10-17 Thread Adam Hardy
That's what you should do. I suggest it's easier adding the getters and 
setters than any other solution. Under normal circumstances the 
form-bean won't cause any disadvantages just because of the extra 
properties.

On 10/17/2003 11:47 AM struts wrote:
duplication and rename it is not working because then I need to create
getter and setter methods. It should be a dummy field and the validator does
the work...
Idea ?
- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 11:10 AM
Subject: Re: validation



On 10/17/2003 10:12 AM [EMAIL PROTECTED] wrote:

Question: Is there an easy way to create a dummy field for 'retype
pasword' ? And is it possible to validate this retype 'password field' with
the validator plugin ? If so how ?
Thanks !
Yes it's easy. Just duplicate the code for the password field, but
rename it retypePassword.
You can validate it using the 'twofields' validator, but that is not in
the struts 1.1 release. Check the archives for links to pages with
instructions for installing it, or check the validator nightly builds,
it might be in there. (I'm not sure).


--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[newbie] JSTL using different ResourceBundles

2003-10-17 Thread Christian Martin
i searched the archive and found a solution to set a LocalizationContext 
in back-end java code.
therefore i don't have to set the bundle in the JSP.
code
 ResourceBundle bundle = 
ResourceBundle.getBundle(ApplicationResources, locale);
 LocalizationContext ctx = new LocalizationContext(bundle);
 Config.set(session, Config.FMT_LOCALIZATION_CONTEXT, ctx);
/code

..following code snippet is not necessary any more
code
 fmt:setBundle basename=ApplicationResources var=ares /
/code
so far this works fine.

BUT what do i have to do to set more than one bundle in back-end java code

i did the following (newbie) trial

code
 message-resources parameter=countries /
 message-resources parameter=states /
/code
.in struts-config.xml
then i want to print out messsages in the jsp.

code
 fmt:message bundle=${countries} key=message.test
 fmt:message bundle=${states} key=message.test
/code
what is the correct value for parameter bundle?

but as i expected JSTL can't find the messages. ???message.test??? 
appears in the browser.

thanks in advance

-
please be patient with the newby
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Logic Iterate

2003-10-17 Thread Thakur, Vikram


Hi ,
Can anyone help me with this iterate Tag ?

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate

the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.

Thanks,
Vikram 



This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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



RE: Logic Iterate

2003-10-17 Thread Ramesh Kannery
logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

try this

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:57 PM
To: Struts (E-mail)
Subject: Logic Iterate




Hi ,
Can anyone help me with this iterate Tag ?

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate

the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.

Thanks,
Vikram 



This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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


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



RE: Logic Iterate

2003-10-17 Thread Thakur, Vikram
No, It does not work.
It says ,  Cannot find bean managers in any scope.

Thanks anywayz.


-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:55 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate


logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

try this

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:57 PM
To: Struts (E-mail)
Subject: Logic Iterate




Hi ,
Can anyone help me with this iterate Tag ?

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate

the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.

Thanks,
Vikram 



This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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


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


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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



RE: Logic Iterate

2003-10-17 Thread Ramesh Kannery
may be ur collection may be empty or null
check ur collection object whether its contains anything??

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:09 PM
To: 'Struts Users Mailing List'
Subject: RE: Logic Iterate


No, It does not work.
It says ,  Cannot find bean managers in any scope.

Thanks anywayz.


-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:55 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate


logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

try this

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:57 PM
To: Struts (E-mail)
Subject: Logic Iterate




Hi ,
Can anyone help me with this iterate Tag ?

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate

the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.

Thanks,
Vikram 



This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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


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


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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


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



Re: struts-el and messages

2003-10-17 Thread Chris Searle
 Steve == Steve Raeburn [EMAIL PROTECTED] writes:

 The nightly build has a method that allows you to store
 messages in the session.  They are automatically removed
 after being displayed.

 Action: protected void saveMessages(HttpSession session,
 ActionMessages messages)

Looks interesting (thinking about it - yes - we only need messages and
not errors after a redirect).

Just downloaded the nightly and installed it.

ActionMessages messages = new ActionMessages();

messages.add(ActionMessages.GLOBAL_MESSAGE,
 new ActionMessage(message.login.succeeded));

saveMessages(session, messages);

Compiles and runs OK.

And the message code JSP:

logic:messagesPresent message=true
  html:messages id=message message=true
p class=messagec:out value=${messsge}//p
  /html:messages
/logic:messagesPresent


Nothing displays.

Does this have to change to use the session messges object? 


So - summary:

1) Errors are working (request scope)

2) Messages are not working (session scope)

with the nightly dated 16.10.2003.

-- 
Chris Searle
[EMAIL PROTECTED]


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



RE: Logic Iterate

2003-10-17 Thread Khalid Umar

If it is collection of Strings only then you can write the collection on
page using
bean:write name=managers/ itself. 
There is No need to provide property attribute. property attribute is
required if you have collection of objects.

Check the name of Formbean name=NewCategoryConfirm. 
Should be from struts-config.xml file.

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 4:07 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate

may be ur collection may be empty or null
check ur collection object whether its contains anything??

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:09 PM
To: 'Struts Users Mailing List'
Subject: RE: Logic Iterate


No, It does not work.
It says ,  Cannot find bean managers in any scope.

Thanks anywayz.


-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:55 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate


logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

try this

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:57 PM
To: Struts (E-mail)
Subject: Logic Iterate




Hi ,
Can anyone help me with this iterate Tag ?

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate

the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.

Thanks,
Vikram 



This message contains information that may be privileged or confidential
and
is the property of the Cap Gemini Ernst  Young Group. It is intended
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy,
disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies
of this message.

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


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


This message contains information that may be privileged or confidential
and
is the property of the Cap Gemini Ernst  Young Group. It is intended
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy,
disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies
of this message.

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


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


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***

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



Re: Logic Iterate

2003-10-17 Thread Mark Lowe
The id is the name of whatever you want to call each object thats being 
spat out during the iteration.

Have a play with this in a jsp page to get used to the tags. And then 
you can move the scriptlet out when your a bit more familiar with stuff.

%
java.util.Map mapOne = new java.util.HashMap();
mapOne.put(fieldOne,valueOne );
mapOne.put(fieldTwo,valueTwo );
java.util.Map mapTwo = new java.util.HashMap();

mapTwo.put(fieldOne,valueOne );
mapTwo.put(fieldTwo,valueTwo );
java.util.ArrayList list = new java.util.ArrayList();

list.add(mapOne);
list.add(mapTwo);
request.setAttribute(mylist,list.toArray());

%

pre
logic:iterate id=item name=mylist
bean:write name=items property=fieldOne /
/logic:iterate
or in jstl

c:forEach var=item items=${mylist}
c:out value=${item. fieldOne} /
/c:forEach
/pre

Cheers Mark

On Friday, October 17, 2003, at 11:38 AM, Thakur, Vikram wrote:

No, It does not work.
It says ,  Cannot find bean managers in any scope.
Thanks anywayz.

-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:55 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate
logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate
try this

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:57 PM
To: Struts (E-mail)
Subject: Logic Iterate


Hi ,
Can anyone help me with this iterate Tag ?
logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate
the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.
Thanks,
Vikram

This message contains information that may be privileged or 
confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended 
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, 
disseminate,
distribute, or use this message or any part thereof. If you receive 
this
message in error, please notify the sender immediately and delete all 
copies
of this message.

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

This message contains information that may be privileged or 
confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended 
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, 
disseminate,
distribute, or use this message or any part thereof. If you receive 
this
message in error, please notify the sender immediately and delete all 
copies
of this message.

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


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


Re: struts-el and messages

2003-10-17 Thread Chris Searle
 Chris == Chris Searle [EMAIL PROTECTED] writes:
 And the message code JSP:

 logic:messagesPresent message=true html:messages
 id=message message=true p class=messagec:out
 value=${messsge}//p /html:messages
 /logic:messagesPresent


 Nothing displays.

Sent that a bit too fast.

Think that :

c:out value=${messsge}/

would benefit by being:

c:out value=${message}/

:-)

-- 
Chris Searle
[EMAIL PROTECTED]


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



RE: Logic Iterate

2003-10-17 Thread Thakur, Vikram

My Form Bean is configured properly and It does contain values.
The only thing that I am not understanding is , why is struts looking for
the bean with name as managers.
I get this error , Cannot find bean managers in any scope.

Thanks,
Vikram

-Original Message-
From: Khalid Umar [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:15 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate



If it is collection of Strings only then you can write the collection on
page using
bean:write name=managers/ itself. 
There is No need to provide property attribute. property attribute is
required if you have collection of objects.

Check the name of Formbean name=NewCategoryConfirm. 
Should be from struts-config.xml file.

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 4:07 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate

may be ur collection may be empty or null
check ur collection object whether its contains anything??

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:09 PM
To: 'Struts Users Mailing List'
Subject: RE: Logic Iterate


No, It does not work.
It says ,  Cannot find bean managers in any scope.

Thanks anywayz.


-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:55 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate


logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

try this

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:57 PM
To: Struts (E-mail)
Subject: Logic Iterate




Hi ,
Can anyone help me with this iterate Tag ?

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate

the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.

Thanks,
Vikram 



This message contains information that may be privileged or confidential
and
is the property of the Cap Gemini Ernst  Young Group. It is intended
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy,
disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies
of this message.

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


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


This message contains information that may be privileged or confidential
and
is the property of the Cap Gemini Ernst  Young Group. It is intended
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy,
disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies
of this message.

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


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


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***

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


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended

RE: Logic Iterate

2003-10-17 Thread Khalid Umar

Probably check if you are setting the collection properly in the
formbean.


-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 4:31 PM
To: 'Struts Users Mailing List'
Subject: RE: Logic Iterate


My Form Bean is configured properly and It does contain values.
The only thing that I am not understanding is , why is struts looking
for
the bean with name as managers.
I get this error , Cannot find bean managers in any scope.

Thanks,
Vikram

-Original Message-
From: Khalid Umar [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:15 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate



If it is collection of Strings only then you can write the collection on
page using
bean:write name=managers/ itself. 
There is No need to provide property attribute. property attribute is
required if you have collection of objects.

Check the name of Formbean name=NewCategoryConfirm. 
Should be from struts-config.xml file.

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 4:07 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate

may be ur collection may be empty or null
check ur collection object whether its contains anything??

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:09 PM
To: 'Struts Users Mailing List'
Subject: RE: Logic Iterate


No, It does not work.
It says ,  Cannot find bean managers in any scope.

Thanks anywayz.


-Original Message-
From: Ramesh Kannery [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:55 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate


logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers property=fieldname/
/logic:iterate

try this

-Original Message-
From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:57 PM
To: Struts (E-mail)
Subject: Logic Iterate




Hi ,
Can anyone help me with this iterate Tag ?

logic:iterate id=managers name=NewCategoryConfirm
property=categoryMangers
bean:write name=managers/
/logic:iterate

the categoryManagers property  returns a Collection os Strings I
want to print all the values in the collection on screen.
Is it possible using  bean:write  or there any alternatives.

Thanks,
Vikram 



This message contains information that may be privileged or confidential
and
is the property of the Cap Gemini Ernst  Young Group. It is intended
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy,
disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies
of this message.

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


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


This message contains information that may be privileged or confidential
and
is the property of the Cap Gemini Ernst  Young Group. It is intended
only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy,
disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies
of this message.

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


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


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited
is 
'privileged' and 'confidential' and intended for use only by the
individual
 or entity to which it is addressed. You are notified that any use,
copying 
or dissemination of the information contained in the E-MAIL in any
manner 
whatsoever is strictly prohibited.


***

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


RE: [FRIDAY] Free Dog.....

2003-10-17 Thread Mark Galbreath
Looks prime to me...can it be shipped live?

Mark, member, PETA
(People for the Eating of Tasty Animals)

-Original Message-
From: Shane Mingins [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 7:28 PM
To: '[EMAIL PROTECTED]'
Subject: [FRIDAY] Free Dog.


Hi

A mate of mine is looking for a good home for their family's dog.  He
said it's really lovable and friendly with kids, but his wife said the
dog makes her nervous when it stares at her (I know - weird - I thought
the same thing).  She wants it out of the house ASAP unfortunately.  If
you know of anyone who might like to have this loveable pup for a pet,
let me know my mate has attached a jpeg of the little mutt.

Thanks





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



RE: [FRIDAY] Free Dog.....

2003-10-17 Thread Mark Galbreath
+1

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 7:34 PM

Ditch the wife
Keep the dog..
-M

- Original Message - 
From: Shane Mingins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

 A mate of mine is looking for a good home for their family's dog.  He
 said it's really lovable and friendly with kids, but his wife said the
 dog makes her nervous when it stares at her (I know - weird - I thought
 the same thing).  She wants it out of the house ASAP unfortunately.  If
 you know of anyone who might like to have this loveable pup for a pet,
 let me know my mate has attached a jpeg of the little mutt.


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



upload of large files

2003-10-17 Thread Alessio
Hello everybody,
I'm facing a problem that I think all of you know very well.
I have to permit the upload of large files, my application interacts with an
EJB module that persist the file.
I'm currently using struts upload but in this way the file is keeping in
memory in a form bean.
With large files and many connections I could run out of memory.

Anyone knows a good workaround to avoid the upload in memory of large files?

Thanks in advance.
Alessio.



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



[FRIDAY] URL O' The Day

2003-10-17 Thread Mark Galbreath
http://www.kmfms.com/


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



Re: [newbie] JSTL using different ResourceBundles

2003-10-17 Thread Kris Schneider
One approach you could take would be to create your set of alternate
LocalizationContext instances at application startup and store them in
application scope:

ResourceBundle countriesBundle =  ResourceBundle.getBundle(countries, locale);
LocalizationContext countriesCtx = new LocalizationContext(countriesBundle, locale);
servletCtx.setAttribute(countriesCtx, countriesCtx);

ResourceBundle statesBundle =  ResourceBundle.getBundle(states, locale);
LocalizationContext statesCtx = new LocalizationContext(statesBundle, locale);
servletCtx.setAttribute(statesCtx, statesCtx);

Then, in your JSP:

fmt:message bundle=${applicationScope.countriesCtx} key=message.test
fmt:message bundle=${applicationScope.statesCtx} key=message.test

Quoting Christian Martin [EMAIL PROTECTED]:

 i searched the archive and found a solution to set a LocalizationContext 
 in back-end java code.
 therefore i don't have to set the bundle in the JSP.
 code
   ResourceBundle bundle = 
 ResourceBundle.getBundle(ApplicationResources, locale);
   LocalizationContext ctx = new LocalizationContext(bundle);
   Config.set(session, Config.FMT_LOCALIZATION_CONTEXT, ctx);
 /code
 
 ..following code snippet is not necessary any more
 code
   fmt:setBundle basename=ApplicationResources var=ares /
 /code
 
 so far this works fine.
 
 BUT what do i have to do to set more than one bundle in back-end java code
 
 i did the following (newbie) trial
 
 code
   message-resources parameter=countries /
   message-resources parameter=states /
 /code
 .in struts-config.xml
 
 then i want to print out messsages in the jsp.
 
 code
   fmt:message bundle=${countries} key=message.test
   fmt:message bundle=${states} key=message.test
 /code
 
 what is the correct value for parameter bundle?
 
 but as i expected JSTL can't find the messages. ???message.test??? 
 appears in the browser.
 
 thanks in advance
 
 -
 please be patient with the newby

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

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



Re: [newbie] JSTL using different ResourceBundles

2003-10-17 Thread Adam Hardy
On 10/17/2003 12:16 PM Christian Martin wrote:
code
 message-resources parameter=countries /
 message-resources parameter=states /
/code
.in struts-config.xml
then i want to print out messsages in the jsp.

code
 fmt:message bundle=${countries} key=message.test
 fmt:message bundle=${states} key=message.test
/code
what is the correct value for parameter bundle?

but as i expected JSTL can't find the messages. ???message.test??? 
appears in the browser.
The ${countries} and ${states} won't be available as variables to EL in 
your JSP just because you have them set up in your struts-config.

If you do:

c:out value=${countries} /

what do you get?

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [newbie] JSTL using different ResourceBundles

2003-10-17 Thread Adam Hardy
On 10/17/2003 02:17 PM Kris Schneider wrote:
One approach you could take would be to create your set of alternate
LocalizationContext instances at application startup and store them in
application scope:
ResourceBundle countriesBundle =  ResourceBundle.getBundle(countries, locale);
LocalizationContext countriesCtx = new LocalizationContext(countriesBundle, locale);
servletCtx.setAttribute(countriesCtx, countriesCtx);
ResourceBundle statesBundle =  ResourceBundle.getBundle(states, locale);
LocalizationContext statesCtx = new LocalizationContext(statesBundle, locale);
servletCtx.setAttribute(statesCtx, statesCtx);
Then, in your JSP:

fmt:message bundle=${applicationScope.countriesCtx} key=message.test
fmt:message bundle=${applicationScope.statesCtx} key=message.test
in web.xml this will set up one as the default so you only need to 
programmatically set up the others, so at least for the most-used bundle 
you won't have to specify the 'bundle' attribute:

  context-param
param-name
  javax.servlet.jsp.jstl.fmt.localizationContext
/param-name
param-valueApplicationResources/param-value
  /context-param


--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Looking up the Struts Datasource

2003-10-17 Thread Philipp Röthl
Hi,

I've implemented a struts application that uses JavaBeans which perform the whole 
business logic. These beans access an Oracle DB. The datasource is passed from the 
action classes to the bean classes as a parameter.

Now I have to implement a WebService that does the same as the Struts Application. 
Therefore I use the same JavaBeans.

My problem now is: I have to pass the datasource to the Java Beans. I've read that I 
should be able to access the Struts Datasource via JNDI. But how?

Thanks for any help.

Philipp

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



RE: Help setting up sslext

2003-10-17 Thread Brian McSweeney
Hi Adam, 
thanks for the help.
I've put in the change in the action-mappings in the struts-config.xml
file

action-mappings type=org.apache.struts.config.SecureActionConfig

but the problem is, ssl doesn't seem to be switching at all. The action 
runs in https when I say it should, but all other actions then continue
to 
run in https. I was under the impression that they'd switch back to
normal 
http. Is this not correct?

Cheers,
Brian


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 17 October 2003 08:09
To: Struts Users Mailing List
Subject: Re: Help setting up sslext

On 10/16/2003 05:13 PM Brian McSweeney wrote:
 a) Change the action-mappings in the struts-config.xml file
 action-mappings type=org.apache.struts.config.SecureActionConfig
 
 b) Change the web.xml file as follows:
 
 servlet-nameaction/servlet-name
  
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 !-- Struts Config --
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namemapping/param-name
  

param-valueorg.apache.struts.action.SecureActionMapping/param-value
 /init-param
 
 could someone tell me if either of these steps are necessary, or what
 else is necessary?

Hi Brian,
your (a) is definitely necessary to enable this:

 actionpath=/staticjavascriptssl
 forward=/WEB-INF/general/staticjavascript.jsp
   set-property property=secure value=true/
 /action

I have not used, or heard of before, your (b). Perhaps it has the same 
effect as (a).

So what's not working?

Adam


-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


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


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



Re: Looking up the Struts Datasource

2003-10-17 Thread Ben Anderson
It depends on the container as to how you put the datasource into the 
context.

If you're using Tomcat 4.1:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
Then to access the datasource:
   String dsName = java:comp/env/jdbc/myDS;
   ctx = new InitialContext();
   DataSource ds = (DataSource)ctx.lookup(dsName);


From: Philipp Röthl [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Looking up the Struts Datasource
Date: Fri, 17 Oct 2003 15:50:23 +0200
Hi,

I've implemented a struts application that uses JavaBeans which perform the 
whole business logic. These beans access an Oracle DB. The datasource is 
passed from the action classes to the bean classes as a parameter.

Now I have to implement a WebService that does the same as the Struts 
Application. Therefore I use the same JavaBeans.

My problem now is: I have to pass the datasource to the Java Beans. I've 
read that I should be able to access the Struts Datasource via JNDI. But 
how?

Thanks for any help.

Philipp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Cheer a special someone with a fun Halloween eCard from American Greetings! 
Go to  http://www.msn.americangreetings.com/index_msn.pd?source=msne134

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


ActionMessage groups

2003-10-17 Thread Wiebe de Jong
I've notices that ActionError will be deprecated in struts 1.2.1. This may
cause me a problem.

Having two separate lists (ActionErrors and ActionMessages) is great because
of the separation of concerns. I can display the Errors in red and the
Messages in green. When there is only one list, how will I be able to
differentiate?

How about adding an optional grouping parameter to ActionMessage?  (i.e. new
ActionMessage(1,message.employee.insert.success,employeeDTO.getName() );

This would enable me to have as many groups as I want, so errors would
display in red, messages in blue, warnings in yellow, and messages to my
wife in pink. ;-)

Wiebe de Jong
http://frontierj.blogspot.com 


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



Re: [FRIDAY] URL O' The Day

2003-10-17 Thread Mark Lowe
Nice link ... Sent to us with..

Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)

:o)

On Friday, October 17, 2003, at 12:58 PM, Mark Galbreath wrote:

http://www.kmfms.com/

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


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


HTML:SELECT giving headaches

2003-10-17 Thread Sethi, Mandeep


Hi Everyone

I'm working on displaying a collection using HTML:SELECT.
I'm our case we have a collection of value objects in session scope ,so for
e.g
in our case we have a collection of Category in session scope ,Which further
has 
a collection of subCategory and I need to display them in a select list in
way like

Category name1
...subCategory name1
...subCategory name2

Category name2
...subCategory name1
...subCategory name2


class Category()
{
String name;
String id;
Collection subCategory;

}

Class SubCategory{
String subName;
String subID;
}

So far I'm successfull with first part that is displaying Category name with
their id as value ,my code is

html:select property=availableList size=18 multiple=true
html:options collection=availableFieldList
 property=lookupType
 labelProperty=lookupTypeLabel/
 /html:select


where availableFieldList is the collection of Category ,

Can anyone suggest few ideas for my second step of displaying subcategories
too in required fashion,

Thank You


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



Need mailing list

2003-10-17 Thread Wiebe de Jong
Do you have bookmarks for any open source mailing lists written in Java?

Wiebe de Jong
http://frontierj.blogspot.com 

-Original Message-
From: Koni Roth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 14, 2003 2:15 AM
To: Struts Users Mailing List
Subject: Re: need calendar (maybe popup) calendar

Calendar? Sure! Here my bookmarks on this topic. ;-)

http://www.mattkruse.com/javascript/calendarpopup/
http://dynarch.com/mishoo/calendar.epl
http://www.aoc.nrao.edu/~bwaters/pub/taglib/calendar-taglib.html
http://www.servletsuite.com/servlets/calendar.htm
http://www.mattkruse.com/javascript/javascripttoolbox.zip

Koni

Otto, Frank wrote:
 Hello,
  
 I search a good solution for displaying a calendar.
  
 I use struts and have an input field for date value and I want to display
a calendar (maybe popup) for choose the date.
  
 Is there a good implentation for using with struts?
  
  
  
 Regards,
  
 Frank
 


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


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



RE: Need mailing list

2003-10-17 Thread Paananen, Tero
 Do you have bookmarks for any open source mailing lists 
 written in Java?

http://www.google.com/search?q=Open+Source+Java+%22mailing+list%22

Come'on people...

-TPP

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



Re: [FRIDAY] Free Dog.....

2003-10-17 Thread Julie . Huang
where is the picture?


Julie 
Member of HSUS




Martin Gainty [EMAIL PROTECTED]
10/16/03 07:33 PM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:Re: [FRIDAY] Free Dog.


Ditch the wife
Keep the dog..
-M
- Original Message - 
From: Shane Mingins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 7:27 PM
Subject: [FRIDAY] Free Dog.


 Hi

 A mate of mine is looking for a good home for their family's dog.  He
 said it's really lovable and friendly with kids, but his wife said the
 dog makes her nervous when it stares at her (I know - weird - I thought
 the same thing).  She wants it out of the house ASAP unfortunately.  If
 you know of anyone who might like to have this loveable pup for a pet,
 let me know my mate has attached a jpeg of the little mutt.

 Thanks









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

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





= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 
This transmittal and any attachments may contain confidential, privileged or sensitive 
information and is solely for the use of the intended recipient. If you are not 
intended recipient, you are hereby notified that you have received this transmittal 
and any such attachments in error and any review, dissemination, distribution or 
copying thereof is strictly prohibited. If you have received this transmittal and any 
attachments in error please notify the sender and immediately destroy the message and 
all its attachments. Any opinions herein expressed may be those of the author and not 
necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no 
responsibility for the accuracy or completeness of any information herein contained.
= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 



RE: Need mailing list

2003-10-17 Thread Wiebe de Jong
Okay, my fault. Let me rephrase the question.

Does anybody know of a good mailing list app that is open source and written
in Java?

Wiebe de Jong
http://frontierj.blogspot.com 

-Original Message-
From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 7:46 AM
To: 'Struts Users Mailing List'
Subject: RE: Need mailing list

 Do you have bookmarks for any open source mailing lists 
 written in Java?

http://www.google.com/search?q=Open+Source+Java+%22mailing+list%22

Come'on people...

-TPP

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


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



RE: HTML:SELECT giving headaches

2003-10-17 Thread Michael D. Norman
You could do this a couple of ways (thinking out loud here):

1) Do some preprocessing and build a list of all the objects, but I
guess that would only work if your SubCategory class had the same
properties for name and ID.

2) Do some preprocessing and add ID/name pairs to a SequenceHashMap
(org.apache.commons.collections.SequencedHashMap) and use that as your
collection.

3) Don't use html:options/ but instead use nested logic:iterate/
tags (for each category, loop over the subcategories in the collection)
and use html:option/ tags with name/value pairs.  This is probably the
best since it is the clearest as to what you are doing, plus you can
create the empty spaces more easily.

-- Michael D. Norman
   ProbuSoft -- Custom Software Development
   http://www.probusoft.com/
   913-390-6951
   [EMAIL PROTECTED]
 

 -Original Message-
 From: Sethi, Mandeep [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 17, 2003 9:39 AM
 To: 'Struts Users Mailing List'
 Subject: HTML:SELECT giving headaches
 
 
 
 Hi Everyone
 
 I'm working on displaying a collection using HTML:SELECT.
 I'm our case we have a collection of value objects in session scope
,so
 for
 e.g
 in our case we have a collection of Category in session scope ,Which
 further
 has
 a collection of subCategory and I need to display them in a select
list in
 way like
 
 Category name1
 ...subCategory name1
 ...subCategory name2
 
 Category name2
 ...subCategory name1
 ...subCategory name2
 
 
 class Category()
 {
   String name;
   String id;
   Collection subCategory;
 
 }
 
 Class SubCategory{
 String subName;
 String subID;
 }
 
 So far I'm successfull with first part that is displaying Category
name
 with
 their id as value ,my code is
 
 html:select property=availableList size=18 multiple=true
 html:options collection=availableFieldList
  property=lookupType
  labelProperty=lookupTypeLabel/
  /html:select
 
 
 where availableFieldList is the collection of Category ,
 
 Can anyone suggest few ideas for my second step of displaying
 subcategories
 too in required fashion,
 
 Thank You
 
 


**
 **
 This email may contain confidential material.
 If you were not an intended recipient,
 Please notify the sender and delete all copies.
 We may monitor email to and from our network.


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



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



RE: Need mailing list

2003-10-17 Thread Paananen, Tero
 Okay, my fault. Let me rephrase the question.
 
 Does anybody know of a good mailing list app that is open 
 source and written in Java?

www.google.com

-TPP

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



RE: [FRIDAY] URL O' The Day

2003-10-17 Thread Mark Galbreath
Yep...glad the irony was not wasted!  ;-)

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 10:38 AM

Nice link ... Sent to us with..

Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)

:o)

On Friday, October 17, 2003, at 12:58 PM, Mark Galbreath wrote:

 http://www.kmfms.com/


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



RE: [FRIDAY] Free Dog.....

2003-10-17 Thread Chen, Gin
How did you get a picture of Mark?

-Tim

-Original Message-
From: Shane Mingins [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 16, 2003 7:30 PM
To: 'Struts Users Mailing List'
Subject: RE: [FRIDAY] Free Dog.


Ok so no attachments :-(

http://fattyco.org/~beck/stephen/Free_Dog.jpg


 -Original Message-
 From: Shane Mingins [mailto:[EMAIL PROTECTED]
 Sent: Friday, 17 October 2003 12:28 p.m.
 To: '[EMAIL PROTECTED]'
 Subject: [FRIDAY] Free Dog.
 
 Hi
 
 A mate of mine is looking for a good home for their family's dog.  He
 said it's really lovable and friendly with kids, but his wife said the
 dog makes her nervous when it stares at her (I know - weird - I thought
 the same thing).  She wants it out of the house ASAP unfortunately.  If
 you know of anyone who might like to have this loveable pup for a pet,
 let me know my mate has attached a jpeg of the little mutt.
 
 Thanks
 


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

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



for the Apple-biters

2003-10-17 Thread Mark Galbreath
...just ran across this URL and thought I'd pass it along FWIW:

http://developer.apple.com/internet/java/struts.html


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



RE: Need mailing list

2003-10-17 Thread Mark Galbreath
Write your own

http://www.mscs.mu.edu/~aricke/Ent2002/Assignment3/listing3-3.html

-Original Message-
From: Wiebe de Jong [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 11:03 AM

Okay, my fault. Let me rephrase the question.

Does anybody know of a good mailing list app that is open source and written
in Java?



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



RE: [FRIDAY] Free Dog.....

2003-10-17 Thread Mark Galbreath
oh man!  that's cold!  ru related to Andrew?

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 11:53 AM

How did you get a picture of Mark?

-Tim

-Original Message-
From: Shane Mingins [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 16, 2003 7:30 PM

Ok so no attachments :-(

http://fattyco.org/~beck/stephen/Free_Dog.jpg


 -Original Message-
 From: Shane Mingins [mailto:[EMAIL PROTECTED]
 Sent: Friday, 17 October 2003 12:28 p.m.
 
 A mate of mine is looking for a good home for their family's dog.  He
 said it's really lovable and friendly with kids, but his wife said the
 dog makes her nervous when it stares at her (I know - weird - I thought
 the same thing).  She wants it out of the house ASAP unfortunately.  If
 you know of anyone who might like to have this loveable pup for a pet,
 let me know my mate has attached a jpeg of the little mutt.


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



Re: SSLExt and Struts Workflow?

2003-10-17 Thread Tim Shadel
Thanks Matthias,

I'm almost positive, the SSL/non-SSL session tracking is taken care in 
SSLExt of by URL rewriting as necessary.  I'll keep an eye out for that 
as I test out my work.  I'll let you know off-list if I have any questions.

Thanks!

Tim

Matthias Bauer wrote:
Tim,

what you are saying seems pretty reasonable. Even though not having 
looked at SSLExt, I don't expect any more collisions than the action 
mapping type and the request processor. When saying that, I am assuming 
that SSLExt correctly copes with session tracking when switching back 
and forth between SSL actions  and non-SSL actions. This is necessary, 
because the workflow state data is kept in the user's session.

If you have any questions or need some support when implementing the 
integration, feel free to come back to me.

--- Matthias

Tim Shadel wrote:

I know this thread is a couple weeks old, but I just started looking 
into this myself.

Actually, I don't think that they are currently compatible, but not 
because of the RequestProcessor.  Matthias has made it easier to write 
a RequestProcessor that includes others, so that should be possible 
(though I haven't done it).  The problem seems to be that they each 
require a custom ActionMappings class:

action-mappings type=org.apache.struts.config.SecureActionConfig

action-mappings type=com.livinglogic.struts.workflow.WorkflowMapping

I assume that you can't use both.  After looking at the code, it 
appears that it may not be hard to change SSLExt to expect an 
Interface instead of a class in most areas that the SecureActionConfig 
is really needed for the config.getSecure() call (WorkflowMapping 
seems to hold more than simple get/set methods).  It seems that the 
changes to SecureActionConfig are most in the checkSsl() and 
computerUrl() methods.  I may be missing something, but it doesn't 
seem like much would break.

Eclpse's Extract Interface... refactoring can't do it automatically, 
but gives a quick glance at the areas most affected.  If the SslExt 
code could use an interface, then it would be possible to extend the 
WorkflowMapping, add the needed methods, use the new class in the 
action-mapping and then use both SslExt and Struts Workflow together.

Steve and Matthias, do you see any glitches with this approach?  If 
not, I may try to start working at it (isn't that the general rule - 
don't propose something unless you want to volunteer to help? :-D).

Thanks for your great extentions to Struts!

Tim

Matthias Bauer wrote:

If you still want to use the sslext RequestProcessor you should be 
easily able to do that: It is fairly trivial to build an 
SSLExtWorkflowRequestProcessor in just the same way as the 
TilesWorkflowRequestProcesser is built, which is included in the 
Struts Workflow Extension. This is because all the workflow logic is 
extracted into a separate class WorkflowRequestProcessorLogic. If you 
are interested, have a look at the classes WorkflowRequestProcessor, 
TilesWorkflowRequestProcessor, WorkflowRequestProcessorLogic and 
WorkflowRequestProcessorLogicAdapter.

--- Matthias

Steve Ditlinger wrote:

I'll admit to not having used Struts Workflow.  But I don't know of any
reason why sslext should not work, as long as actions are defined in a
struts config file like other struts apps.
If Struts Workflow uses its own RequestProcessor, you would not be 
able to
use the sslext RequestProcessor (without creating your own custom
RequestProcessor).  However, that is OK.  You can use the sslext Plugin
without the sslext RequestProcessor.   Assuming the use of the 
sslext tags,
the sslext RequestProcessor is really only needed as a failsafe for
redirecting to the correct protocol if a URL is improperly 
hand-entered.

HTH,
Steve
- Original Message - From: Mick Knutson 
[EMAIL PROTECTED]
To: struts [EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 2:54 PM
Subject: SSLExt and Struts Workflow?

 

Does SSLExt and Struts Workflow work together?

---
Thanks
Mick Knutson
http://www.baselogic.com
---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  




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



/div





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


Re: [FRIDAY] Free Dog.....

2003-10-17 Thread Barry Volpe
I've seen some freaky shht but that's freaky!!

- Original Message - 
From: Mark Galbreath [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 9:02 AM
Subject: RE: [FRIDAY] Free Dog.


 oh man!  that's cold!  ru related to Andrew?
 
 -Original Message-
 From: Chen, Gin [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 17, 2003 11:53 AM
 
 How did you get a picture of Mark?
 
 -Tim
 
 -Original Message-
 From: Shane Mingins [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 16, 2003 7:30 PM
 
 Ok so no attachments :-(
 
 http://fattyco.org/~beck/stephen/Free_Dog.jpg
 
 
  -Original Message-
  From: Shane Mingins [mailto:[EMAIL PROTECTED]
  Sent: Friday, 17 October 2003 12:28 p.m.
  
  A mate of mine is looking for a good home for their family's dog.  He
  said it's really lovable and friendly with kids, but his wife said the
  dog makes her nervous when it stares at her (I know - weird - I thought
  the same thing).  She wants it out of the house ASAP unfortunately.  If
  you know of anyone who might like to have this loveable pup for a pet,
  let me know my mate has attached a jpeg of the little mutt.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


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



RE: for the Apple-biters

2003-10-17 Thread Nguyen, Hien
I'm actually writing my struts application using Eclipse + Tomcat on my
PowerBook 17 and Safari for the pages.  Its sweet!

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 11:57 AM
To: struts-wankers
Subject: for the Apple-biters


...just ran across this URL and thought I'd pass it along FWIW:

http://developer.apple.com/internet/java/struts.html


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

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



JSTL evaluate problems

2003-10-17 Thread struts
JSTL is not nesting appropriately.  Here is an example of what I am doing:

c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:out value=${person[nestedProp]}/

The error that I am getting is:
Unable to find a value for name.firstName in object of class
org.team.Person using operator [] (null)

If nestedProp was just firstName (and Person had a firstName property) then
this works just fine.  JSTL is not seeing the . and doing getName().getFirstName()

I have tried a number of combinations with [] and ' (escape) and \ and 
nothing works :(  Any help appreciated.


Carl 

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



struts-config.xml data-source

2003-10-17 Thread Fabio Oliveira

Hello all,

I've just configured the sample data-source tag in
the Blank application in order to point to an Oracle
Database, using the thin driver; and I've noticed that it's
opened two connections as specified in the minCount
property.

I wonder whether this two connections are pooled ? Can anyone
shed some light on this question.

For your reference I'm including the data-sources section
in this e-mail.

Thank you,

Fabio Oliveira.



 data-sources

   data-source

 set-property

property=autoCommit

value=false/

 set-property

property=description

value=Example Data Source Configuration/

 set-property

property=driverClass

value=oracle.jdbc.driver.OracleDriver/

 set-property

property=maxCount

value=8/

 set-property

property=minCount

value=4/

 set-property

property=password

value=mypassword/

 set-property

property=url


value=jdbc:oracle:thin:myuser/[EMAIL PROTECTED]:1521:mydb/

 set-property

property=user

value=myuser/

   /data-source

 /data-sources



---
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br


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



How to retrieve messages from default bundle?

2003-10-17 Thread Barry Volpe
Hi,

Want to expose a message in my action:

In my action I have:
throw new Exception(I have an error); 

want to use message resource:

message.error=I have an error  (in applcation.properties)


throw new Exception(message.error);   (I know this doesn't work directly)


Not sure how to set this up.

Appreciate a code example suggestion.

Thanks,
Barry

RE: for the Apple-biters

2003-10-17 Thread Mark Galbreath
Sure wish I could afford a G5 PowerBook!!

-Original Message-
From: Nguyen, Hien [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 12:12 PM

I'm actually writing my struts application using Eclipse + Tomcat on my
PowerBook 17 and Safari for the pages.  Its sweet!

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 11:57 AM

...just ran across this URL and thought I'd pass it along FWIW:

http://developer.apple.com/internet/java/struts.html


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



RE: for the Apple-biters

2003-10-17 Thread Andy Engle
Mark Galbreath [EMAIL PROTECTED] wrote:

 Sure wish I could afford a G5 PowerBook!!

Me too.  Hopefully my side work will pick up and I could pick one up. 
You have to have the right tool for the job!


Andy


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



Re: How to retrieve messages from default bundle?

2003-10-17 Thread Kris Schneider
Something like this should work:

MessageResources resources = getResources(request);
String msg = resources.getMessage(message.error);
throw new Exception(msg);

Quoting Barry Volpe [EMAIL PROTECTED]:

 Hi,
 
 Want to expose a message in my action:
 
 In my action I have:
 throw new Exception(I have an error); 
 
 want to use message resource:
 
 message.error=I have an error  (in applcation.properties)
 
 
 throw new Exception(message.error);   (I know this doesn't work directly)
 
 
 Not sure how to set this up.
 
 Appreciate a code example suggestion.
 
 Thanks,
 Barry


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

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



RE: HTML:SELECT giving headaches - you need OPTGROUP

2003-10-17 Thread Richard Mixon (qwest)
I believe that what you really are wanting to do is use the OPTGROUP tag within 
HTML's select tag. This allows you to create
a two level indented list of categories and subcategories in a select list.

Unfortunately Struts does not directly support this. I asked about this a couple of 
months ago - and got no response at all. I
imagine the lack of support is for two reasons:

1) The data structure to support it would be slightly more complicated - a 
collection of category object, each category object
would need a few properties and a collection of (sub)category objects.

2) The browser support for OPTGROUP has been spotty until recently. Under Windows it 
was not supported in MSIE until version 5.5
(IIRC) and with Netscape support started in version 6 (again, IIRC). However the 
OPTGROUP is supposed to degrade gracefully in
older browsers and still be usable - not so sure about that.

If the browser support is not an issue, then you can still OPTGROUP with struts - IF 
you are willing to do a little scripting (or
even better create your own custom tag). We do and are very pleased with the results, 
although we have had to make some minor
adjustments to support different browsers on different platforms.

Here are a couple of references that should be useful.

  http://www.w3.org/TR/REC-html40/interact/forms.html#edef-OPTGROUP
  http://tagsnstyles.host.sk/elements/optgroup.html

Here is a snippet of the code that I use in my JSP to create the indented select lists 
(I did change variable names to be a little
more general and removed a few complexities). I ended up using a combination of JSTL 
and JSP scriptlets (not pretty, but it works).
If we decide to use this on a more widespread basis,a custom taglib is definitely in 
order. I've included two versions, the first
only works with Windows and MSIE 6.0, Netscape 7.x and Mozilla Firebird (may work with 
other browsers, but not tested). The second
also works with Macintosh MSIE 5.1 - turns out that Mac MSIE 5.1 has quite a few 
differences - you would think both being written by
MS, they might ... I know, the problem is I thought - :(. Have not had a chance to 
test under Macintosh Safari, maybe it will not
be so picky. Anyway, this is not elegant at all, but it works and the effect is quite 
nice.

SNIPPET - Supports Windows only (see above)

  hmtl:select property=subCategoryId indexed=true styleId=newsubCategoryId
optgroup label=
  option value= label=nbsp;/option
/optgroup
c:set var=prevCategory value=/
c:forEach items=${Collection_SubCategory} var=subCat
  c:set var=currentCategory value=${subCat.subject_name}/
  c:set var=currentSubCategory value=${subCat.name}/
  c:if test=${prevCategory != currentCategory}
c:if test=${!empty prevCategory}
/optgroup
/c:if
  /c:if
  c:if test=${prevCategory != currentCategory  !empty currentSubCategory}
  optgroup label=c:out value=${currentCategory}/
  /c:if
  c:if test=${currentSubCategory != ''}
  option value=c:out value=${subCat.id}/ label=c:out 
value=${currentSubCategory}/
c:if test=${subCat.id == categoryForm.subCategoryId}
  selected=true
/c:if
  c:out value=${currentSubCategory}//option
  /c:if
  c:set var=prevCategory value=${subCat.subject_name}/
/c:forEach
/optgroup
  /hmtl:select


SNIPPET - Supports Windows and Mac (see above)

  hmtl:select property=subCategoryId indexed=true styleId=newsubCategoryId
  % if ( request.getHeader(user-agent).toLowerCase().indexOf(win)  -1 ) { %
optgroup label=
  option value= label=nbsp;/option
/optgroup
  % } else { %
  option value=nbsp;/option
  % } %
c:set var=prevCategory value=/
c:forEach items=${Collection_SubCategory} var=subCat
  c:set var=currentCategory value=${subCat.subject_name}/
  c:set var=currentSubCategory value=${subCat.name}/
  % if ( request.getHeader(user-agent).toLowerCase().indexOf(win)  -1 ) { %
  c:if test=${prevCategory != currentCategory}
c:if test=${!empty prevCategory}
/optgroup
/c:if
  /c:if
  c:if test=${prevCategory != currentCategory  !empty currentSubCategory}
  optgroup label=c:out value=${currentCategory}/
  /c:if
  % } else { %
  c:if test=${prevCategory != currentCategory  !empty currentSubCategory}
option value=c:out value=${currentCategory}/ readonly=true 
style=font-weight: bold;
  c:out value=${currentCategory}/
/option
  /c:if
  % } %
  c:if test=${currentSubCategory != ''}
  % if ( request.getHeader(user-agent).toLowerCase().indexOf(win)  -1 ) { %
  option value=c:out value=${subCat.id}/ label=c:out 
value=${currentSubCategory}/
c:if test=${subCat.id == categoryForm.subCategoryId}
  selected=true
/c:if
  c:out value=${currentSubCategory}//option
  % } else { %
  option value=c:out value=${subCat.id}/
c:if test=${subCat.id == 

Re: How to retrieve messages from default bundle?

2003-10-17 Thread Barry Volpe
Works thanks!

- Original Message - 
From: Kris Schneider [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 10:19 AM
Subject: Re: How to retrieve messages from default bundle?


 Something like this should work:

 MessageResources resources = getResources(request);
 String msg = resources.getMessage(message.error);
 throw new Exception(msg);

 Quoting Barry Volpe [EMAIL PROTECTED]:

  Hi,
 
  Want to expose a message in my action:
 
  In my action I have:
  throw new Exception(I have an error);
 
  want to use message resource:
 
  message.error=I have an error  (in applcation.properties)
 
 
  throw new Exception(message.error);   (I know this doesn't work
directly)
 
 
  Not sure how to set this up.
 
  Appreciate a code example suggestion.
 
  Thanks,
  Barry


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

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







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



Re: JSTL evaluate problems

2003-10-17 Thread Kris Schneider
Are you just trying to shorthand this:

c:out value=${person.name.firstName}/

In other words, person.getName().getFirstName().

Quoting [EMAIL PROTECTED]:

 JSTL is not nesting appropriately.  Here is an example of what I am doing:
 
 c:set var=person value=${requestScope.personForm}/
 c:set var=nestedProp value=name.firstName/
 c:out value=${person[nestedProp]}/
 
 The error that I am getting is:
 Unable to find a value for name.firstName in object of class
 org.team.Person using operator [] (null)
 
 If nestedProp was just firstName (and Person had a firstName property) then
 this works just fine.  JSTL is not seeing the . and doing
 getName().getFirstName()
 
 I have tried a number of combinations with [] and ' (escape) and \ and 
 nothing works :(  Any help appreciated.
 
 
 Carl

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

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



Upload a multipart post file to an action, but have a servlet pro cess it?

2003-10-17 Thread Rustad, Aaron

I have a Servlet that accepts a multipart/form-data POST request and
extracts the file from it using the commons FileUpload API. I wrote this
servlet to allow automated clients to upload data files to my server. Now, I
have a requirement to allow users to manually upload files via a web page.
To do this, I will be using Struts, but I would like the actual processing
of the request to be handled by the servlet as it is now. So I have this
code in the action:

getServlet().getServletContext().getRequestDispatcher(/servlet/UploadServle
t).include(request, response);

However, when I call this action the form fields and file are first pulled
from the request and placed into the FormBean, and of course, they can not
be pulled again from the request in the servlet. My question is this:

Can I force the ActionServlet not to populate the FormBean and just leave
the request as isthis way, the functionality will remain in the servlet
that has been previously developed.

Thanks!
Aaron.

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



Re: JSTL evaluate problems

2003-10-17 Thread struts
No.  The variable that is actually nestedProp is populated dynamically.  Most
of the time it is just a single property name, but from time to time, it needs
to be nested.

Carl

Quoting Kris Schneider [EMAIL PROTECTED]:

 Are you just trying to shorthand this:
 
 c:out value=${person.name.firstName}/
 
 In other words, person.getName().getFirstName().
 
 Quoting [EMAIL PROTECTED]:
 
  JSTL is not nesting appropriately.  Here is an example of what I am
 doing:
  
  c:set var=person value=${requestScope.personForm}/
  c:set var=nestedProp value=name.firstName/
  c:out value=${person[nestedProp]}/
  
  The error that I am getting is:
  Unable to find a value for name.firstName in object of class
  org.team.Person using operator [] (null)
  
  If nestedProp was just firstName (and Person had a firstName property)
 then
  this works just fine.  JSTL is not seeing the . and doing
  getName().getFirstName()
  
  I have tried a number of combinations with [] and ' (escape) and \ and
 
  nothing works :(  Any help appreciated.
  
  
  Carl
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




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



RE: for the Apple-biters

2003-10-17 Thread Nguyen, Hien
You're gonna have to wait for a while before Apple can squeeze a G5 to a PB.

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 12:59 PM
To: Struts Users Mailing List
Subject: RE: for the Apple-biters


Sure wish I could afford a G5 PowerBook!!

-Original Message-
From: Nguyen, Hien [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 12:12 PM

I'm actually writing my struts application using Eclipse + Tomcat on my
PowerBook 17 and Safari for the pages.  Its sweet!

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 11:57 AM

...just ran across this URL and thought I'd pass it along FWIW:

http://developer.apple.com/internet/java/struts.html


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

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



HTML encoding of text returned from a bean

2003-10-17 Thread Chadha, Deepak \(BLM\)

Hi,
I have some UI customization that is done based on some data.  In order to implement 
it in a generic, reusable fashion, I am trying to generate the HTML text (including 
struts tags) in a bean (called FETList below).

Scenario1 shown below works.  However, Scenario2 is what I am trying to get working 
and not succeeding.
Thanks for any help.
Regards
Deepak

Scenario1: Placing the code in the JSP.  This works and a droplist shows up fine.
CODE IN JSP 
jsp:setProperty name=FETList property=currentKey 
value=MEMBER_DETAIL5MEM_FIELD5C5/
bean:define id=dctest name=FETList property=myFieldChoiceList /
BRNew 
html:select property=contractName  
html:options collection=dctest property=value_cd labelProperty=ext_desc /  
/html:select



Scenario2: Attempting to invoke the getHTMLString() on the bean from the JSP.  This 
does not work.  Instead of the droplist showing up, I see the actual text showing up 
(bean:define id..)  What am I doing wrong?  Is there some way that I need to flag an 
encoding scheme?


CODE IN JSP 
jsp:setProperty name=FETList property=currentKey 
value=MEMBER_DETAIL5MEM_FIELD5C5/
BRbean:write name=FETList property=HTMLString /

CODE IN BEAN FETList that is invoked 
public String getHTMLString() {

System.out.println(Entered  getHTMLString);

String HTMLString = new String();
   
HTMLString = bean:define id=\dctest\ name=\FETList\ 
property=\myFieldChoiceList\ /BRNew html:select property=\contractName\  
html:options collection=\dctest\ property=\value_cd\ labelProperty=\ext_desc\ 
/  /html:select;

return HTMLString ;

}
*** Confidentiality Notice ***
This email, its electronic document attachments, and the contents of its website 
linkages may contain confidential health information.  This information is intended 
solely for use by the individual or entity to whom it is addressed.  If you have 
received this information in error, please notify the sender immediately and arrange 
for the prompt destruction of the material and any accompanying attachments.




AW: Looking up the Struts Datasource

2003-10-17 Thread Philipp Rthl
Ben, thanks for your answer. But the DS I would like to get is the Struts DS. The one 
I defined in the struts-config.xml.
When I do the naming lookup as you described I get 
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
 
Philipp

-Ursprngliche Nachricht- 
Von: Ben Anderson [mailto:[EMAIL PROTECTED] 
Gesendet: Fr 17.10.2003 16:22 
An: [EMAIL PROTECTED] 
Cc: 
Betreff: Re: Looking up the Struts Datasource



It depends on the container as to how you put the datasource into the
context.

If you're using Tomcat 4.1:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Then to access the datasource:
String dsName = java:comp/env/jdbc/myDS;
ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(dsName);



From: Philipp Rthl [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Looking up the Struts Datasource
Date: Fri, 17 Oct 2003 15:50:23 +0200

Hi,

I've implemented a struts application that uses JavaBeans which perform the
whole business logic. These beans access an Oracle DB. The datasource is
passed from the action classes to the bean classes as a parameter.

Now I have to implement a WebService that does the same as the Struts
Application. Therefore I use the same JavaBeans.

My problem now is: I have to pass the datasource to the Java Beans. I've
read that I should be able to access the Struts Datasource via JNDI. But
how?

Thanks for any help.

Philipp

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


_
Cheer a special someone with a fun Halloween eCard from American Greetings!
Go to  http://www.msn.americangreetings.com/index_msn.pd?source=msne134


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



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

Re: JSTL evaluate problems

2003-10-17 Thread Ben Anderson
this should work:

c:set var=person value=${requestScope.personForm}/
c:set var=_name value=name/
c:set var=_firstName value=firstName/
c:out value=${person[_name][_firstName]}/

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: JSTL evaluate problems
Date: Fri, 17 Oct 2003 12:29:44 -0500
No.  The variable that is actually nestedProp is populated dynamically.  
Most
of the time it is just a single property name, but from time to time, it 
needs
to be nested.

Carl

Quoting Kris Schneider [EMAIL PROTECTED]:

 Are you just trying to shorthand this:

 c:out value=${person.name.firstName}/

 In other words, person.getName().getFirstName().

 Quoting [EMAIL PROTECTED]:

  JSTL is not nesting appropriately.  Here is an example of what I am
 doing:
 
  c:set var=person value=${requestScope.personForm}/
  c:set var=nestedProp value=name.firstName/
  c:out value=${person[nestedProp]}/
 
  The error that I am getting is:
  Unable to find a value for name.firstName in object of class
  org.team.Person using operator [] (null)
 
  If nestedProp was just firstName (and Person had a firstName property)
 then
  this works just fine.  JSTL is not seeing the . and doing
  getName().getFirstName()
 
  I have tried a number of combinations with [] and ' (escape) and \ and
 
  nothing works :(  Any help appreciated.
 
 
  Carl

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

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




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Never get a busy signal because you are always connected  with high-speed 
Internet access. Click here to comparison-shop providers.  
https://broadband.msn.com

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


RE: HTML encoding of text returned from a bean

2003-10-17 Thread Michael D. Norman
Scenario 1 works because the JSP parser understands it needs to parse
the tags.  However, Scenario 2 is simply returning text that will be
written to the response.  There is no way that I know of to force a
container to read dynamically-generated JSP without spitting it out into
a JSP file and including that JSP file or (BAD IDEA!!!) calling the JSPC
code from within your JSP/servlet.

If you want to get the dynamic results from the string, you can
instantiate instances of the tags that are actually doing the work, or
if possible, use runtime expressions in the parameters of the tags.
However, I'm not sure exactly what you're trying to accomplish by
returning JSP from a method so this may not be helpful at all.

-- Michael D. Norman
   ProbuSoft -- Custom Software Development
   http://www.probusoft.com/
   913-390-6951
   [EMAIL PROTECTED]
 

 -Original Message-
 From: Chadha, Deepak (BLM) [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 17, 2003 12:51 PM
 To: [EMAIL PROTECTED]
 Subject: HTML encoding of text returned from a bean
 
 
 Hi,
 I have some UI customization that is done based on some data.  In
order to
 implement it in a generic, reusable fashion, I am trying to generate
the
 HTML text (including struts tags) in a bean (called FETList below).
 
 Scenario1 shown below works.  However, Scenario2 is what I am trying
to
 get working and not succeeding.
 Thanks for any help.
 Regards
 Deepak
 
 Scenario1: Placing the code in the JSP.  This works and a droplist
shows
 up fine.
 CODE IN JSP 
 jsp:setProperty name=FETList property=currentKey
 value=MEMBER_DETAIL5MEM_FIELD5C5/
 bean:define id=dctest name=FETList property=myFieldChoiceList
/
 BR  New
 html:select property=contractName
 html:options collection=dctest property=value_cd
 labelProperty=ext_desc /
 /html:select
 
 
 
 Scenario2: Attempting to invoke the getHTMLString() on the bean from
the
 JSP.  This does not work.  Instead of the droplist showing up, I see
the
 actual text showing up (bean:define id..)  What am I doing wrong?
Is
 there some way that I need to flag an encoding scheme?
 
 
 CODE IN JSP 
 jsp:setProperty name=FETList property=currentKey
 value=MEMBER_DETAIL5MEM_FIELD5C5/
 BR  bean:write name=FETList property=HTMLString /
 
 CODE IN BEAN FETList that is invoked 
 public String getHTMLString() {
 
 System.out.println(Entered  getHTMLString);
 
 String HTMLString = new String();
 
 HTMLString = bean:define id=\dctest\ name=\FETList\
 property=\myFieldChoiceList\ /BRNew html:select
 property=\contractName\  html:options collection=\dctest\
 property=\value_cd\ labelProperty=\ext_desc\ /  /html:select;
 
 return HTMLString ;
 
 }
 *** Confidentiality Notice ***
 This email, its electronic document attachments, and the contents of
its
 website linkages may contain confidential health information.  This
 information is intended solely for use by the individual or entity to
whom
 it is addressed.  If you have received this information in error,
please
 notify the sender immediately and arrange for the prompt destruction
of
 the material and any accompanying attachments.
 



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



Re: JSTL evaluate problems

2003-10-17 Thread struts
It doesn't come in seperated.  It comes in name.firstName.

Quoting Ben Anderson [EMAIL PROTECTED]:

 this should work:
 
 c:set var=person value=${requestScope.personForm}/
 c:set var=_name value=name/
 c:set var=_firstName value=firstName/
 c:out value=${person[_name][_firstName]}/
 
 
 From: [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: JSTL evaluate problems
 Date: Fri, 17 Oct 2003 12:29:44 -0500
 
 No.  The variable that is actually nestedProp is populated dynamically. 
 
 Most
 of the time it is just a single property name, but from time to time, it
 
 needs
 to be nested.
 
 Carl
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
   Are you just trying to shorthand this:
  
   c:out value=${person.name.firstName}/
  
   In other words, person.getName().getFirstName().
  
   Quoting [EMAIL PROTECTED]:
  
JSTL is not nesting appropriately.  Here is an example of what I am
   doing:
   
c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:out value=${person[nestedProp]}/
   
The error that I am getting is:
Unable to find a value for name.firstName in object of class
org.team.Person using operator [] (null)
   
If nestedProp was just firstName (and Person had a firstName
 property)
   then
this works just fine.  JSTL is not seeing the . and doing
getName().getFirstName()
   
I have tried a number of combinations with [] and ' (escape) and \
 and
   
nothing works :(  Any help appreciated.
   
   
Carl
  
   --
   Kris Schneider mailto:[EMAIL PROTECTED]
   D.O.Tech   http://www.dotech.com/
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 _
 Never get a busy signal because you are always connected  with high-speed
 
 Internet access. Click here to comparison-shop providers.  
 https://broadband.msn.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




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



Re: JSTL evaluate problems

2003-10-17 Thread Kris Schneider
Then I don't see how to make it work with JSTL. So, nestedProp is a scoped
variable containing the nested property you want to access, right? Does this
work for you:

jsp:useBean id=nestedProp type=java.lang.String/
bean:write name=personForm property=%= nestedProp %/

Unfortunately, I don't think Struts-EL provides a version of bean:write or you
could also try:

bean-el:write name=personForm property=${nestedProp}/

Quoting [EMAIL PROTECTED]:

 No.  The variable that is actually nestedProp is populated dynamically. 
 Most
 of the time it is just a single property name, but from time to time, it
 needs
 to be nested.
 
 Carl
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
  Are you just trying to shorthand this:
  
  c:out value=${person.name.firstName}/
  
  In other words, person.getName().getFirstName().
  
  Quoting [EMAIL PROTECTED]:
  
   JSTL is not nesting appropriately.  Here is an example of what I am
  doing:
   
   c:set var=person value=${requestScope.personForm}/
   c:set var=nestedProp value=name.firstName/
   c:out value=${person[nestedProp]}/
   
   The error that I am getting is:
   Unable to find a value for name.firstName in object of class
   org.team.Person using operator [] (null)
   
   If nestedProp was just firstName (and Person had a firstName property)
  then
   this works just fine.  JSTL is not seeing the . and doing
   getName().getFirstName()
   
   I have tried a number of combinations with [] and ' (escape) and \ and
  
   nothing works :(  Any help appreciated.
   
   
   Carl
  
  -- 
  Kris Schneider mailto:[EMAIL PROTECTED]
  D.O.Tech   http://www.dotech.com/

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

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



Re: display struts tag in Deamveaver design view

2003-10-17 Thread Christian Bollmeyer
Am Donnerstag, 16. Oktober 2003 21:07 schrieb Rong Yu:
 Hi,

 I have been using struts for our project, but our web design teem is
 complaining about not being able to see struts tag in Deamveaver(MX)
 design view. So they can not do such simple things as adding items to
 a combobox using design tools. Instead they have to know how struts
 tag work and hard code it. It has the same problem for all struts
 tags.

Well, we also use DreamWeaver MX sometimes for checking if the
overall layout is alright, and its major advantage is that it doesn't
complain about JSP tags and leaves them more or less untouched.
I don't know why designers like this tool, but that's their part. For
me, it's much too cluttered and tends to break the code formatting.
Still, it's nessary sometimes. Considering the display tags (and
other tags): I doubt that tools can provide an exact preview
of how the output will look like without running the page on
the server, for it's rather undeterminable what HTML may be
rendered in the end. So IMHO the best approach is to put
your pages on a Tomcat server (or whatever), let it generate
the HTML and finally have the web designer deal with the
fancy stuff based on the results. IIRC DreamWeaver MX
also has a 'live' mode that supports dynamic output, but
as we don't use it, I don't have any experience with that.
Or you can put it like this: a web application may live well
without the web designers, but not without the Java
developers that deliver the contents, and form follows
function, as always. Then, as a developer, you only
have to deal with HTML on a low-level basis, ensuring
that the general layout is correct and the application pro-
duces valid HTML code the target platform(s) understands.
For complex layouts, I usually tell the designer to save
a static snapshot of the Tomcat results and work on
that. Then, I take this page and either add the fancy
things to the JSP or add the actual tags to it, whichever
is easier. Furthermore, we make an almost excessive
use of the Tiles plugin, as it allows one to split up a
complex design into several pieces and work on
each one seperately until it looks as expected. You
can learn Tiles in about two hours, and it's perfectly
integrated into Struts.

Finally, when it comes to HTML editing, nowadays
I generally tend to steer clear from any products
that are targeted at web designers in the first
place. Actually, I code HTML the low-level way
using my code editor and make use of things
like DreamWeaver only for cross-checking
if I missed something like ending tags or if
nested tables will display right and the like.
For this, DreamWeaver MX is clearly over-
featured. From a developers view, something
like the JSP editor that's integrated in
Oracle's JDev 10g is a nearly perfect fit
in this direction IMHO, though I personally
don't do much HTML anymore (apart from
my personal website) except in times of
need. YMMV.

HTH,

-- Chris.

 Is there any way to deal with this problem?

 Thanks.

 -Rong


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



Re: AW: Looking up the Struts Datasource

2003-10-17 Thread Ben Anderson
you've tried the configuration detailed in the struts faqs?
http://jakarta.apache.org/struts/faqs/database.html
public ActionForward
  execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws Exception
{
javax.sql.DataSource dataSource;
java.sql.Connection myConnection;
try {
 dataSource = getDataSource(request);
 myConnection = dataSource.getConnection();
 // do what you wish with myConnection
} catch (SQLException sqle) {
   getServlet().log(Connection.process, sqle);
} finally {
   //enclose this in a finally block to make
   //sure the connection is closed
   try {
  myConnection.close();
   } catch (SQLException e) {
  getServlet().log(Connection.close, e);
   }
  }
}

From: Philipp Röthl [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: AW: Looking up the Struts Datasource
Date: Fri, 17 Oct 2003 20:01:39 +0200
Ben, thanks for your answer. But the DS I would like to get is the Struts 
DS. The one I defined in the struts-config.xml.
When I do the naming lookup as you described I get 
javax.naming.NameNotFoundException: Name jdbc is not bound in this 
Context

Philipp

-Ursprüngliche Nachricht-
Von: Ben Anderson [mailto:[EMAIL PROTECTED]
Gesendet: Fr 17.10.2003 16:22
An: [EMAIL PROTECTED]
Cc:
Betreff: Re: Looking up the Struts Datasource


It depends on the container as to how you put the datasource into the
context.
If you're using Tomcat 4.1:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
Then to access the datasource:
String dsName = java:comp/env/jdbc/myDS;
ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(dsName);


	From: Philipp Röthl [EMAIL PROTECTED]
	Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
	To: [EMAIL PROTECTED]
	Subject: Looking up the Struts Datasource
	Date: Fri, 17 Oct 2003 15:50:23 +0200
	
	Hi,
	
	I've implemented a struts application that uses JavaBeans which perform 
the
	whole business logic. These beans access an Oracle DB. The datasource is
	passed from the action classes to the bean classes as a parameter.
	
	Now I have to implement a WebService that does the same as the Struts
	Application. Therefore I use the same JavaBeans.
	
	My problem now is: I have to pass the datasource to the Java Beans. I've
	read that I should be able to access the Struts Datasource via JNDI. But
	how?
	
	Thanks for any help.
	
	Philipp
	
	-
	To unsubscribe, e-mail: [EMAIL PROTECTED]
	For additional commands, e-mail: [EMAIL PROTECTED]
	

	_
	Cheer a special someone with a fun Halloween eCard from American 
Greetings!
	Go to  http://www.msn.americangreetings.com/index_msn.pd?source=msne134

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Want to check if your PC is virus-infected?  Get a FREE computer virus scan 
online from McAfee.
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Re: JSTL evaluate problems

2003-10-17 Thread struts
Kris,

Thanks for your tip.  You lead me to the answer.  Here is what works:

c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:set var=val value=${nestedProp} property=${person} /

Now, we can all stand around and scratch our heads and say Duh! Why didn't I
think of that?  Setting the person as the property tells JSTL to use person
as a bean and allows it to do normal nested queries on nestedProp.  Oh man do
I feel like a dummy.

Carl

Quoting Kris Schneider [EMAIL PROTECTED]:

 Then I don't see how to make it work with JSTL. So, nestedProp is a
 scoped
 variable containing the nested property you want to access, right? Does
 this
 work for you:
 
 jsp:useBean id=nestedProp type=java.lang.String/
 bean:write name=personForm property=%= nestedProp %/
 
 Unfortunately, I don't think Struts-EL provides a version of bean:write
 or you
 could also try:
 
 bean-el:write name=personForm property=${nestedProp}/
 
 Quoting [EMAIL PROTECTED]:
 
  No.  The variable that is actually nestedProp is populated dynamically.
 
  Most
  of the time it is just a single property name, but from time to time,
 it
  needs
  to be nested.
  
  Carl
  
  Quoting Kris Schneider [EMAIL PROTECTED]:
  
   Are you just trying to shorthand this:
   
   c:out value=${person.name.firstName}/
   
   In other words, person.getName().getFirstName().
   
   Quoting [EMAIL PROTECTED]:
   
JSTL is not nesting appropriately.  Here is an example of what I am
   doing:

c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:out value=${person[nestedProp]}/

The error that I am getting is:
Unable to find a value for name.firstName in object of class
org.team.Person using operator [] (null)

If nestedProp was just firstName (and Person had a firstName
 property)
   then
this works just fine.  JSTL is not seeing the . and doing
getName().getFirstName()

I have tried a number of combinations with [] and ' (escape) and \
 and
   
nothing works :(  Any help appreciated.


Carl
   
   -- 
   Kris Schneider mailto:[EMAIL PROTECTED]
   D.O.Tech   http://www.dotech.com/
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




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



Re: JSTL evaluate problems

2003-10-17 Thread struts
Never mind... that didn't fix it either.  property is a property of target,
which is another object.

Carl

Quoting [EMAIL PROTECTED]:

 Kris,
 
 Thanks for your tip.  You lead me to the answer.  Here is what works:
 
 c:set var=person value=${requestScope.personForm}/
 c:set var=nestedProp value=name.firstName/
 c:set var=val value=${nestedProp} property=${person} /
 
 Now, we can all stand around and scratch our heads and say Duh! Why didn't
 I
 think of that?  Setting the person as the property tells JSTL to use
 person
 as a bean and allows it to do normal nested queries on nestedProp.  Oh man
 do
 I feel like a dummy.
 
 Carl
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
  Then I don't see how to make it work with JSTL. So, nestedProp is a
  scoped
  variable containing the nested property you want to access, right? Does
  this
  work for you:
  
  jsp:useBean id=nestedProp type=java.lang.String/
  bean:write name=personForm property=%= nestedProp %/
  
  Unfortunately, I don't think Struts-EL provides a version of
 bean:write
  or you
  could also try:
  
  bean-el:write name=personForm property=${nestedProp}/
  
  Quoting [EMAIL PROTECTED]:
  
   No.  The variable that is actually nestedProp is populated
 dynamically.
  
   Most
   of the time it is just a single property name, but from time to time,
  it
   needs
   to be nested.
   
   Carl
   
   Quoting Kris Schneider [EMAIL PROTECTED]:
   
Are you just trying to shorthand this:

c:out value=${person.name.firstName}/

In other words, person.getName().getFirstName().

Quoting [EMAIL PROTECTED]:

 JSTL is not nesting appropriately.  Here is an example of what I
 am
doing:
 
 c:set var=person value=${requestScope.personForm}/
 c:set var=nestedProp value=name.firstName/
 c:out value=${person[nestedProp]}/
 
 The error that I am getting is:
 Unable to find a value for name.firstName in object of class
 org.team.Person using operator [] (null)
 
 If nestedProp was just firstName (and Person had a firstName
  property)
then
 this works just fine.  JSTL is not seeing the . and doing
 getName().getFirstName()
 
 I have tried a number of combinations with [] and ' (escape) and
 \
  and

 nothing works :(  Any help appreciated.
 
 
 Carl

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/
  
  -- 
  Kris Schneider mailto:[EMAIL PROTECTED]
  D.O.Tech   http://www.dotech.com/
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




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



Re: JSTL evaluate problems

2003-10-17 Thread Kris Schneider
Here's a quick test page that emulates what it sounds like you want to do. The
bean:write seems to work fine.

%@ page contentType=text/plain %
%@ taglib prefix=bean uri=http://jakarta.apache.org/struts/tags-bean; %
%@ taglib prefix=curi=http://java.sun.com/jstl/core; %

jsp:useBean id=person class=java.util.HashMap
jsp:useBean id=name class=java.util.HashMap
c:set target=${name} property=firstName value=Kris/
c:set target=${name} property=lastName value=Schneider/
/jsp:useBean
c:set target=${person} property=name value=${name}/
/jsp:useBean

c:set var=nestedProp value=name.firstName/

person:c:out value=${person}/
person.name:   c:out value=${person.name}/
person.name.firstName: c:out value=${person.name.firstName}/

jsp:useBean id=nestedProp type=java.lang.String/
bean:write: bean:write name=person property=%= nestedProp %/

Quoting [EMAIL PROTECTED]:

 Never mind... that didn't fix it either.  property is a property of target,
 which is another object.
 
 Carl
 
 Quoting [EMAIL PROTECTED]:
 
  Kris,
  
  Thanks for your tip.  You lead me to the answer.  Here is what works:
  
  c:set var=person value=${requestScope.personForm}/
  c:set var=nestedProp value=name.firstName/
  c:set var=val value=${nestedProp} property=${person} /
  
  Now, we can all stand around and scratch our heads and say Duh! Why
 didn't
  I
  think of that?  Setting the person as the property tells JSTL to use
  person
  as a bean and allows it to do normal nested queries on nestedProp.  Oh
 man
  do
  I feel like a dummy.
  
  Carl
  
  Quoting Kris Schneider [EMAIL PROTECTED]:
  
   Then I don't see how to make it work with JSTL. So, nestedProp is a
   scoped
   variable containing the nested property you want to access, right? Does
   this
   work for you:
   
   jsp:useBean id=nestedProp type=java.lang.String/
   bean:write name=personForm property=%= nestedProp %/
   
   Unfortunately, I don't think Struts-EL provides a version of
  bean:write
   or you
   could also try:
   
   bean-el:write name=personForm property=${nestedProp}/
   
   Quoting [EMAIL PROTECTED]:
   
No.  The variable that is actually nestedProp is populated
  dynamically.
   
Most
of the time it is just a single property name, but from time to time,
   it
needs
to be nested.

Carl

Quoting Kris Schneider [EMAIL PROTECTED]:

 Are you just trying to shorthand this:
 
 c:out value=${person.name.firstName}/
 
 In other words, person.getName().getFirstName().
 
 Quoting [EMAIL PROTECTED]:
 
  JSTL is not nesting appropriately.  Here is an example of what I
  am
 doing:
  
  c:set var=person value=${requestScope.personForm}/
  c:set var=nestedProp value=name.firstName/
  c:out value=${person[nestedProp]}/
  
  The error that I am getting is:
  Unable to find a value for name.firstName in object of class
  org.team.Person using operator [] (null)
  
  If nestedProp was just firstName (and Person had a firstName
   property)
 then
  this works just fine.  JSTL is not seeing the . and doing
  getName().getFirstName()
  
  I have tried a number of combinations with [] and ' (escape) and
  \
   and
 
  nothing works :(  Any help appreciated.
  
  
  Carl
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
   
   -- 
   Kris Schneider mailto:[EMAIL PROTECTED]
   D.O.Tech   http://www.dotech.com/

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

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



Re: tiles-defs.xml and dynamic page titles: how to do?

2003-10-17 Thread Kirk Wylie
Have you thought about putting the customer name into request scope in 
your actions and using some type of expression (perhaps using struts-el 
or JSTL) to write out the title? So, for example, you'd have something 
roughly (forgive the fact that I'm not doing it in el):

% pageTitle = %bean.write name=titleFromTiles%,  + customerName; %
title%=pageTitle%/title
So rather than putting the actual final title into the page, you'd put 
in a pattern, and rely on the individual tiles to actually compose the 
page title out of the tiles attribute.

Does that make any sense?

Kirk Wylie
M7 Corporation
PhilNoon wrote:
I am using tiles. I define the title of a web page in tiles-defs.xml as in
this snippet:
  definition name=tiles.customer.title.parcels
extends=tiles.default.layout
put name=title value=Customer Consignment Note/
put name=content   value=/pages/customerTitleParcels.jsp/
  /definition
Then in my jsp, I have:

  tiles:getAsString name=title/

Which outputs Customer Consignment Note as expected.

Now my client wants the title to read Consignment Note for  where 

is the customer's name.

Does anyone have an idea how to do this?



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


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


Re: JSTL evaluate problems

2003-10-17 Thread struts
Thank you Kris!  

Quoting Kris Schneider [EMAIL PROTECTED]:

 Here's a quick test page that emulates what it sounds like you want to do.
 The
 bean:write seems to work fine.
 
 %@ page contentType=text/plain %
 %@ taglib prefix=bean uri=http://jakarta.apache.org/struts/tags-bean;
 %
 %@ taglib prefix=curi=http://java.sun.com/jstl/core; %
 
 jsp:useBean id=person class=java.util.HashMap
 jsp:useBean id=name class=java.util.HashMap
 c:set target=${name} property=firstName value=Kris/
 c:set target=${name} property=lastName value=Schneider/
 /jsp:useBean
 c:set target=${person} property=name value=${name}/
 /jsp:useBean
 
 c:set var=nestedProp value=name.firstName/
 
 person:c:out value=${person}/
 person.name:   c:out value=${person.name}/
 person.name.firstName: c:out value=${person.name.firstName}/
 
 jsp:useBean id=nestedProp type=java.lang.String/
 bean:write: bean:write name=person property=%= nestedProp %/
 
 Quoting [EMAIL PROTECTED]:
 
  Never mind... that didn't fix it either.  property is a property of
 target,
  which is another object.
  
  Carl
  
  Quoting [EMAIL PROTECTED]:
  
   Kris,
   
   Thanks for your tip.  You lead me to the answer.  Here is what works:
   
   c:set var=person value=${requestScope.personForm}/
   c:set var=nestedProp value=name.firstName/
   c:set var=val value=${nestedProp} property=${person} /
   
   Now, we can all stand around and scratch our heads and say Duh! Why
  didn't
   I
   think of that?  Setting the person as the property tells JSTL to use
   person
   as a bean and allows it to do normal nested queries on nestedProp. 
 Oh
  man
   do
   I feel like a dummy.
   
   Carl
   
   Quoting Kris Schneider [EMAIL PROTECTED]:
   
Then I don't see how to make it work with JSTL. So, nestedProp is
 a
scoped
variable containing the nested property you want to access, right?
 Does
this
work for you:

jsp:useBean id=nestedProp type=java.lang.String/
bean:write name=personForm property=%= nestedProp %/

Unfortunately, I don't think Struts-EL provides a version of
   bean:write
or you
could also try:

bean-el:write name=personForm property=${nestedProp}/

Quoting [EMAIL PROTECTED]:

 No.  The variable that is actually nestedProp is populated
   dynamically.

 Most
 of the time it is just a single property name, but from time to
 time,
it
 needs
 to be nested.
 
 Carl
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
  Are you just trying to shorthand this:
  
  c:out value=${person.name.firstName}/
  
  In other words, person.getName().getFirstName().
  
  Quoting [EMAIL PROTECTED]:
  
   JSTL is not nesting appropriately.  Here is an example of what
 I
   am
  doing:
   
   c:set var=person value=${requestScope.personForm}/
   c:set var=nestedProp value=name.firstName/
   c:out value=${person[nestedProp]}/
   
   The error that I am getting is:
   Unable to find a value for name.firstName in object of
 class
   org.team.Person using operator [] (null)
   
   If nestedProp was just firstName (and Person had a firstName
property)
  then
   this works just fine.  JSTL is not seeing the . and doing
   getName().getFirstName()
   
   I have tried a number of combinations with [] and ' (escape)
 and
   \
and
  
   nothing works :(  Any help appreciated.
   
   
   Carl
  
  -- 
  Kris Schneider mailto:[EMAIL PROTECTED]
  D.O.Tech   http://www.dotech.com/

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




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



Localization with Struts/Tiles and URLs

2003-10-17 Thread Ruth, Brice
Greetings, all.

I'm looking for some guidance on how best to go about a requirement I 
have from our marketing as far as URL naming goes. We're developing an 
international (localized) site and we have a requirement that the URLs 
look something like this:

domain/us/whatever
domain/fr/whatever
domain/de/whatever
etc.
Now, I have a pretty decent grasp on how I'm going to use the 
localization features of Tiles and Struts to localize the site, but how 
best do I go about fulfilling the requirement outlined above?

Thanks!

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Writing content to ServletOutputStream from Struts Action

2003-10-17 Thread Pingili, Madhupal
Finally, my Struts application is running in production environment. But, 2
exceptions getting logged in
log files everyday. I want to get rid of them. 
1.   GetDocumentContentAction: * Exception:null
   com.ibm.servlet.engine.srt.WriteBeyondContentLengthException
at
com.ibm.servlet.engine.srt.BufferedServletOutputStream.write(BufferedServlet
OutputStream.java(Compiled Code))
at
GetDocumentContentAction.execute(GetDocumentContentAction.java(Compiled
Code))
   ..

2.  GetDocumentContentAction: * Exception:There is no process to read data
written to a pipe.
   java.io.IOException: There is no process to read data written to a pipe.
at java.net.SocketOutputStream.socketWrite(Native Method)
at
java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
at com.ibm.ws.io.Stream.write(Stream.java(Compiled Code))
at com.ibm.ws.io.WriteStream.write(WriteStream.java(Compiled Code))
at
com.ibm.ws.http.ResponseStream.writeChunk(ResponseStream.java(Compiled
Code))
at com.ibm.ws.http.ResponseStream.write(ResponseStream.java(Compiled
Code))
at com.ibm.ws.io.WriteStream.write(WriteStream.java(Compiled Code))
at
com.ibm.servlet.engine.srp.SRPConnection.write(SRPConnection.java(Compiled
Code))
at
com.ibm.servlet.engine.srp.SRPConnection.write(SRPConnection.java(Compiled
Code))
at
com.ibm.servlet.engine.srt.SRTOutputStream.write(SRTOutputStream.java(Compil
ed Code))
at
com.ibm.servlet.engine.srt.BufferedServletOutputStream.write(BufferedServlet
OutputStream.java(Compiled Code))
at
com.ibm.servlet.engine.srt.BufferedServletOutputStream.write(BufferedServlet
OutputStream.java(Compiled Code))
at
GetDocumentContentAction.execute(GetDocumentContentAction.java(Compiled
Code))
   ..
  
These above 2 exceptions occur when GetDocumentContentAction writes the
content to ServletOutputStream. Here is the code snippet:

  String strEncodedFileName =null;
if (fileName!=null) strEncodedFileName =
response.encodeURL(fileName);

response.setContentLength(iFileSize);
if (strEncodedFileName!=null){
  response.addHeader(Content-disposition,
filename= + strEncodedFileName + ;);
}

ServletOutputStream sos = response.getOutputStream();

// get the data and write to a file
byte[] data = null;
while((data= businessDelegateBean.getNextWindow()) != null) {
  dataLen = dataLen + data.length;
  sos.write(data);
  sos.flush();
}
sos.close();

businessDelegateBean.getNextWindow() gives max of 64 KB (64 * 1024 bytes).
So, Is there any limitations of content length that can be written
OutputStream? 
Any ideas how to eliminate these exceptions?

Regards,
Reddy




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



Re: [FRIDAY] Free Dog..... (going further OT!)

2003-10-17 Thread Andy Engle

Sorry to diverge from the already off-topic topic, but this one
couldn't go without being shared: It's really hot in the room we work
in today.  We've been trying to cool it down in here, but I just heard
from a co-worker of mine (who heard it from our boss) that the heating
and air conditioning in our room (which is in a much larger building
here in northern IL) is actually managed/monitored by a group in India,
where supposedly there is a call center that handles such matters. 
It's hot and stuffy in the cave right now (we refer to the room we work
in as the cave, since there are no windows or signs of the great
outdoors) -- everyone is hot and complaining about it.  Anyway, this
co-worker just told me that our boss apparently called the maintenance
people to compliain about the excessive heat problem this morning, but
his call was routed to a call center in *India*, where the person there
logged a ticket for the heat to be turned down.  That ticket was
logged, but in the end the problem is due to the fact that the heat was
left on, and the person who can turn it down is out today.  So, in
spite of our *international* effort to make sure we're all comfortable
in our office buildings, the ticket logged in India is being unanswered
by a vacationing maintenance worker who is simply not around to cut the
heat back a little.

It's already bad enough that the Cubs lost.  And now we have to deal
with calling people in India to make it cooler in here!?!  This is
absolute foolishness!  I've had enough of this place!


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



org.apache.action.struts.*

2003-10-17 Thread Martin Gainty
Which jar contains org.apache.struts.action.*

Many Thanks,

-Martin

Re: tiles-defs.xml and dynamic page titles: how to do?

2003-10-17 Thread Kris Schneider
I've never used Tiles, but one approach would be to put the title in a
properties file:

parcelsTitle=Consignment Note for {0}

Then set up a Tiles attribute to hold the key for the title message. I guess it
would look something like:

definition name=tiles.customer.title.parcels
extends=tiles.default.layout
  put name=titleKey value=parcelsTitle/
  put name=content value=/pages/customerTitleParcels.jsp/
/definition

Then create a scoped variable to hold the key (not sure if this is right):

tiles:importAttribute name=titleKey/

Finally, use bean:message with the key and dynamic customer name:

jsp:useBean id=customerName type=java.lang.String/
bean:message name=titleKey arg0=%= customerName %/

Or:

bean-el:message name=titleKey arg0=${customerName}/

Quoting Kirk Wylie [EMAIL PROTECTED]:

 Have you thought about putting the customer name into request scope in 
 your actions and using some type of expression (perhaps using struts-el 
 or JSTL) to write out the title? So, for example, you'd have something 
 roughly (forgive the fact that I'm not doing it in el):
 
 % pageTitle = %bean.write name=titleFromTiles%,  + customerName;
 %
 title%=pageTitle%/title
 
 So rather than putting the actual final title into the page, you'd put 
 in a pattern, and rely on the individual tiles to actually compose the 
 page title out of the tiles attribute.
 
 Does that make any sense?
 
 Kirk Wylie
 M7 Corporation
 
 PhilNoon wrote:
  I am using tiles. I define the title of a web page in tiles-defs.xml as
 in
  this snippet:
  
definition name=tiles.customer.title.parcels
  extends=tiles.default.layout
  put name=title value=Customer Consignment Note/
  put name=content   value=/pages/customerTitleParcels.jsp/
/definition
  
  Then in my jsp, I have:
  
tiles:getAsString name=title/
  
  Which outputs Customer Consignment Note as expected.
  
  Now my client wants the title to read Consignment Note for  where 
  
  is the customer's name.
  
  Does anyone have an idea how to do this?

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

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



Re: org.apache.action.struts.*

2003-10-17 Thread Ruth, Brice
struts.jar

Martin Gainty wrote:

Which jar contains org.apache.struts.action.*

Many Thanks,

-Martin
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: HTML encoding of text returned from a bean

2003-10-17 Thread Martin Gainty
Added .\WEB-INF\lib\struts.jar to classpath and that worked ..
Thanks,
-M
- Original Message - 
From: Michael D. Norman [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 2:15 PM
Subject: RE: HTML encoding of text returned from a bean


 Scenario 1 works because the JSP parser understands it needs to parse
 the tags.  However, Scenario 2 is simply returning text that will be
 written to the response.  There is no way that I know of to force a
 container to read dynamically-generated JSP without spitting it out into
 a JSP file and including that JSP file or (BAD IDEA!!!) calling the JSPC
 code from within your JSP/servlet.
 
 If you want to get the dynamic results from the string, you can
 instantiate instances of the tags that are actually doing the work, or
 if possible, use runtime expressions in the parameters of the tags.
 However, I'm not sure exactly what you're trying to accomplish by
 returning JSP from a method so this may not be helpful at all.
 
 -- Michael D. Norman
ProbuSoft -- Custom Software Development
http://www.probusoft.com/
913-390-6951
[EMAIL PROTECTED]
  
 
  -Original Message-
  From: Chadha, Deepak (BLM) [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 17, 2003 12:51 PM
  To: [EMAIL PROTECTED]
  Subject: HTML encoding of text returned from a bean
  
  
  Hi,
  I have some UI customization that is done based on some data.  In
 order to
  implement it in a generic, reusable fashion, I am trying to generate
 the
  HTML text (including struts tags) in a bean (called FETList below).
  
  Scenario1 shown below works.  However, Scenario2 is what I am trying
 to
  get working and not succeeding.
  Thanks for any help.
  Regards
  Deepak
  
  Scenario1: Placing the code in the JSP.  This works and a droplist
 shows
  up fine.
  CODE IN JSP 
  jsp:setProperty name=FETList property=currentKey
  value=MEMBER_DETAIL5MEM_FIELD5C5/
  bean:define id=dctest name=FETList property=myFieldChoiceList
 /
  BR New
  html:select property=contractName
  html:options collection=dctest property=value_cd
  labelProperty=ext_desc /
  /html:select
  
  
  
  Scenario2: Attempting to invoke the getHTMLString() on the bean from
 the
  JSP.  This does not work.  Instead of the droplist showing up, I see
 the
  actual text showing up (bean:define id..)  What am I doing wrong?
 Is
  there some way that I need to flag an encoding scheme?
  
  
  CODE IN JSP 
  jsp:setProperty name=FETList property=currentKey
  value=MEMBER_DETAIL5MEM_FIELD5C5/
  BR bean:write name=FETList property=HTMLString /
  
  CODE IN BEAN FETList that is invoked 
  public String getHTMLString() {
  
  System.out.println(Entered  getHTMLString);
  
  String HTMLString = new String();
  
  HTMLString = bean:define id=\dctest\ name=\FETList\
  property=\myFieldChoiceList\ /BRNew html:select
  property=\contractName\  html:options collection=\dctest\
  property=\value_cd\ labelProperty=\ext_desc\ /  /html:select;
  
  return HTMLString ;
  
  }
  *** Confidentiality Notice ***
  This email, its electronic document attachments, and the contents of
 its
  website linkages may contain confidential health information.  This
  information is intended solely for use by the individual or entity to
 whom
  it is addressed.  If you have received this information in error,
 please
  notify the sender immediately and arrange for the prompt destruction
 of
  the material and any accompanying attachments.
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



repopulating options of html:select when validation fails

2003-10-17 Thread Marc Dugger
Can anyone offer a crafty method of reloading a dynamic collection of
html:options into the request scope in case form validation fails and the
controller must forward to the 'input' of the action mapping?  Thanks.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 10/9/2003


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



RE: ActionMessage groups

2003-10-17 Thread Wendy Smoak
Wiebe de Jong [mailto:[EMAIL PROTECTED] wrote:
 I've notices that ActionError will be deprecated in struts 1.2.1. 
 This may cause me a problem.
 Having two separate lists (ActionErrors and ActionMessages) is great
because of the 
 separation of concerns. I can display the Errors in red and the
Messages in green. When 
 there is only one list, how will I be able to differentiate?

I noticed this, too, but I think it's okay.  There are still two lists,
and in the Action, you use either saveErrors or saveMessages depending
on what you've got.  What changed is the argument to saveErrors-- now
you saveErrors(HttpServletRequest, ActionMessages).

http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.htm
l

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

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



Re: org.apache.action.struts.*

2003-10-17 Thread Andy Engle
Ruth, Brice [EMAIL PROTECTED] wrote:

 struts.jar
 
 Martin Gainty wrote:
 
 Which jar contains org.apache.struts.action.*

Another tip: Sometimes I use WinZip to look at jar files, which will
show you all the classes and paths of those classes that are wrapped up
in a jar file.  Also, you can do the Windoze search for files
containing text... in a specific directory, which will also point out
which jar file may be containing a specific package or class name.


Andy


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



Re: [FRIDAY] Free Dog..... (going further OT!)

2003-10-17 Thread Martin Gainty
Have to do what all people in Southern Climates do when it gets hot ..Take
off !
(You are really going to have to so something about that Northern work
ethic)

Cub Fans arent the only people that are disappointed the Sox got hammered
last nite..

-M

- Original Message - 
From: Andy Engle [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:10 PM
Subject: Re: [FRIDAY] Free Dog. (going further OT!)



 Sorry to diverge from the already off-topic topic, but this one
 couldn't go without being shared: It's really hot in the room we work
 in today.  We've been trying to cool it down in here, but I just heard
 from a co-worker of mine (who heard it from our boss) that the heating
 and air conditioning in our room (which is in a much larger building
 here in northern IL) is actually managed/monitored by a group in India,
 where supposedly there is a call center that handles such matters.
 It's hot and stuffy in the cave right now (we refer to the room we work
 in as the cave, since there are no windows or signs of the great
 outdoors) -- everyone is hot and complaining about it.  Anyway, this
 co-worker just told me that our boss apparently called the maintenance
 people to compliain about the excessive heat problem this morning, but
 his call was routed to a call center in *India*, where the person there
 logged a ticket for the heat to be turned down.  That ticket was
 logged, but in the end the problem is due to the fact that the heat was
 left on, and the person who can turn it down is out today.  So, in
 spite of our *international* effort to make sure we're all comfortable
 in our office buildings, the ticket logged in India is being unanswered
 by a vacationing maintenance worker who is simply not around to cut the
 heat back a little.

 It's already bad enough that the Cubs lost.  And now we have to deal
 with calling people in India to make it cooler in here!?!  This is
 absolute foolishness!  I've had enough of this place!


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



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



RE: HTML:SELECT giving headaches

2003-10-17 Thread Sethi, Mandeep
Hi 

I eventually ended up using the logic:iterate tag and it worked  ,thx

For anyone who faced similar error ,my code was

html:select property=availableList size=18 multiple=true

logic:iterate id=categoryAvailableList name=availableFieldList
option value=bean:write name=categoryAvailableList property=lookupType
/bean:write name=categoryAvailableList property=lookupTypeLabel /
/option
logic:present name=categoryAvailableList property=admStuLookupMasterVO

logic:iterate id=subcategoryAvailableList name=categoryAvailableList
property = admStuLookupMasterVO
option value=bean:write name=subcategoryAvailableList
property=lookupType /|bean:write name=subcategoryAvailableList
property=lookupCode /...bean:write name=subcategoryAvailableList
property=lookupDesc / /option
/logic:iterate

/logic:present
/logic:iterate
/html:select

thxx everybody

Mandeep

-Original Message-
From: Michael D. Norman [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 10:04 AM
To: 'Struts Users Mailing List'
Subject: RE: HTML:SELECT giving headaches

You could do this a couple of ways (thinking out loud here):

1) Do some preprocessing and build a list of all the objects, but I
guess that would only work if your SubCategory class had the same
properties for name and ID.

2) Do some preprocessing and add ID/name pairs to a SequenceHashMap
(org.apache.commons.collections.SequencedHashMap) and use that as your
collection.

3) Don't use html:options/ but instead use nested logic:iterate/
tags (for each category, loop over the subcategories in the collection)
and use html:option/ tags with name/value pairs.  This is probably the
best since it is the clearest as to what you are doing, plus you can
create the empty spaces more easily.

-- Michael D. Norman
   ProbuSoft -- Custom Software Development
   http://www.probusoft.com/
   913-390-6951
   [EMAIL PROTECTED]
 

 -Original Message-
 From: Sethi, Mandeep [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 17, 2003 9:39 AM
 To: 'Struts Users Mailing List'
 Subject: HTML:SELECT giving headaches
 
 
 
 Hi Everyone
 
 I'm working on displaying a collection using HTML:SELECT.
 I'm our case we have a collection of value objects in session scope
,so
 for
 e.g
 in our case we have a collection of Category in session scope ,Which
 further
 has
 a collection of subCategory and I need to display them in a select
list in
 way like
 
 Category name1
 ...subCategory name1
 ...subCategory name2
 
 Category name2
 ...subCategory name1
 ...subCategory name2
 
 
 class Category()
 {
   String name;
   String id;
   Collection subCategory;
 
 }
 
 Class SubCategory{
 String subName;
 String subID;
 }
 
 So far I'm successfull with first part that is displaying Category
name
 with
 their id as value ,my code is
 
 html:select property=availableList size=18 multiple=true
 html:options collection=availableFieldList
  property=lookupType
  labelProperty=lookupTypeLabel/
  /html:select
 
 
 where availableFieldList is the collection of Category ,
 
 Can anyone suggest few ideas for my second step of displaying
 subcategories
 too in required fashion,
 
 Thank You
 
 


**
 **
 This email may contain confidential material.
 If you were not an intended recipient,
 Please notify the sender and delete all copies.
 We may monitor email to and from our network.


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



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

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



Re: org.apache.action.struts.*

2003-10-17 Thread Ruth, Brice
And even more convenient is the way that you can use Eclipse to show all 
the packages/classes/etc. when you add a library to a project. ;)

Andy Engle wrote:

Ruth, Brice [EMAIL PROTECTED] wrote:

 

struts.jar

Martin Gainty wrote:

   

Which jar contains org.apache.struts.action.*
 

Another tip: Sometimes I use WinZip to look at jar files, which will
show you all the classes and paths of those classes that are wrapped up
in a jar file.  Also, you can do the Windoze search for files
containing text... in a specific directory, which will also point out
which jar file may be containing a specific package or class name.
Andy

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: [FRIDAY] Free Dog..... (going further OT!)

2003-10-17 Thread Andy Engle
You wrote:

 Have to do what all people in Southern Climates do when it gets hot
 ..Take off ! (You are really going to have to so something about that
 Northern work ethic)

Yeah... I need to get out of here.  Enough for one day.


 Cub Fans arent the only people that are disappointed the Sox got
 hammered last nite..

Seriously.  I thought they had that thing in the bag, much like I
thought about Game 6 of the Cubs/Marlins series.


Andy


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



O.T. Windward Studios offers free award-winning game for trying Windward Reports

2003-10-17 Thread David Thielen
The Offer

Enemy Nations is one of the highest rated award winning Real-Time Strategy games ever 
created. And you can get a copy for free just by trying Windward Reports.

The Game
Meet interesting people on the Internet, then build big tanks and show the bastards 
who's boss!

The Battle for the Last Planet
Now that you've landed on the last planet, all you have to do is feed your people, 
power your city, fuel your economy, deploy your army and destroy Enemy Nations ... 
before they destroy you. 

Sophisticated Real-Time Strategy
Enemy Nations® is quite simply the most sophisticated, most challenging, and most 
interesting real-time strategy game ever published.

For the free offer, please go to http://www.windwardreports.com/free.htm



Windward Reports

Windward ReportsT is the only J2EE report engine that uses Microsoft WordT as its 
layout tool -- so creating reports is fast  easy, for both technical and 
non-technical users.

Combine that with the robust, plug 'n' play Windward Reports server engine and you've 
got an elegant, flexible and very affordable reporting solution.

It's as easy as 1-2-3: 

  1.. Design your report template using MS-Word (or any RTF-capable editor). 
  2.. Send your XML data file and the report template to the Windward Reports Server. 
  3.. Specify your desired output format: PDF, RTF, HTML or TXT. 
That's it! There's no learning curve or added expenses for your layout tool, and the 
intuitive JSP-like formatting syntax let's you create everything from simple everyday 
reports to complex, enterprise-wide analyses. Look like a hero without ever breaking a 
sweat.

For more information about Windward Reports, please go to 
http://www.windwardreports.com/


Re: org.apache.action.struts.*

2003-10-17 Thread Martin Gainty
Thanks for the great advice..
-M
- Original Message - 
From: Ruth, Brice [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:39 PM
Subject: Re: org.apache.action.struts.*


 And even more convenient is the way that you can use Eclipse to show all 
 the packages/classes/etc. when you add a library to a project. ;)
 
 Andy Engle wrote:
 
 Ruth, Brice [EMAIL PROTECTED] wrote:
 
   
 
 struts.jar
 
 Martin Gainty wrote:
 
 
 
 Which jar contains org.apache.struts.action.*
   
 
 
 Another tip: Sometimes I use WinZip to look at jar files, which will
 show you all the classes and paths of those classes that are wrapped up
 in a jar file.  Also, you can do the Windoze search for files
 containing text... in a specific directory, which will also point out
 which jar file may be containing a specific package or class name.
 
 
 Andy
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
   
 
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: repopulating options of html:select when validation fails

2003-10-17 Thread Wendy Smoak
 Can anyone offer a crafty method of reloading a dynamic collection of
html:options
 into the request scope in case form validation fails and the
controller must forward to 
 the 'input' of the action mapping?  Thanks.

Is putting them in session scope totally out of the question?  I think a
bit of cleanup code is a fair tradeoff for having the collection
available when you need it.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

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



Re: [FRIDAY] Free Dog..... (going further OT!)

2003-10-17 Thread Greg Reddin
Andy Engle wrote:
It's already bad enough that the Cubs lost.  
+1.  I have never wanted a team to win a baseball game so much in my life.



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


Using fmt:message with struts

2003-10-17 Thread Barry Volpe
Hi,

Want to replace:

bean:message key=view.title /

with

fmt:message key=view.title /

I put:

%@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt %

in my jsp.

All I get is 

???view.title???


What am I missing?

Thanks,
Barry

RE: Using fmt:message with struts

2003-10-17 Thread Wendy Smoak
Barry Volpe wrote:
 Want to replace:
 bean:message key=view.title /
 with
 fmt:message key=view.title /
 I put:
 %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt %
 in my jsp.
 All I get is 
 ???view.title???
 What am I missing?

I know this one!  (Having asked the same thing earlier in the week. ;)  

In web.xml:
  !-- this is necessary for the fmt:message tags to work --
  context-param
 
param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
param-valueApplicationResources/param-value
  /context-param

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

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



AW: AW: Looking up the Struts Datasource

2003-10-17 Thread Philipp Rthl
That's not really what I would like to do.
 
public ActionForward
   execute(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response) throws Exception
{
SomeBean  myBean = new SomeBean();
}
 
 
public class SomeBean()
{
 
   public SomeBean()
 {
//how do I get the Struts DS here - without passing it as an attribute?
}
 
}
 
Any hints?
 
phi

-Ursprngliche Nachricht- 
Von: Ben Anderson [mailto:[EMAIL PROTECTED] 
Gesendet: Fr 17.10.2003 20:57 
An: [EMAIL PROTECTED] 
Cc: 
Betreff: Re: AW: Looking up the Struts Datasource



you've tried the configuration detailed in the struts faqs?
http://jakarta.apache.org/struts/faqs/database.html

public ActionForward
   execute(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response) throws Exception
{
javax.sql.DataSource dataSource;
java.sql.Connection myConnection;
try {
  dataSource = getDataSource(request);
  myConnection = dataSource.getConnection();
  // do what you wish with myConnection
} catch (SQLException sqle) {
getServlet().log(Connection.process, sqle);
} finally {
//enclose this in a finally block to make
//sure the connection is closed
try {
   myConnection.close();
} catch (SQLException e) {
   getServlet().log(Connection.close, e);
}
   }
}


From: Philipp Rthl [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: AW: Looking up the Struts Datasource
Date: Fri, 17 Oct 2003 20:01:39 +0200

Ben, thanks for your answer. But the DS I would like to get is the Struts
DS. The one I defined in the struts-config.xml.
When I do the naming lookup as you described I get
javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context

Philipp

   -Ursprngliche Nachricht-
   Von: Ben Anderson [mailto:[EMAIL PROTECTED]
   Gesendet: Fr 17.10.2003 16:22
   An: [EMAIL PROTECTED]
   Cc:
   Betreff: Re: Looking up the Struts Datasource



   It depends on the container as to how you put the datasource into the
   context.

   If you're using Tomcat 4.1:
   
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

   Then to access the datasource:
   String dsName = java:comp/env/jdbc/myDS;
   ctx = new InitialContext();
   DataSource ds = (DataSource)ctx.lookup(dsName);



   From: Philipp Rthl [EMAIL PROTECTED]
   Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Looking up the Struts Datasource
   Date: Fri, 17 Oct 2003 15:50:23 +0200
   
   Hi,
   
   I've implemented a struts application that uses JavaBeans which 
perform
the
   whole business logic. These beans access an Oracle DB. The datasource 
is
   passed from the action classes to the bean classes as a parameter.
   
   Now I have to implement a WebService that does the same as the Struts
   Application. Therefore I use the same JavaBeans.
   
   My problem now is: I have to pass the datasource to the Java Beans. 
I've
   read that I should be able to access the Struts Datasource via JNDI. 
But
   how?
   
   Thanks for any help.
   
   Philipp
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   

   _
   Cheer a special someone with a fun Halloween eCard from American
Greetings!
   Go to  http://www.msn.americangreetings.com/index_msn.pd?source=msne134


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




  1   2   >