Re: Form Submission

2004-02-19 Thread Mark Lowe
 with right now gives some add  
on
  features over struts. Basically taken from StrutsEJB framework.
 
  We are using Map Based DTOs to transfer data from view layer to  
model
  layer and other way round.
  We are also using the feature of Command Files. I will explain  
it what
  it is for people unaware of StrutsEJB framework.
 
  In Struts we are supposed to mention the Action Class in the
  struts-config.xml. And from the Action class we generally call  
some
  java programs (say command files) to access the model layer  
basically
  to avoid keeping business logic in Action Classes.
 
  But in my framework we just need to mention the Command file  
name in
  struts-config.xml instead of Action classes. There is only one  
action
  class that is DefaultAction class which handles all the requests  
and
  diverts the program control to the command file. I will give  
here one
  typical entry in my struts-config.xml for your reference.
 
  action
  path=/CreateUser
  type=framework.common.web.DefaultAction
  name=UserForm
  scope=request
  input = /CreateUser.jsp
  parameter=app.cmd.CreateUserCmd
  forward name=Success path = /UserSucc.jsp /
/action
 
  in the above action tag the attribute parameter is the name of  
the
  command file where i would like my control to go after the form  
gets
  submitted.
 
  Now the problem is in the Command File CreateUserCmd where i  
would
  keep my business logic -- i dont have the request object. so i  
cant
  do a
  request.getParameter(.);  here.
 
  the way i get values from forms is like this.
 
  if I have this code in JSP
  html:text property=dto(txtUsname) styleClass=listItem  
size=14
  /
 
  I will have to write the following code in my command file to  
get the
  value of User Name
  String UserName = (String)paramDTO.get(txtUsName);
 
  As Mark/Wendy were asking me why i cant use JavaScript is because
 
  whenever i use something like this in JavaScript I get javascript
  error at runtime
  document.UserForm.dto(txtUsName).value = val;
  document.UserForm.submit();
 
  This is obvious because whenever javascript parses something like
  dto(txtUsName) it takes it as a function call.
 
  I hope I could explain the problem properly.
 
  Regards
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com
 
 
  Geeta Ramani
Struts Users  
Mailing List
[EMAIL PROTECTED] To
  [EMAIL PROTECTED]
 
02/17/2004 09:57 PM  cc
Please respond to   Subject Re: Form Submission
   Struts Users Mailing List
 [EMAIL PROTECTED]
 
 
 
 
  Avinash:
 
  How about trying something like this:
 
  %String myLink = /EmplyeeDetailAction.do?employeeId= +  
employeeId;
  %
 
  html:link page=%=myLinkEmployee Detail Page/html:link
 
  Regards,
  Geeta
 
  [EMAIL PROTECTED] wrote:
 
 
  I want to use a hyperlink instead -
 
  for example
  On a typical employee list page clicking the employee id of an
  employee takes you to the employee detail page.
 
  In this scenario employee id can not be displayed over a button  
- it
 
  has to be a hyperlink..
 
  Use of javascript is restricted. So i cant call a javascript
  function
  to set the action atribute and then call the submit function.
 
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com
 
 
  Mark Lowe [EMAIL PROTECTED]
To Struts Users  
Mailing
  List
 
  [EMAIL PROTECTED]
   02/17/2004 08:57 PM
cc
   Please respond to
  Struts Users Mailing List  Subject Re: Form Submission
[EMAIL PROTECTED]
 
 
 
 
  May I ask why you don't want a submit button?
 
 
  On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:
 
 
  Hi
 
  How can we submit a form without using html:submit tag. I  
dont
  want
  to use JavaScript for this?
 
  Thanks  Regards
   Avinash Tiwari
   Tata Consultancy Services
   Mailto: [EMAIL PROTECTED]
   Website:
  http://
 
 
   
www.tcs.comInterScan_Disclaimer.txt-
  -
 
 
  ---
  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]
 
 
 
  ForwardSourceID:NT4E3A
 
  

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

Re: Form Submission

2004-02-18 Thread Geeta Ramani
Hi Avinash:

I have not followed your description very carefully - my eyes started
glazing over about mid-way..;) - but here's a thought (and I'm only
going by what i remember of your original question, so forgive me if I
misspeak..): If you do not have access to the request object, do you at
least have access to the session?  In which case how about putting the
user in a session variable (maybe right after logon) and then you should
be able to get his/her userId etc etc wherever you want it from..?  I
know there has been **extensive** discussion in this list re. the pros
and cons of using session variables and if you are of the
all-session-vars-are-bad school of thought, this won't do you any good.
But personally,  this seems to be a situation where a session variable
would come in handy..

If however this idea wn't work in your situation, you may want to
discuss with your clients their absolute requirement about wanting a
link vs. a button (I believe you indicated earlier that the latter case
will pose no prblems for you..?)

Good luck!
Geeta

[EMAIL PROTECTED] wrote:


 Hi Geeta/Paul/Mark/Wendy

 What Geeta has suggested is basically the same thing but Paul is using
 JSTL for that.
 But such is the restriction of my application that I can not use
 request object to get the values from form directly by calling
 request.getParameter(...);

 I will explain this why.

 The framework that we are working with right now gives some add on
 features over struts. Basically taken from StrutsEJB framework.

 We are using Map Based DTOs to transfer data from view layer to model
 layer and other way round.
 We are also using the feature of Command Files. I will explain it what
 it is for people unaware of StrutsEJB framework.

 In Struts we are supposed to mention the Action Class in the
 struts-config.xml. And from the Action class we generally call some
 java programs (say command files) to access the model layer basically
 to avoid keeping business logic in Action Classes.

 But in my framework we just need to mention the Command file name in
 struts-config.xml instead of Action classes. There is only one action
 class that is DefaultAction class which handles all the requests and
 diverts the program control to the command file. I will give here one
 typical entry in my struts-config.xml for your reference.

 action
 path=/CreateUser
 type=framework.common.web.DefaultAction
 name=UserForm
 scope=request
 input = /CreateUser.jsp
 parameter=app.cmd.CreateUserCmd
 forward name=Success path = /UserSucc.jsp /
   /action

 in the above action tag the attribute parameter is the name of the
 command file where i would like my control to go after the form gets
 submitted.

 Now the problem is in the Command File CreateUserCmd where i would
 keep my business logic -- i dont have the request object. so i cant
 do a
 request.getParameter(.);  here.

 the way i get values from forms is like this.

 if I have this code in JSP
 html:text property=dto(txtUsname) styleClass=listItem size=14
 /

 I will have to write the following code in my command file to get the
 value of User Name
 String UserName = (String)paramDTO.get(txtUsName);

 As Mark/Wendy were asking me why i cant use JavaScript is because

 whenever i use something like this in JavaScript I get javascript
 error at runtime
 document.UserForm.dto(txtUsName).value = val;
 document.UserForm.submit();

 This is obvious because whenever javascript parses something like
 dto(txtUsName) it takes it as a function call.

 I hope I could explain the problem properly.

 Regards
 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com


 Geeta Ramani
  Struts Users Mailing List
  [EMAIL PROTECTED] To [EMAIL PROTECTED]

  02/17/2004 09:57 PM  cc
  Please respond to   Subject Re: Form Submission
 Struts Users Mailing List
   [EMAIL PROTECTED]




 Avinash:

 How about trying something like this:

 %String myLink = /EmplyeeDetailAction.do?employeeId= + employeeId;
 %

 html:link page=%=myLinkEmployee Detail Page/html:link

 Regards,
 Geeta

 [EMAIL PROTECTED] wrote:

 
  I want to use a hyperlink instead -
 
  for example
  On a typical employee list page clicking the employee id of an
  employee takes you to the employee detail page.
 
  In this scenario employee id can not be displayed over a button - it

  has to be a hyperlink..
 
  Use of javascript is restricted. So i cant call a javascript
 function
  to set the action atribute and then call the submit function.
 
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com
 
 
  Mark Lowe [EMAIL PROTECTED]
   To Struts Users Mailing
 List

 [EMAIL PROTECTED]
  02/17/2004 08:57 PM
   cc
  Please respond to
 Struts Users

Re: Form Submission

2004-02-18 Thread Mark Lowe
I said no such thing about javascript.

I'm in the httpsession != evil school and I'd say this isn't an  
occasion where you'd use it as you don't need anything to persist  
beyond the request (accept this default action thing whatever thats  
about).

The single action class as a type of command dispatcher sounds  
ingenious. But it has to be using a form property or request parameter  
otherwise the id in the link wouldn't do what you want. I can see how  
this has helped make life less complex :o) I assume it extracts a map  
iterates through is and then selects the relevant 'command' based on  
the map's contents.

You cant submit a form with a link without using javascript. You can  
use an image as a button, but thats another subject. I have no more  
suggestions than those I've already made, else I'll start getting urges  
to go out and score come crack in an attempt to save my teeth from all  
the brick-chewing.

On 18 Feb 2004, at 14:15, Geeta Ramani wrote:

Hi Avinash:

I have not followed your description very carefully - my eyes started
glazing over about mid-way..;) - but here's a thought (and I'm only
going by what i remember of your original question, so forgive me if I
misspeak..): If you do not have access to the request object, do you at
least have access to the session?  In which case how about putting the
user in a session variable (maybe right after logon) and then you  
should
be able to get his/her userId etc etc wherever you want it from..?  I
know there has been **extensive** discussion in this list re. the pros
and cons of using session variables and if you are of the
all-session-vars-are-bad school of thought, this won't do you any good.
But personally,  this seems to be a situation where a session variable
would come in handy..



If however this idea wn't work in your situation, you may want to
discuss with your clients their absolute requirement about wanting a
link vs. a button (I believe you indicated earlier that the latter case
will pose no prblems for you..?)



Good luck!
Geeta
[EMAIL PROTECTED] wrote:

Hi Geeta/Paul/Mark/Wendy

What Geeta has suggested is basically the same thing but Paul is using
JSTL for that.
But such is the restriction of my application that I can not use
request object to get the values from form directly by calling
request.getParameter(...);
I will explain this why.

The framework that we are working with right now gives some add on
features over struts. Basically taken from StrutsEJB framework.
We are using Map Based DTOs to transfer data from view layer to model
layer and other way round.
We are also using the feature of Command Files. I will explain it what
it is for people unaware of StrutsEJB framework.
In Struts we are supposed to mention the Action Class in the
struts-config.xml. And from the Action class we generally call some
java programs (say command files) to access the model layer basically
to avoid keeping business logic in Action Classes.
But in my framework we just need to mention the Command file name in
struts-config.xml instead of Action classes. There is only one action
class that is DefaultAction class which handles all the requests and
diverts the program control to the command file. I will give here one
typical entry in my struts-config.xml for your reference.
action
path=/CreateUser
type=framework.common.web.DefaultAction
name=UserForm
scope=request
input = /CreateUser.jsp
parameter=app.cmd.CreateUserCmd
forward name=Success path = /UserSucc.jsp /
  /action
in the above action tag the attribute parameter is the name of the
command file where i would like my control to go after the form gets
submitted.
Now the problem is in the Command File CreateUserCmd where i would
keep my business logic -- i dont have the request object. so i cant
do a
request.getParameter(.);  here.
the way i get values from forms is like this.

if I have this code in JSP
html:text property=dto(txtUsname) styleClass=listItem size=14
/
I will have to write the following code in my command file to get the
value of User Name
String UserName = (String)paramDTO.get(txtUsName);
As Mark/Wendy were asking me why i cant use JavaScript is because

whenever i use something like this in JavaScript I get javascript
error at runtime
document.UserForm.dto(txtUsName).value = val;
document.UserForm.submit();
This is obvious because whenever javascript parses something like
dto(txtUsName) it takes it as a function call.
I hope I could explain the problem properly.

Regards
Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
Geeta Ramani
  Struts Users Mailing List
  [EMAIL PROTECTED] To  
[EMAIL PROTECTED]

  02/17/2004 09:57 PM  cc
  Please respond to   Subject Re: Form Submission
 Struts Users Mailing List
   [EMAIL PROTECTED]


Avinash:

How about trying something like this:

%String myLink

Re: Form Submission

2004-02-18 Thread Geeta Ramani
 will have to write the following code in my command file to get the
  value of User Name
  String UserName = (String)paramDTO.get(txtUsName);
 
  As Mark/Wendy were asking me why i cant use JavaScript is because
 
  whenever i use something like this in JavaScript I get javascript
  error at runtime
  document.UserForm.dto(txtUsName).value = val;
  document.UserForm.submit();
 
  This is obvious because whenever javascript parses something like
  dto(txtUsName) it takes it as a function call.
 
  I hope I could explain the problem properly.
 
  Regards
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com
 
 
  Geeta Ramani
Struts Users Mailing List
[EMAIL PROTECTED] To
  [EMAIL PROTECTED]
 
02/17/2004 09:57 PM  cc
Please respond to   Subject Re: Form Submission
   Struts Users Mailing List
 [EMAIL PROTECTED]
 
 
 
 
  Avinash:
 
  How about trying something like this:
 
  %String myLink = /EmplyeeDetailAction.do?employeeId= + employeeId;
  %
 
  html:link page=%=myLinkEmployee Detail Page/html:link
 
  Regards,
  Geeta
 
  [EMAIL PROTECTED] wrote:
 
 
  I want to use a hyperlink instead -
 
  for example
  On a typical employee list page clicking the employee id of an
  employee takes you to the employee detail page.
 
  In this scenario employee id can not be displayed over a button - it
 
  has to be a hyperlink..
 
  Use of javascript is restricted. So i cant call a javascript
  function
  to set the action atribute and then call the submit function.
 
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com
 
 
  Mark Lowe [EMAIL PROTECTED]
To Struts Users Mailing
  List
 
  [EMAIL PROTECTED]
   02/17/2004 08:57 PM
cc
   Please respond to
  Struts Users Mailing List  Subject Re: Form Submission
[EMAIL PROTECTED]
 
 
 
 
  May I ask why you don't want a submit button?
 
 
  On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:
 
 
  Hi
 
  How can we submit a form without using html:submit tag. I dont
  want
  to use JavaScript for this?
 
  Thanks  Regards
   Avinash Tiwari
   Tata Consultancy Services
   Mailto: [EMAIL PROTECTED]
   Website:
  http://
 
 
  www.tcs.comInterScan_Disclaimer.txt-
  -
 
 
  ---
  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]
 
 
 
  ForwardSourceID:NT4E3A
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  ForwardSourceID:NT4E76
 
 
  -
  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: Form Submission

2004-02-18 Thread Mark Lowe
 size=14
/
I will have to write the following code in my command file to get  
the
value of User Name
String UserName = (String)paramDTO.get(txtUsName);

As Mark/Wendy were asking me why i cant use JavaScript is because

whenever i use something like this in JavaScript I get javascript
error at runtime
document.UserForm.dto(txtUsName).value = val;
document.UserForm.submit();
This is obvious because whenever javascript parses something like
dto(txtUsName) it takes it as a function call.
I hope I could explain the problem properly.

Regards
Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
Geeta Ramani
  Struts Users Mailing  
List
  [EMAIL PROTECTED] To
[EMAIL PROTECTED]

  02/17/2004 09:57 PM  cc
  Please respond to   Subject Re: Form Submission
 Struts Users Mailing List
   [EMAIL PROTECTED]


Avinash:

How about trying something like this:

%String myLink = /EmplyeeDetailAction.do?employeeId= +  
employeeId;
%

html:link page=%=myLinkEmployee Detail Page/html:link

Regards,
Geeta
[EMAIL PROTECTED] wrote:

I want to use a hyperlink instead -

for example
On a typical employee list page clicking the employee id of an
employee takes you to the employee detail page.
In this scenario employee id can not be displayed over a button -  
it

has to be a hyperlink..

Use of javascript is restricted. So i cant call a javascript
function
to set the action atribute and then call the submit function.

Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
Mark Lowe [EMAIL PROTECTED]
  To Struts Users Mailing
List
[EMAIL PROTECTED]
 02/17/2004 08:57 PM
  cc
 Please respond to
Struts Users Mailing List  Subject Re: Form Submission
  [EMAIL PROTECTED]


May I ask why you don't want a submit button?

On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:

Hi

How can we submit a form without using html:submit tag. I dont
want
to use JavaScript for this?

Thanks  Regards
 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website:
http://

www.tcs.comInterScan_Disclaimer.txt--- 
--
-


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



ForwardSourceID:NT4E3A

   

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


ForwardSourceID:NT4E76

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

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


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


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


Re: Form Submission

2004-02-18 Thread Michael McGrady
 entry in my struts-config.xml for your reference.
 
  action
  path=/CreateUser
  type=framework.common.web.DefaultAction
  name=UserForm
  scope=request
  input = /CreateUser.jsp
  parameter=app.cmd.CreateUserCmd
  forward name=Success path = /UserSucc.jsp /
/action
 
  in the above action tag the attribute parameter is the name of the
  command file where i would like my control to go after the form gets
  submitted.
 
  Now the problem is in the Command File CreateUserCmd where i would
  keep my business logic -- i dont have the request object. so i cant
  do a
  request.getParameter(.);  here.
 
  the way i get values from forms is like this.
 
  if I have this code in JSP
  html:text property=dto(txtUsname) styleClass=listItem size=14
  /
 
  I will have to write the following code in my command file to get the
  value of User Name
  String UserName = (String)paramDTO.get(txtUsName);
 
  As Mark/Wendy were asking me why i cant use JavaScript is because
 
  whenever i use something like this in JavaScript I get javascript
  error at runtime
  document.UserForm.dto(txtUsName).value = val;
  document.UserForm.submit();
 
  This is obvious because whenever javascript parses something like
  dto(txtUsName) it takes it as a function call.
 
  I hope I could explain the problem properly.
 
  Regards
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com
 
 
  Geeta Ramani
Struts Users Mailing List
[EMAIL PROTECTED] To
  [EMAIL PROTECTED]
 
02/17/2004 09:57 PM  cc
Please respond to   Subject Re: Form Submission
   Struts Users Mailing List
 [EMAIL PROTECTED]
 
 
 
 
  Avinash:
 
  How about trying something like this:
 
  %String myLink = /EmplyeeDetailAction.do?employeeId= + employeeId;
  %
 
  html:link page=%=myLinkEmployee Detail Page/html:link
 
  Regards,
  Geeta
 
  [EMAIL PROTECTED] wrote:
 
 
  I want to use a hyperlink instead -
 
  for example
  On a typical employee list page clicking the employee id of an
  employee takes you to the employee detail page.
 
  In this scenario employee id can not be displayed over a button - it
 
  has to be a hyperlink..
 
  Use of javascript is restricted. So i cant call a javascript
  function
  to set the action atribute and then call the submit function.
 
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com
 
 
  Mark Lowe [EMAIL PROTECTED]
To Struts Users Mailing
  List
 
  [EMAIL PROTECTED]
   02/17/2004 08:57 PM
cc
   Please respond to
  Struts Users Mailing List  Subject Re: Form Submission
[EMAIL PROTECTED]
 
 
 
 
  May I ask why you don't want a submit button?
 
 
  On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:
 
 
  Hi
 
  How can we submit a form without using html:submit tag. I dont
  want
  to use JavaScript for this?
 
  Thanks  Regards
   Avinash Tiwari
   Tata Consultancy Services
   Mailto: [EMAIL PROTECTED]
   Website:
  http://
 
 
  www.tcs.comInterScan_Disclaimer.txt-
  -
 
 
  ---
  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]
 
 
 
  ForwardSourceID:NT4E3A
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  ForwardSourceID:NT4E76
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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


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


Re: Form Submission

2004-02-18 Thread Geeta Ramani
 in
struts-config.xml instead of Action classes. There is only one action
class that is DefaultAction class which handles all the requests and
diverts the program control to the command file. I will give here one
typical entry in my struts-config.xml for your reference.
   
action
path=/CreateUser
type=framework.common.web.DefaultAction
name=UserForm
scope=request
input = /CreateUser.jsp
parameter=app.cmd.CreateUserCmd
forward name=Success path = /UserSucc.jsp /
  /action
   
in the above action tag the attribute parameter is the name of the
command file where i would like my control to go after the form gets
submitted.
   
Now the problem is in the Command File CreateUserCmd where i would
keep my business logic -- i dont have the request object. so i cant
do a
request.getParameter(.);  here.
   
the way i get values from forms is like this.
   
if I have this code in JSP
html:text property=dto(txtUsname) styleClass=listItem size=14
/
   
I will have to write the following code in my command file to get the
value of User Name
String UserName = (String)paramDTO.get(txtUsName);
   
As Mark/Wendy were asking me why i cant use JavaScript is because
   
whenever i use something like this in JavaScript I get javascript
error at runtime
document.UserForm.dto(txtUsName).value = val;
document.UserForm.submit();
   
This is obvious because whenever javascript parses something like
dto(txtUsName) it takes it as a function call.
   
I hope I could explain the problem properly.
   
Regards
Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
   
   
Geeta Ramani
  Struts Users Mailing List
  [EMAIL PROTECTED] To
[EMAIL PROTECTED]
   
  02/17/2004 09:57 PM  cc
  Please respond to   Subject Re: Form Submission
 Struts Users Mailing List
   [EMAIL PROTECTED]
   
   
   
   
Avinash:
   
How about trying something like this:
   
%String myLink = /EmplyeeDetailAction.do?employeeId= + employeeId;
%
   
html:link page=%=myLinkEmployee Detail Page/html:link
   
Regards,
Geeta
   
[EMAIL PROTECTED] wrote:
   
   
I want to use a hyperlink instead -
   
for example
On a typical employee list page clicking the employee id of an
employee takes you to the employee detail page.
   
In this scenario employee id can not be displayed over a button - it
   
has to be a hyperlink..
   
Use of javascript is restricted. So i cant call a javascript
function
to set the action atribute and then call the submit function.
   
Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
   
   
Mark Lowe [EMAIL PROTECTED]
  To Struts Users Mailing
List
   
[EMAIL PROTECTED]
 02/17/2004 08:57 PM
  cc
 Please respond to
Struts Users Mailing List  Subject Re: Form Submission
  [EMAIL PROTECTED]
   
   
   
   
May I ask why you don't want a submit button?
   
   
On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:
   
   
Hi
   
How can we submit a form without using html:submit tag. I dont
want
to use JavaScript for this?
   
Thanks  Regards
 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website:
http://
   
   
www.tcs.comInterScan_Disclaimer.txt-
-
   
   
---
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]
   
   
   
ForwardSourceID:NT4E3A
   
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
ForwardSourceID:NT4E76
   
   
-
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

Form Submission

2004-02-17 Thread avinash . tiwari

Hi 

How can we submit a form without using
html:submit tag. I dont want to use _javascript_ for this?

Thanks  Regards
Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.comDISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute 
unlawful act and can possibly attract legal action, civil and/or criminal. The 
contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk 
and neither the originator of this message nor Tata Consultancy Services takes any 
responsibility or liability towards the same. Opinions, conclusions and any other 
information contained in this message
that do not relate to the official business of Tata Consultancy Services shall be 
understood as neither given nor endorsed by Tata Consultancy Services or any affiliate 
of Tata Consultancy Services. If you have received this message in error, you should 
destroy this message and may please notify the sender by e-mail. Thank you.

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

RE: Form Submission

2004-02-17 Thread Wendy Smoak
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 How can we submit a form without using html:submit tag. I 
 dont want to use JavaScript for this? 

AFAIK, the only other option is to put the parameters in a URL:
http://www.example.com/myapp/someAction.do?abc=123

But without JavaScript, you'd have to know the parameter *before* the
form was filled out, when the HTML was generated.  What is your
objection to a submit button?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



RE: Form Submission

2004-02-17 Thread avinash . tiwari

there is a hyperlink in my form - clicking
this hyperlink should submit the form. 
I can't use html:submit because
it displays a button instead of a hyperlink.

And the restriction is not to use _javascript_.


Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





Wendy Smoak [EMAIL PROTECTED]

02/17/2004 08:29 PM




Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
Struts Users Mailing List
[EMAIL PROTECTED]


cc



Subject
RE: Form Submission








 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

 How can we submit a form without using html:submit tag. I

 dont want to use _javascript_ for this? 

AFAIK, the only other option is to put the parameters in a URL:
http://www.example.com/myapp/someAction.do?abc=123

But without _javascript_, you'd have to know the parameter *before* the
form was filled out, when the HTML was generated. What is your
objection to a submit button?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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


ForwardSourceID:NT4E02
 
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute 
unlawful act and can possibly attract legal action, civil and/or criminal. The 
contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk 
and neither the originator of this message nor Tata Consultancy Services takes any 
responsibility or liability towards the same. Opinions, conclusions and any other 
information contained in this message
that do not relate to the official business of Tata Consultancy Services shall be 
understood as neither given nor endorsed by Tata Consultancy Services or any affiliate 
of Tata Consultancy Services. If you have received this message in error, you should 
destroy this message and may please notify the sender by e-mail. Thank you.

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

Re: Form Submission

2004-02-17 Thread Mark Lowe
May I ask why you don't want a submit button?

On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:

Hi

How can we submit a form without using html:submit tag. I dont want  
to use JavaScript for this?

Thanks  Regards
 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website:  
http:// 
www.tcs.comInterScan_Disclaimer.txt-- 
---
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: Form Submission

2004-02-17 Thread Mark Lowe
In which case you want a

input type=image ..

in stuts speak

html:image ..



On 17 Feb 2004, at 16:26, [EMAIL PROTECTED] wrote:

there is a hyperlink in my form - clicking this hyperlink should  
submit the form.
I can't use html:submit because it displays a button instead of a  
hyperlink.

And the restriction is not to use javascript.

 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com


Wendy Smoak [EMAIL PROTECTED]

02/17/2004 08:29 PM

Please respond to
 Struts Users Mailing List [EMAIL PROTECTED]


To
Struts Users Mailing List [EMAIL PROTECTED]
cc

Subject
RE: Form Submission






 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  How can we submit a form without using html:submit tag. I
  dont want to use JavaScript for this?
 AFAIK, the only other option is to put the parameters in a URL:
 http://www.example.com/myapp/someAction.do?abc=123
 But without JavaScript, you'd have to know the parameter *before* the
 form was filled out, when the HTML was generated.  What is your
 objection to a submit button?
 --
 Wendy Smoak
 Application Systems Analyst, Sr.
 ASU IA Information Resources Management
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT4E02    
InterScan_Disclaimer.txt- 

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: Form Submission

2004-02-17 Thread Desai, Sunny
Having a button using html:submit submits all of the form variables
(including hidden). Keeping a button itself gives you more control in Action
which you can use to manipulate the forwarding page (if the need be).
 
So in effect, you can achieve the more than link 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 10:27 AM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: RE: Form Submission



there is a hyperlink in my form - clicking this hyperlink should submit the
form. 
I can't use html:submit because it displays a button instead of a
hyperlink. 

And the restriction is not to use javascript. 


Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com 



Wendy Smoak [EMAIL PROTECTED] 


02/17/2004 08:29 PM 



Please respond to
Struts Users Mailing List [EMAIL PROTECTED]



To
Struts Users Mailing List [EMAIL PROTECTED] 

cc

Subject
RE: Form Submission






 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 How can we submit a form without using html:submit tag. I 
 dont want to use JavaScript for this? 

AFAIK, the only other option is to put the parameters in a URL:
http://www.example.com/myapp/someAction.do?abc=123

But without JavaScript, you'd have to know the parameter *before* the
form was filled out, when the HTML was generated.  What is your
objection to a submit button?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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


ForwardSourceID:NT4E02 




Re: Form Submission

2004-02-17 Thread avinash . tiwari

I want to use a hyperlink instead -


for example
On a typical employee list page clicking
the employee id of an employee takes you to the employee detail page.

In this scenario employee id can not
be displayed over a button - it has to be a hyperlink..

Use of _javascript_ is restricted. So
i cant call a _javascript_ function to set the action atribute and then call
the submit function.

Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





Mark Lowe [EMAIL PROTECTED]

02/17/2004 08:57 PM




Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
Struts Users Mailing
List [EMAIL PROTECTED]


cc



Subject
Re: Form Submission








May I ask why you don't want a submit button?


On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:


 Hi

 How can we submit a form without using html:submit tag. I
dont want 
 to use _javascript_ for this?

 Thanks  Regards
 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: 
 http:// 
 www.tcs.comInterScan_Disclaimer.txt--

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


ForwardSourceID:NT4E3A
 
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute 
unlawful act and can possibly attract legal action, civil and/or criminal. The 
contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk 
and neither the originator of this message nor Tata Consultancy Services takes any 
responsibility or liability towards the same. Opinions, conclusions and any other 
information contained in this message
that do not relate to the official business of Tata Consultancy Services shall be 
understood as neither given nor endorsed by Tata Consultancy Services or any affiliate 
of Tata Consultancy Services. If you have received this message in error, you should 
destroy this message and may please notify the sender by e-mail. Thank you.

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

RE: Form Submission

2004-02-17 Thread Wendy Smoak
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 there is a hyperlink in my form - clicking this hyperlink 
 should submit the form. 
 I can't use html:submit because it displays a button 
 instead of a hyperlink. 
 And the restriction is not to use javascript. 

So the objection is really how the button _looks_, right?  You can
change that, to a point.

What about putting the employee ID as a hidden field on the form, so
that it will get submitted without being displayed on the form?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 


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



Re: Form Submission

2004-02-17 Thread Mark Lowe
sounds like you want to display an image instead of a submit button.

html has provision for such things..

input type=image src=mybutton.gif

in struts tags this is

html:image ..

if you have many employees in one form  then you want to use indexed  
properties or mapped backed form using the id as your key. [Other  
keywords nested beans, nested forms]

otherwise if there's just one employee use a hidden form value.

On 17 Feb 2004, at 16:34, [EMAIL PROTECTED] wrote:

I want to use a hyperlink instead -

for example
On a typical employee list page clicking the employee id of an  
employee takes you to the employee detail page.

In this scenario employee id can not be displayed over a button - it  
has to be a hyperlink..

Use of javascript is restricted. So i cant call a javascript function  
to set the action atribute and then call the submit function.

 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com


Mark Lowe [EMAIL PROTECTED]

02/17/2004 08:57 PM

Please respond to
 Struts Users Mailing List [EMAIL PROTECTED]


To
Struts Users Mailing List [EMAIL PROTECTED]
cc

Subject
Re: Form Submission






May I ask why you don't want a submit button?

 On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:

 
  Hi
 
  How can we submit a form without using html:submit tag. I dont  
want  
  to use JavaScript for this?
 
  Thanks  Regards
   Avinash Tiwari
   Tata Consultancy Services
   Mailto: [EMAIL PROTECTED]
   Website:  
  http://
   
www.tcs.comInterScan_Disclaimer.txt--
  ---
  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]
ForwardSourceID:NT4E3A    
InterScan_Disclaimer.txt- 

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: Form Submission

2004-02-17 Thread Geeta Ramani
Avinash:

How about trying something like this:

%String myLink = /EmplyeeDetailAction.do?employeeId= + employeeId; %

html:link page=%=myLinkEmployee Detail Page/html:link

Regards,
Geeta

[EMAIL PROTECTED] wrote:


 I want to use a hyperlink instead -

 for example
 On a typical employee list page clicking the employee id of an
 employee takes you to the employee detail page.

 In this scenario employee id can not be displayed over a button - it
 has to be a hyperlink..

 Use of javascript is restricted. So i cant call a javascript function
 to set the action atribute and then call the submit function.

 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com


 Mark Lowe [EMAIL PROTECTED]
   To Struts Users Mailing List
  [EMAIL PROTECTED]
  02/17/2004 08:57 PM
   cc
  Please respond to
 Struts Users Mailing List  Subject Re: Form Submission
   [EMAIL PROTECTED]




 May I ask why you don't want a submit button?


 On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:

 
  Hi
 
  How can we submit a form without using html:submit tag. I dont
 want
  to use JavaScript for this?
 
  Thanks  Regards
   Avinash Tiwari
   Tata Consultancy Services
   Mailto: [EMAIL PROTECTED]
   Website:
  http://
 
 www.tcs.comInterScan_Disclaimer.txt--

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


 ForwardSourceID:NT4E3A


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



Re: Form Submission

2004-02-17 Thread PAUL BRANT
I use the EL and JSTL to accomplich the same thing:

td nowrap align=left
html:link page=/searchByPersonId.do?personId=${result.personId}
   c:out value=${result.ssn}/
/html:link
/td 

This creates a link for each person in a list that I iterate over using c:forEach.

Paul

 Geeta Ramani [EMAIL PROTECTED] 02/17/04 11:27AM 
Avinash:

How about trying something like this:

%String myLink = /EmplyeeDetailAction.do?employeeId= + employeeId; %

html:link page=%=myLinkEmployee Detail Page/html:link

Regards,
Geeta

[EMAIL PROTECTED] wrote:


 I want to use a hyperlink instead -

 for example
 On a typical employee list page clicking the employee id of an
 employee takes you to the employee detail page.

 In this scenario employee id can not be displayed over a button - it
 has to be a hyperlink..

 Use of javascript is restricted. So i cant call a javascript function
 to set the action atribute and then call the submit function.

 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED] 
 Website: http://www.tcs.com 


 Mark Lowe [EMAIL PROTECTED]
   To Struts Users Mailing List
  [EMAIL PROTECTED]
  02/17/2004 08:57 PM
   cc
  Please respond to
 Struts Users Mailing List  Subject Re: Form Submission
   [EMAIL PROTECTED]




 May I ask why you don't want a submit button?


 On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:

 
  Hi
 
  How can we submit a form without using html:submit tag. I dont
 want
  to use JavaScript for this?
 
  Thanks  Regards
   Avinash Tiwari
   Tata Consultancy Services
   Mailto: [EMAIL PROTECTED] 
   Website:
  http://
 
 www.tcs.comInterScan_Disclaimer.txt--

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


 ForwardSourceID:NT4E3A


 -
 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: Form Submission

2004-02-17 Thread avinash . tiwari

Hi Geeta/Paul/Mark/Wendy

What Geeta has suggested is basically
the same thing but Paul is using JSTL for that.
But such is the restriction of my application
that I can not use request object to get the values from form directly
by calling request.getParameter(...);

I will explain this why.

The framework that we are working with
right now gives some add on features over struts. Basically taken from
StrutsEJB framework.

We are using Map Based DTOs to transfer
data from view layer to model layer and other way round.
We are also using the feature of Command
Files. I will explain it what it is for people unaware of StrutsEJB framework.

In Struts we are supposed to mention
the Action Class in the struts-config.xml. And from the Action class we
generally call some java programs (say command files) to access the model
layer basically to avoid keeping business logic in Action Classes.

But in my framework we just need to
mention the Command file name in struts-config.xml instead of Action classes.
There is only one action class that is DefaultAction class which handles
all the requests and diverts the program control to the command file. I
will give here one typical entry in my struts-config.xml for your reference.

action 
  path=/CreateUser

  type=framework.common.web.DefaultAction
  name=UserForm
  scope=request
  input = /CreateUser.jsp
  parameter=app.cmd.CreateUserCmd
  forward name=Success
path = /UserSucc.jsp /  
 /action

in the above action tag the attribute
parameter is the name of the command file where i would like my control
to go after the form gets submitted.

Now the problem is in the Command File
CreateUserCmd where i would keep my business logic -- i dont
have the request object. so i cant do a
request.getParameter(.); 
here.

the way i get values from forms is like
this.

if I have this code in JSP 
html:text property=dto(txtUsname)
styleClass=listItem size=14 /

I will have to write the following code
in my command file to get the value of User Name
String UserName = (String)paramDTO.get(txtUsName);

As Mark/Wendy were asking me why i cant
use _javascript_ is because 

whenever i use something like this in
_javascript_ I get _javascript_ error at runtime
document.UserForm.dto(txtUsName).value
= val;
document.UserForm.submit();

This is obvious because whenever _javascript_
parses something like dto(txtUsName) it takes it as a function call.

I hope I could explain the problem properly.


Regards
Avinash Tiwari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





Geeta Ramani
[EMAIL PROTECTED] 
02/17/2004 09:57 PM




Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
Struts Users Mailing List
[EMAIL PROTECTED]


cc



Subject
Re: Form Submission








Avinash:

How about trying something like this:

%String myLink = /EmplyeeDetailAction.do?employeeId= +
employeeId; %

html:link page=%=myLinkEmployee Detail Page/html:link

Regards,
Geeta

[EMAIL PROTECTED] wrote:


 I want to use a hyperlink instead -

 for example
 On a typical employee list page clicking the employee id of an
 employee takes you to the employee detail page.

 In this scenario employee id can not be displayed over a button -
it
 has to be a hyperlink..

 Use of _javascript_ is restricted. So i cant call a _javascript_ function
 to set the action atribute and then call the submit function.

 Avinash Tiwari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com


 Mark Lowe [EMAIL PROTECTED]
  
  
To Struts Users Mailing List
  
  
 [EMAIL PROTECTED]
 02/17/2004 08:57 PM
  
  
cc
 Please respond to
   Struts Users Mailing List   Subject
Re: Form Submission
  [EMAIL PROTECTED]




 May I ask why you don't want a submit button?


 On 17 Feb 2004, at 15:55, [EMAIL PROTECTED] wrote:

 
  Hi
 
  How can we submit a form without using html:submit tag.
I dont
 want
  to use _javascript_ for this?
 
  Thanks  Regards
  Avinash Tiwari
  Tata Consultancy Services
  Mailto: [EMAIL PROTECTED]
  Website:
  http://
 
 www.tcs.comInterScan_Disclaimer.txt--

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


 ForwardSourceID:NT4E3A

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


ForwardSourceID:NT4E76
 
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated

RE: Form submission

2004-01-22 Thread Wendy Smoak
 From: Raman [mailto:[EMAIL PROTECTED] 
 I want to implement something like this:
 Conditional checks: for form submission to different Actions
 Can anybody help me in this or give me some idea...

Use the Struts-EL tags [?? Haven't tried it with form actions].

Use JavaScript to change the action of the form before submitting.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



Form submission

2004-01-15 Thread Raman
I want to implement something like this:

Conditional checks: for form submission to different Actions


logic:equal value=MP name=userQuestionaireForm property=filterConstant
html:form action=/UpdateUserQstMP
/logic:equal
logic:notEqual value=MP name=userQuestionaireForm property=filterConstant
html:form action=/UpdateUserQst
/logic:notEqual

But this is giving me error [ServletException  Unterminated tag'
if i remove the logic tags it works fine.

Can anybody help me in this or give me some idea...

Thanks
-- Raman

Re: Form submission

2004-01-15 Thread Mark Lowe
logic:equal ...
bean:define id=action ...
..
html:form action=%= action %

or

c:choose
c:when test=${myForm.prop}
c:set var=action value=/foo.do /
/c:when
c:otherwise
c:set var=action value=/bar.do /
/c:otherwise
/c:choose
html-el:form action=${action}
On 15 Jan 2004, at 14:08, Raman wrote:

I want to implement something like this:

Conditional checks: for form submission to different Actions

logic:equal value=MP name=userQuestionaireForm 
property=filterConstant
html:form action=/UpdateUserQstMP
/logic:equal
logic:notEqual value=MP name=userQuestionaireForm 
property=filterConstant
html:form action=/UpdateUserQst
/logic:notEqual

But this is giving me error [ServletException  Unterminated tag'
if i remove the logic tags it works fine.
Can anybody help me in this or give me some idea...

Thanks
-- Raman


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


AW: Form submission

2004-01-15 Thread Martin Sturzenegger
html:form action=/UpdateUserQstMP/ instead of html:form 
action=/UpdateUserQstMP  
this might help
martin



-- Urspruengliche Nachricht --
Von: Raman [EMAIL PROTECTED]
Antworten an: Struts Users Mailing List [EMAIL PROTECTED]
Datum:  Thu, 15 Jan 2004 19:38:55 +0530

I want to implement something like this:

Conditional checks: for form submission to different Actions


logic:equal value=MP name=userQuestionaireForm property=filterConstant
html:form action=/UpdateUserQstMP
/logic:equal
logic:notEqual value=MP name=userQuestionaireForm property=filterConstant
html:form action=/UpdateUserQst
/logic:notEqual

But this is giving me error [ServletException  Unterminated tag'
if i remove the logic tags it works fine.

Can anybody help me in this or give me some idea...

Thanks
-- Raman

 
 

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



RE: Form submission

2004-01-15 Thread Gopalakrishnan, Jayesh
You cannot nest these tags, inner tags must close b4 you close the outer
ones..

You could give this a try,

bean:define id=suffix name=userQuestionaireForm
property=filterConstant
html:form action=%=(suffix.equals(MP)) ? /UpdateUserQstMP :
/UpdateUserQst%

You get the idea right...

-jayash


-Original Message-
From: Raman [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 6:09 AM
To: Struts Users Mailing List
Subject: Form submission


I want to implement something like this:

Conditional checks: for form submission to different Actions


logic:equal value=MP name=userQuestionaireForm
property=filterConstant
html:form action=/UpdateUserQstMP
/logic:equal
logic:notEqual value=MP name=userQuestionaireForm
property=filterConstant
html:form action=/UpdateUserQst
/logic:notEqual

But this is giving me error [ServletException  Unterminated tag'
if i remove the logic tags it works fine.

Can anybody help me in this or give me some idea...

Thanks
-- Raman

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



Form submission through java script

2003-11-10 Thread Shishir K. Singh
Hi, 

I have a form with one drop down menu list and two buttons (continue and
previous ). The two buttons are hooked up to the LookupDispatchAction
where 
I process the code as required by the action of the button. Everything
works fine if I use the buttons. 


My requirement is that when I click on any one value of the list box,
the form should get submitted. I am trying to use Javascript to do the
same. 

In the onclick of the select html:select, I have a function called
submit() 

The submit function looks like this



script language=text/javascript
function submit() {
document.form.action =
http://localhost:8081/createContentAction.do
document.form.submit()
}

/script 

 
And my form action is 


html:form  action=/createContentAction





When I click any value in the drop down, I get this error :


javax.servlet.ServletException: Request[/createContentAction] does not
contain handler parameter named action
at
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:199)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:226)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)


Can anyone pls tell me where am I going wrong or what more needs to be
done ??

TIA
Shishir

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



Re: Form submission through java script

2003-11-10 Thread Brice Ruth
Why are you setting the document.form.action? Just call 
document.form.submit() - the JavaScript will automatically know what to 
do and where to submit to.

Shishir K. Singh wrote:

Hi, 

I have a form with one drop down menu list and two buttons (continue and
previous ). The two buttons are hooked up to the LookupDispatchAction
where 
I process the code as required by the action of the button. Everything
works fine if I use the buttons. 

My requirement is that when I click on any one value of the list box,
the form should get submitted. I am trying to use Javascript to do the
same. 

In the onclick of the select html:select, I have a function called
submit() 

The submit function looks like this



script language=text/javascript
   function submit() {
   document.form.action =
http://localhost:8081/createContentAction.do
   document.form.submit()
   }
/script 

And my form action is 

html:form  action=/createContentAction





When I click any value in the drop down, I get this error :

javax.servlet.ServletException: Request[/createContentAction] does not
contain handler parameter named action
at
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:199)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:226)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)
Can anyone pls tell me where am I going wrong or what more needs to be
done ??
TIA
Shishir
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


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


RE: Form submission through java script

2003-11-10 Thread Shishir K. Singh
Initially, I was trying that. I got the same error. 

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 5:36 PM
To: Struts Users Mailing List
Subject: Re: Form submission through java script

Why are you setting the document.form.action? Just call
document.form.submit() - the JavaScript will automatically know what to
do and where to submit to.

Shishir K. Singh wrote:

Hi,

I have a form with one drop down menu list and two buttons (continue 
and previous ). The two buttons are hooked up to the 
LookupDispatchAction where I process the code as required by the action

of the button. Everything works fine if I use the buttons.


My requirement is that when I click on any one value of the list box, 
the form should get submitted. I am trying to use Javascript to do the 
same.

In the onclick of the select html:select, I have a function called
submit()

The submit function looks like this



script language=text/javascript
function submit() {
document.form.action =
http://localhost:8081/createContentAction.do
document.form.submit()
}

/script

 
And my form action is


html:form  action=/createContentAction





When I click any value in the drop down, I get this error :


javax.servlet.ServletException: Request[/createContentAction] does not 
contain handler parameter named action
   at
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAc
t
ion.java:199)
   at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestP
r
ocessor.java:484)
   at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java
:
274)
   at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
a
tionFilterChain.java:247)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
t
erChain.java:193)
   at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorF
i
lter.java:226)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
a
tionFilterChain.java:213)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
t
erChain.java:193)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
v
e.java:243)
   at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j
a
va:566)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
4
72)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
v
e.java:190)


Can anyone pls tell me where am I going wrong or what more needs to be 
done ??

TIA
Shishir

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

  


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



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


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



RE: Form submission through java script

2003-11-10 Thread Yansheng Lin
If you do a System.out on action, you will find it's null right now.
You need to pass a valid action to the your dispatch Action so that it knows
which handler to call.

document.form.action='continue';


-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED] 
Sent: lundi 10 novembre 2003 15:33
To: Struts Users Mailing List
Subject: Form submission through java script


Hi, 

I have a form with one drop down menu list and two buttons (continue and
previous ). The two buttons are hooked up to the LookupDispatchAction
where 
I process the code as required by the action of the button. Everything
works fine if I use the buttons. 


My requirement is that when I click on any one value of the list box,
the form should get submitted. I am trying to use Javascript to do the
same. 

In the onclick of the select html:select, I have a function called
submit() 

The submit function looks like this



script language=text/javascript
function submit() {
document.form.action =
http://localhost:8081/createContentAction.do
document.form.submit()
}

/script 

 
And my form action is 


html:form  action=/createContentAction





When I click any value in the drop down, I get this error :


javax.servlet.ServletException: Request[/createContentAction] does not
contain handler parameter named action
at
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:199)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:226)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)


Can anyone pls tell me where am I going wrong or what more needs to be
done ??

TIA
Shishir

-
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: Form submission through java script

2003-11-10 Thread Shishir K. Singh
I am getting the same error. 

The name of the button that I want to emulate is action and  the value
is Continue. Where/how do I set this parameter in the Java Script so
that the LookupDispatchAction  is able to get the value.   

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 5:42 PM
To: 'Struts Users Mailing List'
Subject: RE: Form submission through java script

If you do a System.out on action, you will find it's null right now.
You need to pass a valid action to the your dispatch Action so that it
knows which handler to call.

document.form.action='continue';


-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED]
Sent: lundi 10 novembre 2003 15:33
To: Struts Users Mailing List
Subject: Form submission through java script


Hi, 

I have a form with one drop down menu list and two buttons (continue and
previous ). The two buttons are hooked up to the LookupDispatchAction
where 
I process the code as required by the action of the button. Everything
works fine if I use the buttons. 


My requirement is that when I click on any one value of the list box,
the form should get submitted. I am trying to use Javascript to do the
same. 

In the onclick of the select html:select, I have a function called
submit() 

The submit function looks like this



script language=text/javascript
function submit() {
document.form.action =
http://localhost:8081/createContentAction.do
document.form.submit()
}

/script 

 
And my form action is 


html:form  action=/createContentAction





When I click any value in the drop down, I get this error :


javax.servlet.ServletException: Request[/createContentAction] does not
contain handler parameter named action
at
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:199)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:226)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)


Can anyone pls tell me where am I going wrong or what more needs to be
done ??

TIA
Shishir

-
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: Form submission through java script

2003-11-10 Thread Lynn Guy
I got this message when I DID want to change the
action.  I had to change the parameter name to xaction
and it worked.  So I'd be suspicious of the name
submit as well. Also, I had to change the action to
append the parameter and its value to get it to work
this way.  

--- Yansheng Lin [EMAIL PROTECTED] wrote:
 If you do a System.out on action, you will find it's
 null right now.
 You need to pass a valid action to the your dispatch
 Action so that it knows
 which handler to call.
 
 document.form.action='continue';
 
 
 -Original Message-
 From: Shishir K. Singh
 [mailto:[EMAIL PROTECTED] 
 Sent: lundi 10 novembre 2003 15:33
 To: Struts Users Mailing List
 Subject: Form submission through java script
 
 
 Hi, 
 
 I have a form with one drop down menu list and two
 buttons (continue and
 previous ). The two buttons are hooked up to the
 LookupDispatchAction
 where 
 I process the code as required by the action of the
 button. Everything
 works fine if I use the buttons. 
 
 
 My requirement is that when I click on any one value
 of the list box,
 the form should get submitted. I am trying to use
 Javascript to do the
 same. 
 
 In the onclick of the select html:select, I have a
 function called
 submit() 
 
 The submit function looks like this
 
 
 
 script language=text/javascript
 function submit() {
 document.form.action =
 http://localhost:8081/createContentAction.do
 document.form.submit()
 }
 
 /script 
 
  
 And my form action is 
 
 
 html:form  action=/createContentAction
 
 
 
 
 
 When I click any value in the drop down, I get this
 error :
 
 
 javax.servlet.ServletException:
 Request[/createContentAction] does not
 contain handler parameter named action
   at

org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
 ion.java:199)
   at

org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
 ocessor.java:484)
   at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
 274)
   at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at

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

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

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

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

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
 lter.java:226)
   at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:213)
   at

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

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

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

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

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

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:190)
 
 
 Can anyone pls tell me where am I going wrong or
 what more needs to be
 done ??
 
 TIA
 Shishir
 

-
 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: Form submission through java script

2003-11-10 Thread Shishir K. Singh
Will appreciate it if you could show how to append the params and it's
value.  

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 6:44 PM
To: Struts Users Mailing List
Subject: RE: Form submission through java script

I got this message when I DID want to change the action.  I had to
change the parameter name to xaction and it worked.  So I'd be
suspicious of the name submit as well. Also, I had to change the
action to append the parameter and its value to get it to work this way.


--- Yansheng Lin [EMAIL PROTECTED] wrote:
 If you do a System.out on action, you will find it's null right now.
 You need to pass a valid action to the your dispatch Action so that it

 knows which handler to call.
 
 document.form.action='continue';
 
 
 -Original Message-
 From: Shishir K. Singh
 [mailto:[EMAIL PROTECTED]
 Sent: lundi 10 novembre 2003 15:33
 To: Struts Users Mailing List
 Subject: Form submission through java script
 
 
 Hi,
 
 I have a form with one drop down menu list and two buttons (continue 
 and previous ). The two buttons are hooked up to the 
 LookupDispatchAction where I process the code as required by the 
 action of the button. Everything works fine if I use the buttons.
 
 
 My requirement is that when I click on any one value of the list box, 
 the form should get submitted. I am trying to use Javascript to do the

 same.
 
 In the onclick of the select html:select, I have a function called
 submit()
 
 The submit function looks like this
 
 
 
 script language=text/javascript
 function submit() {
 document.form.action =
 http://localhost:8081/createContentAction.do
 document.form.submit()
 }
 
 /script
 
  
 And my form action is
 
 
 html:form  action=/createContentAction
 
 
 
 
 
 When I click any value in the drop down, I get this error :
 
 
 javax.servlet.ServletException:
 Request[/createContentAction] does not contain handler parameter named

 action
   at

org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
 ion.java:199)
   at

org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
 ocessor.java:484)
   at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
 274)
   at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at

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

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

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

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

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
 lter.java:226)
   at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:213)
   at

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

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

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

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

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

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:190)
 
 
 Can anyone pls tell me where am I going wrong or what more needs to be

 done ??
 
 TIA
 Shishir
 

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

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


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


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



RE: Form submission through java script

2003-11-10 Thread Lynn Guy
script language=text/javascript
function submit() {
document.form.action =
http://localhost:8081/createContentAction.do?action=Continue;;
document.form.submit()
}

/script 

but note:  I had to change the parameter name from
action to something else because the button named
action seems to conflict with the property action
on the form and I kept getting errors.

--- Shishir K. Singh [EMAIL PROTECTED]
wrote:
 I am getting the same error. 
 
 The name of the button that I want to emulate is
 action and  the value
 is Continue. Where/how do I set this parameter in
 the Java Script so
 that the LookupDispatchAction  is able to get the
 value.   
 
 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 10, 2003 5:42 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Form submission through java script
 
 If you do a System.out on action, you will find it's
 null right now.
 You need to pass a valid action to the your dispatch
 Action so that it
 knows which handler to call.
 
 document.form.action='continue';
 
 
 -Original Message-
 From: Shishir K. Singh
 [mailto:[EMAIL PROTECTED]
 Sent: lundi 10 novembre 2003 15:33
 To: Struts Users Mailing List
 Subject: Form submission through java script
 
 
 Hi, 
 
 I have a form with one drop down menu list and two
 buttons (continue and
 previous ). The two buttons are hooked up to the
 LookupDispatchAction
 where 
 I process the code as required by the action of the
 button. Everything
 works fine if I use the buttons. 
 
 
 My requirement is that when I click on any one value
 of the list box,
 the form should get submitted. I am trying to use
 Javascript to do the
 same. 
 
 In the onclick of the select html:select, I have a
 function called
 submit() 
 
 The submit function looks like this
 
 
 
 script language=text/javascript
 function submit() {
 document.form.action =
 http://localhost:8081/createContentAction.do
 document.form.submit()
 }
 
 /script 
 
  
 And my form action is 
 
 
 html:form  action=/createContentAction
 
 
 
 
 
 When I click any value in the drop down, I get this
 error :
 
 
 javax.servlet.ServletException:
 Request[/createContentAction] does not
 contain handler parameter named action
   at

org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
 ion.java:199)
   at

org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
 ocessor.java:484)
   at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
 274)
   at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at

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

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

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

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

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
 lter.java:226)
   at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:213)
   at

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

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

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

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

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

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:190)
 
 
 Can anyone pls tell me where am I going wrong or
 what more needs to be
 done ??
 
 TIA
 Shishir
 

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

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

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


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



RE: Form submission through java script

2003-11-10 Thread Shishir K. Singh
Thanks ..it works.  

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 6:51 PM
To: Struts Users Mailing List
Subject: RE: Form submission through java script

script language=text/javascript
function submit() {
document.form.action =
http://localhost:8081/createContentAction.do?action=Continue;;
document.form.submit()
}

/script 

but note:  I had to change the parameter name from action to something
else because the button named action seems to conflict with the
property action
on the form and I kept getting errors.

--- Shishir K. Singh [EMAIL PROTECTED]
wrote:
 I am getting the same error. 
 
 The name of the button that I want to emulate is action and  the 
 value is Continue. Where/how do I set this parameter in the Java 
 Script so that the LookupDispatchAction  is able to get the
 value.   
 
 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 10, 2003 5:42 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Form submission through java script
 
 If you do a System.out on action, you will find it's null right now.
 You need to pass a valid action to the your dispatch Action so that it

 knows which handler to call.
 
 document.form.action='continue';
 
 
 -Original Message-
 From: Shishir K. Singh
 [mailto:[EMAIL PROTECTED]
 Sent: lundi 10 novembre 2003 15:33
 To: Struts Users Mailing List
 Subject: Form submission through java script
 
 
 Hi,
 
 I have a form with one drop down menu list and two buttons (continue 
 and previous ). The two buttons are hooked up to the 
 LookupDispatchAction where I process the code as required by the 
 action of the button. Everything works fine if I use the buttons.
 
 
 My requirement is that when I click on any one value of the list box, 
 the form should get submitted. I am trying to use Javascript to do the

 same.
 
 In the onclick of the select html:select, I have a function called
 submit()
 
 The submit function looks like this
 
 
 
 script language=text/javascript
 function submit() {
 document.form.action =
 http://localhost:8081/createContentAction.do
 document.form.submit()
 }
 
 /script
 
  
 And my form action is
 
 
 html:form  action=/createContentAction
 
 
 
 
 
 When I click any value in the drop down, I get this error :
 
 
 javax.servlet.ServletException:
 Request[/createContentAction] does not contain handler parameter named

 action
   at

org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
 ion.java:199)
   at

org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
 ocessor.java:484)
   at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
 274)
   at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at

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

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

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

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

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
 lter.java:226)
   at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:213)
   at

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

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

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

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

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

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:190)
 
 
 Can anyone pls tell me where am I going wrong or what more needs to be

 done ??
 
 TIA
 Shishir
 

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

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

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


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


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

Struts form submission using POST

2003-11-04 Thread chinmay . r . parikh
How to submit a form to an external web link (not part of the current
web application)?

 

In struts action, all links are interpreted relative to web context and
therefore forward object specified in 

struts-config does not work.

 

e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{

 

ActionForward forward =
mapping.findForward(constructionPage);

}

 

// Strtus-config:

 

forward name=constructionPage
path=http://www.externalformprocessor.com/

 

Web context:  myapplication

 

URL in forward tag of the struts-config is evaluated as
/myapplication/http://www.externalformprocessor.com; which 

obviously is not a valid URL.

 

 

One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.

 

Does any one know any alternative approach to submit forms to external
sites using POST?

 

Any suggestion will be appreciated.



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.


RE: Struts form submission using POST

2003-11-04 Thread Andrew Hill
What are you actually trying to do here?
a.) Have the browser directly submit the form somewhere else
 - or -
b.) have the browser submit to *your app* first and then and forward outside
from the action?

if(a)
then your execute code is irrelevant as you wont be going through the action
on submit - What you need is to have the 'action' attribute of the pages
form tag point at the external site. (Not quite sure how you would do this
using the struts tags as Im not familiar enough with their syntax)

if(b)
You cant do this using a server side forward. It would require a client side
forward (redirect). Ive never tried this with a POST rather than a GET, but
Im assuming that since your asking about it it doesnt work?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 17:35
To: [EMAIL PROTECTED]
Subject: Struts form submission using POST


How to submit a form to an external web link (not part of the current
web application)?



In struts action, all links are interpreted relative to web context and
therefore forward object specified in

struts-config does not work.



e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{



ActionForward forward =
mapping.findForward(constructionPage);

}



// Strtus-config:



forward name=constructionPage
path=http://www.externalformprocessor.com/



Web context:  myapplication



URL in forward tag of the struts-config is evaluated as
/myapplication/http://www.externalformprocessor.com; which

obviously is not a valid URL.





One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.



Does any one know any alternative approach to submit forms to external
sites using POST?



Any suggestion will be appreciated.



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.


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



RE: Struts form submission using POST

2003-11-04 Thread chinmay . r . parikh

I am submitting a form to external site (no form processing is involved
at the client side).  All parameters that need to be passed to external
site are hidden variables on the page.

I am not sure how to use 'action' attribute of the page.  In the past I
have attempted to use html:link with action but the problem remains
the same as URL is context/application relative (as specified in the
struts doc)and therefore external links are not valid URLs.

What I have tried is that collate all parameters and submit the page
using normal html form (and not using the struts framework) but I want
to stick to struts framework throughout my application.

Server side processing (option b in your reply) works only with GET as
you can append query string parameters and then using
request.sendRedirectTo(http://abc.com ?selectedName=); but this
exposes security risk.

Any further suggestions.


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2003 09:48
To: Struts Users Mailing List
Subject: RE: Struts form submission using POST

What are you actually trying to do here?
a.) Have the browser directly submit the form somewhere else
 - or -
b.) have the browser submit to *your app* first and then and forward
outside
from the action?

if(a)
then your execute code is irrelevant as you wont be going through the
action
on submit - What you need is to have the 'action' attribute of the pages
form tag point at the external site. (Not quite sure how you would do
this
using the struts tags as Im not familiar enough with their syntax)

if(b)
You cant do this using a server side forward. It would require a client
side
forward (redirect). Ive never tried this with a POST rather than a GET,
but
Im assuming that since your asking about it it doesnt work?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 17:35
To: [EMAIL PROTECTED]
Subject: Struts form submission using POST


How to submit a form to an external web link (not part of the current
web application)?



In struts action, all links are interpreted relative to web context and
therefore forward object specified in

struts-config does not work.



e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{



ActionForward forward =
mapping.findForward(constructionPage);

}



// Strtus-config:



forward name=constructionPage
path=http://www.externalformprocessor.com/



Web context:  myapplication



URL in forward tag of the struts-config is evaluated as
/myapplication/http://www.externalformprocessor.com; which

obviously is not a valid URL.





One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.



Does any one know any alternative approach to submit forms to external
sites using POST?



Any suggestion will be appreciated.



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the
original.  Any other use of the email by you is prohibited.


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



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.

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



RE: Struts form submission using POST

2003-11-04 Thread shirishchandra.sakhare
Use struts tags for everything except for the form tag...The in the action attribute 
you can give the url to external site..

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 11:35 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Struts form submission using POST



I am submitting a form to external site (no form processing is involved
at the client side).  All parameters that need to be passed to external
site are hidden variables on the page.

I am not sure how to use 'action' attribute of the page.  In the past I
have attempted to use html:link with action but the problem remains
the same as URL is context/application relative (as specified in the
struts doc)and therefore external links are not valid URLs.

What I have tried is that collate all parameters and submit the page
using normal html form (and not using the struts framework) but I want
to stick to struts framework throughout my application.

Server side processing (option b in your reply) works only with GET as
you can append query string parameters and then using
request.sendRedirectTo(http://abc.com ?selectedName=); but this
exposes security risk.

Any further suggestions.


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2003 09:48
To: Struts Users Mailing List
Subject: RE: Struts form submission using POST

What are you actually trying to do here?
a.) Have the browser directly submit the form somewhere else
 - or -
b.) have the browser submit to *your app* first and then and forward
outside
from the action?

if(a)
then your execute code is irrelevant as you wont be going through the
action
on submit - What you need is to have the 'action' attribute of the pages
form tag point at the external site. (Not quite sure how you would do
this
using the struts tags as Im not familiar enough with their syntax)

if(b)
You cant do this using a server side forward. It would require a client
side
forward (redirect). Ive never tried this with a POST rather than a GET,
but
Im assuming that since your asking about it it doesnt work?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 17:35
To: [EMAIL PROTECTED]
Subject: Struts form submission using POST


How to submit a form to an external web link (not part of the current
web application)?



In struts action, all links are interpreted relative to web context and
therefore forward object specified in

struts-config does not work.



e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{



ActionForward forward =
mapping.findForward(constructionPage);

}



// Strtus-config:



forward name=constructionPage
path=http://www.externalformprocessor.com/



Web context:  myapplication



URL in forward tag of the struts-config is evaluated as
/myapplication/http://www.externalformprocessor.com; which

obviously is not a valid URL.





One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.



Does any one know any alternative approach to submit forms to external
sites using POST?



Any suggestion will be appreciated.



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the
original.  Any other use of the email by you is prohibited.


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



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.

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



Third party form submission

2003-11-03 Thread chinmay . r . parikh
Hi

 

I want to submit a form to third party web site using POST method.

 

However, struts action class always evaluates URL specified in the
config file as relative URL.  i.e http://thirdparty.com
http://thirdparty.com/  is read as /http://thirdpary.com and therefore
I could not use forward in action.

 

I tried using [HTTPServletResponse]
response.sendRedirect(http://thirdparty.com http://thirdparty.com/ )
but I am not sure if parameters set in the form will get passed by this
method.

 

Any suggestions will be appreciated.

 

Regards

 

Chinmay

 

 

 

 

 



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.


action form submission

2003-10-06 Thread Nisith Dash



Hi ,

can anybody tell me how i can usea _javascript_ 
in my JSP page to open a new pop up window and at the same time submit my parent 
action form to this new popup window.As such I am not able toreference 
this action form within the action class defined for the pop up window. 




Any help..

Thanks
Nisith


** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm
** No virus found in attached file noname.htm

NO VIRUS FOUND: SERVER GENERATED MESSAGE
* End of message ***


DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery of the message to such person) and may contain legally privileged and 
confidential information belonging to Tata Consultancy Services. It must not be 
printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever 
manner) by any person other than the addressee. Unauthorized use, disclosure or 
copying is strictly prohibited and may constitute unlawful act and can possibly 
attract legal action, civil and/or criminal. The contents of this message need not 
necessarily reflect or endorse the views of Tata Consultancy Services on any subject 
matter. Any action taken or omitted to be taken based on this message is entirely at 
your risk and neither the originator of this message nor Tata Consultancy Services 
takes any responsibility or liability towards the same. Opinions, conclusions and any 
other information contained in this message that do not relate to the official 
business of Tata Consultancy Services shall be understood as neither given nor 
endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. 
If you have received this message in error, you should destroy this message and may 
please notify the sender by e-mail. Thank you.


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

RE: Refreshing Form Submission and Duplicates

2003-09-19 Thread John Reynolds
Shane, exactly what I was looking for and unable to find. Thanks!

JR

 -Original Message-
 From: Shane Mingins [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 18, 2003 10:26 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Refreshing Form Submission and Duplicates
 
 I noticed this the other day at http://husted.com/struts/catalog.html
 
 Use the Action Token methods to prevent duplicate submits
 
 There are methods built into the Struts action to generate one-use
tokens.
 A
 token is placed in the session when a form is populated and also into
the
 HTML form as a hidden property. When the form is returned, the token
is
 validated. If validation fails, then the form has already been
submitted,
 and the user can be apprised.
 
 - saveToken(request)
 - on the return trip,
   isTokenValid(request)
   resetToken(request)
 
 
 I am not sure if that is of any help as I have yet to use it ...
although
 I
 have just this minute found a case in my own application to do so ;-
 
 Shane
 
 
 
  -Original Message-
  From: John Reynolds [mailto:[EMAIL PROTECTED]
  Sent: Friday, 19 September 2003 2:16 p.m.
  To: [EMAIL PROTECTED]
  Subject: Refreshing Form Submission and Duplicates
 
  Hi,
 
  I have a question about a bug in my application using a Struts Form.
  This happens in multiple areas of my site, but the one example I
will
  use is a Message Board feature. The problem is that when a user goes
to
  a list of messages, fills out the form to post a message and ends up
  back on the list page, the message will be submitted twice if they
  refresh the page following the form submission. this has caused
  duplicate messages throughout the message board, as it is the nature
of
  message boards to refresh the list of messages often to check for
new
  ones. Keep in mind, my app strictly follows the approach of the
O'Reilly
  book.
 
  I'll try to make this easy to follow:
 
  1. the user goes to a message board with a list of messages from
other
  users. this page is /messagelist.do the action looks like this:
 
action
  path=/messagelist
  name=messageListForm
  type=myapp.framework.actions.MessageListAction
  scope=request
  forward name=Success
path=/templates/messagelist.jsp/
/action
 
  (the messageListForm is a struts form bean with a List of message
  objects)
 
  2. at the bottom of the page is a form to post your own message 3.
the
  user enters their Name, Subject and Message Body and submit the form
4.
  the form is processed by a Struts Action. the action tag in
  struts-config.xml looks like this:
 
action
  path=/messageinsert
  name=messageDetailForm
  type=myapp.framework.actions.MessageInsertAction
  scope=request
  validate=false
  forward name=Success path=/messagelist.do/
/action
 
  - From the naming convention, you can see that the Action inserts
the
  message into storage (database) and upon success the user is
forwarded
  to the same /messagelist.do action
 
  Now, when the form is submitted and this is displayed, the URL in
the
  browser says:
 
  http://myapp.com/myapp/messageinsert.do
 
  I expect that this is correct because the HTML form itself was form
  action=/messageinsert.do method=POST.
 
  The user's submitted message will be found on the list of messages.
  HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE WILL BE SUBMITTED
  AGAIN. This should not happen. If i'm the customer, i've already
  submitted the form, and now i'm seeing a list of messages.
refreshing
  should have no effect on the form that i just submitted.
 
  Does anyone have a suggested fix?
 
  Thanks all,
 
  JR
 
 
 
 -
 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: Refreshing Form Submission and Duplicates

2003-09-19 Thread srikanth
I like to use the combination of two.
For data that is sensitive and should not be submitted
twice, I use sync token and also a http redirect.
For data that can be submitted twice, I just use the
redirect.

For a casual user who accidentally tries to resubmit by
pressing refresh, redirect should suffice. He will not
get any error.
However when the user is adamant and tries to back by
using the browser history, sync token is needed.

I havent found any problems with the fact that redirect
makes an extra trip to the client.

Cheers,
Srikanth

On Fri, 19 Sep 2003, Mohd Amin Mohd Din wrote:

 Date: Fri, 19 Sep 2003 10:42:13 +0800
 From: Mohd Amin Mohd Din [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL
PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: Refreshing Form Submission and Duplicates

 An easier way would be to do a redirect once
submitting the form to
 listing the page.


Redirect doesn't stop the user from pressing the back
button (or working
their way back the Go menu) and submitting the form
again.

Craig


 -Original Message-
 From: Shane Mingins [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 19, 2003 10:26 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Refreshing Form Submission and Duplicates

 I noticed this the other day at
http://husted.com/struts/catalog.html

 Use the Action Token methods to prevent duplicate
submits

 There are methods built into the Struts action to
generate one-use
 tokens. A
 token is placed in the session when a form is
populated and also into
 the
 HTML form as a hidden property. When the form is
returned, the token is
 validated. If validation fails, then the form has
already been
 submitted,
 and the user can be apprised.

 - saveToken(request)
 - on the return trip,
   isTokenValid(request)
   resetToken(request)


 I am not sure if that is of any help as I have yet to
use it ...
 although I
 have just this minute found a case in my own
application to do so ;-

 Shane



  -Original Message-
  From: John Reynolds [mailto:[EMAIL PROTECTED]
  Sent: Friday, 19 September 2003 2:16 p.m.
  To: [EMAIL PROTECTED]
  Subject: Refreshing Form Submission and Duplicates
 
  Hi,
 
  I have a question about a bug in my application
using a Struts Form.
  This happens in multiple areas of my site, but the
one example I will
  use is a Message Board feature. The problem is that
when a user goes
 to
  a list of messages, fills out the form to post a
message and ends up
  back on the list page, the message will be
submitted twice if they
  refresh the page following the form submission.
this has caused
  duplicate messages throughout the message board, as
it is the nature
 of
  message boards to refresh the list of messages
often to check for new
  ones. Keep in mind, my app strictly follows the
approach of the
 O'Reilly
  book.
 
  I'll try to make this easy to follow:
 
  1. the user goes to a message board with a list of
messages from other
  users. this page is /messagelist.do the action
looks like this:
 
action
  path=/messagelist
  name=messageListForm
 
type=myapp.framework.actions.MessageListAction
  scope=request
  forward name=Success
 path=/templates/messagelist.jsp/
/action
 
  (the messageListForm is a struts form bean with a
List of message
  objects)
 
  2. at the bottom of the page is a form to post your
own message 3. the
  user enters their Name, Subject and Message Body
and submit the form
 4.
  the form is processed by a Struts Action. the
action tag in
  struts-config.xml looks like this:
 
action
  path=/messageinsert
  name=messageDetailForm
 
type=myapp.framework.actions.MessageInsertAction
  scope=request
  validate=false
  forward name=Success
path=/messagelist.do/
/action
 
  - From the naming convention, you can see that the
Action inserts the
  message into storage (database) and upon success
the user is forwarded
  to the same /messagelist.do action
 
  Now, when the form is submitted and this is
displayed, the URL in the
  browser says:
 
  http://myapp.com/myapp/messageinsert.do
 
  I expect that this is correct because the HTML form
itself was form
  action=/messageinsert.do method=POST.
 
  The user's submitted message will be found on the
list of messages.
  HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE
WILL BE SUBMITTED
  AGAIN. This should not happen. If i'm the customer,
i've already
  submitted the form, and now i'm seeing a list of
messages. refreshing
  should have no effect on the form that i just
submitted.
 
  Does anyone have a suggested fix?
 
  Thanks all,
 
  JR
 
 

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



RE: Refreshing Form Submission and Duplicates

2003-09-19 Thread Mainguy, Mike
I.E. in your Action Class
Public ActionMapping execute
...

boolean isValidSynchronizerToken= isTokenValid(request);
this.saveToken(request);
if (request.getMethod().equals(POST))
if (isValidSynchronizerToken) {
   return doPost();
} else {
   return doGet();  
}

} else {
return doGet();
}


private ActionMapping doGet() {

}
private ActionMapping doPost() {

}
...

-Original Message-
From: Shane Mingins [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 18, 2003 10:26 PM
To: 'Struts Users Mailing List'
Subject: RE: Refreshing Form Submission and Duplicates


I noticed this the other day at http://husted.com/struts/catalog.html

Use the Action Token methods to prevent duplicate submits

There are methods built into the Struts action to generate one-use tokens. A
token is placed in the session when a form is populated and also into the
HTML form as a hidden property. When the form is returned, the token is
validated. If validation fails, then the form has already been submitted,
and the user can be apprised. 

- saveToken(request) 
- on the return trip, 
isTokenValid(request) 
resetToken(request)


I am not sure if that is of any help as I have yet to use it ... although I
have just this minute found a case in my own application to do so ;-

Shane



 -Original Message-
 From: John Reynolds [mailto:[EMAIL PROTECTED]
 Sent: Friday, 19 September 2003 2:16 p.m.
 To: [EMAIL PROTECTED]
 Subject: Refreshing Form Submission and Duplicates
 
 Hi,
 
 I have a question about a bug in my application using a Struts Form. 
 This happens in multiple areas of my site, but the one example I will 
 use is a Message Board feature. The problem is that when a user goes 
 to a list of messages, fills out the form to post a message and ends 
 up back on the list page, the message will be submitted twice if they 
 refresh the page following the form submission. this has caused 
 duplicate messages throughout the message board, as it is the nature 
 of message boards to refresh the list of messages often to check for 
 new ones. Keep in mind, my app strictly follows the approach of the 
 O'Reilly book.
 
 I'll try to make this easy to follow:
 
 1. the user goes to a message board with a list of messages from other 
 users. this page is /messagelist.do the action looks like this:
 
   action
 path=/messagelist
 name=messageListForm
 type=myapp.framework.actions.MessageListAction
 scope=request
 forward name=Success path=/templates/messagelist.jsp/
   /action
 
 (the messageListForm is a struts form bean with a List of message
 objects)
 
 2. at the bottom of the page is a form to post your own message 3. the 
 user enters their Name, Subject and Message Body and submit the form 
 4. the form is processed by a Struts Action. the action tag in 
 struts-config.xml looks like this:
 
   action
 path=/messageinsert
 name=messageDetailForm
 type=myapp.framework.actions.MessageInsertAction
 scope=request
 validate=false
 forward name=Success path=/messagelist.do/
   /action
 
 - From the naming convention, you can see that the Action inserts the 
 message into storage (database) and upon success the user is forwarded 
 to the same /messagelist.do action
 
 Now, when the form is submitted and this is displayed, the URL in the 
 browser says:
 
 http://myapp.com/myapp/messageinsert.do
 
 I expect that this is correct because the HTML form itself was form 
 action=/messageinsert.do method=POST.
 
 The user's submitted message will be found on the list of messages. 
 HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE WILL BE SUBMITTED 
 AGAIN. This should not happen. If i'm the customer, i've already 
 submitted the form, and now i'm seeing a list of messages. refreshing 
 should have no effect on the form that i just submitted.
 
 Does anyone have a suggested fix?
 
 Thanks all,
 
 JR
 
 

-
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

Refreshing Form Submission and Duplicates

2003-09-18 Thread John Reynolds
Hi,
 
I have a question about a bug in my application using a Struts Form.
This happens in multiple areas of my site, but the one example I will
use is a Message Board feature. The problem is that when a user goes to
a list of messages, fills out the form to post a message and ends up
back on the list page, the message will be submitted twice if they
refresh the page following the form submission. this has caused
duplicate messages throughout the message board, as it is the nature of
message boards to refresh the list of messages often to check for new
ones. Keep in mind, my app strictly follows the approach of the O'Reilly
book.
 
I'll try to make this easy to follow:
 
1. the user goes to a message board with a list of messages from other
users. this page is /messagelist.do the action looks like this:
 
  action 
path=/messagelist 
name=messageListForm 
type=myapp.framework.actions.MessageListAction 
scope=request
forward name=Success path=/templates/messagelist.jsp/
  /action
 
(the messageListForm is a struts form bean with a List of message
objects)
 
2. at the bottom of the page is a form to post your own message 3. the
user enters their Name, Subject and Message Body and submit the form 4.
the form is processed by a Struts Action. the action tag in
struts-config.xml looks like this:
 
  action 
path=/messageinsert 
name=messageDetailForm 
type=myapp.framework.actions.MessageInsertAction 
scope=request 
validate=false
forward name=Success path=/messagelist.do/
  /action
 
- From the naming convention, you can see that the Action inserts the
message into storage (database) and upon success the user is forwarded
to the same /messagelist.do action
 
Now, when the form is submitted and this is displayed, the URL in the
browser says:
 
http://myapp.com/myapp/messageinsert.do
 
I expect that this is correct because the HTML form itself was form
action=/messageinsert.do method=POST.
 
The user's submitted message will be found on the list of messages.
HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE WILL BE SUBMITTED
AGAIN. This should not happen. If i'm the customer, i've already
submitted the form, and now i'm seeing a list of messages. refreshing
should have no effect on the form that i just submitted.
 
Does anyone have a suggested fix?
 
Thanks all,
 
JR
 
 


RE: Refreshing Form Submission and Duplicates

2003-09-18 Thread Shane Mingins
I noticed this the other day at http://husted.com/struts/catalog.html

Use the Action Token methods to prevent duplicate submits

There are methods built into the Struts action to generate one-use tokens. A
token is placed in the session when a form is populated and also into the
HTML form as a hidden property. When the form is returned, the token is
validated. If validation fails, then the form has already been submitted,
and the user can be apprised. 

- saveToken(request) 
- on the return trip, 
isTokenValid(request) 
resetToken(request)


I am not sure if that is of any help as I have yet to use it ... although I
have just this minute found a case in my own application to do so ;-

Shane



 -Original Message-
 From: John Reynolds [mailto:[EMAIL PROTECTED]
 Sent: Friday, 19 September 2003 2:16 p.m.
 To: [EMAIL PROTECTED]
 Subject: Refreshing Form Submission and Duplicates
 
 Hi,
 
 I have a question about a bug in my application using a Struts Form.
 This happens in multiple areas of my site, but the one example I will
 use is a Message Board feature. The problem is that when a user goes to
 a list of messages, fills out the form to post a message and ends up
 back on the list page, the message will be submitted twice if they
 refresh the page following the form submission. this has caused
 duplicate messages throughout the message board, as it is the nature of
 message boards to refresh the list of messages often to check for new
 ones. Keep in mind, my app strictly follows the approach of the O'Reilly
 book.
 
 I'll try to make this easy to follow:
 
 1. the user goes to a message board with a list of messages from other
 users. this page is /messagelist.do the action looks like this:
 
   action
 path=/messagelist
 name=messageListForm
 type=myapp.framework.actions.MessageListAction
 scope=request
 forward name=Success path=/templates/messagelist.jsp/
   /action
 
 (the messageListForm is a struts form bean with a List of message
 objects)
 
 2. at the bottom of the page is a form to post your own message 3. the
 user enters their Name, Subject and Message Body and submit the form 4.
 the form is processed by a Struts Action. the action tag in
 struts-config.xml looks like this:
 
   action
 path=/messageinsert
 name=messageDetailForm
 type=myapp.framework.actions.MessageInsertAction
 scope=request
 validate=false
 forward name=Success path=/messagelist.do/
   /action
 
 - From the naming convention, you can see that the Action inserts the
 message into storage (database) and upon success the user is forwarded
 to the same /messagelist.do action
 
 Now, when the form is submitted and this is displayed, the URL in the
 browser says:
 
 http://myapp.com/myapp/messageinsert.do
 
 I expect that this is correct because the HTML form itself was form
 action=/messageinsert.do method=POST.
 
 The user's submitted message will be found on the list of messages.
 HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE WILL BE SUBMITTED
 AGAIN. This should not happen. If i'm the customer, i've already
 submitted the form, and now i'm seeing a list of messages. refreshing
 should have no effect on the form that i just submitted.
 
 Does anyone have a suggested fix?
 
 Thanks all,
 
 JR
 
 

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



RE: Refreshing Form Submission and Duplicates

2003-09-18 Thread Mohd Amin Mohd Din
An easier way would be to do a redirect once submitting the form to
listing the page.

-Original Message-
From: Shane Mingins [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 10:26 AM
To: 'Struts Users Mailing List'
Subject: RE: Refreshing Form Submission and Duplicates

I noticed this the other day at http://husted.com/struts/catalog.html

Use the Action Token methods to prevent duplicate submits

There are methods built into the Struts action to generate one-use
tokens. A
token is placed in the session when a form is populated and also into
the
HTML form as a hidden property. When the form is returned, the token is
validated. If validation fails, then the form has already been
submitted,
and the user can be apprised. 

- saveToken(request) 
- on the return trip, 
isTokenValid(request) 
resetToken(request)


I am not sure if that is of any help as I have yet to use it ...
although I
have just this minute found a case in my own application to do so ;-

Shane



 -Original Message-
 From: John Reynolds [mailto:[EMAIL PROTECTED]
 Sent: Friday, 19 September 2003 2:16 p.m.
 To: [EMAIL PROTECTED]
 Subject: Refreshing Form Submission and Duplicates
 
 Hi,
 
 I have a question about a bug in my application using a Struts Form.
 This happens in multiple areas of my site, but the one example I will
 use is a Message Board feature. The problem is that when a user goes
to
 a list of messages, fills out the form to post a message and ends up
 back on the list page, the message will be submitted twice if they
 refresh the page following the form submission. this has caused
 duplicate messages throughout the message board, as it is the nature
of
 message boards to refresh the list of messages often to check for new
 ones. Keep in mind, my app strictly follows the approach of the
O'Reilly
 book.
 
 I'll try to make this easy to follow:
 
 1. the user goes to a message board with a list of messages from other
 users. this page is /messagelist.do the action looks like this:
 
   action
 path=/messagelist
 name=messageListForm
 type=myapp.framework.actions.MessageListAction
 scope=request
 forward name=Success
path=/templates/messagelist.jsp/
   /action
 
 (the messageListForm is a struts form bean with a List of message
 objects)
 
 2. at the bottom of the page is a form to post your own message 3. the
 user enters their Name, Subject and Message Body and submit the form
4.
 the form is processed by a Struts Action. the action tag in
 struts-config.xml looks like this:
 
   action
 path=/messageinsert
 name=messageDetailForm
 type=myapp.framework.actions.MessageInsertAction
 scope=request
 validate=false
 forward name=Success path=/messagelist.do/
   /action
 
 - From the naming convention, you can see that the Action inserts the
 message into storage (database) and upon success the user is forwarded
 to the same /messagelist.do action
 
 Now, when the form is submitted and this is displayed, the URL in the
 browser says:
 
 http://myapp.com/myapp/messageinsert.do
 
 I expect that this is correct because the HTML form itself was form
 action=/messageinsert.do method=POST.
 
 The user's submitted message will be found on the list of messages.
 HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE WILL BE SUBMITTED
 AGAIN. This should not happen. If i'm the customer, i've already
 submitted the form, and now i'm seeing a list of messages. refreshing
 should have no effect on the form that i just submitted.
 
 Does anyone have a suggested fix?
 
 Thanks all,
 
 JR
 
 

-
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: Refreshing Form Submission and Duplicates

2003-09-18 Thread Craig R. McClanahan
On Fri, 19 Sep 2003, Mohd Amin Mohd Din wrote:

 Date: Fri, 19 Sep 2003 10:42:13 +0800
 From: Mohd Amin Mohd Din [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: Refreshing Form Submission and Duplicates

 An easier way would be to do a redirect once submitting the form to
 listing the page.


Redirect doesn't stop the user from pressing the back button (or working
their way back the Go menu) and submitting the form again.

Craig


 -Original Message-
 From: Shane Mingins [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 19, 2003 10:26 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Refreshing Form Submission and Duplicates

 I noticed this the other day at http://husted.com/struts/catalog.html

 Use the Action Token methods to prevent duplicate submits

 There are methods built into the Struts action to generate one-use
 tokens. A
 token is placed in the session when a form is populated and also into
 the
 HTML form as a hidden property. When the form is returned, the token is
 validated. If validation fails, then the form has already been
 submitted,
 and the user can be apprised.

 - saveToken(request)
 - on the return trip,
   isTokenValid(request)
   resetToken(request)


 I am not sure if that is of any help as I have yet to use it ...
 although I
 have just this minute found a case in my own application to do so ;-

 Shane



  -Original Message-
  From: John Reynolds [mailto:[EMAIL PROTECTED]
  Sent: Friday, 19 September 2003 2:16 p.m.
  To: [EMAIL PROTECTED]
  Subject: Refreshing Form Submission and Duplicates
 
  Hi,
 
  I have a question about a bug in my application using a Struts Form.
  This happens in multiple areas of my site, but the one example I will
  use is a Message Board feature. The problem is that when a user goes
 to
  a list of messages, fills out the form to post a message and ends up
  back on the list page, the message will be submitted twice if they
  refresh the page following the form submission. this has caused
  duplicate messages throughout the message board, as it is the nature
 of
  message boards to refresh the list of messages often to check for new
  ones. Keep in mind, my app strictly follows the approach of the
 O'Reilly
  book.
 
  I'll try to make this easy to follow:
 
  1. the user goes to a message board with a list of messages from other
  users. this page is /messagelist.do the action looks like this:
 
action
  path=/messagelist
  name=messageListForm
  type=myapp.framework.actions.MessageListAction
  scope=request
  forward name=Success
 path=/templates/messagelist.jsp/
/action
 
  (the messageListForm is a struts form bean with a List of message
  objects)
 
  2. at the bottom of the page is a form to post your own message 3. the
  user enters their Name, Subject and Message Body and submit the form
 4.
  the form is processed by a Struts Action. the action tag in
  struts-config.xml looks like this:
 
action
  path=/messageinsert
  name=messageDetailForm
  type=myapp.framework.actions.MessageInsertAction
  scope=request
  validate=false
  forward name=Success path=/messagelist.do/
/action
 
  - From the naming convention, you can see that the Action inserts the
  message into storage (database) and upon success the user is forwarded
  to the same /messagelist.do action
 
  Now, when the form is submitted and this is displayed, the URL in the
  browser says:
 
  http://myapp.com/myapp/messageinsert.do
 
  I expect that this is correct because the HTML form itself was form
  action=/messageinsert.do method=POST.
 
  The user's submitted message will be found on the list of messages.
  HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE WILL BE SUBMITTED
  AGAIN. This should not happen. If i'm the customer, i've already
  submitted the form, and now i'm seeing a list of messages. refreshing
  should have no effect on the form that i just submitted.
 
  Does anyone have a suggested fix?
 
  Thanks all,
 
  JR
 
 

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



Problem with form submission

2003-01-08 Thread Suresh Addagalla
Title: Message



Hi,

I am 
facing a problem when submitting a form which contains a combo box 
("select").

While 
populating the combo box, I use a form-bean (DynaActionForm) containing a Vector 
to populate the combo box. When I submit the form (to the same action so that 
the same page is displayed with a different list), the selected value goes as a 
String. Struts is trying to assign this String to the 
Vector and it's throwing the following 
error:

org.apache.commons.beanutils.ConversionException: Cannot assign value 
of type 'java.lang.String' to property 'serviceSets' of type 
'java.util.Vector'
Any 
help is greatly appreciated.

Thanks,
Suresh
**Disclaimer

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

***


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


Re: Problem with form submission

2003-01-08 Thread Iris
What is your jsp code ?

Suresh Addagalla wrote:


Hi,
 
I am facing a problem when submitting a form which contains a combo 
box (select).
 
While populating the combo box, I use a form-bean (DynaActionForm) 
containing a Vector to populate the combo box. When I submit the form 
(to the same action so that the same page is displayed with a 
different list), the selected value goes as a String. Struts is trying 
to assign this *String* to the *Vector* and it's throwing the 
following error:
 
org.apache.commons.beanutils.ConversionException: Cannot assign value 
of type 'java.lang.String' to property 'serviceSets' of type 
'java.util.Vector'
Any help is greatly appreciated.
 
Thanks,
Suresh

 



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





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




RE: Problem with form submission

2003-01-08 Thread Suresh Addagalla
Hi,

Attached is services.jsp. It mainly access the form-bean containing two
Vector and displays two combo boxes.

The flow is as follows. 

services.do populates the 2 vectors in servicesForm (DynaActionForm) and
forwards to services.jsp. Services.jsp accesses the servicesForm and
displays the contents of 2 vectors as two combo boxes. When the user
selects one entry from the first combo box, I need to submit this so
that the second combo box is updated as per the selection made in the
first combo box. For this, I am submitting to searchServices.do, which
is associated with searchServicesForm (again a DynaActionForm with two
String varaiables for holding the selections from two combo boxes).

Thanks,
Suresh

-Original Message-
From: Iris [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 08, 2003 2:07 PM
To: Struts Users Mailing List
Subject: Re: Problem with form submission


What is your jsp code ?

Suresh Addagalla wrote:

 Hi,
  
 I am facing a problem when submitting a form which contains a combo 
 box (select).
  
 While populating the combo box, I use a form-bean (DynaActionForm) 
 containing a Vector to populate the combo box. When I submit 
the form 
 (to the same action so that the same page is displayed with a 
 different list), the selected value goes as a String. Struts 
is trying 
 to assign this *String* to the *Vector* and it's throwing the 
 following error:
  
 org.apache.commons.beanutils.ConversionException: Cannot 
assign value 
 of type 'java.lang.String' to property 'serviceSets' of type 
 'java.util.Vector'
 Any help is greatly appreciated.
  
 Thanks,
 Suresh

  

--
--

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





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




services.jsp
Description: Binary data
**Disclaimer

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

***


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


Re: Problem with form submission

2003-01-08 Thread Iris
I think the problem is that the property of your select (serviceSets) is 
a Vector,
it must be a String if the select is not multiple.
The property of the select is where the result is submitted, so it must 
be a String (if not multiple)
or an array (if multiple). Only the collection of the option must be a 
collection.

Did I understand your code ?

Iris

Suresh Addagalla wrote:

Hi,

Attached is services.jsp. It mainly access the form-bean containing two
Vector and displays two combo boxes.

The flow is as follows. 

services.do populates the 2 vectors in servicesForm (DynaActionForm) and
forwards to services.jsp. Services.jsp accesses the servicesForm and
displays the contents of 2 vectors as two combo boxes. When the user
selects one entry from the first combo box, I need to submit this so
that the second combo box is updated as per the selection made in the
first combo box. For this, I am submitting to searchServices.do, which
is associated with searchServicesForm (again a DynaActionForm with two
String varaiables for holding the selections from two combo boxes).

Thanks,
Suresh

 

-Original Message-
From: Iris [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 08, 2003 2:07 PM
To: Struts Users Mailing List
Subject: Re: Problem with form submission


What is your jsp code ?

Suresh Addagalla wrote:

   

Hi,

I am facing a problem when submitting a form which contains a combo 
box (select).

While populating the combo box, I use a form-bean (DynaActionForm) 
containing a Vector to populate the combo box. When I submit 
 

the form 
   

(to the same action so that the same page is displayed with a 
different list), the selected value goes as a String. Struts 
 

is trying 
   

to assign this *String* to the *Vector* and it's throwing the 
following error:

org.apache.commons.beanutils.ConversionException: Cannot 
 

assign value 
   

of type 'java.lang.String' to property 'serviceSets' of type 
'java.util.Vector'
Any help is greatly appreciated.

Thanks,
Suresh



--
 

--
   

--
To unsubscribe, e-mail:   
 

mailto:struts-user-[EMAIL PROTECTED]
   

For 
 

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



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

   



**Disclaimer

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

***

   



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





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




Re: Form submission

2002-10-22 Thread Kyrre Lugg
James Mitchell wrote:

Better question.  What are you trying to do?


I just want to replace the submit button with an anchor.

Kyrre Lugg


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Form submission

2002-10-22 Thread Andrew Hill
a href=javascript:document.forms[0].submit();Submit/a

Forgot the syntax for doing it with the link tag, but very similar.

-Original Message-
From: Kyrre Lugg [mailto:kyrre.lugg;tomra.no]
Sent: Tuesday, October 22, 2002 16:50
To: Struts Users Mailing List
Subject: Re: Form submission


James Mitchell wrote:
 Better question.  What are you trying to do?

I just want to replace the submit button with an anchor.

Kyrre Lugg


--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: Form submission

2002-10-22 Thread Kyrre Lugg
Andrew Hill wrote:

a href=javascript:document.forms[0].submit();Submit/a


Thanx for your suggestion, but unfortunately javascript is not an option.

Kyrre Lugg


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Form submission

2002-10-22 Thread Andrew Hill
Hmm. Any chance you are in a position to be able to append the parameters to
the url:
a href=scooby.do?name=bobphone=12345x=ySubmit/a
Of course this href is constant so if you actually need to have those values
editable by the user then this idea wont be much use to you... (Which I
believe is the case here) :-(

I cant think of any other non-js way to submit a form via an anchor.

Maybe you could use an image that looks like an anchor?
Or a button that looks like an anchor thanks to some tricky css stuff?

-Original Message-
From: Kyrre Lugg [mailto:kyrre.lugg;tomra.no]
Sent: Tuesday, October 22, 2002 17:32
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Form submission


Andrew Hill wrote:
 a href=javascript:document.forms[0].submit();Submit/a

Thanx for your suggestion, but unfortunately javascript is not an option.

Kyrre Lugg


--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Form submission

2002-10-22 Thread James Mitchell
This means you are in a status of SOL.

I've seen people in the state a few times..its not pretty.

I can't help you then.


James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former.
- Albert Einstein (1879-1955)






 -Original Message-
 From: Kyrre Lugg [mailto:kyrre.lugg;tomra.no]
 Sent: Tuesday, October 22, 2002 5:32 AM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: Re: Form submission


 Andrew Hill wrote:
  a href=javascript:document.forms[0].submit();Submit/a

 Thanx for your suggestion, but unfortunately javascript is not an option.

 Kyrre Lugg


 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: Form submission

2002-10-22 Thread Kyrre Lugg
James Mitchell wrote:

This means you are in a status of SOL.



SOL?

Kyrre Lugg


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: Form submission

2002-10-22 Thread Adam Sherman
Kyrre Lugg wrote:

James Mitchell wrote:


This means you are in a status of SOL.



SOL?


Sh*t Out of Luck.

A.

--
Adam Sherman
Software Developer
Teach and Travel Inc.
+1.613.241.3103



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: Form submission

2002-10-22 Thread Eddie Bush
Sorry -- Out of Luck.

That's the nice way to put it ;-)  Different people substitute different 
words for the S.  I'll leave alternatives to your imagination ...

Kyrre Lugg wrote:

James Mitchell wrote:


This means you are in a status of SOL.



SOL?

Kyrre Lugg 


--
Eddie Bush




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




RE: Form submission

2002-10-22 Thread James Mitchell
LOLthanks Eddie ;)

James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former.
- Albert Einstein (1879-1955)


 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 22, 2002 3:18 PM
 To: Struts Users Mailing List
 Subject: Re: Form submission


 Sorry -- Out of Luck.

 That's the nice way to put it ;-)  Different people substitute different
 words for the S.  I'll leave alternatives to your imagination ...

 Kyrre Lugg wrote:

  James Mitchell wrote:
 
  This means you are in a status of SOL.
 
 
  SOL?
 
  Kyrre Lugg


 --
 Eddie Bush




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



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




RE: Form submission

2002-10-21 Thread James Mitchell

Better question.  What are you trying to do?

 (e.g. prevent the form from submitting when a user hits the enter/return
key???)


James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org




 -Original Message-
 From: Kyrre Lugg [mailto:kyrre.lugg;tomra.no]
 Sent: Monday, October 21, 2002 7:13 PM
 To: [EMAIL PROTECTED]
 Subject: Form submission


 Excuse me if I'm off topic here:

 Can one capture form data even if the request is not caused by a form
 submit button?

 Kyrre Lugg



 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Form submission

2002-10-21 Thread Brandon Goodin
Yes,

if you have a query string appended to a url that points to an action (i.e.
*.do) the request parameters will be mapped to the associated action's form
bean.

Brandon Goodin

-Original Message-
From: Kyrre Lugg [mailto:kyrre.lugg;tomra.no]
Sent: Monday, October 21, 2002 5:13 PM
To: [EMAIL PROTECTED]
Subject: Form submission


Excuse me if I'm off topic here:

Can one capture form data even if the request is not caused by a form
submit button?

Kyrre Lugg



--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Form submission

2002-10-21 Thread Brandon Goodin
I should be a bit clearer. Basically what i am saying is that as long as you
have request parameters and you are pointing at an action who's form bean
has getter/setter properties that match the request parameters you can
always capture the form data.

Brandon Goodin

-Original Message-
From: Brandon Goodin [mailto:mail;phase.ws]
Sent: Monday, October 21, 2002 3:25 PM
To: Struts Users Mailing List
Subject: RE: Form submission


Yes,

if you have a query string appended to a url that points to an action (i.e.
*.do) the request parameters will be mapped to the associated action's form
bean.

Brandon Goodin

-Original Message-
From: Kyrre Lugg [mailto:kyrre.lugg;tomra.no]
Sent: Monday, October 21, 2002 5:13 PM
To: [EMAIL PROTECTED]
Subject: Form submission


Excuse me if I'm off topic here:

Can one capture form data even if the request is not caused by a form
submit button?

Kyrre Lugg



--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Form submission

2002-10-21 Thread Kyrre Lugg
Excuse me if I'm off topic here:

Can one capture form data even if the request is not caused by a form
submit button?

Kyrre Lugg



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: form submission problem

2002-09-25 Thread Miguel Angel Mulero Martinez

You're using windows? There's a bug in 4.1.10. Update to 4.1.12 (there is a
security bug in earlier versions too).



-Mensaje original-
De: Steve Vanspall [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 25 de septiembre de 2002 7:35
Para: Struts User Mailing List
Asunto: form submission problem

Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden input type=hidden
name=action field when an input type=image button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when
I do a request.getParameter(action) all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


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




Re: form submission problem - Problem Solved

2002-09-25 Thread Steve Vanspall

Thanks Miguel, that wasn't the problem, but thanks anyway.

As I suspected, the problem was very small and very simple, and I proceeded
to kick myself several times when I found it

So thanks Mugeul and Andrew for your help


- Original Message -
From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 10:52 PM
Subject: RE: form submission problem


 You're using windows? There's a bug in 4.1.10. Update to 4.1.12 (there is
a
 security bug in earlier versions too).



 -Mensaje original-
 De: Steve Vanspall [mailto:[EMAIL PROTECTED]]
 Enviado el: miércoles, 25 de septiembre de 2002 7:35
 Para: Struts User Mailing List
 Asunto: form submission problem

 Hi,

 I have a fairly new problem with one of my JSP's.

 I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
 doesn't work properly.

 I try, using Javacript to set the value of a hidden input type=hidden
 name=action field when an input type=image button is pushed, this
 part works fine, have checked the value after it is set.

 However it is not passing the value through to the request. Instead when
 I do a request.getParameter(action) all I get is a blank String.

 All my other pages that do this, are working fine. The tags are placed
 properly withink the form tags.

 Has anyone else has a similar problem with just one page.

 Any help would be appreciated

 Regards

 Steve


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



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




form submission problem

2002-09-24 Thread Steve Vanspall

Hi, 

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page doesn't work 
properly.

I try, using Javacript to set the value of a hidden input type=hidden 
name=action field when an input type=image button is pushed, this part works 
fine, have checked the value after it is set. 

However it is not passing the value through to the request. Instead when I do a 
request.getParameter(action) all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed properly 
withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve



RE: form submission problem

2002-09-24 Thread Andrew Hill

Is that field located within the start and close of the form tag on the
page?

btw: naming your field action is naughty as it will shadow the action
property of the form object in JavaScript. (Though this wont hurt unless you
try accessing (for example to change) the form action in javascript - at
which point it will give you your field action instead of the form property
action!)


-Original Message-
From: Steve Vanspall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 13:35
To: Struts User Mailing List
Subject: form submission problem


Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden input type=hidden
name=action field when an input type=image button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when I
do a request.getParameter(action) all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


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




RE: form submission problem

2002-09-24 Thread Andrew Hill

Oops. Sorry mate!
Just read it a second time and realised I didnt pay enough attention!
The tags are placed properly withink the form tags.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 13:42
To: Struts Users Mailing List
Subject: RE: form submission problem


Is that field located within the start and close of the form tag on the
page?

btw: naming your field action is naughty as it will shadow the action
property of the form object in JavaScript. (Though this wont hurt unless you
try accessing (for example to change) the form action in javascript - at
which point it will give you your field action instead of the form property
action!)


-Original Message-
From: Steve Vanspall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 13:35
To: Struts User Mailing List
Subject: form submission problem


Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden input type=hidden
name=action field when an input type=image button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when I
do a request.getParameter(action) all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


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


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




RE: form submission problem

2002-09-24 Thread Andrew Hill

Is it a multipart form (multipart/form-data encoding) and the associated
action in which you are trying to read that parameter does not have an
ActionForm associated with it?
(Though I dont think thats your problem as in that situation you get a null
and not an empty string)
Hmmm...

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 13:48
To: Struts Users Mailing List
Subject: RE: form submission problem


Oops. Sorry mate!
Just read it a second time and realised I didnt pay enough attention!
The tags are placed properly withink the form tags.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 13:42
To: Struts Users Mailing List
Subject: RE: form submission problem


Is that field located within the start and close of the form tag on the
page?

btw: naming your field action is naughty as it will shadow the action
property of the form object in JavaScript. (Though this wont hurt unless you
try accessing (for example to change) the form action in javascript - at
which point it will give you your field action instead of the form property
action!)


-Original Message-
From: Steve Vanspall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 13:35
To: Struts User Mailing List
Subject: form submission problem


Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden input type=hidden
name=action field when an input type=image button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when I
do a request.getParameter(action) all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


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


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


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




Re: form submission problem

2002-09-24 Thread Steve Vanspall

YEah it's strange

what even more strange, is that I do exactley the same thing in a number of
other pages, and it works fine.

In fact this page used to work also.

My Struts version hasn't changed, only the Tomcat Version.

Will keep battling on, hopefully I will find the problem. Will probably
ending kicking myself because of it's simplicity

Tnaks Anyway
- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 3:53 PM
Subject: RE: form submission problem


 Is it a multipart form (multipart/form-data encoding) and the associated
 action in which you are trying to read that parameter does not have an
 ActionForm associated with it?
 (Though I dont think thats your problem as in that situation you get a
null
 and not an empty string)
 Hmmm...

 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 13:48
 To: Struts Users Mailing List
 Subject: RE: form submission problem


 Oops. Sorry mate!
 Just read it a second time and realised I didnt pay enough attention!
 The tags are placed properly withink the form tags.

 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 13:42
 To: Struts Users Mailing List
 Subject: RE: form submission problem


 Is that field located within the start and close of the form tag on the
 page?

 btw: naming your field action is naughty as it will shadow the action
 property of the form object in JavaScript. (Though this wont hurt unless
you
 try accessing (for example to change) the form action in javascript - at
 which point it will give you your field action instead of the form
property
 action!)


 -Original Message-
 From: Steve Vanspall [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 13:35
 To: Struts User Mailing List
 Subject: form submission problem


 Hi,

 I have a fairly new problem with one of my JSP's.

 I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
 doesn't work properly.

 I try, using Javacript to set the value of a hidden input type=hidden
 name=action field when an input type=image button is pushed, this
 part works fine, have checked the value after it is set.

 However it is not passing the value through to the request. Instead when I
 do a request.getParameter(action) all I get is a blank String.

 All my other pages that do this, are working fine. The tags are placed
 properly withink the form tags.

 Has anyone else has a similar problem with just one page.

 Any help would be appreciated

 Regards

 Steve


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


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


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



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




RE: Problem with form submission

2002-07-10 Thread Jon.Ridgway

Hi Nilan,

Search the newsgroup for 'transaction token', in short you can set a token
to indicate that the form has been submitted. 

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

Jon Ridgway


-Original Message-
From: Nilan Shakya [mailto:[EMAIL PROTECTED]] 
Sent: 09 July 2002 23:59
To: 'Struts Users Mailing List'
Subject: Problem with form submission

Hi All!

I am having a problem while submitting a form. My form submission sometimes
takes delay because it has to do lots of validation before updating the
information in database. While the form is on the process of submission of
data if I click the same submit button once again it is submitting the data
once again. This means that, now my output listing of items from db shows
repeated data set submitted (same data set submitted twice). I want to
prevent the form be submitted once it is on the process of submission of
data (disable the submission of form if it is already on the way to submit
something).

Does anyone have any idea to solve my problem?

Your help will be greatly appreciated.

Nilan



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 09, 2002 11:39 AM
To: Struts Users Mailing List
Subject: Re: Off-Topic: JMS Design Question...



To begin with, I'd recommend using a web service instead of  just JMS. It's
more reusable, has the ability for a variety of clients to access it and
comes with fewer networking headaches. Plus they are especially good for
sending XML. Given the fact that you are simply sending messages and
getting responses, this may be better.

But I've also built JMS apps as well. JMS is extremely cool and has a whole
bunch of functionality that might be useful.  In fact, this is how Weblogic
implements message-oriented web services (see - Message-Style Web Services
and JMS at
http://edocs.bea.com/wls/docs61/webServices/develop.html#1031913 ).

Using JMS within your container with SOAP as the transport protocol as
outlined in the weblogic links above would be a great solution. It gives
you persistence within your container and theirs, while exposing the app as
a web service.

I believe this simplifies your solution:

 - Your web app either:
  1.  - Puts the transaction into a JMS queue (topic or
point-to-point) on your machine
- Another process on your machine gets  the message and then
makes a message-based web service call to their app server
- Their app server (which is exposed as a web service) gets the
message, processes it and places the result on an outoging queue
- Your web sevice call then retrieves the results.
  or, 2.  - Your web app simply acts as a client to their web
service and sends the message/retrieves the results by itself.
- In this case you may be able to use the simpler, RPC-style
web service.
- In this case you also lose the ability to easily persist the
transaction for sending later it their service is unavailable.


Let's assume you choose option #1 above -  to answer your questions:

1)  If Client's App Server is down, then our MDB should keep resending
till the message is sent successfully.  How can I do this in JMS?

 - roll-back your read of your internal JMS queue. The message will be
there when you retry at some later time. The normal transaction management
stuff in your app server should handle all this.


2)  If our JMS Server is down (shouldn't happen, but let's say it does)
what should the Web App do?  Would Durable Subscriptions help in this
case?

 - Log the information you captured in a database and/or via an e-mail
message to someone who cares and intervene manually (uless you want to
write some fail-safe backup delivery - but then how do you provide back-up
in case the back-up fails?). Durable Subscriptions would allow you to not
lose any messages already on the queue, but wouldn't help you add new
transactions if they came along while JMS was down.

Since this is off-topid. feel free to respond to me directly if you want to
follow up.

Kevin















Hello,

This is kind of off-topic, so I apologize in advance.  We do have some
J2EE gurus on this mailing list so I decided to ask it here.  (Is there
any other *active* mailing list where I can post JMS related questions?)

Anyway, I need some help to develop a JMS based solution. Here's what we
are trying to accomplish;

We need to send XML messages (as well as other types of messages) back 
forth between two Application Servers. In other words, a Web Application
created by us will send a message to the application server of our
client and vice versa.

This is what I was thinking of doing;

1) When it's time to send a message on our side, we will write it to a
Topic in our App Server.
2) A MDB on our side will retrieve the message and send it to the Topic
of our client.

The same logic will apply for incoming messages;
1) Client will write a message to our Topic.
2) A MDB

RE: Problem with form submission

2002-07-10 Thread James Mitchell

Take a look at the struts-example.
I know its been part of it since at least Struts 1.0

...specifically, look at SaveRegistrationAction.java

Good Luck!!!

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




 -Original Message-
 From: Nilan Shakya [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 10, 2002 12:01 PM
 To: 'Struts Users Mailing List'
 Cc: '[EMAIL PROTECTED]'
 Subject: RE: Problem with form submission


 Thank you James.

 I am still not sure where to put saveToken(request) and
 isTokenValid(request, true) is not taking. It is not accepting as valid
 method.

 I am hoping that you will give me some clue for that.

 Thank you,
 Nilan

 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 10, 2002 12:58 AM
 To: Struts Users Mailing List
 Subject: RE: Problem with form submission,

 I saved the below msg because this is a very common question:

  -Original Message-
  From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 28, 2002 3:10 PM
  To: Struts Users Mailing List
  Cc: Ivan D. Sager
  Subject: Re: mapping
 

 snip/

 
  To deal with resubmits, the most important issue is to avoid
 updating the
  database twice when the user accidentally resubmits the same
 form.  Struts
  has a feature called transaction control tokens that help you avoid
  this, which is very simply used as follows:
 
  * In the Action that sets up your input form (i.e. before you forward
to it), execute the following
 
  saveToken(request)
 
to save a special value in the user's session that will be used in
the next step.
 
  * In the Action that receives the form and updates the database, add
the following logic before you do the update:
 
  if (isTokenValid(request, true)) {
... this is a resubmit, so go display an error ...
  }
 
The true parameter causes the token to be removed from the session
so that it doesn't interfere with subsequent form submits.
 
  This way, the submit will work the first time, but fail on any
 accidental
  or on-purpose resubmit, and you avoid adding the information to the
  database twice.  It also prevents the user from navigating
 directly to the
  myDB.do URL without going through your normal setup actions -- because
  the transaction token would not have been placed in the session, so the
  isTokenValid() test would fail.
 
  Craig
 
 



 James Mitchell
 Software Engineer\Struts Evangelist
 Struts-Atlanta, the Open Minded Developer Network
 http://www.open-tools.org/struts-atlanta




  -Original Message-
  From: Nilan Shakya [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 09, 2002 6:59 PM
  To: 'Struts Users Mailing List'
  Subject: Problem with form submission
 
 
  Hi All!
 
  I am having a problem while submitting a form. My form submission
  sometimes
  takes delay because it has to do lots of validation before updating the
  information in database. While the form is on the process of
 submission of
  data if I click the same submit button once again it is
  submitting the data
  once again. This means that, now my output listing of items
 from db shows
  repeated data set submitted (same data set submitted twice). I want to
  prevent the form be submitted once it is on the process of submission of
  data (disable the submission of form if it is already on the
 way to submit
  something).
 
  Does anyone have any idea to solve my problem?
 
  Your help will be greatly appreciated.
 
  Nilan
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 09, 2002 11:39 AM
  To: Struts Users Mailing List
  Subject: Re: Off-Topic: JMS Design Question...
 
 
 
  To begin with, I'd recommend using a web service instead of  just
  JMS. It's
  more reusable, has the ability for a variety of clients to access it and
  comes with fewer networking headaches. Plus they are especially good for
  sending XML. Given the fact that you are simply sending messages and
  getting responses, this may be better.
 
  But I've also built JMS apps as well. JMS is extremely cool and
  has a whole
  bunch of functionality that might be useful.  In fact, this is
  how Weblogic
  implements message-oriented web services (see - Message-Style
  Web Services
  and JMS at
  http://edocs.bea.com/wls/docs61/webServices/develop.html#1031913 ).
 
  Using JMS within your container with SOAP as the transport protocol as
  outlined in the weblogic links above would be a great solution. It gives
  you persistence within your container and theirs, while exposing
  the app as
  a web service.
 
  I believe this simplifies your solution:
 
   - Your web app either:
1.  - Puts the transaction into a JMS queue (topic or
  point-to-point) on your machine
  - Another process on your machine gets  the message and then
  makes

Problem with form submission

2002-07-09 Thread Nilan Shakya

Hi All!

I am having a problem while submitting a form. My form submission sometimes
takes delay because it has to do lots of validation before updating the
information in database. While the form is on the process of submission of
data if I click the same submit button once again it is submitting the data
once again. This means that, now my output listing of items from db shows
repeated data set submitted (same data set submitted twice). I want to
prevent the form be submitted once it is on the process of submission of
data (disable the submission of form if it is already on the way to submit
something).

Does anyone have any idea to solve my problem?

Your help will be greatly appreciated.

Nilan



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 09, 2002 11:39 AM
To: Struts Users Mailing List
Subject: Re: Off-Topic: JMS Design Question...



To begin with, I'd recommend using a web service instead of  just JMS. It's
more reusable, has the ability for a variety of clients to access it and
comes with fewer networking headaches. Plus they are especially good for
sending XML. Given the fact that you are simply sending messages and
getting responses, this may be better.

But I've also built JMS apps as well. JMS is extremely cool and has a whole
bunch of functionality that might be useful.  In fact, this is how Weblogic
implements message-oriented web services (see - Message-Style Web Services
and JMS at
http://edocs.bea.com/wls/docs61/webServices/develop.html#1031913 ).

Using JMS within your container with SOAP as the transport protocol as
outlined in the weblogic links above would be a great solution. It gives
you persistence within your container and theirs, while exposing the app as
a web service.

I believe this simplifies your solution:

 - Your web app either:
  1.  - Puts the transaction into a JMS queue (topic or
point-to-point) on your machine
- Another process on your machine gets  the message and then
makes a message-based web service call to their app server
- Their app server (which is exposed as a web service) gets the
message, processes it and places the result on an outoging queue
- Your web sevice call then retrieves the results.
  or, 2.  - Your web app simply acts as a client to their web
service and sends the message/retrieves the results by itself.
- In this case you may be able to use the simpler, RPC-style
web service.
- In this case you also lose the ability to easily persist the
transaction for sending later it their service is unavailable.


Let's assume you choose option #1 above -  to answer your questions:

1)  If Client's App Server is down, then our MDB should keep resending
till the message is sent successfully.  How can I do this in JMS?

 - roll-back your read of your internal JMS queue. The message will be
there when you retry at some later time. The normal transaction management
stuff in your app server should handle all this.


2)  If our JMS Server is down (shouldn't happen, but let's say it does)
what should the Web App do?  Would Durable Subscriptions help in this
case?

 - Log the information you captured in a database and/or via an e-mail
message to someone who cares and intervene manually (uless you want to
write some fail-safe backup delivery - but then how do you provide back-up
in case the back-up fails?). Durable Subscriptions would allow you to not
lose any messages already on the queue, but wouldn't help you add new
transactions if they came along while JMS was down.

Since this is off-topid. feel free to respond to me directly if you want to
follow up.

Kevin















Hello,

This is kind of off-topic, so I apologize in advance.  We do have some
J2EE gurus on this mailing list so I decided to ask it here.  (Is there
any other *active* mailing list where I can post JMS related questions?)

Anyway, I need some help to develop a JMS based solution. Here's what we
are trying to accomplish;

We need to send XML messages (as well as other types of messages) back 
forth between two Application Servers. In other words, a Web Application
created by us will send a message to the application server of our
client and vice versa.

This is what I was thinking of doing;

1) When it's time to send a message on our side, we will write it to a
Topic in our App Server.
2) A MDB on our side will retrieve the message and send it to the Topic
of our client.

The same logic will apply for incoming messages;
1) Client will write a message to our Topic.
2) A MDB on our side will then pick up this message and process it.

If this sounds okay, then I am wondering how I can handle Exception
conditions.  For example;

1)  If Client's App Server is down, then our MDB should keep resending
till the message is sent successfully.  How can I do this in JMS?
2)  If our JMS Server is down (shouldn't happen, but let's say it does)
what should the Web App do

RE: Problem with form submission

2002-07-09 Thread James Mitchell

I saved the below msg because this is a very common question:

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 28, 2002 3:10 PM
 To: Struts Users Mailing List
 Cc: Ivan D. Sager
 Subject: Re: mapping


snip/


 To deal with resubmits, the most important issue is to avoid updating the
 database twice when the user accidentally resubmits the same form.  Struts
 has a feature called transaction control tokens that help you avoid
 this, which is very simply used as follows:

 * In the Action that sets up your input form (i.e. before you forward
   to it), execute the following

 saveToken(request)

   to save a special value in the user's session that will be used in
   the next step.

 * In the Action that receives the form and updates the database, add
   the following logic before you do the update:

 if (isTokenValid(request, true)) {
   ... this is a resubmit, so go display an error ...
 }

   The true parameter causes the token to be removed from the session
   so that it doesn't interfere with subsequent form submits.

 This way, the submit will work the first time, but fail on any accidental
 or on-purpose resubmit, and you avoid adding the information to the
 database twice.  It also prevents the user from navigating directly to the
 myDB.do URL without going through your normal setup actions -- because
 the transaction token would not have been placed in the session, so the
 isTokenValid() test would fail.

 Craig





James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




 -Original Message-
 From: Nilan Shakya [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 6:59 PM
 To: 'Struts Users Mailing List'
 Subject: Problem with form submission


 Hi All!

 I am having a problem while submitting a form. My form submission
 sometimes
 takes delay because it has to do lots of validation before updating the
 information in database. While the form is on the process of submission of
 data if I click the same submit button once again it is
 submitting the data
 once again. This means that, now my output listing of items from db shows
 repeated data set submitted (same data set submitted twice). I want to
 prevent the form be submitted once it is on the process of submission of
 data (disable the submission of form if it is already on the way to submit
 something).

 Does anyone have any idea to solve my problem?

 Your help will be greatly appreciated.

 Nilan



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 11:39 AM
 To: Struts Users Mailing List
 Subject: Re: Off-Topic: JMS Design Question...



 To begin with, I'd recommend using a web service instead of  just
 JMS. It's
 more reusable, has the ability for a variety of clients to access it and
 comes with fewer networking headaches. Plus they are especially good for
 sending XML. Given the fact that you are simply sending messages and
 getting responses, this may be better.

 But I've also built JMS apps as well. JMS is extremely cool and
 has a whole
 bunch of functionality that might be useful.  In fact, this is
 how Weblogic
 implements message-oriented web services (see - Message-Style
 Web Services
 and JMS at
 http://edocs.bea.com/wls/docs61/webServices/develop.html#1031913 ).

 Using JMS within your container with SOAP as the transport protocol as
 outlined in the weblogic links above would be a great solution. It gives
 you persistence within your container and theirs, while exposing
 the app as
 a web service.

 I believe this simplifies your solution:

  - Your web app either:
   1.  - Puts the transaction into a JMS queue (topic or
 point-to-point) on your machine
 - Another process on your machine gets  the message and then
 makes a message-based web service call to their app server
 - Their app server (which is exposed as a web
 service) gets the
 message, processes it and places the result on an outoging queue
 - Your web sevice call then retrieves the results.
   or, 2.  - Your web app simply acts as a client to their web
 service and sends the message/retrieves the results by itself.
 - In this case you may be able to use the simpler, RPC-style
 web service.
 - In this case you also lose the ability to easily persist the
 transaction for sending later it their service is unavailable.


 Let's assume you choose option #1 above -  to answer your questions:

 1)  If Client's App Server is down, then our MDB should keep resending
 till the message is sent successfully.  How can I do this in JMS?

  - roll-back your read of your internal JMS queue. The message will be
 there when you retry at some later time. The normal transaction management
 stuff in your app server should handle all this.


 2)  If our JMS Server is down

Form submission using html:link

2002-05-21 Thread Todd Pierce

Has anyone had any success submitting forms using html:link with the
client-side form validation (packaged with 1.1b1)?

My main problem is this:

The field validation function is run from an onSubmit event declared in an
attribute of the html:form tag. OnSubmit really means a press of a submit
button, and not any form submission (e.g. document.form.submit() does not
fire off an onSubmit event). here's an example:

This works:
html:form action=registerJob.do onsubmit=return
validateRegisterJob(this)
...
html:submit value=Submit onClick=bCancel=false /
/html:form

This doesn't:
html:form action=registerJob.do onsubmit=return
validateRegisterJob(this)
...
html:link href=javascript: bCancel=false;
document.forms[0].submit() /
/html:form

Any suggestions???

There's a secondary problem too. How can I gain access to the form name so I
can use it in javascript?

Thanks,

Todd 

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




Form submission from did n't occurr

2001-04-30 Thread M . Amin

Dear Geir and all,
I'm using velocity integrated with struts and i have a trouble regarding
action mapping :
  
look at my attched files 

The form submission from product.vm to its action configured in .xml did n't
occurr, i do n't what's wrong

Any help will be appreciated.

Regards,
M. Amin

Title: Test


 





  


  
 description
  
  
   
  



  
  categorie
  
  

  



  
long description
  
  
   
  



  
supplier
  
  
   
 



  
   producer
  
  
   
  




  
 
  
   

  



Title: Test

 





  


  
 description
  
  
   $productForm.description
  



  
  categorie
  
  
   $productForm.serviceCategorie
  



  
long description
  
  
   $productForm.longDescription
  



  
supplier
  
  
   $productForm.supplier
 



  
   producer
  
  
   $productForm.producer
  




  
 
  
   

  





?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;

!--
 This is the Struts configuration file for the example application,
 using the proposed new syntax.

 NOTE:  You would only flesh out the details in the form-bean
 declarations if you had a generator tool that used them to create
 the corresponding Java classes for you.  Otherwise, you would
 need only the form-bean element itself, with the corresponding
 name and type attributes.
--


struts-config


  !-- == Data Source Configuration === --
 data-sources
data-source
   autoCommit=false
  description=Example Data Source Configuration
  driverClass=org.postgresql.Driver
 maxCount=4
 minCount=2
 password=
  url=jdbc:postgresql://10.0.1.14/webshop
 user=postgres
/
  /data-sources


  !-- == Form Bean Definitions === --
  form-beans

form-bean  name=productForm
type=com.imkenberg.manager.ProductForm/

  /form-beans


  !-- == Global Forward Definitions == --
  global-forwards
   forward   name=success  path=/show.vm/
  /global-forwards


  !-- == Action Mapping Definitions == --
  action-mappings

actionpath=/savePrd
   type=com.imkenberg.manager.SaveAction
   name=productForm
  scope=request
  input=/product.vm
 forward   name=success  path=/show.vm/
/action


!-- The standard administrative actions available with Struts --
!-- These would be either omitted or protected by security --
!-- in a real application deployment --
actionpath=/admin/addFormBean
   type=org.apache.struts.actions.AddFormBeanAction/
actionpath=/admin/addForward
   type=org.apache.struts.actions.AddForwardAction/
actionpath=/admin/addMapping
   type=org.apache.struts.actions.AddMappingAction/
actionpath=/admin/reload
   type=org.apache.struts.actions.ReloadAction/
actionpath=/admin/removeFormBean
   type=org.apache.struts.actions.RemoveFormBeanAction/
actionpath=/admin/removeForward
   type=org.apache.struts.actions.RemoveForwardAction/
actionpath=/admin/removeMapping
   type=org.apache.struts.actions.RemoveMappingAction/


  /action-mappings

/struts-config








  
  
database
org.apache.struts.webapp.example.DatabaseServlet

  debug
  2

1
  


  
  
action
org.apache.struts.action.ActionServlet

  application
  org.apache.struts.webapp.example.ApplicationResources


  config
  /WEB-INF/struts-config.xml


  debug
  2


  detail
  2


  validate
  true

2
  

 
vel
org.apache.velocity.struts.VelServlet
4
  


  
  
action
*.do
  

  
vel
*.vm
  

  
  
index.vm
  

  
  
/WEB-INF/app.tld
/WEB-INF/app.tld
  

  
  
/WEB-INF/struts-bean.tld
/WEB-INF/struts-bean.tld

how to use image maps for form submission

2001-02-20 Thread Ravindran Ramaiah

Hi,
   I need to use image maps to submit a form using struts.
Is there an equivalent for form:submit to submit a form using imagemap and
how to configure the same?
Ravi