2015-07-23 23:18 GMT+02:00 JOSE L MARTINEZ-AVIAL :
> Hello all,
>I was just looking for this option to override the content-type of the
> json result. Is there any fix for this?
Not sure what I have been referring to but JsonResult has contentType
param defined
https://github.c
Hello all,
I was just looking for this option to override the content-type of the
json result. Is there any fix for this?
Thanks
JL
2012-12-31 12:41 GMT-05:00 Lukasz Lenart :
> 2012/12/30 Burton Rhodes :
> > Lukasz -
> >
> > Thanks for all your help. You got me on t
2012/12/30 Burton Rhodes :
> Lukasz -
>
> Thanks for all your help. You got me on the right track and it appears the
> json Result was what was overriding and setting the content type. As a
> result, I have overridden the JSONResult class to use the "dynamic"
> c
Lukasz -
Thanks for all your help. You got me on the right track and it appears the
json Result was what was overriding and setting the content type. As a
result, I have overridden the JSONResult class to use the "dynamic"
content-Type.
/**
* Custom json result type to set Co
2012/12/30 Burton Rhodes :
> HttpServletResponse response = (HttpServletResponse)
> invocation.getInvocationContext().get(StrutsStatics.HTTP_RESPONSE);
Maybe try to use:
HttpServletRequest request = ServletActionContext.getRequest();
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.
rridden once set)?
As mentioned here [1] you can change content-type till getWriter is
called or response committed
[1]
http://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html#setContentType(java.lang.String)
Regards
--
Łukasz
+ 48 606 323 122 ht
AM, Lukasz Lenart wrote:
> 2012/12/30 Burton Rhodes :
> > I'm not sure what I'm doing wrong, but I cannot for the life of me change
> > the content-type of the response using an interceptor. My interceptor
> code
> > is below. The example below seems a bit abs
2012/12/30 Burton Rhodes :
> I'm not sure what I'm doing wrong, but I cannot for the life of me change
> the content-type of the response using an interceptor. My interceptor code
> is below. The example below seems a bit absurd, but eventually I will add
> code to c
I'm not sure what I'm doing wrong, but I cannot for the life of me change
the content-type of the response using an interceptor. My interceptor code
is below. The example below seems a bit absurd, but eventually I will add
code to change the content-type dynamically from "appli
deploying to that effect:
>
> INFO: Loading global messages from msgs.properties
>
> In my action, I can even print out the text using the correct key and get
> my custom message:
>
> getText( "struts.messages.error.content.type.not.allowed" )
>
> H
In my action, I can even print out the text using the correct key and get my
custom message:
getText( "struts.messages.error.content.type.not.allowed" )
However, when I submit a disallowed file using the form, I get the default
error message:
Content-Type not a
it works in firefox!
it's a chrome and safari issue! sometimes (depends on the file) this
browsers don't set the content type.
thanks Dave, you show me the key.
I hope it helps the community
2009/6/18 Dave Newton
> David Canos wrote:
>
>> if a try to upload a file
David Canos wrote:
if a try to upload a file without ContentType I get this:
[ERROR] 10:39:39.953 (FileUploadInterceptor.java:intercept:263)
org.apache.struts2.interceptor.FileUploadInterceptor
Could not find a Content-Type for <*field*>. Verify that a valid file was
submitted.|#]
how
hi folks
im using struts 2.0.14
if a try to upload a file without ContentType I get this:
[ERROR] 10:39:39.953 (FileUploadInterceptor.java:intercept:263)
org.apache.struts2.interceptor.FileUploadInterceptor
Could not find a Content-Type for <*field*>. Verify that a valid file was
sub
an empty array. Would it be more correct to serialize
them as null?
2. The plugin sets the content type to text/javascript. I am not sure
if application/json (http://www.ietf.org/rfc/rfc4627.txt?number=4627)
is more appropriate?
Thanks,
Alex
Jeromy Evans wrote:
Could someone with an interest in the REST plugin please glance at the
changes I've committed for WW-2641
oops, that was meant for struts-dev. I'll cross-post there.
-
To unsubscribe, e-mail: [EMAIL PROTE
Could someone with an interest in the REST plugin please glance at the
changes I've committed for WW-2641
The change allows a different content-type in the request than the
response. This was added specifically to allow a x-www-form-urlencoded
request with a response in a different co
as
jsp:include or c:import handle correctly the page encoding.
Ignacio
--
View this message in context:
http://www.nabble.com/Loosing-content-type-encoding-in-bean%3Ainclude-tp17168120p17168120.html
Sent from the Struts - User mailing
Page encoding yes; content type, not sure:
http://java.sun.com/javaee/5/docs/tutorial/doc/bnajg.html
L.
Matthew Seaborn wrote:
Does anyone know if it is possible to override the default JSP page content
type and/or page encoding either for an entire web-app or as part of Struts 2?
Many
Does anyone know if it is possible to override the default JSP page content
type and/or page encoding either for an entire web-app or as part of Struts 2?
Many thanks.
Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m +44(0) 7949 465 142
e [EMAIL PROTECTED]<mailto:[EM
2007/4/12, Torsten Römer <[EMAIL PROTECTED]>:
Antonio Petrelli wrote:
I'll gladly wait. I'm already happy that it works now, and I am glad I
tried Struts2 after making two minor webapps with
JSF/MyFaces/Tomahawk/Tiles - maybe a cumbersome combination
It seems that you did not try Shale (includ
Antonio Petrelli wrote:
> 2007/4/12, Torsten Römer <[EMAIL PROTECTED]>:
>> However the documentation states that "The latter [StrutsTilesListener]
>> provides tighter integration with Struts features such as freemarker
>> integration." so I wonder if this applies to the Tiles servlet as well
>> an
2007/4/12, Torsten Römer <[EMAIL PROTECTED]>:
However the documentation states that "The latter [StrutsTilesListener]
provides tighter integration with Struts features such as freemarker
integration." so I wonder if this applies to the Tiles servlet as well
and if it would be better to use it ins
st fine on my Linux/Tomcat 5.5
>> development box but when I deploy the app to the provider's Linux/Tomcat
>> 5.5 webspace the content type is suddenly text/plain instead of
>> text/html and all I see is the HTML source.
>>
>> The funny thing is, that when a
development box but when I deploy the app to the provider's Linux/Tomcat
> 5.5 webspace the content type is suddenly text/plain instead of
> text/html and all I see is the HTML source.
>
> The funny thing is, that when an action is executed through
>
>
>
> the conten
I added Tiles to the struts2-blank-2.0.6 example webapp and started to
work on my application. All works just fine on my Linux/Tomcat 5.5
development box but when I deploy the app to the provider's Linux/Tomcat
5.5 webspace the content type is suddenly text/plain instead of
text/html and all
I have a Struts2 action that uses an XSLT result to generate a final
XHTML document that gets sent to the client. This action is sending the
content-type of "text/xml" so IE6 is displaying the information as an
XML tree, instead of showing a rendered html document.
/xsl/defaults.xsl
Leo Asanov wrote:
This wouldn't work for me because content type have to be different under
different circumstances, but response.setContentType works just fine.
Thanks!!
Be very careful with this, as if you send anything but a text-based
content type, you could be in for a surprise.
This wouldn't work for me because content type have to be different under
different circumstances, but response.setContentType works just fine.
Thanks!!
Cheers,
Leo
Bart Busschots <[EMAIL PROTECTED]> wrote: You can set it in the JSP like so:
<%@ page contentType="text/xml&qu
You can set it in the JSP like so:
<%@ page contentType="text/xml" %>
Leo Asanov wrote:
Hi! Is it possible to change content type in action class?
response.setContentType doesn't do anything. Content is html code, generated by
a jsp file. What are my
Hi! Is it possible to change content type in action class?
response.setContentType doesn't do anything. Content is html code, generated by
a jsp file. What are my options?
Cheers,
Leo
-
Ring'em or ping'em. Make PC-to-phone ca
quot;, "inline" );
BUT, when I get to the end of my action class, what do I return? I cant
return to a JSP page because I've set the content type to be PDF (or
excel)
So, instead of
mapping.findForward("success");
what can I do?
On 5/12/05, *Frank W. Zammetti* <[EMAIL
claration, but here's the real problem
I'm in the action class, and I can can work on the response using
response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline" );
BUT, when I get to the end of my action class, what do I
and I can can work on the response using
> >
> > response.setContentType("application/pdf");
> > response.setHeader("Content-disposition", "inline" );
> >
> > BUT, when I get to the end of my action class, what do I return? I cant
> > r
content type from an action
Okay, I've got it opening the second browser (finally got back to it) using
the target="_new" in the form declaration, but here's the real problem
I'm in the action class, and I can can work on the response using
response.setCon
quot;);
response.setHeader("Content-disposition", "inline" );
BUT, when I get to the end of my action class, what do I return? I cant
return to a JSP page because I've set the content type to be PDF (or excel)
So, instead of
mapping.findForward("success");
what can I
t;
>> The code would look like this:
>>
>>
>>
>>
>>
>> When the user clicks on the button, the action "exportToPdf.do" opens an
>> ServletOutputStream and writes whatever you want. The headers are also
>> set to the content-ty
-
> > From: David Johnson [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 12, 2005 11:17 AM
> > To: Aladin Alaily; Struts Users Mailing List
> > Subject: Re: Opening a NEW browser for a 2nd content type from an action
> >
> > whoa that's simple. I'm tryin
ssage-
From: David Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 11:17 AM
To: Aladin Alaily; Struts Users Mailing List
Subject: Re: Opening a NEW browser for a 2nd content type from an action
whoa that's simple. I'm trying that first Thanks
One things though, I
ke this:
>
>
>
>
>
> When the user clicks on the button, the action "exportToPdf.do" opens an
> ServletOutputStream and writes whatever you want. The headers are also
> set to the content-type you want and the format you want (inline or
> attachment).
>
> Ala
om
>
> On Thu, May 12, 2005 10:47 am, David Johnson said:
> > hmm I dont think I understand. so instead of redirecting to an action
> > mapping, just add the HTML myself, like you would if you were writing a
> > servlet (no jsp) application? interesting.
> >
> > you'
. The headers are also
set to the content-type you want and the format you want (inline or
attachment).
Aladin
> Hey all
>
> is it possible to forme my struts app to open up a second browser window
> for
> the purpose of streaming a different content type (like a pdf file) into
>
were writing a
> servlet (no jsp) application? interesting.
>
> you're right, I dont need a nice tiles definition page for my pdf/xls
> output.. all I really need is to pop up a browser, set the content type,
> and
> direct the response into the new browser.
>
> is there
second browser
does not open).
Thanks,
Paul
-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 10:48 AM
To: Benedict, Paul C; Struts Users Mailing List
Subject: Re: Opening a NEW browser for a 2nd content type from an action
hmm I dont think I
op up a browser, set the content type, and
direct the response into the new browser.
is there a way to target a browser like you can in a but using an
? like a target="pdfOutput" or something? that might work..
h
On 5/12/05, Benedict, Paul C <[EMAIL PROTECTED]> wrote:
>
cally.
Thanks,
Paul
-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 10:31 AM
To: Struts Users Mailing List; CCNY
Subject: Opening a NEW browser for a 2nd content type from an action
Hey all
is it possible to forme my struts app to open up a s
Hey all
is it possible to forme my struts app to open up a second browser window for
the purpose of streaming a different content type (like a pdf file) into it
while maintaining the page in the original browser?
Essentially, I have a nicely rendered HTML report in browser "a" and
47 matches
Mail list logo