Question about property files

2005-06-07 Thread Paul Goepfert
Just  a quick question, I have written a message resource foor part of 
my application.  I  have added the message-resource to my struts 
configuration.  However when I run my web app the properties file is not 
loaded.  I  know its the location.  Here is my  question, where in the 
web app directory structure do I place the propperties file?  I am 
asking on this list because it iis an entry in the struuts-config file.


-Paul

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



Re: [ANNOUNCEMENT] Struts Dialogs: DispatchAction on steroids

2005-06-07 Thread Michael Jouravlev
You do understand that SelectAction is actually just a helper, and the
real story is DialogAction, do you? Have you seen the Login Control
example?

On 6/7/05, Dakota Jack <[EMAIL PROTECTED]> wrote:
> SelectAction is really old news and is what all the apps that use
> multiple select image buttons do only with a lot less bloating of the
> code  See http://www.michaelmcgrady.com/button/
> 
> 
> 
> On 6/7/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > Struts Dialogs is an extension of Struts actions that provides an
> > improved user experience along with event-based programming model.
> >
> > Struts Dialogs currently consists of two action classes: SelectAction
> > and DialogAction.
> >
> > 
> > SelectAction
> > 
> >
> > SelectAction is an abstract Action that dispatches an HTTP form
> > submission event to a handler method.
> >
> > The purpose of this class is processing submission of HTML forms.
> > Unlike DispatchAction and LookupDispatchAction, which correlate value
> > attribute of submit form element with handler method, SelectAction
> > uses name attribute. This allows to display a user-friendly caption on
> > a submit button. Also, it is possible to change button caption without
> > rebuilding the application.
> >
> > 
> > DialogAction
> > 
> >
> > DialogAction is an abstract Action that provides basic dialog
> > functions, like accepting input data, dispatching submit event to a
> > method, generating error messages and rendering a view. DialogAction
> > allows to create robust user inteface and provides simple event-based
> > programming model.
> >
> > DialogAction incorporates several innovative design decisions not
> > previously used in Struts. Some of them are already implemented in
> > other frameworks, like Ruby on Rails or JSF. Other features are unique
> > to DialogAction.
> >
> > The cornerstone concept of DialogAction is separation of input and
> > output processes. This solves several issues, related to HTML form
> > input, like double submit problem, annoying POSTDATA messages, bad
> > usability when Reload, Back and Forward buttons are used.
> >
> > DialogAction defines three different modes of operation:
> >
> > * action initialization prepares action for use with new set of data;
> > * user input process accepts input data, updates domain model,
> > generates error messages;
> > * view rendering process generates a result page.
> >
> > Separation of input and output improves usability and user experience:
> >
> > * Any page can be reloaded without resending input information to
> > the server.
> > * As a consequence, an application does not have to cope with
> > double submits.
> > * Another consequence is that a user does not see "Do you want to
> > resend POSTDATA?" message.
> > * Using Back and Forward buttons is safe, because only result
> > pages are browsed.
> >
> > -
> > Documents, files, samples
> > -
> >
> > Online samples:
> >   http://www.superinterface.com/strutsdialog
> >
> > Documentataion:
> >   http://wiki.java.net/bin/view/Projects/StrutsDialogs
> >   If you cannot see pictures on SelectAction and DialogAction pages,
> >   you might need to register and login to java.net. But it should
> >   work without logging in.
> >
> > Source code for DialogAction and amples is located at:
> >   Folder:
> > 
> > https://easywizard.dev.java.net/servlets/ProjectDocumentList?folderID=3494&expandFolder=3494&folderID=3494
> >   File name:
> > strutsdialog.zip
> >
> > Michael Jouravlev.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> "You can lead a horse to water but you cannot make it float on its back."
> ~Dakota Jack~
>

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



link to a layout page

2005-06-07 Thread Tony Smith
I used tiles defined one of my jsp page with as the
following layout







At another jsp page, I would like to have a link
pointed to this definition. How can I do it? I am
currently using:

ToStudyNew. But it
does not seems to work.

Thanks,



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



access session object

2005-06-07 Thread Tony Smith
Hi:

In my Action class, I stored a object in session with 

 HttpSession session = request.getSession();
 session.setAttribute("myobject", object);

How can I access this object from jsp?

Thanks,




__ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 


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



DynaActionForm / BeanUtils usage issue

2005-06-07 Thread Laurie Harper

Code in a unit test:

  DyanActionForm form = new DynaActionForm();
  BeanUtils.copyProperties(bean, form);

This results in a NullPointerException when BeanUtils calls 
form.getDynaClass().getProperties() (or something like that).


BeanUtils is expecting dynaClass to be set, but DynaActionFrom gives me 
no way to set it, unless I create a sub-class. I had to single step 
through the BeanUtils code to figure out what was causing the NPE 
(complicated by the fact that BeanUtils 1.7.0 has an incorrect version 
listed in it's manifest :=( ).


DynaActionFrom should probably either be abstract or provide a setter 
for dynaClass, given that it's currently impossible to create a valid 
instance without sub-classing.


I'll file a bug report against BeanUtils to use guards around uses of 
getDynaClass() if we can't agree a way to ensure it's unnessesary. Can 
Struts do one of the following:


- make DynaActionForm abstract
- make the default constuctor require an initialization value for dynaClass

I'm guessing the answer is no (for backwards compatibility reasons, 
although maybe not if a DynaActionFrom w/out dynaClass set is always 
invalid). In that case BeanUtils will need to be fixed.


Ugly way to spend an evening, this :-)

L.


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



Re: [ANNOUNCEMENT] Struts Dialogs: DispatchAction on steroids

2005-06-07 Thread Dakota Jack
SelectAction is really old news and is what all the apps that use
multiple select image buttons do only with a lot less bloating of the
code  See http://www.michaelmcgrady.com/button/



On 6/7/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> Struts Dialogs is an extension of Struts actions that provides an
> improved user experience along with event-based programming model.
> 
> Struts Dialogs currently consists of two action classes: SelectAction
> and DialogAction.
> 
> 
> SelectAction
> 
> 
> SelectAction is an abstract Action that dispatches an HTTP form
> submission event to a handler method.
> 
> The purpose of this class is processing submission of HTML forms.
> Unlike DispatchAction and LookupDispatchAction, which correlate value
> attribute of submit form element with handler method, SelectAction
> uses name attribute. This allows to display a user-friendly caption on
> a submit button. Also, it is possible to change button caption without
> rebuilding the application.
> 
> 
> DialogAction
> 
> 
> DialogAction is an abstract Action that provides basic dialog
> functions, like accepting input data, dispatching submit event to a
> method, generating error messages and rendering a view. DialogAction
> allows to create robust user inteface and provides simple event-based
> programming model.
> 
> DialogAction incorporates several innovative design decisions not
> previously used in Struts. Some of them are already implemented in
> other frameworks, like Ruby on Rails or JSF. Other features are unique
> to DialogAction.
> 
> The cornerstone concept of DialogAction is separation of input and
> output processes. This solves several issues, related to HTML form
> input, like double submit problem, annoying POSTDATA messages, bad
> usability when Reload, Back and Forward buttons are used.
> 
> DialogAction defines three different modes of operation:
> 
> * action initialization prepares action for use with new set of data;
> * user input process accepts input data, updates domain model,
> generates error messages;
> * view rendering process generates a result page.
> 
> Separation of input and output improves usability and user experience:
> 
> * Any page can be reloaded without resending input information to
> the server.
> * As a consequence, an application does not have to cope with
> double submits.
> * Another consequence is that a user does not see "Do you want to
> resend POSTDATA?" message.
> * Using Back and Forward buttons is safe, because only result
> pages are browsed.
> 
> -
> Documents, files, samples
> -
> 
> Online samples:
>   http://www.superinterface.com/strutsdialog
> 
> Documentataion:
>   http://wiki.java.net/bin/view/Projects/StrutsDialogs
>   If you cannot see pictures on SelectAction and DialogAction pages,
>   you might need to register and login to java.net. But it should
>   work without logging in.
> 
> Source code for DialogAction and amples is located at:
>   Folder:
> 
> https://easywizard.dev.java.net/servlets/ProjectDocumentList?folderID=3494&expandFolder=3494&folderID=3494
>   File name:
> strutsdialog.zip
> 
> Michael Jouravlev.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Nested properties in DynaActionForm

2005-06-07 Thread Laurie Harper
I'm probably missing something really obvious but I've been fiddling 
about with this for a while now. Maybe someone can spot what I'm doing 
wrong...


I'm using DynaActionForms in my Struts app and I'd like to be able to 
reference a property like this:


  

I tried a form declaration like this:

  

  

but I get an error during request processing that 'iterationLength' is 
not a valid property. So then I tried:


  

  

Struts appears to be trying to cope with this:

DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - 
setProperty(DynaActionForm[dynaClass=ProjectEdit,startDate=,owner=,mode=,description=,iterationLength={},endDate=,status=,name=,doSave=], 
iterationLength.time, [1])
DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - 
  Target bean = {}
DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - 
  Target name = time


So it's getting the empty map as the target bean on which to set a 
property 'time'. But when I fetch the map from the form in my action, 
it's empty.


Is there a way to do this? The reason I want to be able to write the 
property as "iterationLength.time", rather than collapsing it to 
'iterationLengthTime' or something is for consistency with when I'm 
accesing the same property in other beans which aren't dynamically 
generated.


Thanks,

L.


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



RE: Errors not showing on page

2005-06-07 Thread Neil Aggarwal
Michael:

The redirect was it.  I took out the redirect="true" and everything
is working fine.

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com

> -Original Message-
> From: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 07, 2005 4:16 PM
> To: Struts Users Mailing List
> Subject: Re: Errors not showing on page
> 
> 
> 1) First, set the null attribute to "false" in your message resources
> config: 
> http://www.systemmobile.com/articles/strutsMessageResources.html
> And check that Struts at least tries to load messages.
> 
> 2) Does your form bean check for empty fields? Seems, that it forwards
> to "input" without handing control over to action.
> 
> 3) If (2) is correct, then when form fields are not empty, your action
> checks them, and then redirects. Request values are lost after
> redirection.
> 
> Michael.
> 
> On 6/7/05, Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> > Hello:
> > 
> > I am trying to get errors generated from an Action to display
> > on a failure page, but the  tag is not generating
> > any output.
> > 
> > You can see my app by going to
> > http://dev.rentclubs.com/rentclubs/register.do
> > 
> > If you submit the form without putting any input, it reloads
> > the page and the  tag generates a list of errors.
> > 
> > If you fill in the form with junk values and then submit it,
> > you will get a failure page but it does not show the error I
> > am generating.
> > 
> > Here is my action class:
> > 
> > public class RegisterAction extends Action {
> >   public ActionForward execute(ActionMapping mapping,
> >   ActionForm form, HttpServletRequest request, 
> HttpServletResponse response)
> >   throws Exception {
> > // Add the member to the database
> > RegisterForm registerForm = (RegisterForm)form;
> > String firstName = registerForm.getFirstName();
> > System.out.println( "Found first name: " +firstName);
> > 
> > ActionMessages errors = getErrors(request);
> > errors.add(ActionMessages.GLOBAL_MESSAGE ,new
> > ActionMessage("errors.detail","That name already exists"));
> > 
> > if( errors.size() <= 0 )
> >   return mapping.findForward("success");
> > else {
> >   saveErrors(request,errors);
> >   return mapping.findForward("failure");
> > }
> >   }
> > }
> > 
> > Here is the struts-config.xml for the register form:
> >  > name="registerForm" scope="request" input="register.index" 
> validate="true">
> >redirect="true" />
> >redirect="true" />
> > 
> > 
> > 
> > 
> > Here is the code in the failures.jsp page:
> > <[EMAIL PROTECTED] language="java" %>
> > <[EMAIL PROTECTED] file="/imports.jsp" %>
> > <[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-bean"; 
> prefix="bean" %>
> > <[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-html"; 
> prefix="html" %>
> > <[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-tiles"; 
> prefix="tiles"
> > %>
> > 
> > Registration failed
> > 
> > Your registration failed because:
> > 
> > 
> > 
> > If you feel this is not correct, please  > href="mailto:[EMAIL PROTECTED]">contact 
> customer service.
> > 
> > Any idea why the errors are not showing up?
> > 
> > Thanks,
> > Neil
> > 
> > --
> > Neil Aggarwal, JAMM Consulting, (214) 986-3533, 
> www.JAMMConsulting.com
> > FREE! Valuable info on how your business can reduce 
> operating costs by
> > 17% or more in 6 months or less! 
> http://newsletter.JAMMConsulting.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: is performed when org.apache.struts.action.ActionErrors are in the request

2005-06-07 Thread chuck harris
Yes they are included in a common include jsp file:
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld"
prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld"
prefix="logic"%>
and all are in the war.


--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:

> Do you have <%@ taglib
> uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>  in your JSP?
> 
> On 6/7/05, chuck harris <[EMAIL PROTECTED]>
> wrote:
> > I had a struts 1.1 web app contained in its own
> > ear/war. It is/was deployed in jboss/tomcat
> 4.01sp1.
> > Most of the pages extend validatorform. The
> > validatorform validation worked as expected.
> > The pages were packaged in the war:
> > a.jsp ... many jsp's in the war
> > /web-inf/struts-config
> > /web-inf/validation.xml
> > /web-inf/validation-rules.xml
> > /web-inf/ various tld files
> > 
> > Then I included the jsp's in another ear/war that
> > contained several other struts jsp's (none extend
> > validatorform). All jsp's (example) in the new war
> are
> > packaged:
> > /abc/a.jsp ... many jsp's in this context
> > /def/b.jsp ... many jsp's in this context
> > /ghi/c.jsp ... many jsp's in this context - this
> being
> > the one that I included in the existing war.
> > /web-inf/struts-config
> > /web-inf/validation.xml
> > /web-inf/validator-rules.xml
> > /web-inf/ various tld files
> > 
> > I changed the action path in struts-config for the
> new
> > pages from /c to /ghi/c and the input to
> /ghi/c.jsp. I
> > can navigate through the pages as expected if
> > validation errors are not entered.  The problem is
> > when an entry is not valid.  The
> >  tag is not correctly
> > evaluating the messages and code dependent on no
> > errors is being executed. A peek at the request
> shows
> > org.apache.struts.action.ERROR :
> > org.apache.struts.action.ActionErrors
> > with the correct error message.  Why is the
> > messageNotPresent not working properly?  It worked
> > prior to including them in the other ear/war.  I
> tried
> > adding message="true" to the tag but that did not
> > resolve the error.
> > 
> > 
> > 
> > __
> > Discover Yahoo!
> > Get on-the-go sports scores, stock quotes, news
> and more. Check it out!
> > http://discover.yahoo.com/mobile.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]
> 
> 




__ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

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



Re: html-el:checkbox quandary

2005-06-07 Thread Hubert Rabago
Oh, yeah, that's another thing.  You usually can leave out the value
attribute, except in checkbox.  In another thread, where you have
problems with the firstName text field, you can leave out the value
attribute, Struts will automatically populate the field with the value
held by the form. 
http://struts.apache.org/userGuide/struts-html.html#text

For a checkbox, the value field indicates what value Struts should
check for to determine whether or not the checkbox was checked,
whether to set the boolean property to true.  In your case, it's like
saying you're saying "if the user didn't change the value, then
healthEligibilityIndicator should be set to true". 
http://struts.apache.org/userGuide/struts-html.html#checkbox

Hubert


On 6/7/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: <[EMAIL PROTECTED]>
> >
> > In the JSP that is executed for the Dependent action this gets executed:
> >  > value="${dependentForm.dependent.healthEligibilityIndicator}"/>
> >
> 
> Why are you using the 'value' attribute?  The framework will automatically
> render the form element with the value present in the form bean.  In your
> case it's probably not hurting anything, but it keeps catching my eye...
> 
> --
> Wendy Smoak
> 
> 
> -
> 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: How to get posted data into a nested object ?

2005-06-07 Thread Hubert Rabago
It's not clear within your error at which point the error is
occurring.  The problem could be that when BeanUtils tries to populate
the firstName field of the dependent bean, dependent is null.  Maybe
you need to modify your form so that getDependent() always returns a
valid DependentVO object, instantiating one as needed.

Hubert

On 6/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Short description:
> -
> How do I get posted data into a bean within the form bean ?
> 
> The JSP has this code.
>  "${dependentForm.dependent.firstName}"/>
> 
> The page is posted and I get this error:
> [07/06/05 15:15:22:743 EDT] 6aa06aa0 WebGroup  E SRVE0026E: [Servlet
> Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: No bean
> specified
> 
> Really I'm getting exasperated trying to get this working.
> All of the examples I've found deal with collections or simply getting the
> data onto the page.
> I need to pick it up from the page.
> 
> 
> Long Description:
> -
> My form bean contains a value object.
> public class DependentForm extends ActionForm {
>private ImageButtonBean addButton = new ImageButtonBean();
>private ImageButtonBean cancelButton = new ImageButtonBean();
>private DependentVO dependent;
> ...
> 
> public class DependentVO extends Dependent {
> ...
> 
> public class Dependent extends People {
> ...
> 
> public class People {
>private Date dateOfBirth;
>private int employeeNumber;
>private String firstName;
>private String lastName;
>private String relationshipCode;
>private String sexTypeCode;
>private String smokerIndicator;
> 
> The JSP has this code.
>  "${dependentForm.dependent.firstName}"/>
> 
> TIA,
> Glenn
>

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



Re: html-el:checkbox quandary

2005-06-07 Thread Wendy Smoak
From: <[EMAIL PROTECTED]>
>
> In the JSP that is executed for the Dependent action this gets executed:
>  value="${dependentForm.dependent.healthEligibilityIndicator}"/>
>

Why are you using the 'value' attribute?  The framework will automatically
render the form element with the value present in the form bean.  In your
case it's probably not hurting anything, but it keeps catching my eye...

-- 
Wendy Smoak


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



Re: How to get posted data into a nested object ?

2005-06-07 Thread Hubert Rabago
What the heck did I just write?

I meant to say "From the error message you shared, it isn't clear at
which point in the submit process the error is occurring."  Forgive
me, it's near the end of a pretty confusing day here at work.

Hubert

On 6/7/05, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> It's not clear within your error at which point the error is
> occurring.  The problem could be that when BeanUtils tries to populate
> the firstName field of the dependent bean, dependent is null.  Maybe
> you need to modify your form so that getDependent() always returns a
> valid DependentVO object, instantiating one as needed.
> 
> Hubert
> 
> On 6/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > Short description:
> > -
> > How do I get posted data into a bean within the form bean ?
> >
> > The JSP has this code.
> >  > "${dependentForm.dependent.firstName}"/>
> >
> > The page is posted and I get this error:
> > [07/06/05 15:15:22:743 EDT] 6aa06aa0 WebGroup  E SRVE0026E: [Servlet
> > Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: No bean
> > specified
> >
> > Really I'm getting exasperated trying to get this working.
> > All of the examples I've found deal with collections or simply getting the
> > data onto the page.
> > I need to pick it up from the page.
> >
> >
> > Long Description:
> > -
> > My form bean contains a value object.
> > public class DependentForm extends ActionForm {
> >private ImageButtonBean addButton = new ImageButtonBean();
> >private ImageButtonBean cancelButton = new ImageButtonBean();
> >private DependentVO dependent;
> > ...
> >
> > public class DependentVO extends Dependent {
> > ...
> >
> > public class Dependent extends People {
> > ...
> >
> > public class People {
> >private Date dateOfBirth;
> >private int employeeNumber;
> >private String firstName;
> >private String lastName;
> >private String relationshipCode;
> >private String sexTypeCode;
> >private String smokerIndicator;
> >
> > The JSP has this code.
> >  > "${dependentForm.dependent.firstName}"/>
> >
> > TIA,
> > Glenn
> >
>

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



Re: How to get posted data into a nested object ?

2005-06-07 Thread Hubert Rabago
By the way, I should warn you that using Date and int fields on a form
bean (which is what you're essentially doing) can lead to problems
when the user types in invalid data.

Maybe you'd be interested in something like FormDef? http://formdef.dev.java.net

Hubert

On 6/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Short description:
> -
> How do I get posted data into a bean within the form bean ?
> 
> The JSP has this code.
>  "${dependentForm.dependent.firstName}"/>
> 
> The page is posted and I get this error:
> [07/06/05 15:15:22:743 EDT] 6aa06aa0 WebGroup  E SRVE0026E: [Servlet
> Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: No bean
> specified
> 
> Really I'm getting exasperated trying to get this working.
> All of the examples I've found deal with collections or simply getting the
> data onto the page.
> I need to pick it up from the page.
> 
> 
> Long Description:
> -
> My form bean contains a value object.
> public class DependentForm extends ActionForm {
>private ImageButtonBean addButton = new ImageButtonBean();
>private ImageButtonBean cancelButton = new ImageButtonBean();
>private DependentVO dependent;
> ...
> 
> public class DependentVO extends Dependent {
> ...
> 
> public class Dependent extends People {
> ...
> 
> public class People {
>private Date dateOfBirth;
>private int employeeNumber;
>private String firstName;
>private String lastName;
>private String relationshipCode;
>private String sexTypeCode;
>private String smokerIndicator;
> 
> The JSP has this code.
>  "${dependentForm.dependent.firstName}"/>
> 
> TIA,
> Glenn
>

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



Re: html-el:checkbox quandary

2005-06-07 Thread Hubert Rabago
I have to admit I didn't understand the question at all.  :(

Hubert

On 6/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> This raises a question.
> Say I have a Dependent and DependentSubmit actions.
> The Dependent action gets data from the DB and displays it using the
> DependentForm.
> The DependentSubmit action is also using the DependentForm.
> 
> In the JSP that is executed for the Dependent action this gets executed:
>  value="${dependentForm.dependent.healthEligibilityIndicator}"/>
> 
> Based on my problems, is it safe to say that the property is resolved
> on the action being submitted to and the the value on the action currently
> handling the request?
> 
> - Glenn
>

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



Re: is performed when org.apache.struts.action.ActionErrors are in the request

2005-06-07 Thread Michael Jouravlev
Do you have <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
 in your JSP?

On 6/7/05, chuck harris <[EMAIL PROTECTED]> wrote:
> I had a struts 1.1 web app contained in its own
> ear/war. It is/was deployed in jboss/tomcat 4.01sp1.
> Most of the pages extend validatorform. The
> validatorform validation worked as expected.
> The pages were packaged in the war:
> a.jsp ... many jsp's in the war
> /web-inf/struts-config
> /web-inf/validation.xml
> /web-inf/validation-rules.xml
> /web-inf/ various tld files
> 
> Then I included the jsp's in another ear/war that
> contained several other struts jsp's (none extend
> validatorform). All jsp's (example) in the new war are
> packaged:
> /abc/a.jsp ... many jsp's in this context
> /def/b.jsp ... many jsp's in this context
> /ghi/c.jsp ... many jsp's in this context - this being
> the one that I included in the existing war.
> /web-inf/struts-config
> /web-inf/validation.xml
> /web-inf/validator-rules.xml
> /web-inf/ various tld files
> 
> I changed the action path in struts-config for the new
> pages from /c to /ghi/c and the input to /ghi/c.jsp. I
> can navigate through the pages as expected if
> validation errors are not entered.  The problem is
> when an entry is not valid.  The
>  tag is not correctly
> evaluating the messages and code dependent on no
> errors is being executed. A peek at the request shows
> org.apache.struts.action.ERROR :
> org.apache.struts.action.ActionErrors
> with the correct error message.  Why is the
> messageNotPresent not working properly?  It worked
> prior to including them in the other ear/war.  I tried
> adding message="true" to the tag but that did not
> resolve the error.
> 
> 
> 
> __
> Discover Yahoo!
> Get on-the-go sports scores, stock quotes, news and more. Check it out!
> http://discover.yahoo.com/mobile.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]



is performed when org.apache.struts.action.ActionErrors are in the request

2005-06-07 Thread chuck harris
I had a struts 1.1 web app contained in its own
ear/war. It is/was deployed in jboss/tomcat 4.01sp1.
Most of the pages extend validatorform. The
validatorform validation worked as expected. 
The pages were packaged in the war:
a.jsp ... many jsp's in the war
/web-inf/struts-config
/web-inf/validation.xml
/web-inf/validation-rules.xml
/web-inf/ various tld files

Then I included the jsp's in another ear/war that
contained several other struts jsp's (none extend
validatorform). All jsp's (example) in the new war are
packaged:
/abc/a.jsp ... many jsp's in this context
/def/b.jsp ... many jsp's in this context
/ghi/c.jsp ... many jsp's in this context - this being
the one that I included in the existing war.
/web-inf/struts-config
/web-inf/validation.xml
/web-inf/validator-rules.xml
/web-inf/ various tld files

I changed the action path in struts-config for the new
pages from /c to /ghi/c and the input to /ghi/c.jsp. I
can navigate through the pages as expected if
validation errors are not entered.  The problem is
when an entry is not valid.  The
 tag is not correctly
evaluating the messages and code dependent on no
errors is being executed. A peek at the request shows
org.apache.struts.action.ERROR :
org.apache.struts.action.ActionErrors
with the correct error message.  Why is the
messageNotPresent not working properly?  It worked
prior to including them in the other ear/war.  I tried
adding message="true" to the tag but that did not
resolve the error.



__ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

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



Re: Errors not showing on page

2005-06-07 Thread Michael Jouravlev
1) First, set the null attribute to "false" in your message resources
config: http://www.systemmobile.com/articles/strutsMessageResources.html
And check that Struts at least tries to load messages.

2) Does your form bean check for empty fields? Seems, that it forwards
to "input" without handing control over to action.

3) If (2) is correct, then when form fields are not empty, your action
checks them, and then redirects. Request values are lost after
redirection.

Michael.

On 6/7/05, Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> Hello:
> 
> I am trying to get errors generated from an Action to display
> on a failure page, but the  tag is not generating
> any output.
> 
> You can see my app by going to
> http://dev.rentclubs.com/rentclubs/register.do
> 
> If you submit the form without putting any input, it reloads
> the page and the  tag generates a list of errors.
> 
> If you fill in the form with junk values and then submit it,
> you will get a failure page but it does not show the error I
> am generating.
> 
> Here is my action class:
> 
> public class RegisterAction extends Action {
>   public ActionForward execute(ActionMapping mapping,
>   ActionForm form, HttpServletRequest request, HttpServletResponse response)
>   throws Exception {
> // Add the member to the database
> RegisterForm registerForm = (RegisterForm)form;
> String firstName = registerForm.getFirstName();
> System.out.println( "Found first name: " +firstName);
> 
> ActionMessages errors = getErrors(request);
> errors.add(ActionMessages.GLOBAL_MESSAGE ,new
> ActionMessage("errors.detail","That name already exists"));
> 
> if( errors.size() <= 0 )
>   return mapping.findForward("success");
> else {
>   saveErrors(request,errors);
>   return mapping.findForward("failure");
> }
>   }
> }
> 
> Here is the struts-config.xml for the register form:
>  name="registerForm" scope="request" input="register.index" validate="true">
>   
>   
> 
> 
> 
> 
> Here is the code in the failures.jsp page:
> <[EMAIL PROTECTED] language="java" %>
> <[EMAIL PROTECTED] file="/imports.jsp" %>
> <[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-bean"; 
> prefix="bean" %>
> <[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-html"; 
> prefix="html" %>
> <[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-tiles"; 
> prefix="tiles"
> %>
> 
> Registration failed
> 
> Your registration failed because:
> 
> 
> 
> If you feel this is not correct, please  href="mailto:[EMAIL PROTECTED]">contact customer service.
> 
> Any idea why the errors are not showing up?
> 
> Thanks,
> Neil
> 
> --
> Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
> FREE! Valuable info on how your business can reduce operating costs by
> 17% or more in 6 months or less! http://newsletter.JAMMConsulting.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: struts - view, create, update user page

2005-06-07 Thread Tony Smith
Micheal:

Could you show me how to build the "one action"?

Thanks,



--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:

> If you want some kind of automation to build an HTML
> form or JSP for
> an arbitrary object on the fly, then Struts does not
> provide this
> service. You need to design pages yourself. Maybe
> there are some
> third-party libraries to do this.
> 
> I might implement something like this as an example
> for Struts Dialogs
> library, your requirement seems to make a good use
> case. But even then
> I will need to create different pages for user list,
> user edit, user
> view, etc. I will use one action per each CRUD
> operation, though.
> 
> Micahel.
> 
> On 6/7/05, Tony Smith <[EMAIL PROTECTED]> wrote:
> > So here is the situation:
> > 
> > All data is in database.
> > 
> > I have a user table with Fields like First Name,
> Last
> > Name, Address, SSN, EMAIL, Telephone...
> > 
> > I have Account table with fields like ID, Date,
> > Balance,... Each user can have one or more
> Accounts.
> > 
> > I have Transaction table with fields like ID,
> Date,
> > Title, Status ... Each user account have one or
> more
> > Transactions.
> > 
> > ...
> > 
> > 
> > I would like to have pages that can create user,
> > display all users or individual users, edit user
> > information, and delete user.
> > 
> > I would like to have pages that can create
> account,
> > display account, edit account information, and
> delete
> > account...
> > 
> > I would like to have pages that can create
> > transaction, display transaction, edit
> transaction,
> > and delete transaction...
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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



Errors not showing on page

2005-06-07 Thread Neil Aggarwal
Hello:

I am trying to get errors generated from an Action to display
on a failure page, but the  tag is not generating
any output.

You can see my app by going to 
http://dev.rentclubs.com/rentclubs/register.do

If you submit the form without putting any input, it reloads
the page and the  tag generates a list of errors.

If you fill in the form with junk values and then submit it,
you will get a failure page but it does not show the error I
am generating.

Here is my action class:

public class RegisterAction extends Action {
  public ActionForward execute(ActionMapping mapping,
  ActionForm form, HttpServletRequest request, HttpServletResponse response)
  throws Exception {
// Add the member to the database
RegisterForm registerForm = (RegisterForm)form;
String firstName = registerForm.getFirstName();
System.out.println( "Found first name: " +firstName);
 
ActionMessages errors = getErrors(request);
errors.add(ActionMessages.GLOBAL_MESSAGE ,new
ActionMessage("errors.detail","That name already exists"));

if( errors.size() <= 0 )
  return mapping.findForward("success");
else {
  saveErrors(request,errors);
  return mapping.findForward("failure");
}
  }
}

Here is the struts-config.xml for the register form:

   
   

 
 

Here is the code in the failures.jsp page:
<[EMAIL PROTECTED] language="java" %>
<[EMAIL PROTECTED] file="/imports.jsp" %>
<[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-bean"; 
prefix="bean" %>
<[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-html"; 
prefix="html" %>
<[EMAIL PROTECTED] uri="http://jakarta.apache.org/struts/tags-tiles"; 
prefix="tiles"
%>

Registration failed

Your registration failed because:



If you feel this is not correct, please mailto:[EMAIL PROTECTED]">contact customer service.

Any idea why the errors are not showing up?

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com


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



Re: struts - view, create, update user page

2005-06-07 Thread Martin Gainty

Tony-

I agree with Larry on getting a better handle on what data elements are 
identified (schema)
When will the data be used (should beans be short term session-scoped or 
perhaps longer term entity beans)
also any business rules or validations use of 'ValidatorActionForm' need to 
be identified.
Any connection factories to be used, taglibs, as well as version JVM/JDK 
should be known..

The more you know up front the less opportunity for surprise later..

Martin-
- Original Message - 
From: "Tony Smith" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, June 07, 2005 4:01 PM
Subject: Re: struts - view, create, update user page



What is the best way to implment this with Struts?
Need help, please, please, please,



So here is the situation:

All data is in database.

I have a user table with Fields like First Name,
Last
Name, Address, SSN, EMAIL, Telephone...

I have Account table with fields like ID, Date,
Balance,... Each user can have one or more Accounts.

I have Transaction table with fields like ID, Date,
Title, Status ... Each user account have one or more
Transactions.

...


I would like to have pages that can create user,
display all users or individual users, edit user
information, and delete user.

I would like to have pages that can create account,
display account, edit account information, and
delete
account...

I would like to have pages that can create
transaction, display transaction, edit transaction,
and delete transaction...

...

Thanks,
--- Larry Meadors <[EMAIL PROTECTED]> wrote:

> Give us some more info Tony.
>
> Are you talking about a relational database with
20
> tables, or is this
> user information just a few bits in an xml file?
>
> Larry
>
>
> On 6/6/05, Tony Smith <[EMAIL PROTECTED]> wrote:
> > Hi, I am using struts to develop a webapp. One
> piece
> > of work is the user information. I will allow
user
> to
> > create, view, and update his personal
information.
> > Usually, the three pages are very similar. What
is
> the
> > best way to do this with Struts? Is there any
> > "Pattern" for this? I checked the Struts
> > DispatchAction, but
> > not sure how to do it...
> >
> >
> > Thanks,
> >
> >
> >
__
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>


-

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


-

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com



-

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





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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




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



Re: default current_timestamp problem

2005-06-07 Thread Dave Newton

Scott Purcell wrote:


I am trying to create simple reference table for some cookies I am creating. I 
wanted to put in a current_timestamp each time I do an insert so I can delete 
this data after 2 or 3 weeks.

Here is the insert statement:
CREATE TABLE COOKIE_REF (cookie_ref varchar(50), dat timestamp default 
current_timestamp)

I am trying to insert the below statement, but it fails with a 1064 
Error Code : 1064

You have an error in your SQL syntax.  Check the manual that corresponds to 
your MySQL server version for the right syntax to use near 'current_timestamp)' 
at line 1
(0 ms taken)


I am running version 4.0.15-max-debug on windows. and following this link but 
It will not work. What can I be doing wrong?

http://dev.mysql.com/doc/mysql/en/datetime.html
 

You might want to try asking on a MySQL list, or looking at your version 
number vs. the version numbers referenced in the MySQL documentation: " 
Beginning with MySQL 4.1.3, the |CURRENT_TIMESTAMP()|, |CURRENT_TIME()|, 
|CURRENT_DATE()|, and |FROM_UNIXTIME()| functions return values in the 
connection's current time zone, which is available as the value of the 
|time_zone| system variable."


You may not be able to use "current_timestamp()" in 4.0, but you might 
be able to use "now()" (although IIRC I never had particularly goodluck 
with getting default values into time or date fields, but that was back 
in 3.xx days).


Dave



Re: How to get posted data into a nested object ?

2005-06-07 Thread gdeschen
Thanks Dave.
This is what is defined.

   
   
   
   
 

   
   
   
   


The JSP posts here:



But the DependentForm bean has a bean defined within it.
It is this bean that I need to put data into it.





Dave Newton <[EMAIL PROTECTED]> 
07/06/2005 03:57 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: How to get posted data into a nested object ?






[EMAIL PROTECTED] wrote:

>Hello,
>
>Short description:
>-
>How do I get posted data into a bean within the form bean ?
> 
>
Do you have the bean defined in the struts-config for that particular 
action? The "name" attribute of the action mapping should contain the 
name of the bean.

http://struts.apache.org/userGuide/building_view.html#form_beans
http://struts.apache.org/userGuide/building_controller.html#action_mapping_example


Dave



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





Re: struts - view, create, update user page

2005-06-07 Thread Dave Newton

Tony Smith wrote:


What is the best way to implment this with Struts?
Need help, please, please, please, 
 

What exactly are you asking? How to do CRUD pages in Struts? Which 
Actions you might want to subclass to handle this (look at 
DispatchAction, probably)? How to build forms in Struts?


Dave



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



Re: Cannot find bean in any scope

2005-06-07 Thread Dave Newton

Daniel Kies wrote:


If I forward to the jsp via an action, how do I make it so when the
jsp refreshes it hits the action?
 

The URL will show the URL of the action, not the JSP. When you refresh 
it's refreshing the action, which will again forward to the JSP.


Dave



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



default current_timestamp problem

2005-06-07 Thread Scott Purcell
Hello,
I am trying to create simple reference table for some cookies I am creating. I 
wanted to put in a current_timestamp each time I do an insert so I can delete 
this data after 2 or 3 weeks.

Here is the insert statement:
CREATE TABLE COOKIE_REF (cookie_ref varchar(50), dat timestamp default 
current_timestamp)

I am trying to insert the below statement, but it fails with a 1064 
Error Code : 1064
You have an error in your SQL syntax.  Check the manual that corresponds to 
your MySQL server version for the right syntax to use near 'current_timestamp)' 
at line 1
(0 ms taken)


I am running version 4.0.15-max-debug on windows. and following this link but 
It will not work. What can I be doing wrong?

http://dev.mysql.com/doc/mysql/en/datetime.html




Thanks,
Scott

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



Re: struts - view, create, update user page

2005-06-07 Thread Michael Jouravlev
If you want some kind of automation to build an HTML form or JSP for
an arbitrary object on the fly, then Struts does not provide this
service. You need to design pages yourself. Maybe there are some
third-party libraries to do this.

I might implement something like this as an example for Struts Dialogs
library, your requirement seems to make a good use case. But even then
I will need to create different pages for user list, user edit, user
view, etc. I will use one action per each CRUD operation, though.

Micahel.

On 6/7/05, Tony Smith <[EMAIL PROTECTED]> wrote:
> So here is the situation:
> 
> All data is in database.
> 
> I have a user table with Fields like First Name, Last
> Name, Address, SSN, EMAIL, Telephone...
> 
> I have Account table with fields like ID, Date,
> Balance,... Each user can have one or more Accounts.
> 
> I have Transaction table with fields like ID, Date,
> Title, Status ... Each user account have one or more
> Transactions.
> 
> ...
> 
> 
> I would like to have pages that can create user,
> display all users or individual users, edit user
> information, and delete user.
> 
> I would like to have pages that can create account,
> display account, edit account information, and delete
> account...
> 
> I would like to have pages that can create
> transaction, display transaction, edit transaction,
> and delete transaction...

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



[Announce] Stylus Studio 6 XML Enterprise Edition (an XML IDE) now available

2005-06-07 Thread Stylus Studio Announcements
[Announce]Dear Struts-users,

Stylus Studio 6 XML Enterprise Edition (an XML IDE) is now available for free 
trial download at: http://www.stylusstudio.com/xml_download.html. Here is a 
summary of some of the new features:
 
* Java Code Generation: Now you can generate code for your XQuery and XSLT 
stylesheets and deploy that code to a live production server or application. 
Stylus Studio captures the settings specified in the XQuery and XSLT scenarios 
- fully configurable, with your choice of XML processor, parameters, 
input/output files, and post processing options, for example - and reflects 
them in the generated Java code. 
* Updated W3C XQuery Compliance:  Stylus Studio is the first XML IDE to fully 
support the W3C XQuery working draft of April 2005 
* New XML Schema Tools:  EDI/EDIFACT to XML Schema conversion - Generate sample 
XML fragments from XML Schema components - Generate Java API for XML Binding 
(JAXB) code from XML Schema - Create XML Schema documentation with a familiar 
JavaDoc-like layout - XML Schema-based output validation of XSLT or XQuery 
transformations - these and many more usability enhancements further the Stylus 
Studio position as the most innovative tool for XML Schema data modeling.
* New File Explorer: The new File Explorer window provides a handy way for 
developers to manage their files in Stylus Studio and to perform other basic 
file-oriented operations (delete, copy, and rename, for example). You can also 
easily convert files by dragging the file you want to convert onto any 
user-defined built-in adapters. A new Auto-Backup feature optionally creates 
backup files of your documents when you save them. 
* XML Diff Text View: The XML Diff Viewer has a third way to view differences 
in XML documents. In addition to the Split View - Tree tab and the Merged tab, 
you can now view two documents side-by-side in plain text on the Split View - 
Text tab. 
* Canonical XML Converter: Render XML in its canonical form with a single mouse 
click - just one of the many new features in the Stylus Studio XML Editor.
 
You can download a free 30-day trial of Stylus Studio 6 XML Enterprise Edition 
at: http://www.stylusstudio.com/xml_download.html
 
Sincerely,
The Stylus Studio Team
http://www.stylusstudio.com
 


Re: i18n url link problem

2005-06-07 Thread Martin Gainty

Right off the bat I assume you included in your taglib's e.g.
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
at top of your jsp?
then you must dynamically create the href so using html:rewrite will help 
instead of link

"">
The doc is available at
http://struts.apache.org/userGuide/struts-html.html#rewrite

Viel Gluck,
Martin-

- Original Message - 
From: "Braun, James F" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2005 2:59 PM
Subject: i18n url link problem


I have a struts app that needs to change a link's url as well as the
title. That is, the url for the product catalogs are different for
Germany and US as well as the titles.

en_US
link.title=Products
link.url=http://www.myUScompany.com/products
de_DE
link.title=Produkte
link.url=http://www.myDEcompany.com/catalog

I have no problem with the title but getting the url into the href="~"
part of the tag on the .jsp page is driving me nuts!

Here is the history of my logic for a top bar menu link: (referring to
the property file above)

I started with:
http://www.myUScompany.com/products";>
Products


I converted the title phrase to i18n which worked fine:
http://www.myUScompany.com/products";>



I tried to convert the link to i18n like this:
">



This failed as well as everything else I tried to get the localized url
into the html:link. I tried html:write but since I'm new to struts I
don't have any confidence that I did it correctly. I'm sure that there
must be a way to do this since I can't be the only one with this
problem.

TIA, J.

--
This transmission is intended only for use by the addressee(s) named herein 
and may contain information that is proprietary, confidential and/or legally 
privileged. If you are not the intended recipient, you are hereby notified 
that any disclosure, copying, distribution, or use of the information 
contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If 
you received this transmission in error, please immediately contact the 
sender and destroy the material in its entirety, whether in electronic or 
hard copy format. Thank you.




-
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 - view, create, update user page

2005-06-07 Thread Tony Smith
What is the best way to implment this with Struts?
Need help, please, please, please, 


> So here is the situation:
> 
> All data is in database. 
> 
> I have a user table with Fields like First Name,
> Last
> Name, Address, SSN, EMAIL, Telephone...
> 
> I have Account table with fields like ID, Date,
> Balance,... Each user can have one or more Accounts.
> 
> I have Transaction table with fields like ID, Date,
> Title, Status ... Each user account have one or more
> Transactions.
> 
> ...
> 
> 
> I would like to have pages that can create user,
> display all users or individual users, edit user
> information, and delete user.
> 
> I would like to have pages that can create account,
> display account, edit account information, and
> delete
> account...
> 
> I would like to have pages that can create
> transaction, display transaction, edit transaction,
> and delete transaction...
> 
> ...
> 
> Thanks,
> --- Larry Meadors <[EMAIL PROTECTED]> wrote:
> 
> > Give us some more info Tony.
> > 
> > Are you talking about a relational database with
> 20
> > tables, or is this
> > user information just a few bits in an xml file?
> > 
> > Larry
> > 
> > 
> > On 6/6/05, Tony Smith <[EMAIL PROTECTED]> wrote:
> > > Hi, I am using struts to develop a webapp. One
> > piece
> > > of work is the user information. I will allow
> user
> > to
> > > create, view, and update his personal
> information.
> > > Usually, the three pages are very similar. What
> is
> > the
> > > best way to do this with Struts? Is there any
> > > "Pattern" for this? I checked the Struts
> > > DispatchAction, but
> > > not sure how to do it...
> > > 
> > > 
> > > Thanks,
> > > 
> > > 
> > >
> __
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > 
> > >
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: How to get posted data into a nested object ?

2005-06-07 Thread Dave Newton

[EMAIL PROTECTED] wrote:


Hello,

Short description:
-
How do I get posted data into a bean within the form bean ?
 

Do you have the bean defined in the struts-config for that particular 
action? The "name" attribute of the action mapping should contain the 
name of the bean.


http://struts.apache.org/userGuide/building_view.html#form_beans
http://struts.apache.org/userGuide/building_controller.html#action_mapping_example

Dave



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



Re: ValidatorActionForm and JavaScript

2005-06-07 Thread Lucas Bern
Hi Martin...
I can not understand what you mean, could you explain it deeply please??
What i need, is to validate a form with a different definition in 
validation.xml for each action.
 
Thanks, and wait for your reply...
Lucas
 
 


Martin Gainty <[EMAIL PROTECTED]> escribió:
Appears that either the generated ActionForm or DynaActionForm form name (as 
evideenced by by the validator. Take a look at your struts-config.xml to 
determine the 
form name and substitute for unknown 'myFormName_required'

in other words
has an entry "YourForm" in

name='YourForm'
type='com.arIsThePlaceToBe.struts.action.YourAction'
...
Conoces?
Martin-
- Original Message - 
From: "Lucas Bern" 
To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2005 3:04 PM
Subject: ValidatorActionForm and JavaScript


> Hi all
> I have a problem with validator. I'm trying to validate a form depending 
> on the action, so I'm using the ValidatorActionForm as superclass of my 
> form...
> I made everything as specified in the documentation, but, the java script 
> code generated by validator produces an error
>
> "myFormName_required undefined"
>
> I think that the java script code generated by validator is using the name 
> attirbute of the form html tag, but it shoud be the action attribute of 
> the form html tag...
>
> help??
>
> Thanks
> Lucas
>
>
> Matthias Wessendorf escribió:
> Hi all,
>
> perhaps this question has been asked allready,
> but let me ask it again...
>
> Is anybody in Stuttgart (Germany) at ApacheCon Europe 18->22 July.
>
> Thanks,
> Matthias
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> 1GB gratis, Antivirus y Antispam
> Correo Yahoo!, el mejor correo web del mundo
> Abrí tu cuenta aquí 

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



-
 A tu celular ¿no le falta algo?
 Usá Yahoo! Messenger y Correo Yahoo! en tu teléfono celular.
 Más información aquí.

Re: ValidatorActionForm and JavaScript

2005-06-07 Thread Lucas Bern
Hi Martin...
I can not understand what you mean, could you explain it deeply please??
What i need, is to validate a form with a different definition in 
validation.xml for each action.
 
Thanks, and wait for your reply...
Lucas
 
 


Martin Gainty <[EMAIL PROTECTED]> escribió:
Appears that either the generated ActionForm or DynaActionForm form name (as 
evideenced by by the validator. Take a look at your struts-config.xml to 
determine the 
form name and substitute for unknown 'myFormName_required'

in other words
has an entry "YourForm" in

name='YourForm'
type='com.arIsThePlaceToBe.struts.action.YourAction'
...
Conoces?
Martin-
- Original Message - 
From: "Lucas Bern" 
To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2005 3:04 PM
Subject: ValidatorActionForm and JavaScript


> Hi all
> I have a problem with validator. I'm trying to validate a form depending 
> on the action, so I'm using the ValidatorActionForm as superclass of my 
> form...
> I made everything as specified in the documentation, but, the java script 
> code generated by validator produces an error
>
> "myFormName_required undefined"
>
> I think that the java script code generated by validator is using the name 
> attirbute of the form html tag, but it shoud be the action attribute of 
> the form html tag...
>
> help??
>
> Thanks
> Lucas
>
>
> Matthias Wessendorf escribió:
> Hi all,
>
> perhaps this question has been asked allready,
> but let me ask it again...
>
> Is anybody in Stuttgart (Germany) at ApacheCon Europe 18->22 July.
>
> Thanks,
> Matthias
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> 1GB gratis, Antivirus y Antispam
> Correo Yahoo!, el mejor correo web del mundo
> Abrí tu cuenta aquí 

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


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

How to get posted data into a nested object ?

2005-06-07 Thread gdeschen
Hello,

Short description:
-
How do I get posted data into a bean within the form bean ?

The JSP has this code.


The page is posted and I get this error:
[07/06/05 15:15:22:743 EDT] 6aa06aa0 WebGroup  E SRVE0026E: [Servlet 
Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: No bean 
specified

Really I'm getting exasperated trying to get this working.
All of the examples I've found deal with collections or simply getting the 
data onto the page.
I need to pick it up from the page.


Long Description:
-
My form bean contains a value object.
public class DependentForm extends ActionForm {
   private ImageButtonBean addButton = new ImageButtonBean();
   private ImageButtonBean cancelButton = new ImageButtonBean();
   private DependentVO dependent;
...

public class DependentVO extends Dependent {
...

public class Dependent extends People {
...

public class People {
   private Date dateOfBirth;
   private int employeeNumber;
   private String firstName;
   private String lastName;
   private String relationshipCode;
   private String sexTypeCode;
   private String smokerIndicator;

The JSP has this code.


TIA,
Glenn

Re: Cannot find bean in any scope

2005-06-07 Thread Daniel Kies
If I forward to the jsp via an action, how do I make it so when the
jsp refreshes it hits the action?

On 6/7/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> On 6/7/05, Daniel Kies <[EMAIL PROTECTED]> wrote:
> > Greetings.  Here is my problem:
> > index.jsp does a redirect to my action.
> > action loads a bean with data
> > forwards to x.jsp
> >
> > x.jsp looks fine, data comes up fine.
> >
> > I do a refresh.  I get Cannot find bean in any scope.  The first time
> > i have data with no problems because the action class loads the
> > request with the bean w\data.
> >
> > The second time the bean is not in the request since i am calling the
> > jsp directly (through the refresh).
> 
> Do you redirect or forward to x.jsp? If you redirect, you lose beans
> with scope less than session.
> 
> > Question:
> > 1) What is a simple way to fix this?
> 
> Either store bean in session, or forward to jsp through action. Thus,
> you actually would be reloading action.
> 
> > 2) I thought the request kept the data in it for a refresh.  Is this wrong?
> 
> yep, this is wrong.
> 
> Michael.
>

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



Re: Cannot find bean in any scope

2005-06-07 Thread Dave Newton

Daniel Kies wrote:


index.jsp does a redirect to my action.
action loads a bean with data
forwards to x.jsp

x.jsp looks fine, data comes up fine.

I do a refresh.  I get Cannot find bean in any scope.  The first time
i have data with no problems because the action class loads the
request with the bean w\data.

The second time the bean is not in the request since i am calling the
jsp directly (through the refresh).

Question:
1) What is a simple way to fix this?
 


1) Put the bean in session (not _my_ preferred solution).

2) Forward (not redirect) to the JSP, so when you refresh you're 
refreshing the action, not the JSP. This also separates the user from 
the JSP (which in struts folks tend to put under WEB-INF so you can't 
get at them from the browser, except for some welcome files).



2) I thought the request kept the data in it for a refresh.  Is this wrong?
 


Apparently ;)

Yes, that's wrong: A refresh is just a new request to the current URL.

Dave



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



Re: i18n url link problem

2005-06-07 Thread gdeschen
The problem is that you have a tag nested within a tag.
In order to do this you need to use the html-el:link tag. The el is 
Expression Language.
However, I am having difficulties with applying the el tags... so I cannot 
yet help you.

One quick way around this is to do it this way:




HTH,
Glenn




"Braun, James F" <[EMAIL PROTECTED]> 
07/06/2005 02:59 PM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
i18n url link problem






I have a struts app that needs to change a link's url as well as the
title. That is, the url for the product catalogs are different for
Germany and US as well as the titles.

en_US
link.title=Products
link.url=http://www.myUScompany.com/products
de_DE
link.title=Produkte
link.url=http://www.myDEcompany.com/catalog

I have no problem with the title but getting the url into the href="~"
part of the tag on the .jsp page is driving me nuts!

Here is the history of my logic for a top bar menu link: (referring to
the property file above)

I started with: 
http://www.myUScompany.com/products";>
 Products 


I converted the title phrase to i18n which worked fine: 
http://www.myUScompany.com/products";>
  


I tried to convert the link to i18n like this: 
"> 
  


This failed as well as everything else I tried to get the localized url
into the html:link. I tried html:write but since I'm new to struts I
don't have any confidence that I did it correctly. I'm sure that there
must be a way to do this since I can't be the only one with this
problem.

TIA, J.

-- 
This transmission is intended only for use by the addressee(s) named 
herein and may contain information that is proprietary, confidential 
and/or legally privileged. If you are not the intended recipient, you are 
hereby notified that any disclosure, copying, distribution, or use of the 
information contained herein (including any reliance thereon) is STRICTLY 
PROHIBITED. If you received this transmission in error, please immediately 
contact the sender and destroy the material in its entirety, whether in 
electronic or hard copy format. Thank you.



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





Re: ValidatorActionForm and JavaScript

2005-06-07 Thread Martin Gainty
Appears that either the generated ActionForm or DynaActionForm form name (as 
evideenced by by the validator. Take a look at your struts-config.xml to determine the 
form name and substitute for unknown 'myFormName_required'


in other words

- Original Message - 
From: "Lucas Bern" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2005 3:04 PM
Subject: ValidatorActionForm and JavaScript



Hi all
I have a problem with validator. I'm trying to validate a form depending 
on the action, so I'm using the ValidatorActionForm as superclass of my 
form...
I made everything as specified in the documentation, but, the java script 
code generated by validator produces an error


"myFormName_required undefined"

I think that the java script code generated by validator is using the name 
attirbute of the form html tag, but it shoud be the action attribute of 
the form html tag...


help??

Thanks
Lucas


Matthias Wessendorf <[EMAIL PROTECTED]> escribió:
Hi all,

perhaps this question has been asked allready,
but let me ask it again...

Is anybody in Stuttgart (Germany) at ApacheCon Europe 18->22 July.

Thanks,
Matthias

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



-
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
Abrí tu cuenta aquí 


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



Re: Reading value from HashMap via JSTL

2005-06-07 Thread Jim Kennedy
Here's how I do it:


This example has the 50 US states stored in a map.
state is a variable store in some scope.


-Original Message-
From: Grzegorz Stasica <[EMAIL PROTECTED]>
Sent: Jun 7, 2005 2:46 PM
To: user@struts.apache.org
Subject: Reading value from HashMap via JSTL

hi,

I've a page on which there are a lot of similar data. For every week in 
a year (52 total) I have 3 different values for instance:
week 1
efficiency=98
complaints=45
other=3

I've decided that HashMap will be the best to store all of the values 
and access each value base on key (key is being build from concatenting 
string year+week+value_type)

How can I access value for specific key from JSTL



Or is it better way to store these values. I rule out having each value 
as a different variable since I'll have 52*3 different variables


-
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: Cannot find bean in any scope

2005-06-07 Thread Michael Jouravlev
On 6/7/05, Daniel Kies <[EMAIL PROTECTED]> wrote:
> Greetings.  Here is my problem:
> index.jsp does a redirect to my action.
> action loads a bean with data
> forwards to x.jsp
> 
> x.jsp looks fine, data comes up fine.
> 
> I do a refresh.  I get Cannot find bean in any scope.  The first time
> i have data with no problems because the action class loads the
> request with the bean w\data.
> 
> The second time the bean is not in the request since i am calling the
> jsp directly (through the refresh).

Do you redirect or forward to x.jsp? If you redirect, you lose beans
with scope less than session.

> Question:
> 1) What is a simple way to fix this?

Either store bean in session, or forward to jsp through action. Thus,
you actually would be reloading action.

> 2) I thought the request kept the data in it for a refresh.  Is this wrong?

yep, this is wrong.

Michael.

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



RE: Reading value from HashMap via JSTL

2005-06-07 Thread Durham David R Jr Ctr 805 CSPTS/SCE
> How can I access value for specific key from JSTL
> 
> 
> 
> Or is it better way to store these values. I rule out having each 
> value as a different variable since I'll have 52*3 different 
> variables

You can just do:

${myhashmap.mykey}


- Dave



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



Reading value from HashMap via JSTL

2005-06-07 Thread Grzegorz Stasica

hi,

I've a page on which there are a lot of similar data. For every week in 
a year (52 total) I have 3 different values for instance:

week 1
efficiency=98
complaints=45
other=3

I've decided that HashMap will be the best to store all of the values 
and access each value base on key (key is being build from concatenting 
string year+week+value_type)


How can I access value for specific key from JSTL



Or is it better way to store these values. I rule out having each value 
as a different variable since I'll have 52*3 different variables



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



ValidatorActionForm and JavaScript

2005-06-07 Thread Lucas Bern
Hi all
I have a problem with validator. I'm trying to validate a form depending on the 
action, so I'm using the ValidatorActionForm as superclass of my form...
I made everything as specified in the documentation, but, the java script code 
generated by validator produces an error
 
"myFormName_required undefined"
 
I think that the java script code generated by validator is using the name 
attirbute of the form html tag, but it shoud be the action attribute of the 
form html tag...
 
help??
 
Thanks
Lucas


Matthias Wessendorf <[EMAIL PROTECTED]> escribió:
Hi all,

perhaps this question has been asked allready,
but let me ask it again...

Is anybody in Stuttgart (Germany) at ApacheCon Europe 18->22 July.

Thanks,
Matthias

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



-
 1GB gratis, Antivirus y Antispam
 Correo Yahoo!, el mejor correo web del mundo
 Abrí tu cuenta aquí

Cannot find bean in any scope

2005-06-07 Thread Daniel Kies
Greetings.  Here is my problem:
index.jsp does a redirect to my action.
action loads a bean with data
forwards to x.jsp

x.jsp looks fine, data comes up fine.

I do a refresh.  I get Cannot find bean in any scope.  The first time
i have data with no problems because the action class loads the
request with the bean w\data.

The second time the bean is not in the request since i am calling the
jsp directly (through the refresh).

Question:
1) What is a simple way to fix this?
2) I thought the request kept the data in it for a refresh.  Is this wrong?

Thanks.

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



i18n url link problem

2005-06-07 Thread Braun, James F
I have a struts app that needs to change a link's url as well as the
title. That is, the url for the product catalogs are different for
Germany and US as well as the titles.

en_US
link.title=Products
link.url=http://www.myUScompany.com/products
de_DE
link.title=Produkte
link.url=http://www.myDEcompany.com/catalog

I have no problem with the title but getting the url into the href="~"
part of the tag on the .jsp page is driving me nuts!

Here is the history of my logic for a top bar menu link: (referring to
the property file above)

I started with: 
http://www.myUScompany.com/products";>
Products 


I converted the title phrase to i18n which worked fine: 
http://www.myUScompany.com/products";>
 


I tried to convert the link to i18n like this: 
"> 
 


This failed as well as everything else I tried to get the localized url
into the html:link. I tried html:write but since I'm new to struts I
don't have any confidence that I did it correctly. I'm sure that there
must be a way to do this since I can't be the only one with this
problem.

TIA, J.

-- 
This transmission is intended only for use by the addressee(s) named herein and 
may contain information that is proprietary, confidential and/or legally 
privileged. If you are not the intended recipient, you are hereby notified that 
any disclosure, copying, distribution, or use of the information contained 
herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received 
this transmission in error, please immediately contact the sender and destroy 
the material in its entirety, whether in electronic or hard copy format. Thank 
you.



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



[OT] ApacheCon Europe

2005-06-07 Thread Matthias Wessendorf

Hi all,

perhaps this question has been asked allready,
but let me ask it again...

Is anybody in Stuttgart (Germany) at ApacheCon Europe 18->22 July.

Thanks,
Matthias

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



Re: How do I use JAAS(JbossSX) in Struts?

2005-06-07 Thread Adam Hardy
You need to put that /DB/home url pattern in your web.xml otherwise the 
servlet container won't force you to login when requesting it.



Adam

On 07/06/05 13:02 marc wrote:

Ok seems like it is not working well at all.

Me login is logging me in ok. But it seems like neither me web.xml or my 
struts actions is looking in me roles.


I have a admin user wdkmaol, that has the admin role. To test things I 
made this code in the login action:

**
Subject testsub = lc.getSubject();
Set testset = testsub.getPrincipals();

Iterator ite = testset.iterator();

while (ite.hasNext()){
System.out.println("CYKLE CYKLE: "+ite.next().toString());
}
***
This prints out:
***
CYKLE CYKLE: wdkmaol
CYKLE CYKLE: Roles(members:admin)
***
So I should be in the right role.


Then I put this in me web.xml:
***


Secure Content
/HelpDesk/bruger/*


admin


NONE


***
But there is no problem going to /HelpDesk/bruger/adduser, as the 
admin.


Last but not least I didt this in some action's to test:
***




***

When I try to access this it comes back with:
***
User is not authorized to access action /DB/home
***
Even thow Im in the admin role.


Im I missing something??



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



Re: Date UI

2005-06-07 Thread Adam Hardy

On 07/06/05 12:55 Larry Meadors wrote:

I am generally allergic to Javascript which I guess limits what can be done
with fancy pop-up pickers. Am open to suggestions should there be a nice
robust script out there I guess.




Get over it. Like it or not, JavaScript is here to stay. Anyone who
looks at any modern framework (including Struts, JSF, and .net) and
says "Ew, JavaScript..." should consider a new career path. Sorry, but
it is just a fact of life, get used to it.



Yes sure but just make sure you don't make javascript mandatory for the 
user - because surfers will always use browsers (e.g. PDA, linux 
console) that don't do javascript.



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



Re: Tomcat Struts form population problem in PRODUCTION

2005-06-07 Thread Adam Hardy
What I mean by security is, what sort of user authentication? For your 
login, that is. I assume that it's hand-rolled and you're accessing some 
sort of data store to verify the password given by the user.


I'll also assume that you've got the struts-config mapping correct, so 
that the correct formbean is being created for the URL you are 
submitting to, and that the formbean has property getters and setters 
matching the field names.


Could you have 2 instances of your formbean and be using the wrong one?

Could you be submitting twice (due to a freaky HTML mistake) or 
submitting to the wrong URL?


Try debugging the params in the request itself - here's my JSP debug method
<%
out.println("App");
java.util.Enumeration e = 
pageContext.getAttributeNamesInScope(PageContext.APPLICATION_SCOPE);

Object value;
while (e != null && e.hasMoreElements())
{
String key = (String)e.nextElement();
value = null;
if (key != null)
value = pageContext.getAttribute(key, 
PageContext.APPLICATION_SCOPE);

out.println(key + ": " + value);
}
out.println("Session");
e = pageContext.getAttributeNamesInScope(PageContext.SESSION_SCOPE);
while (e != null && e.hasMoreElements())
{
String key = (String)e.nextElement();
value = null;
if (key != null)
value = pageContext.getAttribute(key, PageContext.SESSION_SCOPE);
out.println(key + ": " + value);
}
out.println("Request");
e = pageContext.getAttributeNamesInScope(PageContext.REQUEST_SCOPE);
while (e != null && e.hasMoreElements())
{
String key = (String)e.nextElement();
value = null;
if (key != null)
value = pageContext.getAttribute(key, PageContext.REQUEST_SCOPE);
out.println(key + ": " + value);
}
%>




On 07/06/05 09:19 Mark Benussi wrote:

There is no security implemented.

When the form is submitted it calls the BeanUtils.populate method.

With debgging enabled no values are copied into my form on the first 
submission of the form if the form is within a page that was produced as 
the result of the first ever session request to a url on the server 
(phew!).



Original Message Follows
From: Adam Hardy <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: Struts Users Mailing List 
Subject: Re: Tomcat Struts form population problem in PRODUCTION
Date: Tue, 07 Jun 2005 09:03:32 +0100

What sort of security are you using? Container-managed? SSL?

And what exactly do you mean? Which values disappear? The login form 
fields?




On 07/06/05 07:08 Mark Benussi wrote:

I am submitting a Struts form in my live application but the values 
seem to
be getting lost between my browser and the population of my 
ActionForm. This

only happens if the login page is the first request of the session.



If you click around on the site (even once) and then submit the form the
values are taken.



:S



NB This only happens in my live environment (Tomcat 5, LINUX).





-
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: Highly dynamic forms

2005-06-07 Thread gdeschen
http://wiki.apache.org/struts/StrutsCatalogLazyList
Look at the section: Hand Cranking lazy List in the ActionForm.
This is possible with the version you are currently using.

HTH,
- Glenn




Stéphane Zuckerman <[EMAIL PROTECTED]> 
07/06/2005 12:28 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: Highly dynamic forms






Martin Gainty a écrit :
> Stephane
> Did you look at LazyList?
> http://wiki.apache.org/struts/StrutsCatalogLazyList


I did, and that's why I asked if there was a solution without using a 
version of struts > 1.2.4 . :-) I don't think my colleagues would like 
it if I were to change the version of the libraries we have been using
for months now. Of course, if there is no other "easy" way, I'll update 
the libs, and that'll be it.

>> Here's the question for the short version (below you'll find some 
>> lengthier explanations ...) :
>>
>> I'd like to render a list of groups of radio buttons. Said list has a 
>> variable length. So my data structure looks like :
>>
>> [ [radio1,radio2,radio3], [radio1,radio2,radio3,radio4], ...]
>>
>> I am currently using Struts 1.2.4. Is there a way of rendering these 
>> groups of radio buttons without upgrading my version of Struts ?
>>

-- 
Stéphane Zuckerman

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





[ANNOUNCEMENT] Struts Dialogs: DispatchAction on steroids

2005-06-07 Thread Michael Jouravlev
Struts Dialogs is an extension of Struts actions that provides an
improved user experience along with event-based programming model.

Struts Dialogs currently consists of two action classes: SelectAction
and DialogAction.


SelectAction


SelectAction is an abstract Action that dispatches an HTTP form
submission event to a handler method.

The purpose of this class is processing submission of HTML forms.
Unlike DispatchAction and LookupDispatchAction, which correlate value
attribute of submit form element with handler method, SelectAction
uses name attribute. This allows to display a user-friendly caption on
a submit button. Also, it is possible to change button caption without
rebuilding the application.


DialogAction


DialogAction is an abstract Action that provides basic dialog
functions, like accepting input data, dispatching submit event to a
method, generating error messages and rendering a view. DialogAction
allows to create robust user inteface and provides simple event-based
programming model.

DialogAction incorporates several innovative design decisions not
previously used in Struts. Some of them are already implemented in
other frameworks, like Ruby on Rails or JSF. Other features are unique
to DialogAction.

The cornerstone concept of DialogAction is separation of input and
output processes. This solves several issues, related to HTML form
input, like double submit problem, annoying POSTDATA messages, bad
usability when Reload, Back and Forward buttons are used.

DialogAction defines three different modes of operation:

* action initialization prepares action for use with new set of data;
* user input process accepts input data, updates domain model,
generates error messages;
* view rendering process generates a result page.

Separation of input and output improves usability and user experience:

* Any page can be reloaded without resending input information to
the server.
* As a consequence, an application does not have to cope with
double submits.
* Another consequence is that a user does not see "Do you want to
resend POSTDATA?" message.
* Using Back and Forward buttons is safe, because only result
pages are browsed.

-
Documents, files, samples
-

Online samples:
  http://www.superinterface.com/strutsdialog

Documentataion:
  http://wiki.java.net/bin/view/Projects/StrutsDialogs
  If you cannot see pictures on SelectAction and DialogAction pages,
  you might need to register and login to java.net. But it should 
  work without logging in.

Source code for DialogAction and amples is located at:
  Folder:

https://easywizard.dev.java.net/servlets/ProjectDocumentList?folderID=3494&expandFolder=3494&folderID=3494
  File name:
strutsdialog.zip

Michael Jouravlev.

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



Re: Highly dynamic forms

2005-06-07 Thread Stéphane Zuckerman

Martin Gainty a écrit :

Stephane
Did you look at LazyList?
http://wiki.apache.org/struts/StrutsCatalogLazyList



I did, and that's why I asked if there was a solution without using a 
version of struts > 1.2.4 . :-) I don't think my colleagues would like 
it if I were to change the version of the libraries we have been using
for months now. Of course, if there is no other "easy" way, I'll update 
the libs, and that'll be it.


Here's the question for the short version (below you'll find some 
lengthier explanations ...) :


I'd like to render a list of groups of radio buttons. Said list has a 
variable length. So my data structure looks like :


[ [radio1,radio2,radio3], [radio1,radio2,radio3,radio4], ...]

I am currently using Struts 1.2.4. Is there a way of rendering these 
groups of radio buttons without upgrading my version of Struts ?




--
Stéphane Zuckerman

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



Re: Highly dynamic forms

2005-06-07 Thread Martin Gainty

Stephane
Did you look at LazyList?
http://wiki.apache.org/struts/StrutsCatalogLazyList
Martin-
- Original Message - 
From: "Stéphane Zuckerman" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2005 9:53 AM
Subject: Highly dynamic forms



Hello,

Here's the question for the short version (below you'll find some 
lengthier explanations ...) :


I'd like to render a list of groups of radio buttons. Said list has a 
variable length. So my data structure looks like :


[ [radio1,radio2,radio3], [radio1,radio2,radio3,radio4], ...]

I am currently using Struts 1.2.4. Is there a way of rendering these 
groups of radio buttons without upgrading my version of Struts ?




For the detailed explanation :

I'm trying to render a form with fields which aren't defined by advance. 
More precisely, I have a List (an ArrayList) of custom objects, which are 
described like this :


public class MyField {
private String type, group;
private Object data;
// then the accessors follow ...
}

The "type" attribute contains which kind of field is to be rendered 
(radio, text, checkbox, etc.). The "group" attribute enables me to know 
which information is answered. For example :


I have two objects that are to be filled by the user, a text field, and a 
radio field. So my list of MyField objects will look something like :


[ {"radio", "g1", (ArrayList object)}, {"text", "", (String object)} ]

Now, what I need is to not only render the radio buttons part (which I 
eventually managed), but also to get a way to have the submission succeed 
! :-)


Here is a very small example of JSP code :


  

  
  ${item.label}

  
  


I voluntarily didn't use indexed properties, since I have to "play" with 
inner and outer loops' indexes. Although the form is rendered the right 
way, I can't submit info with it, I get an error that says :


"java.lang.NullPointerException: No indexed value for 'liste[2]'"

Since I use a List object, I suppose this isn't very surprising after all.

But then, what's the best way of doing that kind of stuff ?
--
Stéphane Zuckerman

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



Highly dynamic forms

2005-06-07 Thread Stéphane Zuckerman

Hello,

Here's the question for the short version (below you'll find some 
lengthier explanations ...) :


I'd like to render a list of groups of radio buttons. Said list has a 
variable length. So my data structure looks like :


[ [radio1,radio2,radio3], [radio1,radio2,radio3,radio4], ...]

I am currently using Struts 1.2.4. Is there a way of rendering these 
groups of radio buttons without upgrading my version of Struts ?




For the detailed explanation :

I'm trying to render a form with fields which aren't defined by advance. 
More precisely, I have a List (an ArrayList) of custom objects, which 
are described like this :


public class MyField {
private String type, group;
private Object data;
// then the accessors follow ...
}

The "type" attribute contains which kind of field is to be rendered 
(radio, text, checkbox, etc.). The "group" attribute enables me to know 
which information is answered. For example :


I have two objects that are to be filled by the user, a text field, and 
a radio field. So my list of MyField objects will look something like :


[ {"radio", "g1", (ArrayList object)}, {"text", "", (String object)} ]

Now, what I need is to not only render the radio buttons part (which I 
eventually managed), but also to get a way to have the submission 
succeed ! :-)


Here is a very small example of JSP code :


  

  
  ${item.label}

  
  


I voluntarily didn't use indexed properties, since I have to "play" with 
inner and outer loops' indexes. Although the form is rendered the right 
way, I can't submit info with it, I get an error that says :


"java.lang.NullPointerException: No indexed value for 'liste[2]'"

Since I use a List object, I suppose this isn't very surprising after all.

But then, what's the best way of doing that kind of stuff ?
--
Stéphane Zuckerman

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



Re: Oracle 10g and 'forward with redirect'

2005-06-07 Thread Duncan Mills
Michael, are you in a clustered environment here or is it a single OC4J 
instance?

Duncan

Michael Rasmussen wrote:


I am working with Oracle Application Server 10G (version 9.0.4.0.0
according to help) with an application using Struts 1.1.  We want to
use Struts' forward with redirect option, but have had intermittent
success.  Meaning, sometimes the forward re-direct will work and other
times it returns an http status of 400 (malformed url).  When we
receive the 400, we copy the url from our log file, paste it into the
url of a browser, press enter and it works every time.

When I worked at a previous client using WebSphere Application Server
with Struts 1.1, we had a similar problem.  In order to get it to work
with WAS, we had to add the following parameter to the "Environment
Options":  com.ibm.websphere.sendredirect.compliance=1

In the interim, we've traced through the Struts code to the following
statement, where upon executing it, our application blows up with an
http status of 400:
response.sendRedirect(response.encodeRedirectURL(url));

We copied this code into our program and of course it works just fine.

After searching the world over, or at least the www and coming away
empty,  Ideally, we'd like to be able to use Struts' forward with
redirect option, ActionForward(String path, boolean redirect), instead
of the response.sendR . . .  Does Oracle's app server require an
environment parameter similar to WAS to play nicely with Struts 1.1?
Basically, I'd like to know why the Oracle app server and Struts 1.1
are not cooperating with one another!


Thanks,
Michael

-
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: How do I use JAAS(JbossSX) in Struts?

2005-06-07 Thread Vance Karimi
I'm presuming you also have the following in your web.xml:


  Admin user allowed to invoke all methods
  admin


to define the security roles used?

If you change your action path to reflect the url pattern for the 'admin'
role secured resource, it should certainly work and should not require the
role attribute like this:



Vance

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of marc
> Sent: Tuesday, 7 June 2005 8:03 PM
> To: user@struts.apache.org
> Subject: Re: How do I use JAAS(JbossSX) in Struts?
> 
> Ok seems like it is not working well at all.
> 
> Me login is logging me in ok. But it seems like neither me web.xml or my
> struts actions is looking in me roles.
> 
> I have a admin user wdkmaol, that has the admin role. To test things I
> made this code in the login action:
> **
> Subject testsub = lc.getSubject();
>  Set testset = testsub.getPrincipals();
> 
>  Iterator ite = testset.iterator();
> 
>  while (ite.hasNext()){
>  System.out.println("CYKLE CYKLE:
> "+ite.next().toString());
>  }
> ***
> This prints out:
> ***
> CYKLE CYKLE: wdkmaol
> CYKLE CYKLE: Roles(members:admin)
> ***
> So I should be in the right role.
> 
> 
> Then I put this in me web.xml:
> ***
> 
>  
>  Secure Content
>  /HelpDesk/bruger/*
>  
>  
>  admin
>  
>  
>  NONE
>  
>  
> ***
> But there is no problem going to /HelpDesk/bruger/adduser, as the
> admin.
> 
> Last but not least I didt this in some action's to test:
> ***
>type="wilson.helpdesk.actions.menu.ToDbAction"
>   roles="admin">
>   path=".dbcontrol.welcome"
>redirect="false"/>
>   
> 
> ***
> 
> When I try to access this it comes back with:
> ***
> User is not authorized to access action /DB/home
> ***
> Even thow Im in the admin role.
> 
> 
> Im I missing something??
> I followed this howto, to get it work:
> http://www.javaworld.com/javaforums/showflat.php?Cat=2&Board=JavaSecurity&;
> Number=2500&page=0&view=collapsed&sb=5&o=&fpart=1
> 
> 
> 
> 
> 
> Vance Karimi wrote:
> > I use xdoclet and since Struts 1.1 you can do something like this in
> your
> > Action class where you can specify the list of Roles that have access to
> > this action.
> >
> > /**
> >  * @struts.action
> >  *  name="CustomerCreateForm"
> >  *  path="/operator/customers/customer/CustomerAddAction"
> >  *  input="/operator/customers/customer/CustomerCreatePage.jsp"
> >  *  scope="request"
> >  *  validate="true"
> >  *roles = "Admin,Operator"
> > ...
> >
> > However I have settled for declarative security with JBossSX and define
> the
> > context relative URLs to protect with specified roles in my web.xml.
> But I
> > presume you are doing this anyway if using JBossSX.
> >
> >
> >
> >>-Original Message-
> >>From: news [mailto:[EMAIL PROTECTED] On Behalf Of marc
> >>Sent: Friday, 3 June 2005 10:03 PM
> >>To: user@struts.apache.org
> >>Subject: Re: How do I use JAAS(JbossSX) in Struts?
> >>
> >>Yeah looks cool and works with Velocity. I'm working on getting it to
> >>work in me project.
> >>
> >>But I still need to have access controls on me different action's.
> >>
> >>
> >>
> >>Vance Karimi wrote:
> >>
> >>>Have a look at the Struts Menu plugin
> >>>http://struts-menu.sourceforge.net/
> >>>
> >>>
> >>>
> >>>
> 
> 
> -
> 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 - view, create, update user page

2005-06-07 Thread Tony Smith
So here is the situation:

All data is in database. 

I have a user table with Fields like First Name, Last
Name, Address, SSN, EMAIL, Telephone...

I have Account table with fields like ID, Date,
Balance,... Each user can have one or more Accounts.

I have Transaction table with fields like ID, Date,
Title, Status ... Each user account have one or more
Transactions.

...


I would like to have pages that can create user,
display all users or individual users, edit user
information, and delete user.

I would like to have pages that can create account,
display account, edit account information, and delete
account...

I would like to have pages that can create
transaction, display transaction, edit transaction,
and delete transaction...

...

Thanks,
--- Larry Meadors <[EMAIL PROTECTED]> wrote:

> Give us some more info Tony.
> 
> Are you talking about a relational database with 20
> tables, or is this
> user information just a few bits in an xml file?
> 
> Larry
> 
> 
> On 6/6/05, Tony Smith <[EMAIL PROTECTED]> wrote:
> > Hi, I am using struts to develop a webapp. One
> piece
> > of work is the user information. I will allow user
> to
> > create, view, and update his personal information.
> > Usually, the three pages are very similar. What is
> the
> > best way to do this with Struts? Is there any
> > "Pattern" for this? I checked the Struts
> > DispatchAction, but
> > not sure how to do it...
> > 
> > 
> > Thanks,
> > 
> > 
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Validation Help On Large Dynamic List

2005-06-07 Thread gdeschen
This may help you:
http://wiki.apache.org/struts/StrutsCatalogLazyList
http://www.developer.com/java/ejb/article.php/3321521
http://www.developer.com/java/ejb/article.php/2233591

- Glenn




"Scott Purcell" <[EMAIL PROTECTED]> 
07/06/2005 09:19 AM
Please respond to
"Struts Users Mailing List" 


To

cc

Subject
Validation Help On Large Dynamic List






Hello,

I am using the struts framework for a project, and I am seeking advice on 
the following situation. To preface where I am, we have used server side 
validation (validation.xml) throughout the full project and all is good. I 
understand simple field validation and the attributes of the 
validation.xml file.

But as with any project, here is my problem: I have a database query that 
returns hundreds of records. The way this works, is we display the user 
list of keys, and defualt values, and they can change the values to their 
liking. 

eg:
Field1 (then in a textfield they get something like [field 1 default 
value]
Field2 [field2 default value]
and so on and so on.

Here is how the actual code looks on the page.
Now what my original page builder did, was take the value and also placed 
it in a hidden field for some type of database update later on. Hope this 
makes sense .

Agricultural Implements  


Agricultural Tractors 


Re: Validation Help On Large Dynamic List

2005-06-07 Thread Xinsheng \[mike\] Huang
use dynamic form with dynamic array inside.

Scott Purcell <[EMAIL PROTECTED]> wrote:Hello,

I am using the struts framework for a project, and I am seeking advice on the 
following situation. To preface where I am, we have used server side validation 
(validation.xml) throughout the full project and all is good. I understand 
simple field validation and the attributes of the validation.xml file.

But as with any project, here is my problem: I have a database query that 
returns hundreds of records. The way this works, is we display the user list of 
keys, and defualt values, and they can change the values to their liking. 

eg:
Field1 (then in a textfield they get something like [field 1 default value]
Field2 [field2 default value]
and so on and so on.

Here is how the actual code looks on the page.
Now what my original page builder did, was take the value and also placed it in 
a hidden field for some type of database update later on. Hope this makes sense 
.

Agricultural Implements  [input] 
 [input] 

Agricultural Tractors  [input] 
 [input] 

But what is occuring is sometimes they remove the value and then there is no 
value. And I would like to validate this.
So my question is as follows:
If I have a database query with a lot of records that have rows like so:
key1 val1
key2 val2
key3 val3

How can I validate this for " name=origGprID751499 value?

I have been reading about indexed validation but do not seem to have a handle 
on it.

Can anyone give some assistance, or ideas? I did not want to do this in simple 
javascript, as the rest of the site is all server side with Messages.


Thanks
Scott

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





Xinsheng [Mike] Huang
SCJP -- Sun Certified Programmer for Java 2 Platform
SCJD -- Sun Certified Developer for Java 2 Platform
SCEA -- Sun Certified Enterprise Architect for J2EE

410-790-7462(C)

 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Validation Help On Large Dynamic List

2005-06-07 Thread Scott Purcell

Hello,

I am using the struts framework for a project, and I am seeking advice on the 
following situation. To preface where I am, we have used server side validation 
(validation.xml) throughout the full project and all is good. I understand 
simple field validation and the attributes of the validation.xml file.

But as with any project, here is my problem: I have a database query that 
returns hundreds of records. The way this works, is we display the user list of 
keys, and defualt values, and they can change the values to their liking. 

eg:
Field1 (then in a textfield they get something like [field 1 default value]
Field2 [field2 default value]
and so on and so on.

Here is how the actual code looks on the page.
Now what my original page builder did, was take the value and also placed it in 
a hidden field for some type of database update later on. Hope this makes sense 
.

Agricultural Implements  


Agricultural Tractors 


[Shale] Validation Server-Side

2005-06-07 Thread Mariano Petrakovsky
If use the tag like this



I need implement the server side validation ? or this is inside de shale?

Thanxs

--
Mariano G. Petrakovsky
Programmer · Software Factory
AXG Tecnonexo -  www.tecnonexo.com

Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires ·
Argentina.
Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.

Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA.
Tel.: (202) 986-7541 - Fax: (202) 787-3891.


· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · ·




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



Validation Help On Large Dynamic List

2005-06-07 Thread Scott Purcell
Hello,

I am using the struts framework for a project, and I am seeking advice on the 
following situation. To preface where I am, we have used server side validation 
(validation.xml) throughout the full project and all is good. I understand 
simple field validation and the attributes of the validation.xml file.

But as with any project, here is my problem: I have a database query that 
returns hundreds of records. The way this works, is we display the user list of 
keys, and defualt values, and they can change the values to their liking. 

eg:
Field1 (then in a textfield they get something like [field 1 default value]
Field2 [field2 default value]
and so on and so on.

Here is how the actual code looks on the page.
Now what my original page builder did, was take the value and also placed it in 
a hidden field for some type of database update later on. Hope this makes sense 
.

Agricultural Implements  


Agricultural Tractors 


Re: How to encrypt and decrypt?.

2005-06-07 Thread Ed Griebel
Hi Senthil-

This is not a Struts question and doesn't really belong on this list,
but I'll try to answer it anyway. You are storing the passwords as a
hash, which by definition is one-way and non-reversible back into the
cleartext. Hashes are mainly used when you want to compare previously
entered data to new data to see if they are the same, like an e-mail
message. You'll want to use either a symmetric or asymmetric cipher
and you'll need to store the encryption key somewhere. Take a look at
the javax.crypto package, and here's a few articles about how to solve
your problem:

http://java.sun.com/developer/JDCTechTips/2004/tt0116.html
http://www.onjava.com/pub/a/onjava/excerpt/java_security_ch1/index.html?page=1
http://www.onlamp.com/pub/a/bsd/2002/10/31/FreeBSD_Basics.html

-ed

On 6/7/05, senthil Kumar <[EMAIL PROTECTED]> wrote:
> Hello all.,
> 
> 
> 
> In my database password already stored in encrypted format.
> 
> Once user forget the password i need to send back him but its seeing by 
> encryption format only.
> 
> Bofere send password to user, i need to decrypt in java.
> 
> I am encrypt using following code
> 
> 
> cryptoInterface=CryptoFactory.getCryptoHandler();
> password = cryptoInterface.getHash(password);
> 
> 
> But i cant decrypt back. Any one can send the code or help me.
> 
> Thanks in advance.
> Senthil S
>

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



Re: How to encrypt and decrypt?.

2005-06-07 Thread Nicolas De Loof


It seems you'r not encrypting the password but hashing it
explanation :
- pasword *encryption* can be reversed, using some secret key
- pasword *hashing* produces a unique String, that DOES NOT CONTAIN 
infos about the password (cannot be reversed). The hash algorithm (MD5, 
SHA...) is designed so that it is VERY difficult (but not impossible) to 
build another String that will produce the same hash.


If you're using hashing, you cannot get the password back. You may 
provide a 'reset password' link to user having lost they're password, 
that will create a new (random) password and send it by mail.


Nico.


senthil Kumar a écrit :


Hello all.,



In my database password already stored in encrypted format.

Once user forget the password i need to send back him but its seeing by 
encryption format only.

Bofere send password to user, i need to decrypt in java.

I am encrypt using following code


cryptoInterface=CryptoFactory.getCryptoHandler();
password = cryptoInterface.getHash(password);


But i cant decrypt back. Any one can send the code or help me.

Thanks in advance.
Senthil S



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient or received it in error, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
Please do not copy it for any purpose or disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
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: Spooky Tiles problem

2005-06-07 Thread Jeff Beal
Write JSP comments as <%--  --%>

On 6/7/05, andy wix <[EMAIL PROTECTED]> wrote:
> I think the problem was due to my having an include file in the footer that
> was commented out:
> 
> 
> It seems this isn't the way to comment out stuff in jsp?  Why it worked for
> some pages and not others I still have no idea - the only thing I can think
> is that i may have been looking at cached pages for the ones that worked?
> 
> Thanks,
> Andy
>

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



How to encrypt and decrypt?.

2005-06-07 Thread senthil Kumar
Hello all.,



In my database password already stored in encrypted format.

Once user forget the password i need to send back him but its seeing by 
encryption format only.

Bofere send password to user, i need to decrypt in java.

I am encrypt using following code


cryptoInterface=CryptoFactory.getCryptoHandler();
password = cryptoInterface.getHash(password);


But i cant decrypt back. Any one can send the code or help me.

Thanks in advance.
Senthil S



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient or received it in error, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
Please do not copy it for any purpose or disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved

Re: html-el:checkbox quandary

2005-06-07 Thread gdeschen
Oh sh&* !
Hubert you had your finger on the problem all along...
Now that I have had my first coffee of the day things are falling in 
place.

The problem is that the JSP is posting to an action which did not have the 
correct form bean.
So it wasn't able to find the property method.

This raises a question.
Say I have a Dependent and DependentSubmit actions.
The Dependent action gets data from the DB and displays it using the 
DependentForm.
The DependentSubmit action is also using the DependentForm.

In the JSP that is executed for the Dependent action this gets executed:


Based on my problems, is it safe to say that the property is resolved 
on the action being submitted to and the the value on the action currently 
handling the request?

- Glenn




[EMAIL PROTECTED] 
07/06/2005 07:29 AM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
Re: html-el:checkbox quandary






As Hubert suggested here are some of the details.


   
   



   
   
   
   
 

...
public class DependentForm extends ActionForm {
   private DependentVO dependent;

   public DependentVO getDependent() {
  return dependent;
   }

   public void setDependent(DependentVO dependentVO) {
  dependent = dependentVO;
   }
...
}

public class DependentVO extends Dependent implements Serializable {
   private String disabledIndicator;
   private String dentalEligibilityIndicator;
   private String dependentId;
   private String fulltimeStudentIndicator;
   private String healthEligibilityIndicator;
   private String pensionEligibilityIndicator;

   public String getHealthEligibilityIndicator() {
  return healthEligibilityIndicator;
   }

   public void setHealthEligibilityIndicator(String string) {
  healthEligibilityIndicator = string;
   }

Once again... I really appreciate your time and patience with this !
- Glenn






Hubert Rabago <[EMAIL PROTECTED]> 
06/06/2005 05:50 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: html-el:checkbox quandary






Yes.  Maybe if you include the actual mappings, JSP text, form
declaration, etc, someone will find something.  From what you've said,
it should work.

Hubert


On 6/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Yes the form bean is associated with the HTML form.
> 
> If I simply do this:
> 
> It writes out the contents. This takes care of the value attribute.
> 
> My question is for the property.
> Can a nested bean property be used in the html-el:checkbox as the
> property?
> 
> - Glenn
> 
> 
> Hubert Rabago <[EMAIL PROTECTED]>
> 06/06/2005 04:24 PM
> 
> 
> 
> Is dependentForm is form bean associated with the HTML form that
> your checkbox is a part of?  There could be a typo in your
> struts-config, or your , or your form declaration.
> 
> Hubert
> 
> On 6/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I gave it a go and I get this error now... more precise but an error
> none
> > the less...
> > [06/06/05 15:40:53:846 EDT] 5dc35dc3 WebGroup  E SRVE0026E: 
[Servlet
> > Error]-[No getter method for property
> dependent.healthEligibilityIndicator
> > of bean org.apache.struts.taglib.html.BEAN]:
> > javax.servlet.jsp.JspException: No getter method for property
> > dependent.healthEligibilityIndicator of bean
> > org.apache.struts.taglib.html.BEAN
> >
> >

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






Re: How do I use JAAS(JbossSX) in Struts?

2005-06-07 Thread marc

Ok seems like it is not working well at all.

Me login is logging me in ok. But it seems like neither me web.xml or my 
struts actions is looking in me roles.


I have a admin user wdkmaol, that has the admin role. To test things I 
made this code in the login action:

**
Subject testsub = lc.getSubject();
Set testset = testsub.getPrincipals();

Iterator ite = testset.iterator();

while (ite.hasNext()){
System.out.println("CYKLE CYKLE: 
"+ite.next().toString());

}
***
This prints out:
***
CYKLE CYKLE: wdkmaol
CYKLE CYKLE: Roles(members:admin)
***
So I should be in the right role.


Then I put this in me web.xml:
***


Secure Content
/HelpDesk/bruger/*


admin


NONE


***
But there is no problem going to /HelpDesk/bruger/adduser, as the admin.

Last but not least I didt this in some action's to test:
***




***

When I try to access this it comes back with:
***
User is not authorized to access action /DB/home
***
Even thow Im in the admin role.


Im I missing something??
I followed this howto, to get it work: 
http://www.javaworld.com/javaforums/showflat.php?Cat=2&Board=JavaSecurity&Number=2500&page=0&view=collapsed&sb=5&o=&fpart=1






Vance Karimi wrote:

I use xdoclet and since Struts 1.1 you can do something like this in your
Action class where you can specify the list of Roles that have access to
this action.

/**
 * @struts.action
 *  name="CustomerCreateForm"
 *  path="/operator/customers/customer/CustomerAddAction"
 *  input="/operator/customers/customer/CustomerCreatePage.jsp"
 *  scope="request"
 *  validate="true"
 *roles = "Admin,Operator"
...

However I have settled for declarative security with JBossSX and define the
context relative URLs to protect with specified roles in my web.xml.  But I
presume you are doing this anyway if using JBossSX.




-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of marc
Sent: Friday, 3 June 2005 10:03 PM
To: user@struts.apache.org
Subject: Re: How do I use JAAS(JbossSX) in Struts?

Yeah looks cool and works with Velocity. I'm working on getting it to
work in me project.

But I still need to have access controls on me different action's.



Vance Karimi wrote:


Have a look at the Struts Menu plugin
http://struts-menu.sourceforge.net/







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



Re: Date UI

2005-06-07 Thread Larry Meadors
On 6/6/05, Martin Ravell <[EMAIL PROTECTED]> wrote:
> Do you split your dates into day, month and year fields in your HTML?

No, as a user this is the most irritating UI that I can imagine for date input.

> How do you find is the best way to validate?

I use a String property for the field, then parse it into an internal
Date property. If the date does not parse, I keep the bad date in the
string so I can give it back to the user to correct.

> I am generally allergic to Javascript which I guess limits what can be done
> with fancy pop-up pickers. Am open to suggestions should there be a nice
> robust script out there I guess.


Get over it. Like it or not, JavaScript is here to stay. Anyone who
looks at any modern framework (including Struts, JSF, and .net) and
says "Ew, JavaScript..." should consider a new career path. Sorry, but
it is just a fact of life, get used to it.


That said, there are some *amazing* and free date selection
javascripts out there:

http://www.softcomplex.com/products/tigra_calendar/
http://www.fuzzywebmaster.com/java-scripts/date-java-picker-script.html
http://tinyurl.com/apmet

Larry

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



Re: html-el:checkbox quandary

2005-06-07 Thread gdeschen
As Hubert suggested here are some of the details.


   
   



   
   
   
   
 

...
public class DependentForm extends ActionForm {
   private DependentVO dependent;

   public DependentVO getDependent() {
  return dependent;
   }

   public void setDependent(DependentVO dependentVO) {
  dependent = dependentVO;
   }
...
}

public class DependentVO extends Dependent implements Serializable {
   private String disabledIndicator;
   private String dentalEligibilityIndicator;
   private String dependentId;
   private String fulltimeStudentIndicator;
   private String healthEligibilityIndicator;
   private String pensionEligibilityIndicator;

   public String getHealthEligibilityIndicator() {
  return healthEligibilityIndicator;
   }

   public void setHealthEligibilityIndicator(String string) {
  healthEligibilityIndicator = string;
   }

Once again... I really appreciate your time and patience with this !
- Glenn






Hubert Rabago <[EMAIL PROTECTED]> 
06/06/2005 05:50 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: html-el:checkbox quandary






Yes.  Maybe if you include the actual mappings, JSP text, form
declaration, etc, someone will find something.  From what you've said,
it should work.

Hubert


On 6/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Yes the form bean is associated with the HTML form.
> 
> If I simply do this:
> 
> It writes out the contents. This takes care of the value attribute.
> 
> My question is for the property.
> Can a nested bean property be used in the html-el:checkbox as the
> property?
> 
> - Glenn
> 
> 
> Hubert Rabago <[EMAIL PROTECTED]>
> 06/06/2005 04:24 PM
> 
> 
> 
> Is dependentForm is form bean associated with the HTML form that
> your checkbox is a part of?  There could be a typo in your
> struts-config, or your , or your form declaration.
> 
> Hubert
> 
> On 6/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I gave it a go and I get this error now... more precise but an error
> none
> > the less...
> > [06/06/05 15:40:53:846 EDT] 5dc35dc3 WebGroup  E SRVE0026E: 
[Servlet
> > Error]-[No getter method for property
> dependent.healthEligibilityIndicator
> > of bean org.apache.struts.taglib.html.BEAN]:
> > javax.servlet.jsp.JspException: No getter method for property
> > dependent.healthEligibilityIndicator of bean
> > org.apache.struts.taglib.html.BEAN
> >
> >

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





RE: Tiles: How to nest attributes! Is it possible?

2005-06-07 Thread Bob Arnott
Nils Liebelt wrote:
> Hi all,
> 
> Let's say I got a typical tile main layout definition:
> 
>  path="/common/mainLayout.jsp">  value="/common/header.jsp" />  value="sample" type="string"/>  value="/common/footer.jsp" /> 
> 
> Now the content has to split into 2 panes. But not
> always. So I would like to have definition who looks like
> this: 
> 
>  extends=".mainLayout">  value=".splitPane" type="definition"/>  name="content.menu" value="lalelupo"/>  name="content.body" value="la le l"
> type="string"/>  
> 
> The syntax is not right but it explains what I want. Is
> it possible some how. I can only access "menu" and "body"
> as beans. All other tiles insert tags are useless.

I have achived this by doing the following (I don't claim this is 
the best or correct way to do it, it's just worked for me).

In my definitions file I have something like the following -

 

 
  


 
  
  


 
  
  


 
  


Then I have something like the following for teh two tiles JSP files:

default.jsp --

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-bean-el"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles-el"; prefix="tiles" %>



  


  




  
  

  

  
  

  

  
  

  

  
  

  





left-right-split.jsp --

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




  


  
;" />
  
  

  




  
;" 
/>
  
  

  

  
  

  
<%-- Left part goes here... --%>

  
  
<%-- Right part goes here... --%>

  




page-left.jsp and page-right.jsp are just the content of the page you want 
to display.

I hope this helps.

Cheers,

-- 
Bob Arnott



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



RE: Spooky Tiles problem

2005-06-07 Thread andy wix
I think the problem was due to my having an include file in the footer that 
was commented out:



It seems this isn't the way to comment out stuff in jsp?  Why it worked for 
some pages and not others I still have no idea - the only thing I can think 
is that i may have been looking at cached pages for the ones that worked?


Thanks,
Andy


From: "Marco Mistroni" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "'Struts Users Mailing List'" 
Subject: RE: Spooky Tiles problem
Date: Tue, 7 Jun 2005 11:11:58 +0100

Hello,
I had similar problem in the past...
Do you have any request attributes /session attributes /appcontext
attributes
That you are using in that page?

Regards
marco

-Original Message-
From: andy wix [mailto:[EMAIL PROTECTED]
Sent: 07 June 2005 11:08
To: user@struts.apache.org
Subject: Spooky Tiles problem

Hi,

I am getting an exception when loading a page of Tiles.

The error shown in the jsp page is:
javax.servlet.jsp.JspException: ServletException in '/footer.jsp': null
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTa
g.java:921)
at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
at _layout._jspService(_layout.java:120)
[SRC:/layout.jsp:100]

Line 100 of the layout.jsp is:

  


The tile def is:

  
  
  



  


test.jsp is:
HELLO

It is seemingly not dependant upon the jsp inserted.
The same layout file works fine for other tiles. (fulluser.tree does not

have the same problem and inserts the same footer.jsp file).

I am entirely baffled!

Thanks,
Andy

_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/


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


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



_
Winks & nudges are here - download MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



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



[OT] Project ZNF: PHP5 Struts-like MVC framework

2005-06-07 Thread Alessandro 'Aronnax' Rossini
Hi, my name is Alessandro Rossini and I want to let you know the launch of a 
new project called ZNF.
The goal of this project is to provide an open source framework for building 
PHP5 enterprise web applications, based on Struts.
This is not the first attempt to rewrite the Struts implementation, or part of 
it, in PHP, but after spending a lot of time studying existing open source 
frameworks, like Phrame, PHPMVC, Struts4PHP, Seagull and Vida we decided to 
reimplement a brand new framework from scratch for many reasons. First of 
all, all the mentioned frameworks, except Vida, are written in PHP4 and we 
believe that its object engine (Zend Engine 1) is too limited for developing 
enterprise level web application. At the same time the code we analyzed is 
written without a rigorous approach (coding standards, compliance to W3C 
standards, output of notice/warnings, lack of documentation/examples). Last 
but not least frameworks claiming to be a porting of Struts have made no code 
optimization during the porting from J2EE to PHP.
I know that I'm a little Off-Topic here and that in this ML most of people 
would probably dislike PHP :). Anyway we think that, considering the 
limitations that PHP has being a scripting language and not a programming 
language, our project is one of the most functional implementation of an MVC 
framework in this language, so if you're interested take a look. We're 
searching for comments, feedback, bug signaling and best of all new 
developers. Any kind of contribution will be appreciated!
ZNF is free software released under GNU/LGPL license, the official ZNF home 
page is at http://znf.zeronotice.com/.

Best regards.
-- 
Alessandro 'Aronnax' Rossini

web -> www.aronnax.it
e-mail -> [EMAIL PROTECTED]
icq -> 2442698
OpenLUG member -> www.openlug.org
ZeroNotice IT Solutions -> www.zeronotice.com


pgpayX3Jk8rD7.pgp
Description: PGP signature


RE: Spooky Tiles problem

2005-06-07 Thread Marco Mistroni
Hello,
I had similar problem in the past... 
Do you have any request attributes /session attributes /appcontext
attributes
That you are using in that page?

Regards
marco

-Original Message-
From: andy wix [mailto:[EMAIL PROTECTED] 
Sent: 07 June 2005 11:08
To: user@struts.apache.org
Subject: Spooky Tiles problem

Hi,

I am getting an exception when loading a page of Tiles.

The error shown in the jsp page is:
javax.servlet.jsp.JspException: ServletException in '/footer.jsp': null
at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTa
g.java:921)
at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
at _layout._jspService(_layout.java:120)
[SRC:/layout.jsp:100]

Line 100 of the layout.jsp is:

  


The tile def is:

  
  
  



  


test.jsp is:
HELLO

It is seemingly not dependant upon the jsp inserted.
The same layout file works fine for other tiles. (fulluser.tree does not

have the same problem and inserts the same footer.jsp file).

I am entirely baffled!

Thanks,
Andy

_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/


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


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



Spooky Tiles problem

2005-06-07 Thread andy wix

Hi,

I am getting an exception when loading a page of Tiles.

The error shown in the jsp page is:
javax.servlet.jsp.JspException: ServletException in '/footer.jsp': null
	at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)

at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
at _layout._jspService(_layout.java:120)
[SRC:/layout.jsp:100]

Line 100 of the layout.jsp is:

 


The tile def is:

 
 
 



 


test.jsp is:
HELLO

It is seemingly not dependant upon the jsp inserted.
The same layout file works fine for other tiles. (fulluser.tree does not 
have the same problem and inserts the same footer.jsp file).


I am entirely baffled!

Thanks,
Andy

_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/



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



Re: Tomcat Struts form population problem in PRODUCTION

2005-06-07 Thread Mark Benussi
I imaging the JSP must be session aware as the strust tags are included in 
the jsp and compile --> The tags would look for a bean to populate the 
fields.


Original Message Follows
From: Emmanouil Batsis <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: Struts Users Mailing List 
Subject: Re: Tomcat Struts form population problem in PRODUCTION
Date: Tue, 07 Jun 2005 12:22:13 +0300

Mark Benussi wrote:


There is no security implemented.



Is it possible that the JSP is not session aware and thus a session is not 
created to carry the form (and it's fields?)?


-
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: Tomcat Struts form population problem in PRODUCTION

2005-06-07 Thread Emmanouil Batsis

Mark Benussi wrote:


There is no security implemented.



Is it possible that the JSP is not session aware and thus a session is 
not created to carry the form (and it's fields?)?


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



Re: Tomcat Struts form population problem in PRODUCTION

2005-06-07 Thread Mark Benussi

There is no security implemented.

When the form is submitted it calls the BeanUtils.populate method.

With debgging enabled no values are copied into my form on the first 
submission of the form if the form is within a page that was produced as the 
result of the first ever session request to a url on the server (phew!).



Original Message Follows
From: Adam Hardy <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: Struts Users Mailing List 
Subject: Re: Tomcat Struts form population problem in PRODUCTION
Date: Tue, 07 Jun 2005 09:03:32 +0100

What sort of security are you using? Container-managed? SSL?

And what exactly do you mean? Which values disappear? The login form fields?



On 07/06/05 07:08 Mark Benussi wrote:

I am submitting a Struts form in my live application but the values seem to
be getting lost between my browser and the population of my ActionForm. 
This

only happens if the login page is the first request of the session.



If you click around on the site (even once) and then submit the form the
values are taken.



:S



NB This only happens in my live environment (Tomcat 5, LINUX).





-
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: Tomcat Struts form population problem in PRODUCTION

2005-06-07 Thread Adam Hardy

What sort of security are you using? Container-managed? SSL?

And what exactly do you mean? Which values disappear? The login form fields?



On 07/06/05 07:08 Mark Benussi wrote:

I am submitting a Struts form in my live application but the values seem to
be getting lost between my browser and the population of my ActionForm. This
only happens if the login page is the first request of the session.

 


If you click around on the site (even once) and then submit the form the
values are taken.

 


:S

 


NB This only happens in my live environment (Tomcat 5, LINUX).





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



Re: Date UI

2005-06-07 Thread Adam Hardy
The Validator module gives you automatic date validation according to 
your chosen date format, configured in an xml file on a per-form basis.


Adam

On 07/06/05 06:13 Martin Ravell wrote:

Hi all,

 


Having just joined the list I am unaware if this topic has been done to
death already but I was wondering what were peoples views on handling date
input with Struts? I'm scanning archives right now and don't see it come up
too often. If this is a little OT then please flame me. (Just kidding)
Perhaps there are taglib discussion lists or jsp groups that I would be
better off asking?

 


If however you are willing to throw in your $0.02 worth please respond to
either this address or the list. I will of course summarize and post back to
Struts User.

 

Are there favourite taglibs out there which are good for Dates? 

 

Do you split your dates into day, month and year fields in your HTML? 

 


How do you find is the best way to validate?

 

 


I am generally allergic to Javascript which I guess limits what can be done
with fancy pop-up pickers. Am open to suggestions should there be a nice
robust script out there I guess.

 

 

 


Regards

Marty

 

 

 






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