Re: Struts issue with getting response to the post request of the action class which works fine in postman but not in browser - Regarding

2023-05-16 Thread Lukasz Lenart
śr., 10 maj 2023 o 12:53 Vishnu Mahendiren  napisał(a):
> public String execute() throws IOException
> {
> if(request.getParameter("action") != null)
> {
> JSONObject responseJSON = new JSONObject();
> responseJSON.put("key", "value");
> response.setStatus(HttpStatus.SC_OK);
> response.setContentType("application/json");
> response.getWriter().write(responseJSON.toString());
> return null;
> }
> return null;

Why do you write directly to the response? This is really a bad idea,
I would use either a JSON result from the Struts Json Plugin [1], or
the Plain Result available since Struts 6.x [2]
And your problem is related to creating a http session by
CoopInterceptor (part of Content Security Policy mechanism)

[1] https://struts.apache.org/plugins/json/
[2] https://struts.apache.org/core-developers/plain-result


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: STRUTS Issue in IE

2007-12-06 Thread Jeromy Evans

manoharkundety wrote:

I can be able to display the data in the Mozilla Firefox but I cant be able to 
display the same data in Internet
Explorer(IE) 

  
Hi Manohar, I empathise with you but you'll need to be much more 
specific about what's not working to receive help.


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



Re: STRUTS Issue in IE

2007-12-06 Thread Martin Gainty
which tag?
how are you implementing ?
which version IE are you using?

M--
- Original Message -
From: "manoharkundety" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, December 06, 2007 8:47 AM
Subject: STRUTS Issue in IE


>
> Hi Guys ,
>  I am Manohar , I am working on a Web based application in that I am
> displaying some
>
> data using the  tag from STRUTS2. I can be able to display the data in the
>
> Mozilla Firefox but I cant be able to display the same data in Internet
> Explorer(IE)
>
> .So please help in this as it plays a very important role in my project.
> Thanking you all ,
> waiting for ur reply.
>
> regards ,
> Manohar
> [EMAIL PROTECTED]
>
> --
> View this message in context:
http://www.nabble.com/STRUTS-Issue-in-IE-tf4956162.html#a14192689
> Sent from the Struts - User mailing list archive at Nabble.com.
>


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



RE: STRUTS Issue in IE

2007-12-06 Thread David Harland
Haven't you got the mind reading plugin for struts 2. lol 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: 06 December 2007 14:28
To: Struts Users Mailing List
Subject: Re: STRUTS Issue in IE

--- manoharkundety <[EMAIL PROTECTED]> wrote:
> I am working on a Web based application in that I am displaying some 
> data using the  tag from STRUTS2. I can be able to display the data in

> the
Mozilla 
> Firefox but I cant be able to display the same data in Internet
Explorer(IE).
> So please help in this as it plays a very important role in my
project.

I'm somewhat at a loss; you've provided almost no information with which
one could even begin to help you.

d.


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


- --
ML {UFI}

__
Ufi Limited 
Registered in England No.  3980770 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

learndirect Solutions Ltd 
Registered in England No. 5081669 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

UFI Charitable Trust 
Registered in England No.  3658378 
Registered Charity No.  1081028 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

This email has been scanned by the MessageLabs Email Security System.

__

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



Re: STRUTS Issue in IE

2007-12-06 Thread Dave Newton
--- manoharkundety <[EMAIL PROTECTED]> wrote:
> I am working on a Web based application in that I am displaying some data 
> using the  tag from STRUTS2. I can be able to display the data in the
Mozilla 
> Firefox but I cant be able to display the same data in Internet
Explorer(IE).
> So please help in this as it plays a very important role in my project.

I'm somewhat at a loss; you've provided almost no information with which one
could even begin to help you.

d.


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



Re: struts issue...

2006-09-15 Thread Martin Gainty
Michael-
Its sounds as if you have (at least) 2 possible submits most probably by the 
submit button as well as the form action parameter
you have can solve using one of 2 solutions 
1)
either disable submit calling the function OR disable form action calling the 
function
2)
have both submit and action call a javascript function (which handles 
validation and then forwards to the proper location)

HTH,
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Asthana, Rahul" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Friday, September 15, 2006 11:23 AM
Subject: RE: struts issue...


The code posted by punit works.The only problem is that suppose the user clicks 
on submit and for some reason stops the form from submitting through the 
browser controls(it happened with me, some users did it apparently because it 
was taking a long time), then the form would never be submitted again.

-Original Message-
From: Puneet Lakhina [mailto:[EMAIL PROTECTED]
Sent: Friday, September 15, 2006 7:14 AM
To: Struts Users Mailing List
Subject: Re: struts issue...


On 9/15/06, Dean, Michael <[EMAIL PROTECTED]> wrote:
>
> Interesting problem...
>
>
>
> I have a submit button which includes a property = "method" with
> value="Save"...the enclosing form is submitted to a Struts
> DispatchAction sub-class which is configured to rely on the "method"
> parameter for delegation.
>
>
>
> In order to prevent a double-submit, in my onSubmit() javascript I
> disable the button and immediately thereafter "return true"however,
> I proved that the disabling of the button prevents the required method
> parameter from being included in the request...
>
>
>
> I thought about a hidden field but I also established that they ARE NOT
> added to the request upon submission...
>
>
>
> Any ideas?


Ok this is something you could try

var submitnow = true;
function onSubmitFunction () {
if(submitnow = true) {
submitnow = false;
 return true;
}else {
   return false;
}
}


Not sure if this will work. Because I havent tried it.

> Michael Dean
>
> Senior Java Programmer
>
> JIS Applications Maintenance
>
> Information Services Division
>
> Administrative Office of the Courts
>
> 360.704.4008
>
> [EMAIL PROTECTED]
>
>
>
>
>


-- 
Puneet

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



RE: struts issue...

2006-09-15 Thread Asthana, Rahul
The code posted by punit works.The only problem is that suppose the user clicks 
on submit and for some reason stops the form from submitting through the 
browser controls(it happened with me, some users did it apparently because it 
was taking a long time), then the form would never be submitted again.

-Original Message-
From: Puneet Lakhina [mailto:[EMAIL PROTECTED]
Sent: Friday, September 15, 2006 7:14 AM
To: Struts Users Mailing List
Subject: Re: struts issue...


On 9/15/06, Dean, Michael <[EMAIL PROTECTED]> wrote:
>
> Interesting problem...
>
>
>
> I have a submit button which includes a property = "method" with
> value="Save"...the enclosing form is submitted to a Struts
> DispatchAction sub-class which is configured to rely on the "method"
> parameter for delegation.
>
>
>
> In order to prevent a double-submit, in my onSubmit() javascript I
> disable the button and immediately thereafter "return true"however,
> I proved that the disabling of the button prevents the required method
> parameter from being included in the request...
>
>
>
> I thought about a hidden field but I also established that they ARE NOT
> added to the request upon submission...
>
>
>
> Any ideas?


Ok this is something you could try

var submitnow = true;
function onSubmitFunction () {
if(submitnow = true) {
submitnow = false;
 return true;
}else {
   return false;
}
}


Not sure if this will work. Because I havent tried it.

> Michael Dean
>
> Senior Java Programmer
>
> JIS Applications Maintenance
>
> Information Services Division
>
> Administrative Office of the Courts
>
> 360.704.4008
>
> [EMAIL PROTECTED]
>
>
>
>
>


-- 
Puneet

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



Re: struts issue...

2006-09-15 Thread Matts
here's de code I use to disable de button and do submit. May be you can use 
it.




function doSubmit(button){

button.disabled=true;

button.form.submit();

}











- Original Message - 
From: "Puneet Lakhina" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Friday, September 15, 2006 8:13 AM
Subject: Re: struts issue...



On 9/15/06, Dean, Michael <[EMAIL PROTECTED]> wrote:


Interesting problem...



I have a submit button which includes a property = "method" with
value="Save"...the enclosing form is submitted to a Struts
DispatchAction sub-class which is configured to rely on the "method"
parameter for delegation.



In order to prevent a double-submit, in my onSubmit() javascript I
disable the button and immediately thereafter "return true"however,
I proved that the disabling of the button prevents the required method
parameter from being included in the request...



I thought about a hidden field but I also established that they ARE NOT
added to the request upon submission...



Any ideas?



Ok this is something you could try

var submitnow = true;
function onSubmitFunction () {
if(submitnow = true) {
   submitnow = false;
return true;
}else {
  return false;
}
}


Not sure if this will work. Because I havent tried it.


Michael Dean

Senior Java Programmer

JIS Applications Maintenance

Information Services Division

Administrative Office of the Courts

360.704.4008

[EMAIL PROTECTED]








--
Puneet




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



Re: struts issue...

2006-09-15 Thread Puneet Lakhina

On 9/15/06, Dean, Michael <[EMAIL PROTECTED]> wrote:


Interesting problem...



I have a submit button which includes a property = "method" with
value="Save"...the enclosing form is submitted to a Struts
DispatchAction sub-class which is configured to rely on the "method"
parameter for delegation.



In order to prevent a double-submit, in my onSubmit() javascript I
disable the button and immediately thereafter "return true"however,
I proved that the disabling of the button prevents the required method
parameter from being included in the request...



I thought about a hidden field but I also established that they ARE NOT
added to the request upon submission...



Any ideas?



Ok this is something you could try

var submitnow = true;
function onSubmitFunction () {
if(submitnow = true) {
   submitnow = false;
return true;
}else {
  return false;
}
}


Not sure if this will work. Because I havent tried it.


Michael Dean

Senior Java Programmer

JIS Applications Maintenance

Information Services Division

Administrative Office of the Courts

360.704.4008

[EMAIL PROTECTED]








--
Puneet


Re: struts issue...

2006-09-15 Thread Puneet Lakhina

On 9/15/06, Dean, Michael <[EMAIL PROTECTED]> wrote:


Interesting problem...



I have a submit button which includes a property = "method" with
value="Save"...the enclosing form is submitted to a Struts
DispatchAction sub-class which is configured to rely on the "method"
parameter for delegation.



In order to prevent a double-submit, in my onSubmit() javascript I
disable the button and immediately thereafter "return true"however,
I proved that the disabling of the button prevents the required method
parameter from being included in the request...



True. Anything that is disabled in HTML is not submitted in the request.
This is how HTML works and has nothing to do with struts.

I thought about a hidden field but I also established that they ARE NOT

added to the request upon submission...



How did you arrive at this conclusion. You might be doing something wrong.
Because hidden fields are supposed to be and ARE added to the request,
infact they dont really make sense if they are not added.

Any ideas?


Post your code,and then maybe someone can suggest an approach.

Michael Dean


Senior Java Programmer

JIS Applications Maintenance

Information Services Division

Administrative Office of the Courts

360.704.4008

[EMAIL PROTECTED]








--
Puneet


Re: struts issue...

2006-09-14 Thread Michael Jouravlev

Disabled input elements of an HTML form are not submitted. Use HTTP
sniffer to see what is submitted and what not.

On 9/14/06, Dean, Michael <[EMAIL PROTECTED]> wrote:

Interesting problem...



I have a submit button which includes a property = "method" with
value="Save"...the enclosing form is submitted to a Struts
DispatchAction sub-class which is configured to rely on the "method"
parameter for delegation.



 In order to prevent a double-submit, in my onSubmit() javascript I
disable the button and immediately thereafter "return true"however,
I proved that the disabling of the button prevents the required method
parameter from being included in the request...



I thought about a hidden field but I also established that they ARE NOT
added to the request upon submission...



Any ideas?



Michael Dean

Senior Java Programmer

JIS Applications Maintenance

Information Services Division

Administrative Office of the Courts

360.704.4008

[EMAIL PROTECTED]







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



RE: Struts issue..working in local WSAD/iwndows but not in Web s phere Deployment/ AIX

2004-05-05 Thread Barett McGavock
Matthew,

I don't think abstract is part of the problem. I would recommend that you
define the ActionForm as its actual class myForm1/myForm2 and totally ignore
myCommonForm in the struts-config and your JSPs. Sounds like that's the way
you're doing things?

I'd do as David Hibbs mentions and also recommend that you don't have any
stray, older versions of any of these form classes, particularly the
abstract class. There are a lot of class paths/loaders where WAS will
attempt to load classes. This has bitten me more than a few times.

B

> -Original Message-
> From: Mathew, Manoj [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 31, 2004 5:44 PM
> To: Struts Users Mailing List
> Subject: RE: Struts issue..working in local WSAD/iwndows but 
> not in Web sphere Deployment/ AIX
> 
> 
> 
> Hi guys need your help
> 
> is this because i don't have any entry for  myCommonForm in 
> struts config.?
> 
> 
> -Original Message-
> From: Mathew, Manoj 
> Sent: Wednesday, March 31, 2004 3:59 PM
> To: [EMAIL PROTECTED]
> Subject: Struts issue..working in local WSAD/iwndows but not 
> in Web sphere Deployment/ AIX
> 
> 
> 
> I have a action form 
> public class myForm1 extends myCommonForm{}
> 
> public abstract class myCommonForm extends ActionForm{}
> 
> public class myForm2 extends myCommonForm{}
> 
> Here myForm1 and myForm2 have some common properties which 
> has put in myCommonForm(setters and getters) and i extend 
> that in both the myForm1 and 2.  myForm1 and 2 has their own 
> different propertis adn it's getters and setters too.
> 
> The issue is when i do myForm1  frm1 = (myForm1 ) form;
> drm1 doesn't seems to have any value which are common(ie the 
> properties in myCommonForm).. It's working fine in windows 
> local WSAD but not in web Sphere Server/AIX Please help 
> me out Manoj

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



RE: Struts issue..working in local WSAD/iwndows but not in Web s phere Deployment/ AIX

2004-04-01 Thread Hibbs, David
The code premise looks OK; I've done similar.

My guess, given my experience with WAS, would be that either 

a) you didn't get a clean export with the right version of myCommonForm
exported and included in the WAR, and the right version of the WAR included
in the EAR

or

b) you didn't get a clean install.  WAS Support reccommends uninstalling
your app and reinstalling it each time you have a new version.  (It's even
documented in the InfoCenter.)  

So my advice is to do a build all, re-export everything, uninstall
from your deployment server, and install your new version.  If you still
have problems, rummage through the installedApps directory and check the
date/time stamp on your class files.

David Hibbs, ACS
Staff Programmer / Analyst
American National Insurance Company

> -Original Message-
> From: Mathew, Manoj [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 31, 2004 3:59 PM
> To: [EMAIL PROTECTED]
> Subject: Struts issue..working in local WSAD/iwndows but not in Web
> sphere Deployment/ AIX
> 
> 
> 
> I have a action form 
> public class myForm1 extends myCommonForm{}
> 
> public abstract class myCommonForm extends ActionForm{}
> 
> public class myForm2 extends myCommonForm{}
> 
> Here myForm1 and myForm2 have some common properties which 
> has put in myCommonForm(setters and getters) and i extend 
> that in both the myForm1 and 2.  myForm1 and 2 has their own 
> different propertis adn it's getters and setters too.
> 
> The issue is when i do myForm1  frm1 = (myForm1 ) form;
> drm1 doesn't seems to have any value which are common(ie the 
> properties in myCommonForm)..
> It's working fine in windows local WSAD but not in web Sphere 
> Server/AIX
> Please help me out
> Manoj
> 
> 

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



RE: Struts issue..working in local WSAD/iwndows but not in Web sphere Deployment/ AIX

2004-03-31 Thread Mathew, Manoj

Hi guys need your help

is this because i don't have any entry for  myCommonForm in struts config.?


-Original Message-
From: Mathew, Manoj 
Sent: Wednesday, March 31, 2004 3:59 PM
To: [EMAIL PROTECTED]
Subject: Struts issue..working in local WSAD/iwndows but not in Web
sphere Deployment/ AIX



I have a action form 
public class myForm1 extends myCommonForm{}

public abstract class myCommonForm extends ActionForm{}

public class myForm2 extends myCommonForm{}

Here myForm1 and myForm2 have some common properties which has put in 
myCommonForm(setters and getters) and i extend that in both the myForm1 and 2.  
myForm1 and 2 has their own different propertis adn it's getters and setters too.

The issue is when i do myForm1  frm1 = (myForm1 ) form;
drm1 doesn't seems to have any value which are common(ie the properties in 
myCommonForm)..
It's working fine in windows local WSAD but not in web Sphere Server/AIX
Please help me out
Manoj


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


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



RE: Struts issue..working in local WSAD/iwndows but not in Web sphere Deployment/ AIX

2004-03-31 Thread Mathew, Manoj


anybody think 
"abstract" causing an issue here?


-Original Message-
From: Mathew, Manoj 
Sent: Wednesday, March 31, 2004 3:59 PM
To: [EMAIL PROTECTED]
Subject: Struts issue..working in local WSAD/iwndows but not in Web
sphere Deployment/ AIX



I have a action form 
public class myForm1 extends myCommonForm{}

public abstract class myCommonForm extends ActionForm{}

public class myForm2 extends myCommonForm{}

Here myForm1 and myForm2 have some common properties which has put in 
myCommonForm(setters and getters) and i extend that in both the myForm1 and 2.  
myForm1 and 2 has their own different propertis adn it's getters and setters too.

The issue is when i do myForm1  frm1 = (myForm1 ) form;
drm1 doesn't seems to have any value which are common(ie the properties in 
myCommonForm)..
It's working fine in windows local WSAD but not in web Sphere Server/AIX
Please help me out
Manoj


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