Saturday
JSP
-
แก้ไข javazoom กับ JSP ให้รับค่าจาก Form เป็นภาษาไทย (5,132)
lt % String encoding "utf 8" % gt lt % boolean allowresume true % gt lt % nbsp MultipartFormDataRequest mrequest new MultipartFormDataRequest request null 1 MultipartFormDataRequest CFUPARSER encoding allowresume % gt
-
การใช้ภาษาไทย กับ java web application servlet jsp (28,712)
การใช้งาน java web app กับภาษาไทย มักจะมีปัญหา เรื่องไม่แสดงผลตามที่ต้องการ หรือใส่ข้อมูลหน้าเว็บ เป็นภาษาไทย แต่เมื่อ submit แล้ว กลับแสดงผลออกมาเป็นตัวอะไรก็ไม่รู้ ดังนั้นผมจึงได้รวบรวมข้อมูล และเสนอวิธีการจัดการเกี่ยวกับ การแสดงผลภาษาไทย และภาษาอื่น ๆ ของ application ที่ทำงานบน java web app conta
-
Session ID ของ JSP (4,250)
lt %out println request getRequestedSessionId % gt
-
แสดง URL ด้วย JSP (4,058)
lt %String url request getRequestURL toString out println url % gt ผลลัพท์เช่น nbsp http www webub com ชำระเงิน 9 11 htmlคืนค่าอื่น ๆ ดูที่http java sun com javaee 5 docs api javax servlet http HttpServletRequest html getPathTranslated
-
JSP Session Object (5,338)
Session object is medium to interact with client and server Session is a connection between user and server involving exchange of information between users computer and server Server knows information about each other by these session object Web server put information of user in session object
-
เปลี่ยนชื่อไฟล์ Rename file in JSP (4,037)
lt % page language "java" import "java io " errorPage "" % gt lt html gt lt head gt lt title gt File Handling in JSP lt title gt lt head gt lt body gt lt %String fileName getServletContext getRealPath "jsp txt" File f new File fileName boolean flag f renameTo new File getServletContex
-
ตรวจสอบว่ามีไฟล์ปรากฏจริงไหม ด้วย JSP checking file type for existing file or as directory (4,377)
lt % page language "java" import "java io " errorPage "" % gt lt html gt lt head gt lt title gt File Handling in JSP lt title gt lt head gt lt body gt lt %String fileName getServletContext getRealPath "jsp txt" File f new File fileName out print "File exists nbsp nbsp " f exists
-
การสร้างไฟล์ ด้วย JSP Create new file through JSP (7,883)
lt % page language "java" import "java io " errorPage "" % gt lt html gt lt head gt lt title gt File Handling in JSP lt title gt lt head gt lt body gt lt %String fileName getServletContext getRealPath "test txt" File f new File fileName f createNewFile % gt lt body gt lt html gt
-
อ่าน text file Reading text file in JSP (6,308)
lt % page language "java" import "java io " errorPage "" % gt lt html gt lt head gt lt title gt File Handling in JSP lt title gt lt head gt lt body gt lt %String fileName getServletContext getRealPath "jsp txt" File f new File fileName InputStream in new FileInputStream f BufferedI
-
ลบไฟล์ ด้วย JSP (4,741)
lt % ลบไฟล์ nbsp nbsp nbsp String fileName1 "webUB com doc" ที่อยู่ไฟล์ nbsp nbsp nbsp nbsp java io File faf1 new java io File fileName1 nbsp nbsp nbsp nbsp if faf1 exists { faf1 delete out println "File Deleted " nbsp }% gt