Sitemap

Amicuk Programming Answers

Content-type problems while using struts+tomcat+apache+mod_jk

2015-12-10   Views:0

Advertisement

Hi! Could anyone tell me how to solve the following problem. Struts-application works under apache + mod_jk + tomcat 3.3.1. Operating system is Linux. It's impossible to me to make tomcat to send HTTP-answers in UTF-8. I was trying the following: 1.

Hi!
Could anyone tell me how to solve the following problem.
Struts-application works under apache + mod_jk + tomcat 3.3.1. Operating system is Linux.
It's impossible to me to make tomcat to send HTTP-answers in UTF-8.
I was trying the following:
1. Set <DecodeInterceptor defaultEncoding="UTF-8" /> in server.xml
(Has no effect. Tomcat responds with Content-Type: text/html; charset=iso-8859-1)
2. Insert <%@ page contentType="text/html; charset=utf-8"%> into each page header.
(Works fine but when struts-application gets GET/POST-data the two-bytes national characters
are comverted into "?"-symbols)
Is there any way to make tomcat 3.3.1 to send HTTP-answers in UTF-8?

The replay answer
Advertisement
I don't know what the DecodeInterceptor does... but....
If you use number 2, you are only telling the browser what that page's output is. When you process the data, Tomcat for some reason always reads it as ISO8895-1, so you need to tell Tomcat to change it to UTF-8. You can do that by calling request.setCharacterEncoding("UTF-8"), either in the JSP page, or if you need it in a servlet, you can do that in a filter...
It's somewhat described here how to set it up...
http://www.mail-archive.com/[email protected]/msg01193.html

Go to See the other 2 answers

Content-type problems while using struts+tomcat+apache+mod_jk

Category:DefaultRelease time:2015-12-10Views:130

Hi! Could anyone tell me how to solve the following problem. Struts-application works under apache + mod_jk + tomcat 3.3.1. Operating system is Linux. It's impossible to me to make tomcat to send HTTP-answers in UTF-8. I was trying the following: 1.[More]

Extended Content type problem

Category:DefaultRelease time:-0001-11-30Views:130

Extended Content type problem I want to extend the content type 'ExtendDocument' from 'Document'. So I use 'Oracle Internet File System Manager' to create a new Class Object named 'EXTENDDOCUMENT', which is extend from 'DOCUMENT', and add a attribute[More]

Content type problem for 'does not appear to be a proper arcive'

Category:DefaultRelease time:2015-10-11Views:130

Hi all, The following code will create a ZipOutputStream using ByteArrayOutputStream (not FileOutputStream) and attach the outputstream to a MIME multipart email using ByteArrayDataSource (so the file never exists physically). It works and sends the[More]

Content-Type problems

Category:DefaultRelease time:-0001-11-30Views:130

Hi, Can anyone tell me the difference in application/x-www-form-encoded and application/x-www-form-urlencoded content types in HTTP ? Thanks in advance!I don't know what the DecodeInterceptor does... but.... If you use number 2, you are only telling[More]

Could not write value Content Type problem when installing itunes 08. help!

Category:DefaultRelease time:-0001-11-30Views:130

When I tried to update itunes 08 there was an error. Instead, I uninstalled and downloaded the itunes8 setup. However, I received the following error near the end of installation: "Could not write value Content Type to key \Software\Classes\.aif. Ver[More]

Content Type problem

Category:DefaultRelease time:-0001-11-30Views:130

I am trying to retrieve the content type of a file. String strContentType ="";           File file = new File(fileName);           FileNameMap  fnmMime        = URLConnection.getFileNameMap ( ) ;            if ( fnmMime != null ) {             [More]

Sharepoint 2013 and SSRS 2012 Integration - Report Server Content Types not displayed

Category:DefaultRelease time:2015-10-11Views:130

Hello, Everyone:   I installed SSRS 2012 on our Sharepoint 2013 application server following the step-by-step instruction from the posting below:   http://msdn.microsoft.com/en-us/library/jj219068.aspx   Everything goes well after STEP 3 is completed[More]

Problem with content type

Category:DefaultRelease time:2015-10-11Views:130

Hi All, I have set the content type to text/html by using the following statement in jsp <[email protected] contentType=�text/html�%>And if I give out.println("<a href="aaa.do">Click here</a>"); it is showing me a link to click[More]

Tomcat always generates charset in Content-Type http header !!!

Category:DefaultRelease time:2015-10-11Views:130

Dear All! I need urgent help with a problem I met with and any suggestion are very appreciated! The problem is: We are using Tomcat as a web server (and JSP engine), and we would like to use a user control written in C# 2.0 on one of our pages. I've[More]

XML Parser and Content-type/encoding problem

Category:DefaultRelease time:2015-10-11Views:130

I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code: public static String toHTML(Document doc, String xslSource){         ByteArrayOutputStream testo = new[More]

Problems when trying to return information for External Content Types in Sharepoint 2013

Category:DefaultRelease time:2015-10-11Views:130

This is my first post on the forum, until I tried on this problem but have not found anything. When trying to return the information from the external content displays the following error: Error retrieving data from mill. Administrators: query the se[More]

Hot
I have a shcedule that I saved and now I want to save it as a .pdf file, so I go into File, SaveAs and select .pdf in the drop down and the default filename is "document" not what the name of my schedule was.  Where is that set?  How do I make i [More]
When I am trying to delete a row from application table , after selecting a row from table and clicking the 'X' icon in application table and the clicking on commit , I am getting "JBO-25019: Entity row with key oracle.jbo.Key[13000 1 ] is not found [More]
Hi Guys, i was following migration tutorial to NetBeans Visual Web Pack from http://www.netbeans.org/kb/55/vwp-migration.html but apparenlly some of pages didnt work in the runtime and i realized some of jar files have different size example : betwee [More]
I am creating a progressive download movie for the web using the flv. In a new Flash doc, I have an imported .mov on one layer, that was created and exported from a different Flash doc. I have an mp3 on the layer above the imported .mov. The movie pl [More]
Hi I am trying to extend an ABCS service. I went to ProcessSalesOrderSiebelReqABCSImplExtensionV2 partner link and wsdlRuntimeLocation property points to http://SOA_HOST:SOA_PORT/AIAComponents/ExtensionServiceLibrary/Siebel/ProcessSalesOrderSiebelReq [More]
when I try to migrate vision builder to labview I get an error message "Error at Labview code creation step #6"Does the error seem to be occurring at the same step in your Vision Builder AI script? See if you can determine if a certain step intr [More]
Hi guys, I probably did smth wrong - after I was finished editing a movie I copied the project from the project folder to an external disk (not enough space to store movies on my computer) as well as everything that event folder contained, and delete [More]
Hello! A Function Module at backend which is called like below shown has also two flags. I intend to set those flags on true. How is that working ? This is the call of FM inside a method. wdContext.current__I_Rf02_Ial_Query_InputElement().modelObject [More]
My N95, locked to orange, has all of a sudden lost the ability to show me the last 30 days of my calls. I have tried to reset the phone, changed the log setting from 1 day to 30 several times, but all to no avail. I have tried restoring my phone, aga [More]
In the lower measures grid in the Visual Studio IDE I no longer see my totals next to the measure itself. What caused them to go away and can I get them back?do you mean the total like on the screenshot below? It seems that the totals was use defined [More]