I am building my app in Google App Engine

Ok, here I got a Servlet

public void doPost(HttpServletRequest req, HttpServletResponse resp)
        throws IOException {
     String firstName=req.getParameter("firstName");
     System.out.println(URLDecoder.decode(firstName, "UTF-8")+" "+ firstName);
  }

Now, I sent "Thủy" to the Servlet and it shows this output

th?y th?y

Then, I set up appengine-web.xml

<appengine-web-app>.......
 <env-variables>
    <env-var name="DEFAULT_ENCODING" value="UTF-8" />
  </env-variables>
</appengine-web-app>

Then when running i got this error:

com.google.appengine.tools.development.EnvironmentVariableChecker$IncorrectEnvironmentVariableException:
 One or more environment variables have been configured in appengine-web.xml 
that have missing or different values in your local environment. We recommend 
you use system properties instead, but if you are interacting with legacy code 
that requires specific environment variables to have specific values, please 
set these environment variables in your environment before running.
[Mismatch environmentVariableName=DEFAULT_ENCODING 
environmentVariableValue=null appEngineWebXmlValue=UTF-8 
appEngineWebXmlFile=C:\Users\henry\workspace8\FluentEnglish\war\WEB-INF\appengine-web.xml]
    at 
com.google.appengine.tools.development.EnvironmentVariableChecker.check(EnvironmentVariableChecker.java:75)
    at 
com.google.appengine.tools.development.ApplicationConfigurationManager.checkEnvironmentVariables(ApplicationConfigurationManager.java:240)
    at 
com.google.appengine.tools.development.ApplicationConfigurationManager.access$000(ApplicationConfigurationManager.java:32)
    at 
com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.checkEnvironmentVariables(ApplicationConfigurationManager.java:394)
    at 
com.google.appengine.tools.development.JettyContainerService.connectContainer(JettyContainerService.java:211)
    at 
com.google.appengine.tools.development.AbstractContainerService.createConnection(AbstractContainerService.java:273)
    at 
com.google.appengine.tools.development.AbstractInstanceHolder.createConnection(AbstractInstanceHolder.java:37)
    at 
com.google.appengine.tools.development.AbstractModule.createConnection(AbstractModule.java:73)

So, *what's wrong?*

*Why doesn't HttpServletRequest show Unicode Text?*

*How to make HttpServletRequest show Unicode Text?*

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/2bcf809a-92b5-4bd2-b605-3c50889eec53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to