بســم الله الـرحمــن الرحيــم
بحمد لله ثم بفضل الأعضاء هنا توصلت لحل مشكلة اللغه العربيه في برامج ال JSP و ال Struts
و قمت بتنظيم طريقة الحل و وضعتها هنا
http://m-hewedy.blogspot.com/2009/01/enabl...n-java-web.html
شكرا لكم
بســم الله الـرحمــن الرحيــم
بحمد لله ثم بفضل الأعضاء هنا توصلت لحل مشكلة اللغه العربيه في برامج ال JSP و ال Struts
و قمت بتنظيم طريقة الحل و وضعتها هنا
http://m-hewedy.blogspot.com/2009/01/enabl...n-java-web.html
شكرا لكم
المدونة لا تفتح عندي ..او قد تكون محظورة من نوع الاتصال الذي استخدمه
هل لك ان تدرج الموضوع كاملا هنا
بالتوفيق
الله معك..
الموضوع باللغه الإنجليزيه للاسف و لم اقم بترجمته للعربيه بعد , و على ذلك ساقوم بنشره هنا مع الإعتزار للأخوه المشرفين
Enabling Arabic in Java web applications (JSP apps and Struts apps )
One of the most big problems you can face as a java web developer is how
to make you web application accepts Arabic (non-ISO-8859-1 characters)
characters from the users in the input text boxes.
In JSP/Servlet applications, a small googling can solve the problem, but
with a framework such as Struts, the matter differ somewhat.
If your web application uses the Database ( the most if not all does )
you should insure that the problem is not in the Database itself that cannot
save Arabic characters, you should try hand-entering Arabic words in varchar
and nvarchar fields, if it accepts Arabic characters, then the problem is in
the JSP/Servlet or Struts and you will find the solution here.
For pure JSP/Servlet Applications :
Two steps and every thing well be done.
First: in each JSP page write this tag at the top of the page :
<%@page language="java" contentType="text/html; charset=UTF-8"%>
Second : in each Servlet that works as the controller for you JSPs, write these two statements at the top of your service()/doGet()/doPost() methods.
request.setCharacterEncoding("UTF-8");That’s all about Enabling Arabic character acceptation in your JSP forms
For Struts Applications:
Also two steps :
First: in each JSP page write this tag at the top of the page :
<%@page language="java" contentType="text/html; charset=UTF-8"%>
Second: write a Filter class the wraps your org.apache.struts.action.ActionServlet class and put these two statements in its doFilter() method
request.setCharacterEncoding("UTF-8");example filter :
public class ArabicEncodingFilter implements Filter {And then wrap all your Servlets with you Filter by putting this in web.xml :
<filter>
غفر الله لنا جميعا
المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية
جارٍ التحقق من المتواجدين…