Character encoding across Web application contexts

          If I submit an HTTP request encoded in SHIFT-JIS across Web application contexts,
          the characters seem to get mangled. Do I need to do anything special to pass request
          objects that are encoded in SHIFT-JIS to another context.
          

a. EUC-JP
EUC is Extended Unix Code.
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=x-euc-jp">x-euc-jp should be EUC-JP. You use x- for non-registered
encoding names with IANA.
b. JIS
Japanese Industrial Standard
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-2022-jp">To be precise, JIS means nothing. JIS has many standards.
It is an ISO-2022 encoding applied to JIS code sets.
c. Shift_JIS
Microsoft's Japanese encoding method loosly based on
JIS.
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=x-sjis">Use "charset=Shift_JIS" in most cases.
>
d. UTF-8You use charset=UTF-8.
- Which one of the above 4 I should use? Either one is fine as long as you include the meta tag
in HTML. If you want to support older generation of
browsers, then skip UTF-8. If you target i-mode
phone browser, use Shift_JIS.
- Do I have to worry about the encoding of the
Japanese data being entered by user in the input
fields in the HTML form?Yes. Use the same encoding as the encoding of the form.
Make sure to call response.setEncoding to set the
enxoding for the parameter processing.
- What should be encoding of the content of html
output generated by the JSP?Use contentType tag in page directive.

Similar Messages

  • Sessions across Web Applications (WARs)

    I've heard that you can't share session information (http session) across web applications or war files in the j2ee framework. However, I haven't seen any proof of this? I'm struggling to find information telling that I can't do this. Can someone elaborate a bit?
    Thanks.

    Hi !
    It is TOTALLY WRONG that someone wrote here that a
    separate JVM is started for each web-app! No way. Run
    any appserver and do a 'ps -ef|grep java' and I bet
    you will see only one forever :-). Correct
    Steve, it is the classloader hierarchy in all
    appservers that prevents you from sharing sessions (i
    would say classes loaded by various web-apps). There
    is something called a web-app / WAR classloader, which
    is 4th in the hierarchy of JVm classloader hierarchy.
    Since all your web-app loaded classes are loaded by
    this classloader and since each web-app has a "peer"
    classloader at same level for its own web-app, you
    will never be able to share across web-apps. Incorrect, just because you can have separate classloaders for separate web applications does not mean that those web applications cannot share instances.
    It is also possible to have classes which are globally available to ALL web applications which are loaded as part of the servlet container. Tomcat versions 4+ have a common area where classes can be made available. These classes are not loaded within the Web Application classloader at all.
    Not only that but it is possible to configure web application contexts such that they can also share things like sessions. This feature is definitely part of the Apache Tomcat release and as this is taken by Sun to be the Reference Implementation of the Servlet Container I would assume that is also part of the J2EE Standard as well.
    YOu can always use the DB stuff that other genltmen
    has already suggested.

  • How to define JAXP Parsers and Transformer in a Web Application Context

    Hi
    I need to define JAXP Parsers and Transformer in a Web Application Context where I can deploy this application in any J2EE Application Server without modifying the server. That means that I can't set System properties or set the jaxp.properties file. I tried to use the META-INF/services/javax.xml.transform.TransformerFactory file but it didn't work.
    Any ideas?

    Hi
    I need to define JAXP Parsers and Transformer in a Web Application Context where I can deploy this application in any J2EE Application Server without modifying the server. That means that I can't set System properties or set the jaxp.properties file. I tried to use the META-INF/services/javax.xml.transform.TransformerFactory file but it didn't work.
    Any ideas?

  • What's the available value for weblogic.jsp.encoding in web application.

    Hi,
              I'm using chinese windows nt 4.0 and weblogic 5.1 sp6.When I did not set
              weblogic.jsp.encoding to GB2312 , when the jsp file contain's chinese , the
              output will be error .And when I did not set it , the output is correct, but
              when I use request.getParameter("SomeFormElement")(the element inputed
              chinese), the return value is error.
              How should I set weblogic.jsp.encoding value to satisfy all this problem?
              When I set the value to ISO-8859, there is an exception:
              java.io.UnsupportedEncodingException: Charset: 'ISO-8859' not recognized,
              and there is no alias for it in the weblogic.httpd.charsets property. So
              What's the available value for weblogic.jsp.encoding in web application?
              Pan
              

    hi ,
    i think the best way is to create java beans ,in that bean call your EJB ,
    and check the validation over there.
    and make that bean scope to session.
    in each and everypage try to check the session ,if it is not valid then forward to your login page...
    otherwise continue to give access to him like guest
    Regards,
    AfTaB

  • Share graphic layout across web applications (WAR)

    Does somebody know how to share graphic layout across web applications?
    e.g. how to dynamically include a layout html across multiple webapps, so, if I make a change to that layout,, the change is automatically reflected in all webapplications already deployed.
    any idea will be appreciated

    Hi,
    To have a common layout across multiple web applications you can use cascading style sheets (css). By making use of the same style sheet you can have the same appearance in all the web applications. Changing the styles in the css will be reflected in all the pages that make use of this css. The changes wont be effected though in all the already deployed web applications. They will have to be re deployed for the changes to take effect.
    Hope this helps you
    Cheers
    Giri :-)
    Creator Team

  • SharePoint 2013 : Content organizer rules to move the document across web applications

    Hi,
    I wanted to move  the document in drop off library to another web application based on the metadata values.I am thinking of doing this using content organizer rules but I am not sure it will help across web application.
    Is there any other out of the box or no customization solution to achieve this requirement?

    Hi Prasad,
    According to your description, my understanding is that 
    you want to move documents across web applications and keep the metadata. Is it right?
    For moving documents across web applications, you can use Send To connection to achieve it. However, it may cause some meta data missing.
    More information about how to use Send To connection to route documents:
    http://www.informit.com/articles/article.aspx?p=2131831&seqNum=4
    So, for your issue, I suggest you use a third party tool or solution to do it.
    There is a CodePlex solution, check if it is useful for you:
    https://spdeploymentwizard.codeplex.com/
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Character encoding in Web Dynpro source code

    Hi all,
    I want to use special characters like "äüß" in Web Dynpro java code and can't find a possibility to specify the character encoding (ISO-8859-1) for Developer Studio Web Dynpro source editor.
    After rebuilding or compiling the code looks like "äüß".
    In the Java perspective source editor of eclipse/Developer Studio is a menu entry edit/encoding/... but not in Web Dynpro perspective.
    Does anybody know how to set encoding?
    Michael

    Hi Michael,
    Perhaps you can try converting your unicode characters to Java String literal with this web site  (http://www.snible.org/java2/uni2java.html).
    The characters that you supplied convert to "\u00E4\u00FC\u00DF", perhaps inserting that as the String will help.
    Best regards,
    Patrick.

  • How to load objects in web application context during oc4j startup?

    Hi
    How I can put some objects in application context during oc4j application startup?
    I'm using oracle as10g j2ee and web cache edition.
    Thanks

    An idea would be to write your own OC4JStartup implementing class and have this thing create the objects you want and bind them to JNDI.

  • Preserve session across web applications.

    I've deployed 2 different web applications, each part of their own .ear . Is
    there any way to make the two web applications use the SAME session object
    ? My problem is that when I store an object in the session within one
    application, the object isn't available in the session-context for the other
    application.
    I've also verified that they are actually using two different sessions by
    tracking the session-id at script-level. I'm using wl 6.1 if that helps
    //Linus Nikander - [email protected]

    Linus,
    We were faced with a similar situation but our team responsible for the
    Web applications decided to go with a single web-app in the end and we
    bear the cost of not very nice build.
    An alternative solution for you will be instead of setting the
    authentication in the session to set the user object in a cookie and
    then use it for all web applications.
    I believe that is the idea behind the Weblogic Identity Assertion
    security providers
    (http://e-docs.bea.com/wls/docs70/dvspisec/ia.html#1145598) but we've
    never had to deal with it yet.
    Regards,
    Dejan
    Linus Nikander wrote:
    Thank you for your answer, a few follow-up questions.
    As you point out I definitely don't want to implement something that is
    outside the spec. and vendor specific. But how then would you suggest
    solving the following situation:
    At the moment we are co-operating with other actors within a larger project.
    Our task is to design and code one of the modules, which consists of EJBs,
    JSPs and Servlets. From the beginning this was successfully deployed and
    packaged in a single EAR.
    Problems arose when we started to integrate our EAR with a WAR written by
    one of the other participants in the project. The problem was that they are
    responsible for authentication for the whole site, i.e. the login-module.
    The've implemented the login so that when a user successfully logs in, a
    "user"-object is stored in the session. The very fact that the user-object
    exists means that the user is validated. The method for verifying that a
    user is authenticated is thus to check the session for the occurence of this
    object before execution of any JSP or Servlet. For files within their WAR
    this works fine, but as soon as a call is made to a JSP or Servlet within
    our EAR the method of authentication breaks because a new session is
    generated, void of the user-object.
    We've solved the problem by co-deploying a single WAR. In my opinion this is
    a really ugly solution because there is no longer a clean separation of
    "their" and our files, and it makes deployment a real hassle.
    Skipping any points of view as to their chosen method of authentication (we
    don't like it either but its going to remain unchanged no matter what), do
    you see any other way for us to get things to work where we (hopefully) can
    keep our files separate from one another.
    //Linus Nikander - [email protected]
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]...
    It would be a violation of the Servlet spec to do so and although in 6.0
    you could share the session at least in 7.0 it isn't the case.
    I'm not familiar with 6.1 but even if you could do it there then your
    application is not going to be portable since you'll be relying on a
    specific vendor implementation.
    Regards,
    Dejan
    Linus Nikander wrote:
    I've deployed 2 different web applications, each part of their own .ear .
    Is
    there any way to make the two web applications use the SAME session
    object
    ? My problem is that when I store an object in the session within one
    application, the object isn't available in the session-context for the
    other
    application.
    I've also verified that they are actually using two different sessions by
    tracking the session-id at script-level. I'm using wl 6.1 if that helps
    //Linus Nikander - [email protected]

  • Unable to forward requests across web applications

    Hi,
    please let me know if there is a solution to the following problem.
    I have 2 EARs, each having a web application inside.
    Whenever the user submits a request, it goes to a filter in webApp1. This filter checks the request.getRequestURI() and if a specific url pattern is present, it modifies the request using a wrapper and then dispatches it to webApp2. The code in the filter is as follows,
    The original url is,
    http://localhost:8001/ivx/odr/account/frameset.do
    HttpServletRequestWrapper rw = new HttpServletRequestWrapper((HttpServletRequest)request)
    public String getRequestURI()
         //Here I return "/odr/account/frameset.do"
    public String getContextPath()
         //Here I return "/odr" which is the context path of webApp2
    public StringBuffer getRequestURL()
         //Here I return "http://localhost:8001/odr/account/frameset.do"
    public String getServletPath()
         //Here I return "/account/frameset.do"
    Now the filter in webApp2 intercepts the request and after some security checks, does a chain.doFilter(). The struts RequestProcessor is called, which determines the mapping for "/account/frameset.do" and is able to create a valid ActionForward object. Finally when the request is forwarded from the requestProcessor, I get a "404-Page cannot be displayed" error.
    Is this because,
    1. The contextPath is getting lost somewhere ? (I checked the request, it has the context Path of webApp2 correctly)
    2. The request itself is lost ?
    3. The ActionForward object points to a JSP file location like "/account/frameset.jsp" ? (The jsp is located in the account folder directly below the webApp2 context root folder.)
    Thanks.

    I followed the instructions found in the App Server 7 documentation and everything worked fine.
    The instructions I followed are in the document found at this link:
    http://docs.sun.com/source/816-7156-10/agplugin.html#17655
    Just FYI...
    I also checked with Sun about why this process is now necessary and I asked about what happened to the web connector from 6.x. Sun had this reply:
    The Web Server Plug-in is the new web connector. It just hasn't been wrapped with an installation yet ... which is why it is tedious. The old Plug-in for 6.5 would ultimately have the same type of obj.conf entries. I'm not sure if there will be an installation wrapper for it once the Enterprise Edition is released.
    The Web Server Plug-in is different right now in that it doesn't 'know' about multiple instances yet. These are capabilities that will be introduced in the Enterprise Edition in March. Of course, that doesn't stop you from having multiple instances of the web server talking to multiple instances of the app server. It just means that the web server instances have to be directed to the app server instances rather than discovering them.

  • Web Application Context Menu - Problem posting comments

    Hi all,
    We are using SAP BW 7.0 (nw2004s) and the web interface to the reports (Web Applications). Some specific reports have to enable users to insert information about specific lines (comments about non-conformity issues). We were planning to insert documents (via context menu) integrated with portal KM.
    Using the Analyzer, we had no problem at all. All the information posted was saved in KM and we could read it using "RSA1 - Documents" and using the Analyzer. The commented value shows a flag that indicates the comment (a small "paper" picture). But when we try to use the Web Application to post this information, it is saved ok but it can only be read using "RSA1 - Documents" and not by the Web Application (it always shows no new documents) and there's no indication in the commented value at all. Has anyone seen something like that? We need to use the web interface. Using the Analyzer is not an option.
    Thanks in advance

    This is not the 2004s runtime in the 2004s system. The url you provided is the BW 3.x runtime in the 2004s system. Make sure on the client side in IE, you don't have and script blocking or popup blocking. For client side settings in IE, make sure your settings are specified as outlined in this blog:
    Troubleshoot the SAP NetWeaver 2004s BI Frontend Installation
    Also, make sure your url has the fully qualified domain name for your server.

  • Broken character encoding in Web Gallery / Journal

    Hi,
    Is there another place to submit bugs to Apple than posting here?
    I noticed that the web gallery and journals are exported with HTML indicating iso-8859-1 encoding, but the characters are actually encoded with "MacRoman" (which isn't supported in most browsers and doesn't have a standard encoding name).
    I put an example here:
    http://tmp.askask.com/2005/12/aperture_bug/
    (See the ø in my name be messed up on the bottom line).
    Speaking of character sets; it really should export UTF-8 rather than iso-8859-1. (But anything else than MacRoman would be an improvement!)
    - ask
    Quad PowerMac   Mac OS X (10.4.3)  

    After i read elsewhere in this forum that you can "hack" the HTML Templates I thought I give it a try and change the encoding settings.
    So I went to Apperture.app/Contents/Resources/English.lproj/WebThemes/ and went into the Directory of the Theme I used, Pictures. I opened detail.html, gallery.html, journal-gallery.html and journal.html with BBEdit (I think TextEdit is just fine, too) and changed the charset to macintosh as this seems to be the official name of the MacRoman encoding as stated here: http://www.iana.org/assignments/character-sets
    I saved everything (you might make a backup of the original files first) and opened Aperture, exported my Web-Journal to a shared folder with my wife's PC and made some tests.
    The encoding was recognized perfectly and automatically by Firefox (PC, 1.0.7), InternetExplorer (PC, 6.0) and of course Safari and Firefox on the Mac.
    So it seems I can work around my second "favorite" bug in Aperture...
    (My "favorite" is that I lost some projects when naming them with äöü's, it's soooo good to have a backup at hand)
    iBook G4 12"   Mac OS X (10.4.3)   1.25 GB RAM

  • Character encoding in web gallery

    Hi,
    When creating web galleries, LR seems to use UTF-8 encoding for it.. Can I change it to use ISO-Latin-1? I use mostly Finnish in the galleries, and UTF-8 causes some of the Finnish characters to show incorrectly. A test gallery where you can see the problem:
    http://patej.1g.fi/judo/alkeiskurssi_k2006/content/index.html
    My browsers try to read it as ISO-Latin-1-page, which results in showing 'ä' and 'ö' characters incorrectly. I can of course change the encoding the browser uses to view the page, but that isn't too convenient.. Any ideas how to create LR-galleries, which use ISO-Latin-1?
    looking forward to any advice,
    --patrik

    Well, it seems LR's output
    does not validate. Hence some browsers seem to get the charset wrong as "iso-8859-1". (If I change the display to UTF-8 in the browser manually, the site looks fine.)
    Try manually fixing at least the
    first reported error (the omitted end tag in the charset-definition) and see if it works then.
    Alexander.
    Canon EOS 400D (aka. XTi) • 20" iMac Intel • 12" PowerBook G4 • OS X 10.4 • LR 1 • PSE 4

  • Session sharing across web applications in an EAR File

    Hi,
    I have an ear file which further has 5 war files. I want to share the same session
    object across all these war files in the ear file. Can u pls tell me if this is
    possible in weblogic. If yes how?
    Thanks,
    Akash

    I'm sorry, by the J2EE 1.3 specification this isn't allowed. I have sent it on
    to the servlet team to add as an option but that won't be in time for you. If
    you need to share state between them I would probably try and put it in another
    place like an EJB or a singleton class in the system classpath.
    Sam
    [email protected] wrote:
    Hi,
    I have an ear file which further has 5 war files. I want to share the same session
    object across all these war files in the ear file. Can u pls tell me if this is
    possible in weblogic. If yes how?
    Thanks,
    Akash

  • Authentication Across Multiple Web Applications (Revisited)

              Its been an ongoing battle, but I've made some insight into this situation. The problem stands as it seems impossible to authenticate against one web application deployed as a WAR archive and have that authentication carry across to another web application with the same security constraints. I've been told by BEA that, quote:
              "It seems to me that we are violating section 11.6 of the servlet 2.2 spec which talks about webapps"
              I've also been told that this is fixed in WLS 6.0, reference issue #38732.
              For those of us building production environments using 5.1 instead of 6.0 XML based configuration, this does NOT solve our problem.
              I've dug further into the bowels of 5.1 and found that if you manually set the realm name in the login-config of the security constraint in the web.xml file in each WAR deployment as such:
                   <login-config>
                        <auth-method> [whichever method] </auth-method>
                        <realm-name>WebLogic Server</realm-name>
                   </login-config>
              Authentication will carry across web applications. However, I've noted that the session management then becomes unpredictable. For example:
              I log into the application TESTAPP1 which contains a protected servlet that outputs the session ID and attempts to get the authenticated principal name from the "_wl_authuser_" session variable. Upon first load of the page (after the login dialog box), the session is null [can be fixed with .getSession(true) call instead] and the "_wl_authuser_" object does not exist. Reload the page and the session appears as well as the "_wl_authuser_" object. Strange.
              I then move to TESTAPP2, which does not prompt me for authentication but also is missing the session in the same manner. Upon browser reload, the session is created with a different ID and the "_wl_authuser_" object is now available with the appropriate principal name.
              Upon moving back to TESTAPP1, I am not prompted for authentication however, I am assigned yet another session ID after browser reload, different from the first.
              So it seems that although authentication is carried across web applications, the session IDs as you move from TESTAPP1 to TESTAPP2 change, and then change again but not back to the original when going back to TESTAPP1.
              This is a particular problem since we are using Vignette's V5 as our main client and tracking sessions through V5 - this would quickly become unmanageable if a single page view access three or four different application components with three or four different session ids.
              I'm wondering if we can expect the same behavior from WLS 6.0?
              Ideally, I'd like to see WebLogic use a single session ID to track users across multiple web applications but still have session independence between applications. So if I store something in session in TESTAPP1, its not available in TESTAPP2. Does this outline the behaviour in WLS 6.0? Can anyone verify this?
              Some food for thought. Thanks!
              ./Chris
              Senior Systems Anaylst
              MassMutual Financial Group
              

    Hello! I am searching an answer to this question too!!!
    Did you get some news regarding this item?
    Regards,
    C.M.

Maybe you are looking for