marubinotto / Piggydb

Piggydb is a Web notebook application that provides you with a platform to build your knowledge personally or collaboratively.
http://piggydb.net/
Apache License 2.0
149 stars 35 forks source link

Search form error with unicode character in linux #27

Open moviefuns opened 5 years ago

moviefuns commented 5 years ago

Hello. I've deployed piggydb with tomcat 8.5.3 on alpine linux 3.9. Everything is fine but some problem on search text form. When I input unicode characters in search form, in post result pages the keyword was replaced by question marks. Followed many instructions I've add utf-8 encoding support in tomcat conf files, server.xml and web.xml, as bellow.

server.xml: "<connector ..... URIEncoding="UTF-8" .... >"

web.xml uncomment " setCharacterEncodingFilter ... " section and "setCharacterEncodingFilter ... " section.

But with no luck, when I input unicode characters in search form, the result page still got question mark which should be the unicode characters. Could anyone help me, please?

pimgeek commented 5 years ago

I had encountered similar problems, and I recommend using winstone.jar instead of tomcat. the command line for your reference:

java -jar winstone.jar --warfile=piggydb.war \
     --httpsListenAddress=0.0.0.0 --httpsPort=443 \
     --httpPort=-1 --ajp13Port=-1 \
     --httpsKeyStore=your_keystore_name.jks --httpsKeyStorePassword=your_keystore_password
moviefuns commented 5 years ago

I had encountered similar problems, and I recommend using winstone.jar instead of tomcat. the command line for your reference:

java -jar winstone.jar --warfile=piggydb.war \
     --httpsListenAddress=0.0.0.0 --httpsPort=443 \
     --httpPort=-1 --ajp13Port=-1 \
     --httpsKeyStore=your_keystore_name.jks --httpsKeyStorePassword=your_keystore_password
  • the winstone.jar version I used is 1.7.0 - url
  • the md5 checksum is - 9ddcffb6158cee6278f797076c644560

Thank you. Try winstone.jar later.

UPDATE: Awesome! Winstone.jar works! Thank you pimgeek!