Sitemap

Amicuk Programming Answers

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

2015-12-10   Views:1

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
Whenever I click preview video on the iTunes store, the preview box doesn't show the video. Instead it shows purple, brown & green fuzz. It's the same when trying to watch a video I have purchased. I don't know how to fix this? Any ideas? Thanks (:Vi [More]
Well, here's the story. I'm sorry in advance that it's such a huge post. I haven't used my iPod classic for about 8 or so months now, and it's just been chillin in my drawer, turned off. Yesterday, I decided to plug it in to update it with all of the [More]
I have Windows Vista and have Skype 7.6 which says it is the latest update.My question is that I do NOT have the option of leaving either a voice message or a video message to my contacts when they are offline. that option is not highlighted in the w [More]
I have licenses 2.4 installed. While performing system update it tried to install licenses 2.5 from [testing]. And that's what I receive: # pacman -Q licenses licenses 2.4-1 # pacman -S licenses error: could not prepare transaction error: failed to c [More]
SW2010から3Dでのアウトプットを試みていますが.必ずエラーが出ます. 「変換エラー」というシンプルなダイアログが出た後で.ファイルの形式がサポートされていないか または破損しているかもしれないという旨のメッセージが. でもファイルは壊れていませんし.拡張子がSLDPRTのSWの部品ファイルはサポートに入っているはずです. 何か情報をおもちの方がいらっしゃったら教えてください. ※USAのフォーラムで同じ質問も見つけましたが.返信はまだだれからも入っていないようですし 日本語のページのみを見 [More]
Hello everyone! Im sorry for my english! =) My licensing Photoshop will have some problem. Brashes and any manipulates will be so slow. My computer is not too strong, but is not reason. Many users who has power computer has same problem too. And i se [More]
I have a Mac Book Pro and am trying to export my project, but cannot as the SHARE options are all faded out. All I am doing is adding text to a movie. It plays back fine in motion.Hey Adam. Try this link and see if any of the suggestions help: https: [More]
Hi all, I have a datagrid with checkbox as renderer. after selecting few checkboxes,if i scroll the datagrid checkboxes are selected at random. my renderer code is attached.. thanksHi karnatis, Just like Alex told you, we can do it easily by for (var [More]
Does any one know of any program out there that is the equivalent of readystate for windows, that would work with OS X. readystate is if you think back to being in school where the admin has the computer to completely reset it self to its original st [More]
Hi everybody, I'm trying to get the name of the menu that a particular menu item is classified under, and thus far I can't figure out how. Can anyone give me a hand with this, please? I have a SSCCE that describes my efforts so far: import java.awt.e [More]