showing error on forms

2003-07-29 Thread Vinayak Birari
Hi,

can anybody tell me how do i show error at particular field insted of
showing it on top?
i want, each error fileds LABELs to be shown in red.
how do i achieve it.

thanks in advance.
Vinayak.

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



Reflecting Changes in a Form After data has been updated

2003-07-29 Thread Curtney Jacobs
Greetings everyone!

I have an input form where my users can update their profile. After the user 
have select the Update button I would like the form to reflect the updated 
information the user has just submitted.

What is the best way to implement this?

I can think of one way; in my update action class after the data has been 
successfully updated in the database, copy the fields from my value object 
(updated data) back into the ActionForm and subsequently put it back into the 
current session. Is this the most efficient/elegant way of doing this?


Thanks inadvance,

_CJ 

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



Re: showing error on forms

2003-07-29 Thread Prabhu K M
Hi Vinayak,

You can very well populate the error message near the fields instead of 
showing it in the top. Use the following entry near every fields.
html:errors property=name/

The following example will explain you about how to use it.

In your validate() method you are validating a field. In our case name, if 
the name value is null or its length is less than 1, populate an error 
message.

public ActionErrors validate(ActionMapping map, HttpServletRequest req)
{
ActionErrors errors=new ActionErrors();
if(name==null || name.length()1)
{
errors.add(nameMissing, new ActionError(name.missing));
}
return errors;
}
Here the name.missing is the entry made in the MessageResources file.

Add the following in your page near your field,

html:text property=userId/
html:errors property=nameMissing/
Where nameMissing is the key used when it was added to the ActionErrors 
object. I belive that this will work.

Rgds,
Prabhu.K.M
At 11:29 AM 7/29/2003 +0530, Vinayak Birari wrote:
Hi,

can anybody tell me how do i show error at particular field insted of
showing it on top?
i want, each error fileds LABELs to be shown in red.
how do i achieve it.
thanks in advance.
Vinayak.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Changing bean property values in Action Class--Possible???

2003-07-29 Thread guruprasad jakka
Hi,

Is there any way, where I could change the bean data from the
formbean in the Action class and use it in the forwardind JSPs.


J G Guru Prasad
V sem, Information Technology,
Bachelor of Engineering,
National Institute of Technology Karnataka, Surathkal.
( formerly KREC )



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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



Re: Error Msg:Internal Server Error

2003-07-29 Thread gowri shankar
hi,
i tried to do as u said , but still i am  getting the
same error messge. i have sent struts-config.xml file
for your perusal.


?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts
Configuration 1.0//EN
 
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

struts-config

  !-- == Form Bean Definitions 
--
  form-beans
form-bean name=login
type=test.struts.LoginForm /
  /form-beans


  !-- == Global Forward Definitions =
--
  global-forwards
  /global-forwards


  !-- == Action Mapping Definitions 
--
  action-mappings
action
path=/login
type=test.struts.LoginAction
name=login
input=/jsp/LoginView.jsp
validate=true

forward name=valid path=/jsp/MainMenu.jsp /
forward name=invalid path=/jsp/LoginView.jsp
/
/action
  /action-mappings

!--=message Resources=--
  message-resources
   parameter=test.Struts.MessageResources/
   
/struts-config




 --- R Balaji [EMAIL PROTECTED] wrote: 
check whether u have the
 *MessageResources.properties  *in the right 
 place and being configutred in the
 struts-config.xml.
 
 balaji
 
 gowri shankar wrote:
 
 Hi,
 
 This is Gowri Shankar.I tried to run a struts
 application (A basic web Application)which was
 given
 in the site ---

http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#struts
 
 
 I compiled the application and when i tried to run
 it
 I got the following error.
 
 Can anyone please help me out in fixing this bug.
 
 
 The error in the browser was 
 
 Apache Tomcat/4.0.6 - HTTP Status 500 - Internal
 Server Error
 


 
 type Exception report
 
 message Internal Server Error
 
 description The server encountered an internal
 error
 (Internal Server Error) that prevented it from
 fulfilling this request.
 
 exception 
 
 javax.servlet.ServletException: Missing resources
 attribute org.apache.struts.action.MESSAGE
  at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
  at

org.apache.jsp.LoginView$jsp._jspService(LoginView$jsp.java:365)
  at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
  at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
  at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
  at

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
  at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
  at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
  at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at

Development time using Struts,

2003-07-29 Thread Konstadinis Euaggelos
Hi to all,  I want to raise a question here about development time using Struts, 

I am using Struts about 4-months now, 
I found it a very good framework for developing web-applications,  but the devolpment 
time in contrary with the  classicc way(jsp, serlvet)
is much more using Struts. 

Also i find it useless when you use ejb in your applications, you have to make  MANY 
iteration to pass parameters  results from front-end to back-end and vice-versa, 
which of cource costs to much in performance. 


I would like to hear other struts-developers for their experience. 


Vangos.








Re: Changing bean property values in Action Class--Possible???

2003-07-29 Thread R Balaji
yes, you can very well update the FormBean from the ActionClass .

ex .
*TestFormBean testForm= (TestFormBean) form;
   testForm.setNumberOfRows(1);
*this formbean instance will be passed to the jsp page with request 
scope ... i belive this will help you .

balaji

guruprasad jakka wrote:

Hi,

Is there any way, where I could change the bean data from the
formbean in the Action class and use it in the forwardind JSPs.
J G Guru Prasad
V sem, Information Technology,
Bachelor of Engineering,
National Institute of Technology Karnataka, Surathkal.
( formerly KREC )

Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Development time using Struts,

2003-07-29 Thread puneeta

On the cotrary I beleive that Struts, saves quite a lot of time for us.
It can be time consuming if,

1.   we learn and use struts
2.   If its a small application, for large applcations it can save quite a
lot of time

The excellent design of Struts, gives rise to code reuse. We can write some
generic methods and after that simply forget about everything else except
the core business logic.

Regards,
Puneet Agarwal

Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1031)
FAX              : +91-120-246 1521

Struts ... Action ... Struts in Action ... Action in Struts ...


   
 
[EMAIL PROTECTED]  

erizon.comTo: Struts Users Mailing List 
[EMAIL PROTECTED]  
  cc:  
 
07/29/03 01:47 PM Subject: Re: Development time using 
Struts,   
Please respond to  
 
Struts Users  
 
Mailing List  
 
   
 
   
 





You r right about the EJB part. It really effects the performance and  i
think for a developer it's a nightmare just adding layers upon layers
to make a single function call.


thanks
-raj




  Konstadinis Euaggelos
  [EMAIL PROTECTED]To:   Struts
Users Mailing List [EMAIL PROTECTED]
  urodyn.com cc:
  Subject:  Development
time using Struts,
  29/07/2003 01:26 PM
  Please respond to
  Struts Users Mailing
  List






Hi to all,  I want to raise a question here about development time using
Struts,

I am using Struts about 4-months now,
I found it a very good framework for developing web-applications,  but the
devolpment time in contrary with the  classicc way(jsp, serlvet)
is much more using Struts.

Also i find it useless when you use ejb in your applications, you have to
make  MANY iteration to pass parameters  results from front-end to
back-end and vice-versa, which of cource costs to much in performance.


I would like to hear other struts-developers for their experience.


Vangos.












-
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: Re: Changing bean property values in Action Class--Possible???

2003-07-29 Thread guruprasad jakka
Hi Balaji,

Thanks for that valuable information.
It worked perfectly.

J G Guru Prasad
V sem, Information Technology,
Bachelor of Engineering,
National Institute of Technology Karnataka, Surathkal.
( formerly KREC )





Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag


 On Tue, 29 Jul 2003, R Balaji ([EMAIL PROTECTED])
wrote:

 yes, you can very well update the FormBean from the
ActionClass .
 
 ex .
 *TestFormBean testForm= (TestFormBean) form;
 testForm.setNumberOfRows(1);
 *this formbean instance will be passed to the jsp page with
request 
 scope ... i belive this will help you .
 
 balaji
 
 guruprasad jakka wrote:
 
 Hi,
 
 Is there any way, where I could change the bean data from
the
 formbean in the Action class and use it in the forwardind
JSPs.
 
 
 J G Guru Prasad
 V sem, Information Technology,
 Bachelor of Engineering,
 National Institute of Technology Karnataka, Surathkal.
 ( formerly KREC )
 
 
 
 Get your own 800 number
 Voicemail, fax, email, and a lot more
 http://www.ureach.com/reg/tag
 

-
 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: [OT] Is jsessionid specific to Tomcat or generic to all webcontainers?

2003-07-29 Thread Matthias Bauer
Craig,

all this sentence says is that the session id must be encoded as a path 
parameter. But it does not say anything about the name, the implementing 
server is supposed to use. Is there some other place in the spec where 
it says that the parameter must be called jsessionid? If not, I would 
say the server implementation is free to choose any name. Am I 
overlooking something?

--- Matthias

The URL rewriting format is also standardized; in section 7.1.3 you will
see the sentence:
 The session id must be encoded as a path parameter in the URL string.

 



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


Re: Development time using Struts,

2003-07-29 Thread Konstadinis Euaggelos
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 11:44 AM
Subject: Re: Development time using Struts,



On the cotrary I beleive that Struts, saves quite a lot of time for us.
It can be time consuming if,

1.   we learn and use struts
this is a overhead too,

2.   If its a small application, for large applcations it can save quite a
lot of time

The excellent design of Struts, gives rise to code reuse.

The code  reuse hasn't to do only with Struts, but how you have design your
application .

We can write some
generic methods and after that simply forget about everything else except
the core business logic.

I agree with you that you can write some generic methods-class to do some
work,
but for a small change you must write to form bean, actionservlet, jsp, and
ejb tier too.



Regards,
Puneet Agarwal

Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1031)
FAX : +91-120-246 1521

Struts ... Action ... Struts in Action ... Action in Struts ...



[EMAIL PROTECTED]
erizon.comTo: Struts Users Mailing
List [EMAIL PROTECTED]
  cc:
07/29/03 01:47 PM Subject: Re: Development
time using Struts,
Please respond to
Struts Users
Mailing List







You r right about the EJB part. It really effects the performance and  i
think for a developer it's a nightmare just adding layers upon layers
to make a single function call.


thanks
-raj




  Konstadinis Euaggelos
  [EMAIL PROTECTED]To:   Struts
Users Mailing List [EMAIL PROTECTED]
  urodyn.com cc:
  Subject:  Development
time using Struts,
  29/07/2003 01:26 PM
  Please respond to
  Struts Users Mailing
  List






Hi to all,  I want to raise a question here about development time using
Struts,

I am using Struts about 4-months now,
I found it a very good framework for developing web-applications,  but the
devolpment time in contrary with the  classicc way(jsp, serlvet)
is much more using Struts.

Also i find it useless when you use ejb in your applications, you have to
make  MANY iteration to pass parameters  results from front-end to
back-end and vice-versa, which of cource costs to much in performance.


I would like to hear other struts-developers for their experience.


Vangos.












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



Sounds simple, but it isn't: How to pass an attribute to a nested tile?

2003-07-29 Thread Daniel Draws
Hi all!

Is there anybody out there who can solve the following problem:

I have a main and a more special tile defintion declared in the
tiles-defs.xml:

definition name=view.base.layout page=/mainlayout.jsp
  put name=head value=.../
  put name=body value=/
  put name=menu value=.../
  put name=foot value=.../
/definition
definition extends=view.base.layout name=view.special.layout
  put name=body value=/special.jsp/
/definition


the special.jsp defines a more conrete layout for the body:

some html snippet

 tiles:insert attribute=content/

/some html snippet



Now I want to define a concrete jsp, wich inserts the view.special.layout
and passes the content attribute through that to the special.jsp.

My idea was the following jsp:

tiles:insert defintion=view.special.layout
 tiles:put name=content type=string
  some special html /
 /tiles:put
/tiles:insert


So what? I was a little bit naive and at the end this doesn't work.

Is there anybody out there who could help me?

thanks for your help!

daniel


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



How to use SwitchAction?

2003-07-29 Thread Siva
Hi,

Could anyone of you point me a good document on how to use SwitchAction
? I am searching for any articles regarding SwitchAction but couln noy
find any...

Thanks,
Siva


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



RE: Development time using Struts,

2003-07-29 Thread Navjot Singh
I agree with puneet saying that struts does saves a lot of time in
development of large apps. After all, frameworks are meant to provide a set
of services and also defines the boundaries of the system in which the app
developer should put his/her efforts in.

Even with frameworks around, developers need to have standard practice of
coding so as to keep the code flows almost same for the entire app. With
that in place, it's merely copy and paste for the routine jobs and you get
more time to focus on the actual business logic. However, good IDEs also
save lot of time.

So, if you know a framework that suits your needs, it WILL save lots of
time.

regards
Navjot Singh


|-Original Message-
|From: Konstadinis Euaggelos [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, July 29, 2003 1:26 PM
|To: Struts Users Mailing List
|Subject: Development time using Struts,
|
|
|Hi to all,  I want to raise a question here about development time
|using Struts,
|
|I am using Struts about 4-months now,
|I found it a very good framework for developing web-applications,
|but the devolpment time in contrary with the  classicc way(jsp, serlvet)
|is much more using Struts.
|
|Also i find it useless when you use ejb in your applications, you
|have to make  MANY iteration to pass parameters  results from
|front-end to back-end and vice-versa, which of cource costs to
|much in performance.
|
|
|I would like to hear other struts-developers for their experience.
|
|
|Vangos.
|
|
|
|
|
|
|


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



Re: Indexed Properties

2003-07-29 Thread Nicholas L Mohler





Atta,

It sounds to me like you have it.  As long as your names match up, it
should work fine.  Ajay has given a full code example that looks good.

Nick



   

  atta-ur rehman 

  [EMAIL PROTECTED]To:   Struts Users Mailing List 
[EMAIL PROTECTED]  
  com cc: 

   Subject:  Re: Indexed Properties

  07/28/2003 08:44 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   





Yes, I currently have two independent String arrays for blockName and
blockType. Putting them, and all the other block related properties, is
what
seems to be the right thing to do! So you have confirmed.

here is what i have understood from your text:

1) my form would have blocks property that would be a collection of Block
beans
2) iterating each block in the blocks collection i can sure display each
block with indexed=true directive for text boxes and dropdowns.
3) now for the submission part i'd need to have setBlockType(int, string)
and getBlockType(int) and same for the rest of properties. The name of
property in the Block Form and name of the property in the Block Bean must
match.
4) and it should work?

I've had my head stuck in my computer whole day today and i'm barely able
to
write this email :) Tommorrow morning i'd come back and confirm it by
running it. meanwhile I'd appreciate if you could confirm these 4 points
i've noted above!

Thankyou very much for your help. It really did help.

Regards,

ATTA


- Original Message -
From: Nick [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 5:08 PM
Subject: RE: Indexed Properties


 Hi Atta,

 No problem with the assistance.  Just hope that I can be helpful :-)  In
 the cases where I use indexed properties, the property is part of a
 larger object.  It sounds to me like you have two arrays in your form
 class: one for blockName and one for blockType.  I would suggest
 creating a bean with the two properties, and then have a collection of
 those objects in your form.

 Building on my previous example, you'd have something like this:
  logic:iterate name=blocks id=oneBlock
  type=com.myco.beans.Block
  td
html:text name=oneBlock property=blockName indexed =true/
  /td
  td
html:select name=oneBlock property=blockType
 indexed=true size=1
   html:options name=myForm property=blockTypes/
/html:select.
  /td
  /logic:iterate

 This example assumes your collection of blockTypes is part of your form,
 but it could be a collection that was in request/session/application
 scope.  You would create form entries for the collection like you
 implemented in our previous emails.

 I have almost this exact code in a few places and it works well.

 Hope this helps.
 Nick

 -Original Message-
 From: atta-ur rehman [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 28, 2003 3:37 PM
 To: Struts Users Mailing List
 Subject: Re: Indexed Properties

 Thanks, for the reply.

 Okay, here is the background. I'm trying to learn the user of Indexed
 Properties. Why I'm doing that? Well, I have a form that lists, let's
 say
 for the sake of simplicity, Block Name and Block Type columns. Block
 Name is
 a readonly text field while the Block Type is a dropdown list box with a
 set
 of reference values  coming from the database. User can have n blocks on
 the
 page and he can change the block type of any block on the page. user
 cannot
 define a new block on this page.

 In my form I've got String[] getter/setters for blockName and blockType
 properties. In my action, I set both these arrays 

Re: How to use SwitchAction?

2003-07-29 Thread Sergey Smirnov
See simple module switching example on sourceforge
(http://sourceforge.net/projects/struts)
if you use Struts Studio, you can take this adopted example on
http://forum.exadel.com/viewtopic.php?t=120
The war name for it is simple-module-switching.war

Siva [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 Could anyone of you point me a good document on how to use SwitchAction
 ? I am searching for any articles regarding SwitchAction but couln noy
 find any...

 Thanks,
 Siva






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



[newbie] Nested Beans

2003-07-29 Thread steph . kimbrough
Hello,

I use one form with data of type A and within an iteration of data with type B. Each 
member of B has its own submit button thus I can in the following action do some work 
with exactly this entry (e.g. make changes to a database).

Question: how does the action know which button is pressed, if its one of the list 
entries or the main submit button of the form?


-- 
Sparen sie sich reich - 
Werden Sie Premium Mitglied bei freenet.de und erleben Sie 
eine exklusive aufregende Vorteilswelt!
http://www.freenet.de/tipp/premium/vorteile/index.html

RE: [OT] Is jsessionid specific to Tomcat or generic to all web containers?

2003-07-29 Thread Daniel Joshua
I think Craig already said the parameter having to be called jsessionid is
part of a spec...

Regards,
Daniel


-Original Message-
From: Matthias Bauer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 29 July, 2003 5:02 PM
To: Struts Users Mailing List
Subject: Re: [OT] Is jsessionid specific to Tomcat or generic to all
web containers?


Craig,

all this sentence says is that the session id must be encoded as a path
parameter. But it does not say anything about the name, the implementing
server is supposed to use. Is there some other place in the spec where
it says that the parameter must be called jsessionid? If not, I would
say the server implementation is free to choose any name. Am I
overlooking something?

--- Matthias

The URL rewriting format is also standardized; in section 7.1.3 you will
see the sentence:

  The session id must be encoded as a path parameter in the URL string.






-
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: Development time using Struts,

2003-07-29 Thread Puneet Agarwal
   

Konstadinis Euaggelos

[EMAIL PROTECTED]To: Struts Users Mailing List 
[EMAIL PROTECTED]  
rodyn.com   cc:   

 Subject: Re: Development time 
using Struts,   
07/29/03 02:32 PM  

Please respond to Struts  

Users Mailing List

   

   









The code  reuse hasn't to do only with Struts, but how you have design your
application .
-- Struts can only give you some good start, after that its we who write
the code, and if we mess up...Not Struts' fault..!!!


I agree with you that you can write some generic methods-class to do some
work, but for a small change you must write to form bean, actionservlet,
jsp, and
ejb tier too.
--Don't agree...!!!
-- if you compare the same small change in any other framework, you will
find that it takes less time with Struts.
--Moreover Struts's design is such that you can have lesser total defect
content in the application, ( truly if prepared wisely. I would again say,
we should not mess up...!!!)






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



MessageResource

2003-07-29 Thread Nadja Senoucci
Hello,

I have a question concerning the MessageResources. I would like to access
the (localised) messages within my application (not in the page getting
displayed but within my actually Java code) and I've looked up
MessageResource and MessageResourceFactory but I am still a bit confused as
to how to use it... Could someone please give me a simple example code? Or
point me to one?

All I need is to access the correct MessageResource file (depending on the
current local) and read out a few messages certain messages.

I'd greatly appreciate any kind of help.

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



Error : No Action Instance for path could be Created

2003-07-29 Thread guruprasad jakka
Hi,

I am using action chaining to call an action for an action.
The new action has a different actionform to that of the calling
action.

But, When I run the application, I get the error,

No action instance for path /srfailure could be created.

srfailure is the path for the new action.

what might be the error?

All the action and form classes are present.

My entries in struts-config.xml is as follows,
action-mappings

!-- Registration Action --
actionpath=/registration
   type=RegistrationAction
   name=registrationForm
   scope=request
   validate=true
   input=/registration.jsp
   forward name=success 
path=/success.jsp/
   
/action

actionpath=/srfailure
   type=SRFailureAction
   name=srfailureForm
   scope=session
  
   forward name=failure   path=/SRFailure.jsp/
/action

  /action-mappings



J G Guru Prasad
V sem, Information Technology,
Bachelor of Engineering,
National Institute of Technology Karnataka, Surathkal.
( formerly KREC )



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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



Re: MessageResource

2003-07-29 Thread James Mitchell
The struts-example application shows how to do this.  Did you take a look at
that yet?

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx


- Original Message - 
From: Nadja Senoucci [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 6:29 AM
Subject: MessageResource


Hello,

I have a question concerning the MessageResources. I would like to access
the (localised) messages within my application (not in the page getting
displayed but within my actually Java code) and I've looked up
MessageResource and MessageResourceFactory but I am still a bit confused as
to how to use it... Could someone please give me a simple example code? Or
point me to one?

All I need is to access the correct MessageResource file (depending on the
current local) and read out a few messages certain messages.

I'd greatly appreciate any kind of help.

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


-
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 use SwitchAction?

2003-07-29 Thread Siva
thanks a lot Sergey..

Sergey Smirnov wrote:

 See simple module switching example on sourceforge
 (http://sourceforge.net/projects/struts)
 if you use Struts Studio, you can take this adopted example on
 http://forum.exadel.com/viewtopic.php?t=120
 The war name for it is simple-module-switching.war

 Siva [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi,
 
  Could anyone of you point me a good document on how to use SwitchAction
  ? I am searching for any articles regarding SwitchAction but couln noy
  find any...
 
  Thanks,
  Siva

 -
 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: MessageResource

2003-07-29 Thread Nadja Senoucci
Hello,

The struts-example application shows how to do this.  Did you take a look at
that yet?

Oh no, I forgot about it. I actually even forgot I *had* the example app in
the first place. Stupid me. ;) Thank you, but can you tell me in which of
the classes I can find that? There are quite a few... starts searching

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



Re: MessageResource

2003-07-29 Thread James Mitchell
I am assuming you want to get at your bundle from within your action class,
take a look at any of the actions that are there.

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx


- Original Message - 
From: Nadja Senoucci [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 6:42 AM
Subject: Re: MessageResource


Hello,

The struts-example application shows how to do this.  Did you take a look
at
that yet?

Oh no, I forgot about it. I actually even forgot I *had* the example app in
the first place. Stupid me. ;) Thank you, but can you tell me in which of
the classes I can find that? There are quite a few... starts searching

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


-
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: MessageResource

2003-07-29 Thread Nadja Senoucci
Hello,

I am assuming you want to get at your bundle from within your action class,
take a look at any of the actions that are there.

Ah, thank you! I actually didn't want to do it in an action class but I can
pass request object to the appropriate methods anyway.

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



passing parameter to a getter method

2003-07-29 Thread Richard Raquepo
help.

how can i pass a parameter  to a getter method using
JSTL of Struts-EL?

example

in a java i can get values from my bean using
ArrayList values = mybean.getSampleValues(id01);

now how can i do that in struts/jsp. 
using logic-el:iterate or for each.
Id01 is dynamic it will come from a logic-el:iterate.

any dea how?

thanks a lot

submit a form with html:link

2003-07-29 Thread Faisal Shoukat

Hi,

I am trying to submit a form by using a link. I have looked through the
emails already on this and am using the following code from a previous
mail:

html:link href=
onclick=javascript:'document.forms[0].submit();return
false;'Login/html:link

however when I click on the link nothing happens?  Does anybody know
why?

Thanks in Advance
Faisal


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



Re: submit a form with html:link

2003-07-29 Thread Konstadinis Euaggelos
If you are using this way to submit the form then , 

you must not have in your form html:submit but only html:button .
so you must submit your form only wiht javasrcript.

Hope this help.



- Original Message - 
From: Faisal Shoukat [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 2:34 PM
Subject: submit a form with html:link


 
 Hi,
 
 I am trying to submit a form by using a link. I have looked through the
 emails already on this and am using the following code from a previous
 mail:
 
 html:link href=
 onclick=javascript:'document.forms[0].submit();return
 false;'Login/html:link
 
 however when I click on the link nothing happens?  Does anybody know
 why?
 
 Thanks in Advance
 Faisal
 
 
 -
 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: Reflecting Changes in a Form After data has been updated

2003-07-29 Thread Mainguy, Mike
You shouldn't have to do that.  If your form already has all of the values
coming in, unless you reinitialize your form, it will still have them going
out.  The only things you may have to fool with are values that where not
submitted with the form.

Am I missing something?

-Original Message-
From: Curtney Jacobs [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 10:38 AM
To: Struts Users Mailing List
Subject: Reflecting Changes in a Form After data has been updated

Greetings everyone!

I have an input form where my users can update their profile. After the user

have select the Update button I would like the form to reflect the updated

information the user has just submitted.

What is the best way to implement this?

I can think of one way; in my update action class after the data has been 
successfully updated in the database, copy the fields from my value object 
(updated data) back into the ActionForm and subsequently put it back into
the 
current session. Is this the most efficient/elegant way of doing this?


Thanks inadvance,

_CJ 

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


This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.



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



Re: [OT] Is jsessionid specific to Tomcat or generic to all webcontainers?

2003-07-29 Thread Jason Lea
Matthias Bauer wrote:
Craig,

all this sentence says is that the session id must be encoded as a path 
parameter. But it does not say anything about the name, the implementing 
server is supposed to use. Is there some other place in the spec where 
it says that the parameter must be called jsessionid? If not, I would 
say the server implementation is free to choose any name. Am I 
overlooking something?
Perhaps you overlooked looking at the spec itself :)

Servlet Spec 2.3

SRV.7.1.3 URL Rewriting
URL rewriting is the lowest common denominator of session tracking. When 
a client will not accept a cookie, URL rewriting may be used by the 
server as the basis for session tracking. URL rewriting involves adding 
data, a session id, to the URL path that is interpreted by the container 
to associate the request with a session.
The session id must be encoded as a path parameter in the URL string. 
The name of the parameter must be jsessionid. Here is an example of a 
URL containing encoded path information:
http://www.myserver.com/catalog/index.html;jsessionid=1234


--- Matthias

The URL rewriting format is also standardized; in section 7.1.3 you will
see the sentence:
 The session id must be encoded as a path parameter in the URL string.

 



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



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


Re: submit a form with html:link

2003-07-29 Thread Andrew Geery
I've gotten this to work by using '#' as the target of the href:
html:link href=# onclick=document.forms[0].submit();Login/html:link
See also 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg46693.html

Konstadinis Euaggelos wrote:

If you are using this way to submit the form then , 

you must not have in your form html:submit but only html:button .
so you must submit your form only wiht javasrcript.
Hope this help.



- Original Message - 
From: Faisal Shoukat [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 2:34 PM
Subject: submit a form with html:link

 

Hi,

I am trying to submit a form by using a link. I have looked through the
emails already on this and am using the following code from a previous
mail:
html:link href=
onclick=javascript:'document.forms[0].submit();return
false;'Login/html:link
however when I click on the link nothing happens?  Does anybody know
why?
Thanks in Advance
Faisal
-
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: [OT] Is jsessionid specific to Tomcat or generic to all webcontainers?

2003-07-29 Thread Matthias Bauer
I indeed overlooked that. Thanks for the clarification.

--- Matthias

Jason Lea wrote:

Matthias Bauer wrote:

Craig,

all this sentence says is that the session id must be encoded as a 
path parameter. But it does not say anything about the name, the 
implementing server is supposed to use. Is there some other place in 
the spec where it says that the parameter must be called 
jsessionid? If not, I would say the server implementation is free 
to choose any name. Am I overlooking something?


Perhaps you overlooked looking at the spec itself :)

Servlet Spec 2.3

SRV.7.1.3 URL Rewriting
URL rewriting is the lowest common denominator of session tracking. 
When a client will not accept a cookie, URL rewriting may be used by 
the server as the basis for session tracking. URL rewriting involves 
adding data, a session id, to the URL path that is interpreted by the 
container to associate the request with a session.
The session id must be encoded as a path parameter in the URL string. 
The name of the parameter must be jsessionid. Here is an example of a 
URL containing encoded path information:
http://www.myserver.com/catalog/index.html;jsessionid=1234


--- Matthias

The URL rewriting format is also standardized; in section 7.1.3 you 
will
see the sentence:

 The session id must be encoded as a path parameter in the URL string.

 



-
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: Action Chaining problems

2003-07-29 Thread Alex Shneyderman
I went thru the Struts' source and I can not see that this behaviour is
what's supposed to happen. If my redirect is set to false, all struts
does is 

At the end of RequestProcessor.process method the following method is
called:

   processActionForward(request, response, forward);

   this in trun calls
   processForwardConfig( request, response, forward );

   this in turn executes 

if (forward.getRedirect()) {
// only prepend context path for relative uri
if (uri.startsWith(/)) {
uri = request.getContextPath() + uri;
}
response.sendRedirect(response.encodeRedirectURL(uri));

} else {
doForward(uri, request, response);
}

   now since my redirect is false
doForward will be executed and it looks like the following
RequestDispatcher rd =
getServletContext().getRequestDispatcher(uri);
rd.forward(request, response);

As far as I can see Struts does not do it but container somehow does
create a new instance of request (which as I said I could care less
about, as long as the content stays the same). Now is this expected
behavior of RequestDispatcher.forward?

I do not think so. I just can't see where this is happening. If anyone
can point me to the place where I can clearly see the code that should
correspond to the behavior I am seeing, that would be very helpful.
Otherwise, I am stuck with assigneing attributes to the session object,
which I would hate to do.

Thanks,
Alex.

 Dear Alex,
 
 Whenever you do action chaining, for the second action, it will always
be
 considred as a new request from the browser. So the insances will be
new
 and the attributes will not be there. This is the behaviour of action
 chaining.
 
 It is recomended not to use action chaining if you want to pass
attributes
 in the request and use the attributes of the action forms.
 You can extend the actions instead...
 
 Siva
 
 Alex Shneyderman wrote:
 
  I have a need to chain actions and my code looks like:
 
  OperationConfig oc = new OperationConfig ();
 
  if ((oc.getStep () == null) || .equals (oc.getStep ().trim ())) {
 oc.setStep (DEFAULT_STEP);
  }
 
  if ((oc.getOperation () == null) || .equals (oc.getOperation
().trim
  ())) {
 oc.setOperation (DEFAULT_OP);
  }
 
  ActionForward af = mapping.findForward (navigate.step + oc.getStep
  ());
 
  //System.out.println (Hash code:  + ((Object) request).hashCode
());
  //System.out.println (To string:  + ((Object) request).toString
());
 
  if (af != null) {
 request.setAttribute (Constants.REQATTRIBUTE_OPCFG, oc);
 
  //for (Enumeration enum = request.getAttributeNames();
  enum.hasMoreElements // (); ) {
  //   String key = (String) enum.nextElement ();
  // System.out.println (Key:  + key + ; Class:  +
  //request.getAttribute (key).getClass().getName ());
  //}
 
 return af;
  } else { // TODO: this is an error.
 return null;
  }
 
  Now when my action that I chain to gets the request it actualy does
not
  get the attribute that I set. As the matter of fact my request
object is
  completely different instance (which I really could care less about,
as
  long the content stays there).
 
  Can someone shed some light on this?
  My redirect is false.
 
  Thanks,
  Alex.
 
  PS here is the output of the commented code:
 
  Hash code: 5738457
  To string: [EMAIL PROTECTED]
  Key: javax.servlet.request.cipher_suite; Class: java.lang.String
  Key: org.apache.struts.action.MESSAGE; Class:
  org.apache.struts.util.PropertyMessageResources
  Key: javax.servlet.request.key_size; Class: java.lang.Integer
  Key: org.apache.struts.action.mapping.instance; Class:
  org.apache.struts.action.ActionMapping
  Key: Logon; Class: org.apache.struts.validator.DynaValidatorForm
  Key: edu.columbia.law.gls.opcfg; Class:
  edu.columbia.law.gls.OperationConfig
  Key: NavigatorForm; Class: org.apache.struts.action.DynaActionForm
  Key: org.apache.struts.action.MODULE; Class:
  org.apache.struts.config.impl.ModuleConfigImpl
 
  Similar output of the action chained to:
 
  Hash code: 4727831
  To string: [EMAIL PROTECTED]
  -- it is null
  Key: javax.servlet.request.cipher_suite; Class: java.lang.String
  Key: org.apache.struts.action.MESSAGE; Class:
  org.apache.struts.util.PropertyMessageResources
  Key: javax.servlet.request.key_size; Class: java.lang.Integer
  Key: org.apache.struts.action.mapping.instance; Class:
  org.apache.struts.action.ActionMapping
  Key: org.apache.struts.action.MODULE; Class:
  org.apache.struts.config.impl.ModuleConfigImpl
 
  As you can see the request and its content is changed. Why is that?
 
 
-
  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 

Distributed components placing

2003-07-29 Thread Viral_Thakkar








In a typical distributed
web application using the struts framework. 

The flow designed is as below : 

StrutsController -- ActionForm
-- Action -- Business Delegate (Uses Service Locator) -- Session
Facade. 

Details : 

The query is whether Business delegate component should be part of client jar
file or it should be part of server jar file?

I think, business delegate and service locator will be part of client jar file
as business delegate is used inside the Struts Action class execute()
method. And service locator will be used by busiess
delegate to get the session facade. 

If service locator component is required at session facade also then should we
keep service locator component in server jar also?



Thanks in advance.








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

Re: submit a form with html:link

2003-07-29 Thread Sergey Smirnov
Do not be surprised to receive two requests from browser if you do not use
'return false;' at the end.

Andrew Geery [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I've gotten this to work by using '#' as the target of the href:
 html:link href=#
onclick=document.forms[0].submit();Login/html:link

 See also
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg46693.html

 Konstadinis Euaggelos wrote:

 If you are using this way to submit the form then ,
 
 you must not have in your form html:submit but only html:button .
 so you must submit your form only wiht javasrcript.
 
 Hope this help.
 
 
 
 - Original Message -
 From: Faisal Shoukat [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Tuesday, July 29, 2003 2:34 PM
 Subject: submit a form with html:link
 
 
 
 
 Hi,
 
 I am trying to submit a form by using a link. I have looked through the
 emails already on this and am using the following code from a previous
 mail:
 
 html:link href=
 onclick=javascript:'document.forms[0].submit();return
 false;'Login/html:link
 
 however when I click on the link nothing happens?  Does anybody know
 why?
 
 Thanks in Advance
 Faisal
 
 
 -
 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]



How to populate the 2nd action's FormBean in Action Chaining??

2003-07-29 Thread guruprasad jakka

Hi,
I have used action chaining in my web-application.
I have formbean associated with the 2nd action.
When a call is made to this action,the form bean is not getting
populated.
hence,when I try to use the bean's property I get the error
message -Connot find bean in any scope.

I would like to know whether I could populate the formbean
( associated with the 2nd Action class ) to be used in the 2nd
action class.

Thanks,

J G Guru Prasad
V sem, Information Technology,
Bachelor of Engineering,
National Institute of Technology Karnataka, Surathkal.
( formerly KREC )



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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



Re: [newbie] Nested Beans

2003-07-29 Thread Erik Price


[EMAIL PROTECTED] wrote:
Hello,

I use one form with data of type A and within an iteration of data with type B. Each member of B has its own submit button thus I can in the following action do some work with exactly this entry (e.g. make changes to a database).

Question: how does the action know which button is pressed, if its one of the list entries or the main submit button of the form?
Put each submit button into its own form element along with a hidden 
input field to identify which list entry was sent.

Erik

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


RE: [newbie] Nested Beans

2003-07-29 Thread Alex Shneyderman
Alternatively make each submit button an indexed property of your form.
Depending on how big your form is this migh be an acceptable solution.

Alex.

 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 29, 2003 9:47 AM
 To: Struts Users Mailing List
 Subject: Re: [newbie] Nested Beans
 
 
 
 [EMAIL PROTECTED] wrote:
  Hello,
 
  I use one form with data of type A and within an iteration of data
with
 type B. Each member of B has its own submit button thus I can in the
 following action do some work with exactly this entry (e.g. make
changes
 to a database).
 
  Question: how does the action know which button is pressed, if its
one
 of the list entries or the main submit button of the form?
 
 Put each submit button into its own form element along with a hidden
 input field to identify which list entry was sent.
 
 
 Erik
 
 
 -
 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: submit a form with html:link

2003-07-29 Thread ian_d_stewart


OnClick is an arbitrary string that is evaluated by the scripting engine,
not a URL.

try replacing

onclick=javascript:'document.forms[0].submit();return
false;'

with

onclick=document.forms[0].submit(); return false


HTH,
Ian

Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure  Operations
[EMAIL PROTECTED]
(614) 213-6100




Faisal Shoukat [EMAIL PROTECTED] on 07/29/2003 07:34:32 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   'Struts Users Mailing List' [EMAIL PROTECTED]
cc:

Subject:  submit a form with html:link




Hi,

I am trying to submit a form by using a link. I have looked through the
emails already on this and am using the following code from a previous
mail:

html:link href=
onclick=javascript:'document.forms[0].submit();return
false;'Login/html:link

however when I click on the link nothing happens?  Does anybody know
why?

Thanks in Advance
Faisal


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









This transmission may contain information that is privileged, confidential and/or 
exempt from disclosure under applicable law. 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]



Problem with nested:select

2003-07-29 Thread Swaroop George


Hi all,
 I have a problem with nested:select.
I have a drop down which is always disabled. Now based on the value of
some other dropdown I am marking one of the options of this dropdown as
selected. I am using Javascript for this. Now my problem is that once
the form gets submitted the bean(which is supposed to hold the selected
value of the disabled drop down) doesnot retain the value assigned.

However this problem is not occurring when I enable the drop down. The
bean is retaining the value of the drop down, so that when the page gets
refreshed or reloaded I have the value displayed.(I am putting the bean
in session scope.)

Thanks in advance
Swaroop

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



RE: Problem with nested:select

2003-07-29 Thread Mainguy, Mike
Most likely the web browser isn't sending the value of the disabled drop
down.  Try enabling it via javascript before posting the data to the
servlet.

-Original Message-
From: Swaroop George [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 10:00 AM
To: Struts Users Mailing List
Subject: Problem with nested:select



Hi all,
 I have a problem with nested:select.
I have a drop down which is always disabled. Now based on the value of
some other dropdown I am marking one of the options of this dropdown as
selected. I am using Javascript for this. Now my problem is that once
the form gets submitted the bean(which is supposed to hold the selected
value of the disabled drop down) doesnot retain the value assigned.

However this problem is not occurring when I enable the drop down. The
bean is retaining the value of the drop down, so that when the page gets
refreshed or reloaded I have the value displayed.(I am putting the bean
in session scope.)

Thanks in advance
Swaroop

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


This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.



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



problem submitting mulitple row fields in one action form

2003-07-29 Thread Faisal Shoukat


Hello,

Does anyone know how to submit multiple fields in one form.  Let me
explain.  I have a search jsp which returns for example 3 rows.  In each
of the rows there are 3 amendable columns x, y and z. which are stored
as html:text The user has the option of amending all the fields thus
if 3 rows were returned they could amend 9 fields.  

I have the table which holds the results enclosed within a form.
However when a user enters data into all the fields only the data
entered in the first row is passed into the form.

Does anyone know how to get all of the data entered in the fields passed
to the action class.  The number of rows returned depends upon what is
in the database so is not pre defined.

Thanks in advance
faisal


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



Re: Sounds simple, but it isn't: How to pass an attribute to a nestedtile?

2003-07-29 Thread Tim Shadel
Daniel,

This thread discusses something similar:

http://marc.theaimsgroup.com/?l=struts-userm=105290962918724w=2

It's a bit long, and the discussion seemed to help one of the two 
original questioners.  It may work for you too.

HTH,

Tim

Daniel Draws wrote:
Hi all!

Is there anybody out there who can solve the following problem:

I have a main and a more special tile defintion declared in the
tiles-defs.xml:
definition name=view.base.layout page=/mainlayout.jsp
  put name=head value=.../
  put name=body value=/
  put name=menu value=.../
  put name=foot value=.../
/definition
definition extends=view.base.layout name=view.special.layout
  put name=body value=/special.jsp/
/definition
the special.jsp defines a more conrete layout for the body:

some html snippet

 tiles:insert attribute=content/

/some html snippet



Now I want to define a concrete jsp, wich inserts the view.special.layout
and passes the content attribute through that to the special.jsp.
My idea was the following jsp:

tiles:insert defintion=view.special.layout
 tiles:put name=content type=string
  some special html /
 /tiles:put
/tiles:insert
So what? I was a little bit naive and at the end this doesn't work.

Is there anybody out there who could help me?

thanks for your help!

daniel



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


RE: submit a form with html:link

2003-07-29 Thread Yansheng Lin
How about:
a href=javascript:; onclick=...


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: July 29, 2003 7:56 AM
To: Struts Users Mailing List
Subject: Re: submit a form with html:link




OnClick is an arbitrary string that is evaluated by the scripting engine,
not a URL.

try replacing

onclick=javascript:'document.forms[0].submit();return
false;'

with

onclick=document.forms[0].submit(); return false


HTH,
Ian

Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure  Operations
[EMAIL PROTECTED]
(614) 213-6100




Faisal Shoukat [EMAIL PROTECTED] on 07/29/2003 07:34:32 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   'Struts Users Mailing List' [EMAIL PROTECTED]
cc:

Subject:  submit a form with html:link




Hi,

I am trying to submit a form by using a link. I have looked through the
emails already on this and am using the following code from a previous
mail:

html:link href=
onclick=javascript:'document.forms[0].submit();return
false;'Login/html:link

however when I click on the link nothing happens?  Does anybody know
why?

Thanks in Advance
Faisal


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









This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. 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: submit a form with html:link

2003-07-29 Thread Faisal Shoukat
The following works when submitting a form:

html:link href= onclick=document.forms[0].submit();return
false;Login Test/html:link

Thanks.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 15:39
To: 'Struts Users Mailing List'
Subject: RE: submit a form with html:link

How about:
a href=javascript:; onclick=...


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: July 29, 2003 7:56 AM
To: Struts Users Mailing List
Subject: Re: submit a form with html:link




OnClick is an arbitrary string that is evaluated by the scripting
engine,
not a URL.

try replacing

onclick=javascript:'document.forms[0].submit();return
false;'

with

onclick=document.forms[0].submit(); return false


HTH,
Ian

Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure  Operations
[EMAIL PROTECTED]
(614) 213-6100




Faisal Shoukat [EMAIL PROTECTED] on 07/29/2003 07:34:32 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   'Struts Users Mailing List' [EMAIL PROTECTED]
cc:

Subject:  submit a form with html:link




Hi,

I am trying to submit a form by using a link. I have looked through the
emails already on this and am using the following code from a previous
mail:

html:link href=
onclick=javascript:'document.forms[0].submit();return
false;'Login/html:link

however when I click on the link nothing happens?  Does anybody know
why?

Thanks in Advance
Faisal


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









This transmission may contain information that is privileged,
confidential
and/or exempt from disclosure under applicable law. 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]


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



RE: Development time using Struts,

2003-07-29 Thread Suzette Daniel
My develoment time on the ui side has greatly decreased. I've been finishing
ui implementations for shopping cart apps in 2 weeks versus 1 month. I've
not had any kind of EJB problems either, I can take more time on the sever
side now.

Suzette H. Daniel


-Original Message-
From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 10:42 AM
To: 'Struts Users Mailing List'
Subject: RE: Development time using Struts,


 I am using Struts about 4-months now,
 I found it a very good framework for developing 
 web-applications,  but the devolpment time in contrary with 
 the  classicc way(jsp, serlvet) is much more using Struts. 

My experience is quite the opposite.

I'm spending much less time making sure I pass the right parameters around
and spending more time making stuff like error handling and business logic
works.

-TPP

-
This email may contain confidential and privileged material for the sole use
of the intended recipient(s). Any review, use, retention, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


-
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: problem submitting mulitple row fields in one action form

2003-07-29 Thread Wendy Smoak
Faisal wrote:
 Does anyone know how to get all of the data entered in the fields
 passed to the action class.  The number of rows returned depends
 upon what is in the database so is not pre defined.

If you read up on indexed properties, possibly the nested taglib, and use a
String[] property in your Form bean, I think you may find the solution to
this one.  

I can't immediately see how you'd make sure the String[] got initialized to
the right size though.

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


bean:message key=bean:write question

2003-07-29 Thread Brian McSweeney
Hi all,
 
I have parameters in a form bean and I want to use it as 
the key for an associated value in a resource bundle.
 
I was considering using 
 
bean:message key=bean:write name=myForm property=myProperty/
 
is this valid syntax?
 
Thanks,
 
Brian


Re: bean:message key=bean:write question

2003-07-29 Thread David Graham
--- Brian McSweeney [EMAIL PROTECTED] wrote:
 Hi all,
  
 I have parameters in a form bean and I want to use it as 
 the key for an associated value in a resource bundle.
  
 I was considering using 
  
 bean:message key=bean:write name=myForm property=myProperty/
  
 is this valid syntax?

No.  You can't use a tag as another tag's attribute value.  Have you
considered using the JSTL's fmt:message tag instead?

David

  
 Thanks,
  
 Brian
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Reflecting Changes in a Form After data has been updated

2003-07-29 Thread Curtney Jacobs
The form is first populated with the user information from a database. So, 
their is a populated ProfileActionForm that is within the current user 
session.

If I make some changes to the profile information then submit the form the 
database does have the updated information, however, the form does not 
reflect the updated information after submit, it shows the data it was first 
populated with. 

What I would like is that, after submitting the form the redisplayed form to 
show the updated information.

(Note: after submitting the form, the form redisplay again)

_CJ


On Tuesday 29 July 2003 04:45 am, Mainguy, Mike wrote:
 You shouldn't have to do that.  If your form already has all of the values
 coming in, unless you reinitialize your form, it will still have them going
 out.  The only things you may have to fool with are values that where not
 submitted with the form.

 Am I missing something?

 -Original Message-
 From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 10:38 AM
 To: Struts Users Mailing List
 Subject: Reflecting Changes in a Form After data has been updated

 Greetings everyone!

 I have an input form where my users can update their profile. After the
 user

 have select the Update button I would like the form to reflect the
 updated

 information the user has just submitted.

 What is the best way to implement this?

 I can think of one way; in my update action class after the data has been
 successfully updated in the database, copy the fields from my value object
 (updated data) back into the ActionForm and subsequently put it back into
 the
 current session. Is this the most efficient/elegant way of doing this?


 Thanks inadvance,

 _CJ

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


 This message and its contents (to include attachments) are the property of
 Kmart Corporation (Kmart) and may contain confidential and proprietary
 information. You are hereby notified that any disclosure, copying, or
 distribution of this message, or the taking of any action based on
 information contained herein is strictly prohibited. Unauthorized use of
 information contained herein may subject you to civil and criminal
 prosecution and penalties. If you are not the intended recipient, you
 should delete this message immediately.



 -
 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: browser refresh - calls more than one action

2003-07-29 Thread Jing Zhou
Have you tried to use the HTML4 base tag?
The spec states that a document lacking a base element should
by default use the current document's URL as the base URL.
Of course, the current URL is something like /AC1.do in your
case. I guess in the JSP for AC2, you could put a base element
between the head with the attribute href=/AC2.do (or something
like that)

It could introduce side effects in your JSP pages when using
the base element.

Jing
Netspread Carrier
http://www.netspread.com


- Original Message - 
From: S. K . Srinivasan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 3:29 PM
Subject: browser refresh - calls more than one action




 Hi,

 In struts  I have action_class1 ( AC1 ) , action_class 2 (AC2)

 From AC1  , when user clicks button  , i insert a record and then i call
AC2. ( I use findForward to call AC2 from AC1 )

 In the JSP ( VIEW  ) of AC2 , when  user presses refresh  , the struts
controller instead of calling just AC2 , it calls AC1 and then AC2 , leading
to duplicate record.

 When we do forward , Is there any way  to make controller to call only AC2
when the refresh on JSP of  AC2 is pressed.

 I can not use Following ways

 REDIRECT : I can not use Redirect as i am setting some param . Also i can
not do a URL appending , since In Browser URL should not show form data as
per our policy.

 Synchornizing Tokens: There are lot of Action  JSP. Very Tough to
implement.

 Any suggestions.

 regards,

 srini sk

 SMS using the Yahoo! Messenger;Download latest version.


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



Newbie - error Location

2003-07-29 Thread Chirag Mehta


Hello,
I am following the Struts tutorial written by Stephan
Wieser to create my own struts app. I reached the section on forms and
am getting the following error.
Can anyone suggest where i should look for my error?
I can seem to find whereabout my error is? (ie which class etc?
Thanks
Chirag
javax.servlet.ServletException: Exception creating bean
of class gim2.SQLScript: {1}
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at org.apache.jsp.RunSQL_jsp._jspService(RunSQL_jsp.java:82)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)


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

RE: bean:message key=bean:write question

2003-07-29 Thread Brian McSweeney
Hi David,
Thanks for the quick reply.

I know that JSTL might be the best way, but for the moment
I'd really prefer to just get it working with the struts tags 
first because it's an entire app using the struts tags.

If my proposed method isn't valid how about something like:

bean:define id=localCopy name=myForm property=myProperty
type=java.lang.String/

bean:message key=%=localCopy%/

Perhaps this would work?
I know it's a bit nasty, but I just want to get it working :-)

Thanks for your help
Brian



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 16:04
To: Struts Users Mailing List
Subject: Re: bean:message key=bean:write question

--- Brian McSweeney [EMAIL PROTECTED] wrote:
 Hi all,
  
 I have parameters in a form bean and I want to use it as 
 the key for an associated value in a resource bundle.
  
 I was considering using 
  
 bean:message key=bean:write name=myForm property=myProperty/
  
 is this valid syntax?

No.  You can't use a tag as another tag's attribute value.  Have you
considered using the JSTL's fmt:message tag instead?

David

  
 Thanks,
  
 Brian
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.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: bean:message key=bean:write question

2003-07-29 Thread David Graham
--- Brian McSweeney [EMAIL PROTECTED] wrote:
 Hi David,
 Thanks for the quick reply.
 
 I know that JSTL might be the best way, but for the moment
 I'd really prefer to just get it working with the struts tags 
 first because it's an entire app using the struts tags.
 
 If my proposed method isn't valid how about something like:
 
 bean:define id=localCopy name=myForm property=myProperty
 type=java.lang.String/
 
 bean:message key=%=localCopy%/

Yuck! How about fmt:message key=${myForm.myProperty}/ :-) ?

David

 
 Perhaps this would work?
 I know it's a bit nasty, but I just want to get it working :-)
 
 Thanks for your help
 Brian
 
 
 
 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: 29 July 2003 16:04
 To: Struts Users Mailing List
 Subject: Re: bean:message key=bean:write question
 
 --- Brian McSweeney [EMAIL PROTECTED] wrote:
  Hi all,
   
  I have parameters in a form bean and I want to use it as 
  the key for an associated value in a resource bundle.
   
  I was considering using 
   
  bean:message key=bean:write name=myForm property=myProperty/
   
  is this valid syntax?
 
 No.  You can't use a tag as another tag's attribute value.  Have you
 considered using the JSTL's fmt:message tag instead?
 
 David
 
   
  Thanks,
   
  Brian
  
 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: bean:message key=bean:write question

2003-07-29 Thread Paul McCulloch
You could expose the actual message (rather than it's key) via your form -
getMyPropertyMessage(). To render this you'd just need:

bean:write name=myForm property=myPropertyMessage/

Paul

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 16:17
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: bean:message key=bean:write question


Hi David,
Thanks for the quick reply.

I know that JSTL might be the best way, but for the moment
I'd really prefer to just get it working with the struts tags 
first because it's an entire app using the struts tags.

If my proposed method isn't valid how about something like:

bean:define id=localCopy name=myForm property=myProperty
type=java.lang.String/

bean:message key=%=localCopy%/

Perhaps this would work?
I know it's a bit nasty, but I just want to get it working :-)

Thanks for your help
Brian



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 16:04
To: Struts Users Mailing List
Subject: Re: bean:message key=bean:write question

--- Brian McSweeney [EMAIL PROTECTED] wrote:
 Hi all,
  
 I have parameters in a form bean and I want to use it as 
 the key for an associated value in a resource bundle.
  
 I was considering using 
  
 bean:message key=bean:write name=myForm property=myProperty/
  
 is this valid syntax?

No.  You can't use a tag as another tag's attribute value.  Have you
considered using the JSTL's fmt:message tag instead?

David

  
 Thanks,
  
 Brian
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.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]


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


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



RE: bean:message key=bean:write question

2003-07-29 Thread Brian McSweeney
Not sure what you mean Paul,
Are you saying the implementation of the getMyPropertyMessage
would go to the correct localized resource bundle?
Cheers,
Brian


-Original Message-
From: Paul McCulloch [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 16:25
To: 'Struts Users Mailing List'
Subject: RE: bean:message key=bean:write question

You could expose the actual message (rather than it's key) via your form
-
getMyPropertyMessage(). To render this you'd just need:

bean:write name=myForm property=myPropertyMessage/

Paul

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 16:17
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: bean:message key=bean:write question


Hi David,
Thanks for the quick reply.

I know that JSTL might be the best way, but for the moment
I'd really prefer to just get it working with the struts tags 
first because it's an entire app using the struts tags.

If my proposed method isn't valid how about something like:

bean:define id=localCopy name=myForm property=myProperty
type=java.lang.String/

bean:message key=%=localCopy%/

Perhaps this would work?
I know it's a bit nasty, but I just want to get it working :-)

Thanks for your help
Brian



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 16:04
To: Struts Users Mailing List
Subject: Re: bean:message key=bean:write question

--- Brian McSweeney [EMAIL PROTECTED] wrote:
 Hi all,
  
 I have parameters in a form bean and I want to use it as 
 the key for an associated value in a resource bundle.
  
 I was considering using 
  
 bean:message key=bean:write name=myForm property=myProperty/
  
 is this valid syntax?

No.  You can't use a tag as another tag's attribute value.  Have you
considered using the JSTL's fmt:message tag instead?

David

  
 Thanks,
  
 Brian
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.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]


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver
this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to
Internet email messages of this kind, please advise us immediately.
Opinions, conclusions and other information expressed in this message
are not given or endorsed by my Company or employer unless otherwise
indicated by an authorised representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from
being transmitted via electronic mail attachments we cannot guarantee
that attachments do not contain computer virus code.  You are therefore
strongly advised to undertake anti virus checks prior to accessing the
attachment to this electronic mail.  Axios Systems Ltd grants no
warranties regarding performance use or quality of any attachment and
undertakes no liability for loss or damage howsoever caused.


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


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



RE: bean:message key=bean:write question

2003-07-29 Thread Brian McSweeney
Yeah, that looks so nice and simple!
I have to switch over to jstl. 
But getting it working is priority number 1.
Brian


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 16:22
To: 'Struts Users Mailing List'
Subject: RE: bean:message key=bean:write question

--- Brian McSweeney [EMAIL PROTECTED] wrote:
 Hi David,
 Thanks for the quick reply.
 
 I know that JSTL might be the best way, but for the moment
 I'd really prefer to just get it working with the struts tags 
 first because it's an entire app using the struts tags.
 
 If my proposed method isn't valid how about something like:
 
 bean:define id=localCopy name=myForm property=myProperty
 type=java.lang.String/
 
 bean:message key=%=localCopy%/

Yuck! How about fmt:message key=${myForm.myProperty}/ :-) ?

David

 
 Perhaps this would work?
 I know it's a bit nasty, but I just want to get it working :-)
 
 Thanks for your help
 Brian
 
 
 
 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: 29 July 2003 16:04
 To: Struts Users Mailing List
 Subject: Re: bean:message key=bean:write question
 
 --- Brian McSweeney [EMAIL PROTECTED] wrote:
  Hi all,
   
  I have parameters in a form bean and I want to use it as 
  the key for an associated value in a resource bundle.
   
  I was considering using 
   
  bean:message key=bean:write name=myForm property=myProperty/
   
  is this valid syntax?
 
 No.  You can't use a tag as another tag's attribute value.  Have you
 considered using the JSTL's fmt:message tag instead?
 
 David
 
   
  Thanks,
   
  Brian
  
 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.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: Intercepting Action Filters

2003-07-29 Thread Jing Zhou
snip
One can do this with servlet filters, but sometimes its nice to do this
within Struts, to look at the action mapping, pick an action forward, etc.
I could imagine libraries of pluggable 'ActionFilters' for checking that the
user is logged in, security, transaction demarcation, logging, etc.
Applications could pick and choose which ones they want, a la carte style.
One could write a request processor that would take a configured list of
these 'filters', build a filter chain, and run them around each
Action.execute invocation.   Has anyone done anything like this?  Any issues
to watch out for?


I would

Thanks.

Steve Molitor

/snip

I believe that using the request processor to invoke configured *filters*
would overlap too much with the servlet filters. What a real filter
can't do is the transaction demarcation.

Instead of using configurable actions or request processors,
we prefer to use configurable event handling logics inside actions.
You could look at the concept of Control Page in
http://www.netspread.com/tips2.html
When a control page should be shared, we use Controller Delegation
Model. Calls like beforeExecute() or afterExecute() can be done
in such model.

Jing
Netspread Carrier
http://www.netspread.com



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



RE: Reflecting Changes in a Form After data has been updated

2003-07-29 Thread Mainguy, Mike
So you're saying the form that is used to update the data is different than
the form that is used to display it?

-Original Message-
From: Curtney Jacobs [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 12:05 PM
To: Struts Users Mailing List
Subject: Re: Reflecting Changes in a Form After data has been updated

The form is first populated with the user information from a database. So, 
their is a populated ProfileActionForm that is within the current user 
session.

If I make some changes to the profile information then submit the form the 
database does have the updated information, however, the form does not 
reflect the updated information after submit, it shows the data it was first

populated with. 

What I would like is that, after submitting the form the redisplayed form to

show the updated information.

(Note: after submitting the form, the form redisplay again)

_CJ


On Tuesday 29 July 2003 04:45 am, Mainguy, Mike wrote:
 You shouldn't have to do that.  If your form already has all of the values
 coming in, unless you reinitialize your form, it will still have them
going
 out.  The only things you may have to fool with are values that where not
 submitted with the form.

 Am I missing something?

 -Original Message-
 From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 10:38 AM
 To: Struts Users Mailing List
 Subject: Reflecting Changes in a Form After data has been updated

 Greetings everyone!

 I have an input form where my users can update their profile. After the
 user

 have select the Update button I would like the form to reflect the
 updated

 information the user has just submitted.

 What is the best way to implement this?

 I can think of one way; in my update action class after the data has been
 successfully updated in the database, copy the fields from my value object
 (updated data) back into the ActionForm and subsequently put it back into
 the
 current session. Is this the most efficient/elegant way of doing this?


 Thanks inadvance,

 _CJ

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


 This message and its contents (to include attachments) are the property of
 Kmart Corporation (Kmart) and may contain confidential and proprietary
 information. You are hereby notified that any disclosure, copying, or
 distribution of this message, or the taking of any action based on
 information contained herein is strictly prohibited. Unauthorized use of
 information contained herein may subject you to civil and criminal
 prosecution and penalties. If you are not the intended recipient, you
 should delete this message immediately.



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


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


This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.



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



Re: [OT] Is jsessionid specific to Tomcat or generic to all webcontainers?

2003-07-29 Thread Craig R. McClanahan


On Tue, 29 Jul 2003, Matthias Bauer wrote:

 Date: Tue, 29 Jul 2003 11:01:32 +0200
 From: Matthias Bauer [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [OT] Is jsessionid specific to Tomcat or generic to all
 web containers?

 Craig,

 all this sentence says is that the session id must be encoded as a path
 parameter. But it does not say anything about the name, the implementing
 server is supposed to use. Is there some other place in the spec where
 it says that the parameter must be called jsessionid? If not, I would
 say the server implementation is free to choose any name. Am I
 overlooking something?

I don't know about you, but I find the following sentence in 7.1.3

The name of the parameter
must be jsessionid.

to be pretty clear :-).  It's just before the example.

Craig

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



RE: bean:message key=bean:write question

2003-07-29 Thread Paul McCulloch
That's right (though I have no idea how hard it would to implement the
method!).

Paul

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 16:35
To: 'Struts Users Mailing List'
Subject: RE: bean:message key=bean:write question


Not sure what you mean Paul,
Are you saying the implementation of the getMyPropertyMessage
would go to the correct localized resource bundle?
Cheers,
Brian


-Original Message-
From: Paul McCulloch [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 16:25
To: 'Struts Users Mailing List'
Subject: RE: bean:message key=bean:write question

You could expose the actual message (rather than it's key) via your form
-
getMyPropertyMessage(). To render this you'd just need:

bean:write name=myForm property=myPropertyMessage/

Paul

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 16:17
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: bean:message key=bean:write question


Hi David,
Thanks for the quick reply.

I know that JSTL might be the best way, but for the moment
I'd really prefer to just get it working with the struts tags 
first because it's an entire app using the struts tags.

If my proposed method isn't valid how about something like:

bean:define id=localCopy name=myForm property=myProperty
type=java.lang.String/

bean:message key=%=localCopy%/

Perhaps this would work?
I know it's a bit nasty, but I just want to get it working :-)

Thanks for your help
Brian



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 16:04
To: Struts Users Mailing List
Subject: Re: bean:message key=bean:write question

--- Brian McSweeney [EMAIL PROTECTED] wrote:
 Hi all,
  
 I have parameters in a form bean and I want to use it as 
 the key for an associated value in a resource bundle.
  
 I was considering using 
  
 bean:message key=bean:write name=myForm property=myProperty/
  
 is this valid syntax?

No.  You can't use a tag as another tag's attribute value.  Have you
considered using the JSTL's fmt:message tag instead?

David

  
 Thanks,
  
 Brian
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.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]


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver
this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to
Internet email messages of this kind, please advise us immediately.
Opinions, conclusions and other information expressed in this message
are not given or endorsed by my Company or employer unless otherwise
indicated by an authorised representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from
being transmitted via electronic mail attachments we cannot guarantee
that attachments do not contain computer virus code.  You are therefore
strongly advised to undertake anti virus checks prior to accessing the
attachment to this electronic mail.  Axios Systems Ltd grants no
warranties regarding performance use or quality of any attachment and
undertakes no liability for loss or damage howsoever caused.


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


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



Newbie question :Rendering buttons of type submit and button

2003-07-29 Thread Jitesh Sinha
Hi all,
How do you render following html with the help of struts-html tld :

input type=submit name=Save value =Save
input type=button name=Cancel value =Cancel

I don't have any other info like other parameters to include on pressing any
of the buttons .

Thanks,
Jitesh


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



Re: bean:message key=bean:write question

2003-07-29 Thread Thomas Cornet
The simpliest way to do it is :

bean:message name=myForm property=myProperty /

Thomas

At 17:01 29/07/2003, you wrote:
Hi all,

I have parameters in a form bean and I want to use it as
the key for an associated value in a resource bundle.
I was considering using

bean:message key=bean:write name=myForm property=myProperty/

is this valid syntax?

Thanks,

Brian


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


RE: Newbie question :Rendering buttons of type submit and button

2003-07-29 Thread Hajratwala, Nayan (N.)
http://jakarta.apache.org/struts/userGuide/struts-html.html#submit

input type=submit name=Save value =Save

in struts becomes:

html:submit property=Save value=Save /


http://jakarta.apache.org/struts/userGuide/struts-html.html#button

input type=button name=Cancel value =Cancel

in struts becomes:

html:button property=Cancel value=Cancel /


Hope this helps!

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 12:24 PM
To: Struts Users Mailing List
Subject: Newbie question :Rendering buttons of type submit and button


Hi all,
How do you render following html with the help of struts-html tld :

input type=submit name=Save value =Save
input type=button name=Cancel value =Cancel

I don't have any other info like other parameters to include on pressing any
of the buttons .

Thanks,
Jitesh


-
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: bean:message key=bean:write question

2003-07-29 Thread Brian McSweeney
Thanks Thomas! This makes things way easier!
I was looking at old documentation for that 
tag and didn't realize that you can now use 
it that way.

Thanks again,
Brian


-Original Message-
From: Thomas Cornet [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 17:22
To: Struts Users Mailing List
Subject: Re: bean:message key=bean:write question


The simpliest way to do it is :

bean:message name=myForm property=myProperty /

Thomas


At 17:01 29/07/2003, you wrote:
Hi all,

I have parameters in a form bean and I want to use it as
the key for an associated value in a resource bundle.

I was considering using

bean:message key=bean:write name=myForm property=myProperty/

is this valid syntax?

Thanks,

Brian


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



Form Bean Help?

2003-07-29 Thread Matt E
Hello All,

I'm running into a little problem, maybe someone can
help me fix it.

My application is driven by filling out web forms.  At
one point, A user can click the Save Form button,
which writes the form information to a Database.  When
the user visits the page again, the action builds a
DTO that contains all the information they had filled
out and puts it in the session scope, then forwards to
the JSP page that has the form on it.

I had been using the value property of the struts-html
tags to fill in the data, but I've noticed that when
the user hits submit, if there is a validation error,
they are pushed back to the page, and the data they
had enetered is replaced with what was in the DTO
(which is now old data).  I've also run into the
problem of filling in things like radio buttons, based
on what was in the DTO.

It seems to me that what I want to do is not pass
along the DTO with the action, but fill out parts of
the Form Bean before forwarding to the page that
displays it, at which point I could remove the value
properties of the html tags, and have everything work.

My question is, how can I do this from the action?  Or
do I want to attack this problem in another way?

Thanks!

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Form Bean Help?

2003-07-29 Thread Mainguy, Mike
My angle on this is to only load the data from the database when the user is
submitted a request to read data.  If they are submitting an update
action, I don't load the data from the database.
 
-Original Message-
From: Matt E [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 12:37 PM
To: [EMAIL PROTECTED]
Subject: Form Bean Help?

Hello All,

I'm running into a little problem, maybe someone can
help me fix it.

My application is driven by filling out web forms.  At
one point, A user can click the Save Form button,
which writes the form information to a Database.  When
the user visits the page again, the action builds a
DTO that contains all the information they had filled
out and puts it in the session scope, then forwards to
the JSP page that has the form on it.

I had been using the value property of the struts-html
tags to fill in the data, but I've noticed that when
the user hits submit, if there is a validation error,
they are pushed back to the page, and the data they
had enetered is replaced with what was in the DTO
(which is now old data).  I've also run into the
problem of filling in things like radio buttons, based
on what was in the DTO.

It seems to me that what I want to do is not pass
along the DTO with the action, but fill out parts of
the Form Bean before forwarding to the page that
displays it, at which point I could remove the value
properties of the html tags, and have everything work.

My question is, how can I do this from the action?  Or
do I want to attack this problem in another way?

Thanks!

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.



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



RE: Form Bean Help?

2003-07-29 Thread Matt E
Mike,

The bean is stored in the Session scope (the bean
needs to be stored in the session scope, so that some
other data for it which is valid for the life of the
session stays around).

Even if it was a request scoped bean, I'd still like a
way to fill out the action form before hand, because
then things like Radio buttons could be preselected
based on what I loaded from the database.

Cheers.
--- Mainguy, Mike [EMAIL PROTECTED] wrote:
 My angle on this is to only load the data from the
 database when the user is
 submitted a request to read data.  If they are
 submitting an update
 action, I don't load the data from the database.
  
 -Original Message-
 From: Matt E [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 29, 2003 12:37 PM
 To: [EMAIL PROTECTED]
 Subject: Form Bean Help?
 
 Hello All,
 
 I'm running into a little problem, maybe someone can
 help me fix it.
 
 My application is driven by filling out web forms. 
 At
 one point, A user can click the Save Form button,
 which writes the form information to a Database. 
 When
 the user visits the page again, the action builds a
 DTO that contains all the information they had
 filled
 out and puts it in the session scope, then forwards
 to
 the JSP page that has the form on it.
 
 I had been using the value property of the
 struts-html
 tags to fill in the data, but I've noticed that when
 the user hits submit, if there is a validation
 error,
 they are pushed back to the page, and the data they
 had enetered is replaced with what was in the DTO
 (which is now old data).  I've also run into the
 problem of filling in things like radio buttons,
 based
 on what was in the DTO.
 
 It seems to me that what I want to do is not pass
 along the DTO with the action, but fill out parts of
 the Form Bean before forwarding to the page that
 displays it, at which point I could remove the value
 properties of the html tags, and have everything
 work.
 
 My question is, how can I do this from the action? 
 Or
 do I want to attack this problem in another way?
 
 Thanks!
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site
 design software
 http://sitebuilder.yahoo.com
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 This message and its contents (to include
 attachments) are the property of Kmart Corporation
 (Kmart) and may contain confidential and proprietary
 information. You are hereby notified that any
 disclosure, copying, or distribution of this
 message, or the taking of any action based on
 information contained herein is strictly prohibited.
 Unauthorized use of information contained herein may
 subject you to civil and criminal prosecution and
 penalties. If you are not the intended recipient,
 you should delete this message immediately.
 
 
 

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: [OT] Is jsessionid specific to Tomcat or generic to all web containers?

2003-07-29 Thread Yansheng Lin
Isn't that for URL rewritting only?  

When you use a session through cookie, I think you can name it anything you
want.


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: July 29, 2003 10:12 AM
To: Struts Users Mailing List; Struts Users Mailing List
Subject: Re: [OT] Is jsessionid specific to Tomcat or generic to all web
containers?




On Tue, 29 Jul 2003, Matthias Bauer wrote:

 Date: Tue, 29 Jul 2003 11:01:32 +0200
 From: Matthias Bauer [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [OT] Is jsessionid specific to Tomcat or generic to all
 web containers?

 Craig,

 all this sentence says is that the session id must be encoded as a path
 parameter. But it does not say anything about the name, the implementing
 server is supposed to use. Is there some other place in the spec where
 it says that the parameter must be called jsessionid? If not, I would
 say the server implementation is free to choose any name. Am I
 overlooking something?

I don't know about you, but I find the following sentence in 7.1.3

The name of the parameter
must be jsessionid.

to be pretty clear :-).  It's just before the example.

Craig

-
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: Subject RE: Multiple modules - Please help

2003-07-29 Thread Steve Raeburn
Ajay,
I've closed this bug. It seems to be a configuration problem...

I'm assuming that your add.jsp and edit.jsp files are in the /admin
directory.

The problem is with your configuration. ForwardAction requires a CONTEXT
relative path which, in this case would be:

 action path=/showEdit
 type=org.apache.struts.actions.ForwardAction
 parameter=/admin/edit.jsp
 /action

(Note also, you had your parameter in a separate tag, but it should be an
attribute of the action tag. Not sure if that's what you actually had in
your
source or it's just a typo in the bug report, but it wouldn't help!)

The reason it worked when you used your own custom action is that by default
ActionFoward paths are MODULE relative, so your configuration entry
/edit.jsp
would be translated by the RequestProcessor to a context relative path of
/admin/edit.jsp

... if you still have problems after this, please post back to the user
list.

Steve

 -Original Message-
 From: Steve Raeburn [mailto:[EMAIL PROTECTED]
 Sent: July 28, 2003 9:13 PM
 To: Struts Users Mailing List
 Subject: RE: Subject RE: Multiple modules - Please help


 Glad you got it working. I'll take a look at your bug report and see if I
 can sort out what's happening with ForwardAction.

 Steve


  -Original Message-
  From: Ajay Patil [mailto:[EMAIL PROTECTED]
  Sent: July 28, 2003 8:28 PM
  To: [EMAIL PROTECTED]
  Subject: Subject RE: Multiple modules - Please help
 
 
  Dear Steve,
 
   Can you access the edit or remove actions by entering the URL in your
   address bar?
   e.g. http://localhost:8080/myapp/admin/edit.do?parameter=XXX
 
  Your tip helped me to debug the problem.
 
  Apparently, I got the 404 error from the browser.
  In the config file, edit.do was declared to be of type ForwardAction.
  I created a new action class and used it instead of ForwardAction.
 
  and voila, it worked !
 
  So, it might be a bug in ForwardAction.
 
  I have posted a bug at
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21949
 
  Thanks,
  Ajay
 
 
  -
  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: Indexed Properties

2003-07-29 Thread atta-ur rehman
Hello again Nick.

Well i've come a step forward in that i've been able to successfully show
the jsp page using index=true for all the rows and submit the form without
any errors too:

logic:iterate name=theForm property=blocks id=block
type=test.Block
   tr
td align=center
 html:text property=id name=block indexed=true /
/td
td
 html:text property=name name=block indexed=true /
/td
td
 html:select property=category name=block indexed=true
  html:options collection=optionList property=value
labelProperty=label/
 /html:select
/td
   /tr
  /logic:iterate

works like a charm!

What i'm still missing what is updated when i submit the form? where can i
get updated values from? my ActionForm has list attirbute called blocks
each element in the list is a Block bean object. The Block bean has
getter/setters for id, name and category.

In ActionForm I also included setCategory(int) and getCategory(int, string)
which doesn't seem to be called at all!

something obvious that i'm missing?

Thanks.

ATTA


- Original Message - 
From: Nicholas L Mohler [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 2:57 AM
Subject: Re: Indexed Properties







 Atta,

 It sounds to me like you have it.  As long as your names match up, it
 should work fine.  Ajay has given a full code example that looks good.

 Nick




   atta-ur rehman
   [EMAIL PROTECTED]To:   Struts Users
Mailing List [EMAIL PROTECTED]
   com cc:
Subject:  Re: Indexed
Properties
   07/28/2003 08:44
   PM
   Please respond to
   Struts Users
   Mailing List






 Yes, I currently have two independent String arrays for blockName and
 blockType. Putting them, and all the other block related properties, is
 what
 seems to be the right thing to do! So you have confirmed.

 here is what i have understood from your text:

 1) my form would have blocks property that would be a collection of
Block
 beans
 2) iterating each block in the blocks collection i can sure display each
 block with indexed=true directive for text boxes and dropdowns.
 3) now for the submission part i'd need to have setBlockType(int, string)
 and getBlockType(int) and same for the rest of properties. The name of
 property in the Block Form and name of the property in the Block Bean must
 match.
 4) and it should work?

 I've had my head stuck in my computer whole day today and i'm barely able
 to
 write this email :) Tommorrow morning i'd come back and confirm it by
 running it. meanwhile I'd appreciate if you could confirm these 4 points
 i've noted above!

 Thankyou very much for your help. It really did help.

 Regards,

 ATTA


 - Original Message -
 From: Nick [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Monday, July 28, 2003 5:08 PM
 Subject: RE: Indexed Properties


  Hi Atta,
 
  No problem with the assistance.  Just hope that I can be helpful :-)  In
  the cases where I use indexed properties, the property is part of a
  larger object.  It sounds to me like you have two arrays in your form
  class: one for blockName and one for blockType.  I would suggest
  creating a bean with the two properties, and then have a collection of
  those objects in your form.
 
  Building on my previous example, you'd have something like this:
   logic:iterate name=blocks id=oneBlock
   type=com.myco.beans.Block
   td
 html:text name=oneBlock property=blockName indexed =true/
   /td
   td
 html:select name=oneBlock property=blockType
  indexed=true size=1
html:options name=myForm property=blockTypes/
 /html:select.
   /td
   /logic:iterate
 
  This example assumes your collection of blockTypes is part of your form,
  but it could be a collection that was in request/session/application
  scope.  You would create form entries for the collection like you
  implemented in our previous emails.
 
  I have almost this exact code in a few places and it works well.
 
  Hope this helps.
  Nick
 
  -Original Message-
  From: atta-ur rehman [mailto:[EMAIL PROTECTED]
  Sent: Monday, July 28, 2003 3:37 PM
  To: Struts Users Mailing List
  Subject: Re: Indexed Properties
 
  Thanks, for the reply.
 
  Okay, here is the background. I'm trying to learn the user of Indexed
  Properties. Why I'm doing that? Well, I have a form that lists, let's
  say
  for the sake of simplicity, Block Name and Block Type columns. Block
  Name is
  a readonly text field while the Block Type is a dropdown list box with a
  set
  of reference values  coming from the database. User can have n blocks on
  the
  page and he can change the block type of any block on the page. user
  cannot
  

RE: Form Bean Help?

2003-07-29 Thread Wendy Smoak
Matt wrote:
 I had been using the value property of the struts-html
 tags to fill in the data, but I've noticed that when
 the user hits submit, if there is a validation error,
 they are pushed back to the page, and the data they
 had enetered is replaced with what was in the DTO
 (which is now old data).

Don't use the 'value' attribute, just let Struts render the HTML form
elements based on what's stored in the Form bean.  That will fix the
redisplay on validation problem.

If you need to pre-populate the form, read the DTO from the database and use
BeanUtils.copyProperties(...) to copy the DTO values into the Form bean
before forwarding to the view.

Take a look at the struts-example webapp, it works the way you're
describing.

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


Re: Reflecting Changes in a Form After data has been updated

2003-07-29 Thread Curtney Jacobs
No. The same form displays and update the data.

When the user clicks on his/her name the form is populated with his/her 
profile information. The information can then be edited by the user. After 
editing the information the user clicks update. The data is updated and the 
same form redisplays again reflecting the updated information.

It just seems that the session still holds on to the previous information 
(before the update).

_CJ

On Tuesday 29 July 2003 09:05 am, Mainguy, Mike wrote:
 So you're saying the form that is used to update the data is different than
 the form that is used to display it?

 -Original Message-
 From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 12:05 PM
 To: Struts Users Mailing List
 Subject: Re: Reflecting Changes in a Form After data has been updated

 The form is first populated with the user information from a database. So,
 their is a populated ProfileActionForm that is within the current user
 session.

 If I make some changes to the profile information then submit the form the
 database does have the updated information, however, the form does not
 reflect the updated information after submit, it shows the data it was
 first

 populated with.

 What I would like is that, after submitting the form the redisplayed form
 to

 show the updated information.

 (Note: after submitting the form, the form redisplay again)

 _CJ

 On Tuesday 29 July 2003 04:45 am, Mainguy, Mike wrote:
  You shouldn't have to do that.  If your form already has all of the
  values coming in, unless you reinitialize your form, it will still have
  them

 going

  out.  The only things you may have to fool with are values that where not
  submitted with the form.
 
  Am I missing something?
 
  -Original Message-
  From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 23, 2003 10:38 AM
  To: Struts Users Mailing List
  Subject: Reflecting Changes in a Form After data has been updated
 
  Greetings everyone!
 
  I have an input form where my users can update their profile. After the
  user
 
  have select the Update button I would like the form to reflect the
  updated
 
  information the user has just submitted.
 
  What is the best way to implement this?
 
  I can think of one way; in my update action class after the data has been
  successfully updated in the database, copy the fields from my value
  object (updated data) back into the ActionForm and subsequently put it
  back into the
  current session. Is this the most efficient/elegant way of doing this?
 
 
  Thanks inadvance,
 
  _CJ
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  This message and its contents (to include attachments) are the property
  of Kmart Corporation (Kmart) and may contain confidential and proprietary
  information. You are hereby notified that any disclosure, copying, or
  distribution of this message, or the taking of any action based on
  information contained herein is strictly prohibited. Unauthorized use of
  information contained herein may subject you to civil and criminal
  prosecution and penalties. If you are not the intended recipient, you
  should delete this message immediately.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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


 This message and its contents (to include attachments) are the property of
 Kmart Corporation (Kmart) and may contain confidential and proprietary
 information. You are hereby notified that any disclosure, copying, or
 distribution of this message, or the taking of any action based on
 information contained herein is strictly prohibited. Unauthorized use of
 information contained herein may subject you to civil and criminal
 prosecution and penalties. If you are not the intended recipient, you
 should delete this message immediately.



 -
 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: Indexed Properties

2003-07-29 Thread Paananen, Tero
 What i'm still missing what is updated when i submit the 
 form? where can i
 get updated values from? my ActionForm has list attirbute 
 called blocks
 each element in the list is a Block bean object. The
 Block bean has getter/setters for id, name and category.

Two strategies:

1. Update everything every time you submit regardless of
   whether the information changed or not

2. Keep the previous values around and compare the values
   submitted to the previous ones. Then only update the beans
   that changed. You could do this in a number of ways.

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



RE: Reflecting Changes in a Form After data has been updated

2003-07-29 Thread Mainguy, Mike
That seems odd. Are you sure you aren't somehow loading the old data
somewhere before you actually do the update operation.  Perhaps you are
inadvertently doing a POST-LoadFromDB-SaveToDB-Respond.  I had that
particular problem at one point.   

On another note, there is another thread currently active on the mailing
list that is rather similar (Subject is:  Form Bean Help?) 

-Original Message-
From: Curtney Jacobs [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 1:57 PM
To: Struts Users Mailing List
Subject: Re: Reflecting Changes in a Form After data has been updated

No. The same form displays and update the data.

When the user clicks on his/her name the form is populated with his/her 
profile information. The information can then be edited by the user. After 
editing the information the user clicks update. The data is updated and
the 
same form redisplays again reflecting the updated information.

It just seems that the session still holds on to the previous information 
(before the update).

_CJ

On Tuesday 29 July 2003 09:05 am, Mainguy, Mike wrote:
 So you're saying the form that is used to update the data is different
than
 the form that is used to display it?

 -Original Message-
 From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 12:05 PM
 To: Struts Users Mailing List
 Subject: Re: Reflecting Changes in a Form After data has been updated

 The form is first populated with the user information from a database. So,
 their is a populated ProfileActionForm that is within the current user
 session.

 If I make some changes to the profile information then submit the form the
 database does have the updated information, however, the form does not
 reflect the updated information after submit, it shows the data it was
 first

 populated with.

 What I would like is that, after submitting the form the redisplayed form
 to

 show the updated information.

 (Note: after submitting the form, the form redisplay again)

 _CJ

 On Tuesday 29 July 2003 04:45 am, Mainguy, Mike wrote:
  You shouldn't have to do that.  If your form already has all of the
  values coming in, unless you reinitialize your form, it will still have
  them

 going

  out.  The only things you may have to fool with are values that where
not
  submitted with the form.
 
  Am I missing something?
 
  -Original Message-
  From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 23, 2003 10:38 AM
  To: Struts Users Mailing List
  Subject: Reflecting Changes in a Form After data has been updated
 
  Greetings everyone!
 
  I have an input form where my users can update their profile. After the
  user
 
  have select the Update button I would like the form to reflect the
  updated
 
  information the user has just submitted.
 
  What is the best way to implement this?
 
  I can think of one way; in my update action class after the data has
been
  successfully updated in the database, copy the fields from my value
  object (updated data) back into the ActionForm and subsequently put it
  back into the
  current session. Is this the most efficient/elegant way of doing this?
 
 
  Thanks inadvance,
 
  _CJ
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  This message and its contents (to include attachments) are the property
  of Kmart Corporation (Kmart) and may contain confidential and
proprietary
  information. You are hereby notified that any disclosure, copying, or
  distribution of this message, or the taking of any action based on
  information contained herein is strictly prohibited. Unauthorized use of
  information contained herein may subject you to civil and criminal
  prosecution and penalties. If you are not the intended recipient, you
  should delete this message immediately.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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


 This message and its contents (to include attachments) are the property of
 Kmart Corporation (Kmart) and may contain confidential and proprietary
 information. You are hereby notified that any disclosure, copying, or
 distribution of this message, or the taking of any action based on
 information contained herein is strictly prohibited. Unauthorized use of
 information contained herein may subject you to civil and criminal
 prosecution and penalties. If you are not the intended recipient, you
 should delete this message immediately.



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



Re: Indexed Properties

2003-07-29 Thread atta-ur rehman
Thanks.

you see my problem is i don't know how to get the updated values when the
form is submitted? my beans collection is updated, my indexed getter/setter
are not called? so where are the new values or even the same values when i
submit without changing anything at all on the form?

this is my Action code that i'm using to get values:
TestForm tf = (TestForm) form;

HttpSession session = request.getSession();

if (tf != null  tf.getBlocks() != null) {

List list = tf.getBlocks();

Block block;

for (int i = 0; i  list.size(); i++) {

block = (Block) list.get(i);

System.out.println(TestAction.execute Block:  +

block.getId() + ,  + block.getName() + ,  +

block.getCategory());

}

} // if (tf != null  tf.getBlocks() != null)

but this code always prints the values that i set the first time page was
shown!



ATTA

- Original Message - 
From: Paananen, Tero [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:04 AM
Subject: RE: Indexed Properties


  What i'm still missing what is updated when i submit the
  form? where can i
  get updated values from? my ActionForm has list attirbute
  called blocks
  each element in the list is a Block bean object. The
  Block bean has getter/setters for id, name and category.

 Two strategies:

 1. Update everything every time you submit regardless of
whether the information changed or not

 2. Keep the previous values around and compare the values
submitted to the previous ones. Then only update the beans
that changed. You could do this in a number of ways.

 -TPP

 -
 This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention, distribution
or disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


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



newbie dynamic bean:message question

2003-07-29 Thread John Boyes
I'm building my first Struts app with a standard header template which will apply to 
all pages.

The contents of the header template will generally be identical save for a few items 
(e.g the page
title and heading) which will be individual to each page used by the template.

Ideally I would like the content for each page title and heading to be pulled from my
application.properties xml file, but I'm not sure how to do this, is it possible to do 
this
dynamically via a message bean for instance? e.g in pseudocode:

 titlebean:message key=thisisadynamicvaluepulledfromsomewhereelse//title

or is there a much easier to do this and I'm barking up the wrong tree altogether?

I'm using JSP 1.2

Any responses gratefully received . . .

Thanks,

John


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



Re: Random 405 Http Error

2003-07-29 Thread Craig R. McClanahan
Would you by any chance be forwarding to a static resource in the case
where this fails, and a dynamic resource (or JSP page) when it succeeds?
If so, then the default servlet would indeed be an issue.

Craig

On Tue, 29 Jul 2003, Brian Husted wrote:

 Date: Tue, 29 Jul 2003 12:53:21 -0400
 From: Brian Husted [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Random 405 Http Error

 Platform:Weblogic 8.1
 Proxy: Apache
 Application: Struts Release 1-1

 Issue:

 I am receiving an http 405 response on post attempts to a Struts 1-1
 application.

 Here is the post that is causing the 405 (or http method not allowed) from
 the weblogic access log

 192.168.2.21 - - [29/Jul/2003:10:14:12 -0400] POST
 /uboc-tl/executeQuery.do HTTP/1.1 405 45

 Here is a subsequent post that worked and returned a 200

 192.168.2.21 - - [29/Jul/2003:10:17:23 -0400] POST
 /uboc-tl/executeQuery.do HTTP/1.1 200 0

 These Posts were sent from the same apache server and from the same
 browser.
 Once the 405 occurs, the problem continues to persist in the same browser
 session by hitting refresh.  However, executing the same request in a
 different browser seems to allow the request to be successful.

 I have decompiled the default servlet for weblogic and discovered that if
 the http method is not defined in the overriding servlet a 405 is returned.

 Any ideas would be of great help!

 Thanks
 Brian



 -
 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: Memory consumption 1.1 b3 vs. 1.1 final

2003-07-29 Thread Brendan . Johnston
Is this an issue because the session is being serialized?

Maybe the reference to the struts config needs to be declared transient and
be restored if the object is deserialized.

Brendan


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 1:20 PM
To: Struts Users Mailing List
Subject: RE: Memory consumption 1.1 b3 vs. 1.1 final




On Mon, 28 Jul 2003, Maya Retzlaff wrote:

 Date: Mon, 28 Jul 2003 21:19:19 +0200
 From: Maya Retzlaff [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: Memory consumption  1.1 b3 vs. 1.1 final

 Hi,

 Unfortunate no one replied. But I'll try again with more information.

 After a bit more debugging, when using the debugger see screen shot.
 http://maya.retzlaff.se/debugScreenShot.png, sorry couldn't export to
text.
 Its a bit censored.

 This means that the whole struts-config.xml (a HashMap with 127 elements)
is
 saved in the session for every user when action scope=session is set
in
 struts-config.xml. For us with the memory restrictions we face, the 50k
that
 the strutsconfig takes in memory is very severe.

Why are you assuming that the memory is being duplicated?  All of the
references point to the one-and-only copy of the actual Config instances,
in the collection that was built when the configuration file was first
parsed.

Craig

-
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: newbie dynamic bean:message question

2003-07-29 Thread Jeff Kyser
Hey John,

Consider using Tiles, and then you can incorporate something like:

	tiles:getAsString name=title/

into your header. The value for 'title' would then come from
your tiles-config.xml file for each different page you extended
from your master layout page.
-jeff

On Tuesday, July 29, 2003, at 12:20  PM, John Boyes wrote:

I'm building my first Struts app with a standard header template which 
will apply to all pages.

The contents of the header template will generally be identical save 
for a few items (e.g the page
title and heading) which will be individual to each page used by the 
template.

Ideally I would like the content for each page title and heading to be 
pulled from my
application.properties xml file, but I'm not sure how to do this, is 
it possible to do this
dynamically via a message bean for instance? e.g in pseudocode:

 titlebean:message 
key=thisisadynamicvaluepulledfromsomewhereelse//title

or is there a much easier to do this and I'm barking up the wrong tree 
altogether?

I'm using JSP 1.2

Any responses gratefully received . . .

Thanks,

John

-
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: Indexed Properties

2003-07-29 Thread Paananen, Tero
 but this code always prints the values that i set
 the first time page was shown!

Beats me...the code looked fine to me.

Maybe something wrong with your action mappings
and form bean configurations? Or the JSP the values
are changed on.

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Re: Reflecting Changes in a Form After data has been updated

2003-07-29 Thread Curtney Jacobs
Sovle it. 

Thanks for the replies Mike, it got my brain thinking.

The problem and solution is listed below, just in case anyone else is having a 
similar problem.

The  problem was I was storing the prepopulated ActionForm in the session 
scope while the new updated ActionForm was stored in the current request 
scope. Thus, after the update request was completed that instance of the 
ActionForm was lost and the ActionForm stored in the session (old data) was 
just redisplayed. Therefore, all I had to do was change my  update action 
within my action mapping from request to session.


_CJ

My problem was I was storing

On Tuesday 29 July 2003 10:12 am, Mainguy, Mike wrote:
 That seems odd. Are you sure you aren't somehow loading the old data
 somewhere before you actually do the update operation.  Perhaps you are
 inadvertently doing a POST-LoadFromDB-SaveToDB-Respond.  I had that
 particular problem at one point.

 On another note, there is another thread currently active on the mailing
 list that is rather similar (Subject is:  Form Bean Help?)

 -Original Message-
 From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 1:57 PM
 To: Struts Users Mailing List
 Subject: Re: Reflecting Changes in a Form After data has been updated

 No. The same form displays and update the data.

 When the user clicks on his/her name the form is populated with his/her
 profile information. The information can then be edited by the user. After
 editing the information the user clicks update. The data is updated and
 the
 same form redisplays again reflecting the updated information.

 It just seems that the session still holds on to the previous information
 (before the update).

 _CJ

 On Tuesday 29 July 2003 09:05 am, Mainguy, Mike wrote:
  So you're saying the form that is used to update the data is different

 than

  the form that is used to display it?
 
  -Original Message-
  From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 23, 2003 12:05 PM
  To: Struts Users Mailing List
  Subject: Re: Reflecting Changes in a Form After data has been updated
 
  The form is first populated with the user information from a database.
  So, their is a populated ProfileActionForm that is within the current
  user session.
 
  If I make some changes to the profile information then submit the form
  the database does have the updated information, however, the form does
  not reflect the updated information after submit, it shows the data it
  was first
 
  populated with.
 
  What I would like is that, after submitting the form the redisplayed form
  to
 
  show the updated information.
 
  (Note: after submitting the form, the form redisplay again)
 
  _CJ
 
  On Tuesday 29 July 2003 04:45 am, Mainguy, Mike wrote:
   You shouldn't have to do that.  If your form already has all of the
   values coming in, unless you reinitialize your form, it will still have
   them
 
  going
 
   out.  The only things you may have to fool with are values that where

 not

   submitted with the form.
  
   Am I missing something?
  
   -Original Message-
   From: Curtney Jacobs [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, July 23, 2003 10:38 AM
   To: Struts Users Mailing List
   Subject: Reflecting Changes in a Form After data has been updated
  
   Greetings everyone!
  
   I have an input form where my users can update their profile. After the
   user
  
   have select the Update button I would like the form to reflect the
   updated
  
   information the user has just submitted.
  
   What is the best way to implement this?
  
   I can think of one way; in my update action class after the data has

 been

   successfully updated in the database, copy the fields from my value
   object (updated data) back into the ActionForm and subsequently put it
   back into the
   current session. Is this the most efficient/elegant way of doing this?
  
  
   Thanks inadvance,
  
   _CJ
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
   This message and its contents (to include attachments) are the property
   of Kmart Corporation (Kmart) and may contain confidential and

 proprietary

   information. You are hereby notified that any disclosure, copying, or
   distribution of this message, or the taking of any action based on
   information contained herein is strictly prohibited. Unauthorized use
   of information contained herein may subject you to civil and criminal
   prosecution and penalties. If you are not the intended recipient, you
   should delete this message immediately.
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: 

Re: Indexed Properties

2003-07-29 Thread atta-ur rehman
so you are saying that ideally the the beans collection in my ActionForm
should be updated on form submission?


- Original Message - 
From: Paananen, Tero [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:30 AM
Subject: RE: Indexed Properties


  but this code always prints the values that i set
  the first time page was shown!

 Beats me...the code looked fine to me.

 Maybe something wrong with your action mappings
 and form bean configurations? Or the JSP the values
 are changed on.

 -TPP

 -
 This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention, distribution
or disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


 -
 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: Indexed Properties

2003-07-29 Thread Paananen, Tero
 so you are saying that ideally the the beans collection
 in my ActionForm should be updated on form submission?

The attribute values in the beans held in the collection
should change on form submission, yes.

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Opening/reading a file from a Struts application...

2003-07-29 Thread Davide Bruzzone
Greetings all...

I'm trying to load and read a text file (on the server's filesystem)
from within a Struts application. I'd like to be able to put the file in
the WEB-INF, or the WEB-INF/classes directory, but am having trouble
finding the file (i.e. I'm having trouble obtaining the path that I need
in order to open the file), and reading it...

Here's what my research has turned up:

// Something like this will return an InputStream. This is fine for
properties files
// since you can load a properties file by passing an InputStream to the
load method
// on a Properties object  
Thread.currentThread().getContextClassLoader().getResourceAsStream(my.p
roperties);

The problem with this is that the methods that I'm using to read the
contents of files takes either a string that represents the file name,
or a File object... The methods then calculate the file's length, read
the file into an array of bytes, and return the contents of the array in
various forms (i.e. An array of bytes, a string, etc.).

Does anyone have any suggestions about how best to go about doing this
(I could change the methods that read the contents of files into
strings, but I'm not sure exactly how to go about doing this).

Any help would be greatly appreciated...

Cheers...

Dave   

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



Re: Indexed Properties

2003-07-29 Thread atta-ur rehman
Okay.

my form-bean definition looks like:

form-bean name=testForm type=test.TestForm/

while the action is:

action path=/test  type=test.TestAction
  name=testForm  scope=session validate=false
input=/test.jsp
  forward name=failure path=/mainMenu.jsp/
  forward name=success path=/test.jsp/
/action

my form class extends ActionForm.

any ideas?

ATTA

- Original Message - 
From: Paananen, Tero [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:43 AM
Subject: RE: Indexed Properties


  so you are saying that ideally the the beans collection
  in my ActionForm should be updated on form submission?

 The attribute values in the beans held in the collection
 should change on form submission, yes.

 -TPP

 -
 This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention, distribution
or disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


 -
 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: Opening/reading a file from a Struts application...

2003-07-29 Thread Jarnot Voytek Contr AU HQ/SC
-Original Message-
From: Jarnot Voytek Contr AU HQ/SC 
Sent: Friday, June 27, 2003 11:53 AM
To: 'Struts Users Mailing List'
Subject: RE: getting a file path to /WEB-INF from a HttpSession


try 

request.getSession(false).getServletContext().getRealPath(/WEB-INF/...))

or, in an action you could do

getServlet().getServletContext().getRealPath(/WEB-INF/...);

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


 -Original Message-
 From: Davide Bruzzone [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 29, 2003 12:58 PM
 To: Struts Users Mailing List
 Subject: Opening/reading a file from a Struts application...
 
 
 Greetings all...
 
 I'm trying to load and read a text file (on the server's filesystem)
 from within a Struts application. I'd like to be able to put 
 the file in
 the WEB-INF, or the WEB-INF/classes directory, but am having trouble
 finding the file (i.e. I'm having trouble obtaining the path 
 that I need
 in order to open the file), and reading it...
 
 Here's what my research has turned up:
 
 // Something like this will return an InputStream. This is fine for
 properties files
 // since you can load a properties file by passing an 
 InputStream to the
 load method
 // on a Properties object  
 Thread.currentThread().getContextClassLoader().getResourceAsSt
 ream(my.p
 roperties);
 
 The problem with this is that the methods that I'm using to read the
 contents of files takes either a string that represents the file name,
 or a File object... The methods then calculate the file's length, read
 the file into an array of bytes, and return the contents of 
 the array in
 various forms (i.e. An array of bytes, a string, etc.).
 
 Does anyone have any suggestions about how best to go about doing this
 (I could change the methods that read the contents of files into
 strings, but I'm not sure exactly how to go about doing this).
 
 Any help would be greatly appreciated...
 
 Cheers...
 
 Dave   
 
 -
 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: Indexed Properties

2003-07-29 Thread Nicholas L Mohler





Hi Atta

Just to clatify:
1)  You have a form that contains a blocks property which is a collection
of test.Block objects.
2)  The test.Block object has the following properties(get/set methods
for each): id, name, and category
3)  As we discussesed in our earlier emails, you have the get/set methods
for the blocks property in your form.
4)  You also have a singular getBlock method that takes an int (index)
and returns the Block object from the collection for the given index.

A couple possible causes for the error:
-  Item 4) is not implemented correctly.  You need the method shown below.
Note that since your form is in the session, you shouldn't need the
sizing logic.
public Block getBlock(int index) {
  while (index = this.blocks.size()) {
this.blocks.add(new Block());
  }
  return (Block) this.blocks.get(index);
}

-  When looking at your page, look at the source and confirm that your
indexed properties are named correctly.  You should see block[0].id,
block[0].name, block[0].category.

If none of this helps, I'm not sure where else to look.  It sounds like
everything else is lining up...

Nick




   

  atta-ur rehman 

  [EMAIL PROTECTED]To:   Struts Users Mailing List 
[EMAIL PROTECTED]  
  com cc: 

   Subject:  Re: Indexed Properties

  07/29/2003 12:57 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   





Hello again Nick.

Well i've come a step forward in that i've been able to successfully show
the jsp page using index=true for all the rows and submit the form
without
any errors too:

logic:iterate name=theForm property=blocks id=block
type=test.Block
   tr
td align=center
 html:text property=id name=block indexed=true /
/td
td
 html:text property=name name=block indexed=true /
/td
td
 html:select property=category name=block indexed=true
  html:options collection=optionList property=value
labelProperty=label/
 /html:select
/td
   /tr
  /logic:iterate

works like a charm!

What i'm still missing what is updated when i submit the form? where can i
get updated values from? my ActionForm has list attirbute called blocks
each element in the list is a Block bean object. The Block bean has
getter/setters for id, name and category.

In ActionForm I also included setCategory(int) and getCategory(int, string)
which doesn't seem to be called at all!

something obvious that i'm missing?

Thanks.

ATTA


- Original Message -
From: Nicholas L Mohler [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 2:57 AM
Subject: Re: Indexed Properties







 Atta,

 It sounds to me like you have it.  As long as your names match up, it
 should work fine.  Ajay has given a full code example that looks good.

 Nick




   atta-ur rehman
   [EMAIL PROTECTED]To:   Struts Users
Mailing List [EMAIL PROTECTED]
   com cc:
Subject:  Re: Indexed
Properties
   07/28/2003 08:44
   PM
   Please respond to
   Struts Users
   Mailing List






 Yes, I currently have two independent String arrays for blockName and
 blockType. Putting them, and all the other block related properties, is
 what
 seems to be the right thing to do! So you have confirmed.

 here is what i have understood from your text:

 1) my form would have blocks property that would be a collection of
Block
 beans
 2) iterating each block in the 

RE: Opening/reading a file from a Struts application...

2003-07-29 Thread Davide Bruzzone
Thank you...

I'll give it a try...

Cheers...

Dave

-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]

Sent: Tuesday, July 29, 2003 12:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Opening/reading a file from a Struts application...


-Original Message-
From: Jarnot Voytek Contr AU HQ/SC 
Sent: Friday, June 27, 2003 11:53 AM
To: 'Struts Users Mailing List'
Subject: RE: getting a file path to /WEB-INF from a HttpSession


try 

request.getSession(false).getServletContext().getRealPath(/WEB-INF/...
))

or, in an action you could do

getServlet().getServletContext().getRealPath(/WEB-INF/...);

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



DynaActionForm reset

2003-07-29 Thread Sloan Seaman
I have an action that used a form bean (suggestion_form).

When I go to my edit page, my code populates the bean and displays the page.  Works 
great.

If I go to my add page (which in the struts-config uses the same form bean) the page 
gets the values from the populated bean from the edit page even though my code that 
populates the bean was never called.

I'm guessing that somehow the reset() on the DynaActionForm is not being called even 
though the call to the add page is a new request and therefor the form bean still has 
the values that I set in it

What am I doing wrong???

--
Sloan


This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com


Re: Indexed Properties

2003-07-29 Thread atta-ur rehman
Bingo!

The deceptive ActionForm.getBlock(int):Block was not there. Just added it
and wow!

This is opened up a whole paradigm for me. I can see how easy and manageable
code becomes not to mention its reduced size! Its just what i've been
looking for, for quite sometime! Learning new things pays, after all ;)

My sincere thanks for your help and patience! It took some time, but was
worth it!

ATTA


- Original Message - 
From: Nicholas L Mohler [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 11:19 AM
Subject: Re: Indexed Properties







 Hi Atta

 Just to clatify:
 1)  You have a form that contains a blocks property which is a
collection
 of test.Block objects.
 2)  The test.Block object has the following properties(get/set methods
 for each): id, name, and category
 3)  As we discussesed in our earlier emails, you have the get/set methods
 for the blocks property in your form.
 4)  You also have a singular getBlock method that takes an int (index)
 and returns the Block object from the collection for the given index.

 A couple possible causes for the error:
 -  Item 4) is not implemented correctly.  You need the method shown below.
 Note that since your form is in the session, you shouldn't need the
 sizing logic.
 public Block getBlock(int index) {
   while (index = this.blocks.size()) {
 this.blocks.add(new Block());
   }
   return (Block) this.blocks.get(index);
 }

 -  When looking at your page, look at the source and confirm that your
 indexed properties are named correctly.  You should see block[0].id,
 block[0].name, block[0].category.

 If none of this helps, I'm not sure where else to look.  It sounds like
 everything else is lining up...

 Nick






   atta-ur rehman
   [EMAIL PROTECTED]To:   Struts Users
Mailing List [EMAIL PROTECTED]
   com cc:
Subject:  Re: Indexed
Properties
   07/29/2003 12:57
   PM
   Please respond to
   Struts Users
   Mailing List






 Hello again Nick.

 Well i've come a step forward in that i've been able to successfully show
 the jsp page using index=true for all the rows and submit the form
 without
 any errors too:

 logic:iterate name=theForm property=blocks id=block
 type=test.Block
tr
 td align=center
  html:text property=id name=block indexed=true /
 /td
 td
  html:text property=name name=block indexed=true /
 /td
 td
  html:select property=category name=block indexed=true
   html:options collection=optionList property=value
 labelProperty=label/
  /html:select
 /td
/tr
   /logic:iterate

 works like a charm!

 What i'm still missing what is updated when i submit the form? where can i
 get updated values from? my ActionForm has list attirbute called blocks
 each element in the list is a Block bean object. The Block bean has
 getter/setters for id, name and category.

 In ActionForm I also included setCategory(int) and getCategory(int,
string)
 which doesn't seem to be called at all!

 something obvious that i'm missing?

 Thanks.

 ATTA


 - Original Message -
 From: Nicholas L Mohler [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Tuesday, July 29, 2003 2:57 AM
 Subject: Re: Indexed Properties


 
 
 
 
 
  Atta,
 
  It sounds to me like you have it.  As long as your names match up, it
  should work fine.  Ajay has given a full code example that looks good.
 
  Nick
 
 
 
 
atta-ur rehman
[EMAIL PROTECTED]To:   Struts Users
 Mailing List [EMAIL PROTECTED]
com cc:
 Subject:  Re: Indexed
 Properties
07/28/2003 08:44
PM
Please respond to
Struts Users
Mailing List
 
 
 
 
 
 
  Yes, I currently have two independent String arrays for blockName and
  blockType. Putting them, and all the other block related properties, is
  what
  seems to be the right thing to do! So you have confirmed.
 
  here is what i have understood from your text:
 
  1) my form would have blocks property that would be a collection of
 Block
  beans
  2) iterating each block in the blocks collection i can sure display each
  block with indexed=true directive for text boxes and dropdowns.
  3) now for the submission part i'd need to have setBlockType(int,
string)
  and getBlockType(int) and same for the rest of properties. The name of
  property in the Block Form and name of the property in the Block Bean
 must
  match.
  4) and it should work?
 
  I've had my head stuck in my computer whole day today and i'm barely
able
  to
  write this 

RE: [OT] Is jsessionid specific to Tomcat or generic to all web containers?

2003-07-29 Thread Brian Husted

Would you by any chance be forwarding to a static resource in the case
where this fails, and a dynamic resource (or JSP page) when it succeeds?
If so, then the default servlet would indeed be an issue.

If the request successful, I am forwarding to a jsp page in my Tiles
Request Processor.

However, I forward to an custom html 500 page if an exception occurs.

The path in my global-exceptions in struts-config.xml (see below) forwards
to this page.

global-exceptions

   exception
 key=
 scope=request
 type=java.lang.Exception
 path=/locator500.htm

handler=com.ams.transactionlocator.uboc.struts.DefaultExceptionHandler/

/global-exceptions

Any ideas?

Brian Husted
AMS, Outsourced Solutions Group
410-897-1602 (phone)
410-897-1163 (fax)
www.ams.com

This email message is intended only for use by the recipient(s), and may
contain confidential and proprietary information of AMS, Inc.  Any
unauthorized use, disclosure, or distribution is prohibited.  If you are
not the intended recipient, please contact the sender by reply email and
destroy all copies of this email message.


   

  Craig R.

  McClanahan  To:   Struts Users Mailing List 
[EMAIL PROTECTED]
  [EMAIL PROTECTED]cc:
 
  org Subject:  RE: [OT] Is jsessionid 
specific to Tomcat or generic to all web 
containers?

  07/29/2003 01:21 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   







On Tue, 29 Jul 2003, Yansheng Lin wrote:

 Date: Tue, 29 Jul 2003 10:48:02 -0600
 From: Yansheng Lin [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: [OT] Is jsessionid specific to Tomcat or generic to all
 web containers?

 Isn't that for URL rewritting only?


Yes, the path parameter stuff is for URL rewriting only.

 When you use a session through cookie, I think you can name it anything
you
 want.


No ... you really might want to read the spec before making assumptions
like this.  It is specific on the name of the session id cookie
(JSESSIONID) as well, in Section 7.1.1.

  http://java.sun.com/products/servlet/download.html

The entire section on how sessions work in a standard servlet container is
only five pages, plus the Javadocs on the HttpSession class :-).

Craig

-
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: DynaActionForm reset

2003-07-29 Thread Suzette Daniel
Be sure to set the scope on your action mapping to request, it is session
scope by default.

Suzette H. Daniel
Java Developer/Web dept
770 416.9222 ex: 5041



-Original Message-
From: Sloan Seaman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 2:26 PM
To: Struts Users Mailing List
Subject: DynaActionForm reset


I have an action that used a form bean (suggestion_form).

When I go to my edit page, my code populates the bean and displays the page.
Works great.

If I go to my add page (which in the struts-config uses the same form bean)
the page gets the values from the populated bean from the edit page even
though my code that populates the bean was never called.

I'm guessing that somehow the reset() on the DynaActionForm is not being
called even though the call to the add page is a new request and therefor
the form bean still has the values that I set in it

What am I doing wrong???

--
Sloan


This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security service
working around the clock, around the globe, visit http://www.messagelabs.com


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



Re: Opening/reading a file from a Struts application...

2003-07-29 Thread Craig R. McClanahan


On Tue, 29 Jul 2003, Davide Bruzzone wrote:

 Date: Tue, 29 Jul 2003 11:57:41 -0600
 From: Davide Bruzzone [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Opening/reading a file from a Struts application...

 Greetings all...

 I'm trying to load and read a text file (on the server's filesystem)
 from within a Struts application. I'd like to be able to put the file in
 the WEB-INF, or the WEB-INF/classes directory, but am having trouble
 finding the file (i.e. I'm having trouble obtaining the path that I need
 in order to open the file), and reading it...

 Here's what my research has turned up:

 // Something like this will return an InputStream. This is fine for
 properties files
 // since you can load a properties file by passing an InputStream to the
 load method
 // on a Properties object
 Thread.currentThread().getContextClassLoader().getResourceAsStream(my.p
 roperties);


This only works on files visible to the class loader (i.e. files in
/WEB-INF/classes, or packaged in JARs inside /WEB-INF/lib).  To read
general resources in your webapp, try ServletContext.getResourceAsStream()
instead.  You pass it a context-relative path like
/WEB-INF/my.properties.

 The problem with this is that the methods that I'm using to read the
 contents of files takes either a string that represents the file name,
 or a File object... The methods then calculate the file's length, read
 the file into an array of bytes, and return the contents of the array in
 various forms (i.e. An array of bytes, a string, etc.).


That's not going to be portable, because you cannot assume that webapp
resources actually live in the filesystem - you might be running straight
from a WAR file, or in a container that puts all the static resources in
BLOBs in a database, or ...

If you really need file i/o access to this stuff, you should create an
initialization parameter pointing at the directory containing the relevant
files, and then access then outside your webapp hierarchy.

 Does anyone have any suggestions about how best to go about doing this
 (I could change the methods that read the contents of files into
 strings, but I'm not sure exactly how to go about doing this).

 Any help would be greatly appreciated...

 Cheers...

 Dave


Craig

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



Re: Random 405 Http Error

2003-07-29 Thread Brian Husted

Would you by any chance be forwarding to a static resource in the case
where this fails, and a dynamic resource (or JSP page) when it succeeds?
If so, then the default servlet would indeed be an issue.

If the request successful, I am forwarding to a jsp page in my Tiles
Request Processor.

However, I forward to an custom html 500 page if an exception occurs.

The path in my global-exceptions in struts-config.xml (see below) forwards
to this page.

global-exceptions

   exception
 key=
 scope=request
 type=java.lang.Exception
 path=/locator500.htm

handler=com.ams.transactionlocator.uboc.struts.DefaultExceptionHandler/

/global-exceptions

Any ideas?

Brian Husted
AMS, Outsourced Solutions Group
410-897-1602 (phone)
410-897-1163 (fax)
www.ams.com

This email message is intended only for use by the recipient(s), and may
contain confidential and proprietary information of AMS, Inc.  Any
unauthorized use, disclosure, or distribution is prohibited.  If you are
not the intended recipient, please contact the sender by reply email and
destroy all copies of this email message.


   

  Craig R.

  McClanahan  To:   Struts Users Mailing List 
[EMAIL PROTECTED]
  [EMAIL PROTECTED]cc:
 
  org Subject:  Re: Random 405 Http Error 

   

  07/29/2003 01:24 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   





Would you by any chance be forwarding to a static resource in the case
where this fails, and a dynamic resource (or JSP page) when it succeeds?
If so, then the default servlet would indeed be an issue.

Craig

On Tue, 29 Jul 2003, Brian Husted wrote:

 Date: Tue, 29 Jul 2003 12:53:21 -0400
 From: Brian Husted [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Random 405 Http Error

 Platform:Weblogic 8.1
 Proxy: Apache
 Application: Struts Release 1-1

 Issue:

 I am receiving an http 405 response on post attempts to a Struts 1-1
 application.

 Here is the post that is causing the 405 (or http method not allowed)
from
 the weblogic access log

 192.168.2.21 - - [29/Jul/2003:10:14:12 -0400] POST
 /uboc-tl/executeQuery.do HTTP/1.1 405 45

 Here is a subsequent post that worked and returned a 200

 192.168.2.21 - - [29/Jul/2003:10:17:23 -0400] POST
 /uboc-tl/executeQuery.do HTTP/1.1 200 0

 These Posts were sent from the same apache server and from the same
 browser.
 Once the 405 occurs, the problem continues to persist in the same browser
 session by hitting refresh.  However, executing the same request in a
 different browser seems to allow the request to be successful.

 I have decompiled the default servlet for weblogic and discovered that if
 the http method is not defined in the overriding servlet a 405 is
returned.

 Any ideas would be of great help!

 Thanks
 Brian



 -
 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: Intercepting Action Filters

2003-07-29 Thread Molitor, Stephen L
Yes, there's a lot of overlap between servlet filters and 'action filters'.  But with 
a servlet filter you get control after Struts has already performed the action 
forward.  With an 'action filter' you'd get control before the forward is performed, 
and you would have convenient access to the mapping, form, etc.  (But I guess you 
could still fish that stuff out of the request in a servlet filter.)

You can't wrap a call to a try..catch..finally block with before/AfterExecute hooks.  
You would need that for things like transactions, as you mention.

Steve

-Original Message-
From: Jing Zhou [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:56 AM
To: Struts Users Mailing List
Subject: Re: Intercepting Action Filters


snip
One can do this with servlet filters, but sometimes its nice to do this
within Struts, to look at the action mapping, pick an action forward, etc.
I could imagine libraries of pluggable 'ActionFilters' for checking that the
user is logged in, security, transaction demarcation, logging, etc.
Applications could pick and choose which ones they want, a la carte style.
One could write a request processor that would take a configured list of
these 'filters', build a filter chain, and run them around each
Action.execute invocation.   Has anyone done anything like this?  Any issues
to watch out for?


I would

Thanks.

Steve Molitor

/snip

I believe that using the request processor to invoke configured *filters*
would overlap too much with the servlet filters. What a real filter
can't do is the transaction demarcation.

Instead of using configurable actions or request processors,
we prefer to use configurable event handling logics inside actions.
You could look at the concept of Control Page in
http://www.netspread.com/tips2.html
When a control page should be shared, we use Controller Delegation
Model. Calls like beforeExecute() or afterExecute() can be done
in such model.

Jing
Netspread Carrier
http://www.netspread.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]



Receiving an AbstractMethodError while trying to use a PlugIn

2003-07-29 Thread Donowho, Warren
I am trying to use a PlugIn to initialize an application.  I have looked at
the example supplied with Struts and I even looked at the ValidatorPlugIn.
This looks like it should be a simple task, but I am getting a dump.  I am
running on Tomcat 4.1.24 and using Struts 1.1.  I have implemented the init
and destroy methods.  A portion of the dump is shown below.  Any help would
be appreciated.

java.lang.AbstractMethodError:
com.ti.scbit.dlpqra.action.TestPlugIn.init(Lorg/apache/struts/action/ActionS
ervlet;Lorg/apache/struts/config/ApplicationConfig;)V
at
org.apache.struts.action.ActionServlet.initApplicationPlugIns(ActionServlet.
java:991)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:458)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
.

Regards,
Warren Donowho

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



RE: Opening/reading a file from a Struts application...

2003-07-29 Thread Dolf Starreveld
At 12:23 -0600 7/29/03, Davide Bruzzone spoke thusly:

Note that getRealPath(/WEB-INF/...) is allowed to fail (under the spec).
I know for a fact that in several containers, if your deploy as a WAR file,
it will indeed fail.
Here are two alternatives that will always work to access files in /WEB-INF:

1)
String path = /WEB-INF/myfile.ext;
InputStream istream = servletContext.getResourceAsStream(path);
2)
String path = /WEB-INF/myfile.ext;
URL url = servletContext.getResource(path);
URLConnection uconn = url.openConnection();
InputStream istream = uconn.getInputStream();
What remains to solve your problem is to refactor your code to accept 
an InputStream rather than a File. It appears that File is used to 
length()
can be called on it so the byte array can be properly allocated.
If the resource is truly a file, it appears the istream.available() will
do that job for you (although I have not tested this).


Thank you...

I'll give it a try...

Cheers...

Dave

-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 12:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Opening/reading a file from a Struts application...
-Original Message-
From: Jarnot Voytek Contr AU HQ/SC
Sent: Friday, June 27, 2003 11:53 AM
To: 'Struts Users Mailing List'
Subject: RE: getting a file path to /WEB-INF from a HttpSession
try

request.getSession(false).getServletContext().getRealPath(/WEB-INF/...
))
or, in an action you could do

getServlet().getServletContext().getRealPath(/WEB-INF/...);

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


--
Dolf Starreveld 190 Thompson Square
http://www.starreveld.com   Mountain View, CA 94043
Home: (650) 966-1404Mobile: (415) 613-7229
FAX:  (650) 967-2863
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DynaActionForm reset

2003-07-29 Thread Sloan Seaman
Yep.. that would do it... thanks!

--
Sloan

- Original Message - 
From: Suzette Daniel [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 2:33 PM
Subject: RE: DynaActionForm reset


 Be sure to set the scope on your action mapping to request, it is session
 scope by default.

 Suzette H. Daniel
 Java Developer/Web dept
 770 416.9222 ex: 5041



 -Original Message-
 From: Sloan Seaman [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 29, 2003 2:26 PM
 To: Struts Users Mailing List
 Subject: DynaActionForm reset


 I have an action that used a form bean (suggestion_form).

 When I go to my edit page, my code populates the bean and displays the
page.
 Works great.

 If I go to my add page (which in the struts-config uses the same form
bean)
 the page gets the values from the populated bean from the edit page even
 though my code that populates the bean was never called.

 I'm guessing that somehow the reset() on the DynaActionForm is not being
 called even though the call to the add page is a new request and therefor
 the form bean still has the values that I set in it

 What am I doing wrong???

 --
 Sloan

 
 This email has been scanned for all viruses by the MessageLabs Email
 Security System. For more information on a proactive email security
service
 working around the clock, around the globe, visit
http://www.messagelabs.com
 

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





This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com


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



  1   2   >