Võ Văn Hải's blog

Chỉ có một điều tuyệt đối đó là mọi thứ đều tương đối…

Cơ bản về Cấu hình Tomcat

Để chạy được 1 ứng dụng web viết bằng JSP hoặc Servlet bạn cần 1 web server để host các trang của bạn. Có rất nhat62 Webserver khác nhau dùng cho việc này nhưng có lẽ Tomcat là 1 webserver đơn giản, dễ sử dụng nhất. Bài viết này sẽ hướng dẫn các bạn cách chúng ta có thể sử dụng Tomcat làm 1 web server và cách chúng ta triển khai các trang web của chúng ta lên đấy.

Đầu tiên, bạn hãy download phần mềm Apache Tomcat tại http://tomcat.apache.org/. Tôi nghĩ là bạn nên download bản zip để khỏi phải cài đặt.

Sau khi download thành công, giải nén ra 1 thư mục nào đó, giả sử là (C:\javaSofts) bạn cần làm 1 vài bước để có thể chạy Tomcat.

1> Tất nhiên máy bạn phải cài đặt JDK

2> Bạn thêm 1 biến môi trường có tên JAVA_HOME và có giá trị là đường dẫn đến thư mục cài đặt JDK

3> Trong Tùy biến môi trường PATH, bạn hiệu chỉnh lại và thêm vào ;.;%JAVA_HOME%\bin;

Bây giờ bạn vào thư mục bin của thư mục bạn đã giải nén Tomcat(C:\javasofts\apache-tomcat-6.0.18\bin), chạy tập tin startup.bat. OK, Nếu việc thực thi thành công, bạn sẽ có cửa sổ sau(nhớ đừng tắt nó nhé)

TomcatStarting

Bây giờ bạn mở trình duyệt lên, gõ vào URL sau http://localhost:8080/

Kết quả sẽ như  sau
Tomcat Web Manager

Mẹo: bạn nên tạo 1 shortcut của tập tin startup.bat ra desktop, sau đó nhấn chuột phải lên shortcut này, chọn properties. Bạn gắn 1 phím tắt cho nó trong mục Shortcut Ket là tổ hợp phím nào đó(ví dụ Ctrl-Alt-J). Nhấn OK. Bây giờ mỗi lần muốn start Tomcat bạn chỉ cần nhấn tổ hợp phím Ctrl-Alt-J trong bất kỳ đâu.

Các ứng dụng web của bạn sau này đều phải đặt trong thư mục webapps của tom cat(E:\javasofts\apache-tomcat-6.0.18\webapps).

Bây giờ bạn thử tạo 1 dự án HelloWorld nhé:

Trong thư mục webapps, bạn tạo thư mục HelloWorld.

Trong thư mục HelloWorld bạn tạo 1 file có tên index.jsp có nội dung

<html>
<head>
<title>.:Hello JSP:.</title>
</head>
<body>
<h1>Hello JSP world!</h1>
<h2>Current Time: <%= new java.util.Date()%></h2>
</body>
</html>

Bây giờ bạn mở trình duyệt, đi đến địa chỉ http://localhost:8080/HelloWorld/index.jsp

Kết quả như sau:
HelloWorldJSP

Chúc bạn thành công !

115 Responses to “Cơ bản về Cấu hình Tomcat”

  1. New_member said

    Chào Anh!
    Em đã thực hiện theo hướng dẫn của Anh nhưng báo lỗi sau khi chạy index.jsp:

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: Unable to compile class for JSP:

    An error occurred at line: 22 in the generated java file
    The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

    Đây là lỗi gì ạ?
    em chạy trên eclipse cũng bị lỗi tương tự.
    Mong Anh hướng dẫn.
    Xin cảm ơn.

  2. vovanhai said

    Biết đâu bản TOmcat của bạn bị lỗi. Down lại rồi giải nén. Thử lại.

  3. khanh said

    anh ơi cấu hình cơ bản như vậy chỉ chạy được 2h apache lại chết!!

  4. Đinh Tiến Tình said

    Mình xin bổ sung thêm một chút về cấu hình Tomcat của thầy Hải.Đối với các bạn lần đầu làm quen với Tomcat có thể nên cấu hình như sau :
    -1.chuột phải lên My Computer -> chọn thẻ ‘Properties’->chọn ‘Advanced’ tab->chọn ‘Environtment Variables’
    -2.chọn New trong mục ‘User Variable…’ điền vào các giá trị sau:
    muc ‘variable name’ điền CATALINA_HOME,mục ‘variable value’ điền : đường dẫn đến thư mục Tomcat(ví dụ :C:\apache-tomcat-6.0.20).lưu ý là các giá trị không có dấu nháy(‘)-> ok.
    -3.làm lại thao tác 2 với giá trị mới là : mục name : CATALINA_BASE , mục value :đường dẫn đến thư mục Tomcat -> ok.
    -4.Vẫn trong cửa sổ ‘Environment Variable’,trong ‘System Variable’,các bạn tìm biến ‘Path’, chọn edit thêm vào cuối,đường dẫn đến thư mục ‘bin’ của tomcat (ví dụ : C:\apache-tomcat-6.0.20\bin),nhớ thêm dấu chấm phẩy ở phía trước nhé(;).
    hi vọng giúp được các bạn tránh 1 số lỗi khi chạy tomcat.
    còn 1 số cấu hình nâng cao hơn các bạn thử search trên google khi đã làm quen với nó rồi nhé.
    chúc may mắn.

  5. pham quoc vuong said

    Em chao Thay!
    thay co the sua giup e loi tomcat nay duoc khong?
    em dang lam do an bang struts

    HTTP Status 500 –

    ——————————————————————————–

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: java.lang.NullPointerException
    org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:520)
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:427)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

    root cause

    java.lang.NullPointerException
    faq.select_faqAction.execute(select_faqAction.java:61)
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.

  6. vovanhai said

    Lỗi |NullPointerExeption kìa. Kiểm tra xem code có chỗ nào kết quả là 1 đối tượng null không.

  7. AJAXPro said

    Xin được hỏi anh một vấn đề mà tôi đang gặp trục trặc dưới đây.

    Tôi có đoạn code của file index.jsp dưới đây, nằm trong thư mục webapps/demo:

    Kết quả trả về không phải là webapps/demo/test.txt như tôi mong muốn mà luôn là giá trị của CATALINA_HOME. Làm thế nào để read/write file vào đúng thư mục mà mình đang đứng nhỉ?

  8. AJAXPro said

    Tôi xin gõ lại đoạn code đã bị mất ở trên:

    java.io.File f = new java.io.File(“test.txt”);
    out.println(f.getAbsolutePath());

  9. xin hoi said

    Anh ơi cho em hỏi trong phần Tomcat minh đưa file servlet vào đâu để nó có thể điều khiển trang JSP ạ

  10. vovanhai said

    Đưa nó vào Tên_Project\WEB-INF\classes\.

  11. aloha said

    Bạn ơi cho hỏi mình đã cài tomcat và chạy thành công nhưng trên máy khác truy cập vào thì không được. Vậy đó là lỗi gì vậy?

  12. Daniel said

    Thầy ơi, cho em hỏi, sau khi làm em chạy được như thầy nói, nhưng một lúc sau khi em mở lại cửa sổ startup.bat. Nó xuất hiện rồi lại…mất tiêu???

  13. Võ Văn Hải said

    coi lại cái biến môi trường JAVA_HOME

  14. Võ Văn Hải said

    coi cái firewall, virus program,…

  15. T13TIN said

    Chào Anh
    Cho tôi hỏi Tomcat của tôi có vấn đề thế này: Hệ thống chạy bình thường nhưng thỉnh thoảng lại stop. Tôi phải shutdown Tomcat rồi start lại thì nó chạy.
    Xin hỏi lỗi này là do đâu vậy?

  16. Võ Văn Hải said

    Các sản phẩm free của thế giới java hay bị lỗi này. Bạn thường xuyên “clean” nó thì nó mới trơn tru. Cu thể: trong Tomcat lâu ngày bạn chạy nhiều chương trình thì nó tạo các thư mục rác chứa trong thư mục: %TOMCAT_HOME%\work\Catalina\localhost. Bạn vào đó xóa sạch đi. Khởi động lại Tomcat.

  17. Chào anh.
    Rất cảm ơn về những bài hướng dẫn rất bổ ích của anh. Số là cái Tomcat của tôi cũng bị y trang bạn Daniel.
    Anh có cách nào hướng dẫn cụ thể cách khắc phục giùm với.
    Cảm ơn nhiều.

  18. Mai Thanh said

    cảm ơn Thầy lất lất là nhìu

  19. Nguyen Duc Thuan said

    HTTP Status 500 -

    --------------------------------------------------------------------------------

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: Unable to compile class for JSP
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    root cause

    java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.20\work\Catalina\localhost\Hello\org\apache\jsp\index_jsp.java (The system cannot find the path specified)
    java.io.FileOutputStream.open(Native Method)
    java.io.FileOutputStream.(FileOutputStream.java:179)
    java.io.FileOutputStream.(FileOutputStream.java:70)
    org.apache.jasper.compiler.Compiler.setupContextWriter(Compiler.java:276)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:215)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.

    Thầy giúp em fix lỗi này được không ạ. Em cảm ơn thấy!

  20. Võ Văn Hải said

    Lỗi tồn tại trong trang JSP nên không biên dịch được.
    Đừng có để tomcat vào program file, bạn theo cách của tôi, download bản portable, giải nén ở ổ D chẳng hạn là OK.

  21. Quang Trung said

    Dạ e chào thầy !

    E đang thực hiện bài tập làm web bằng mô hình 3 lớp trong Java. Chương trình hoàn thiện không bị lỗi gì hết . Lúc đầu e chạy thì ra được . Nhưng sau đó bị lỗi HTTP 404 ” unknown resource ” không thầy . Thầy giúp e với ạ , e đã cài lại TOMCAT nhưng vẫn bị lỗi này ạ !

    E chân thành cảm ơn thầy !

  22. Võ Văn Hải said

    Lỗi này em ghi như thế biết đâu mà đoán chứ. Em đóng gói app của em lại thành file war rồi down tomcat portable mới về, copy file war vào thư mục webapps của tomcat sau đó start tomcat rồi truy xuất lại xem sao.

  23. Quang Trung said

    HTTP Status 404 – /BookStore/vd_view1

    ——————————————————————————–

    type Status report

    message /BookStore/vd_view1

    description The requested resource (/BookStore/vd_view1) is not available.

    ——————————————————————————–

    Apache Tomcat/6.0.29

    dạ e làm lại thì có lúc bị , lúc không bị ạ!!

  24. Duy Linh said

    Em đang tìm hiểu về uPortal connect with Sakai mà em không thể nào cài 2 thứ đó trên 1 máy được, em cài build và deploy uPortal chạy OK, tiếp tục build Sakai thì nó lại chiếm cổng 8080 của uPortal đang chạy-> cuối cùng chỉ có 1 trong 2 cái chạy cổng 8080, em thấy trên 1 video sakai có thể chạy cổng 8081 mà em tìm hiểu mấy ngày cxng không biết chỉnh nó như thế nào. Thầy Hải có giúp em được không

  25. Võ Văn Hải said

    chưa thử cái này bao giờ. Bạn nào đã làm rồi hãy giúp bạn ấy!

  26. Võ Văn Hải said

    Chưa triển khai được làm sao mà chạy.

  27. Quang Trung said

    dạ , thầy có thể hướng dẫn rỏ hơn chút cho e được không ạ!? dạ , e chưa hiểu ạ!? triển khai cái nào ạ !?

  28. Phuong said

    Thầy ơi e dùng tomcat tích hợp sẵn khi cài netbean nên không cần phải config gì đúng không ạ?
    Nhưng khi em khởi động tomcat bằng startup.bat thì nó báo lỗi ghê quá, vậy là sao ạ?

  29. Phuong said

    Thầy ơi em sử dụng tomcat tích hợp sẵn khi cài netbean, như vậy thì không cần phải config gì đúng không ạ. Khi em chạy tomcat trong netbean thì vẫn bình thường, nhưng tắt netbean rồi, chạy bằng startup.bat thì nó lỗi tùm lum. Nó bị sao vậy ạ?


    java.util.logging.ErrorManager: 4
    java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Apach
    e Tomcat 6.0.26\logs\catalina.2011-03-31.log (Access is denied)
    ...INFO: Server startup in 993 ms

  30. Võ Văn Hải said

    Làm ơn đọc kỹ lại hướng dẫn

  31. Võ Văn Hải said

    Như tôi đã nói. Bạn phải cấu hình JAVA_HOME var, trong Path var, thêm %JAVA_HOME%\bin. sau đó mới chạy.
    Tuy nhiên bạn chạy Tomcat lỗi như vậy vì Win7/Vista bảo vệ thư mục Program Files rất kỹ nên không chạy được. Bạn làm theo hướng dẫn: download Tomcat về và giải nén nó ra đĩa nào đó (không ở trong Program Files) là OK.

  32. Nguyễn Hùng said

    Anh cho em hỏi là cho em hỏi là khi em start service trên tomcat thì nó báo lỗi thế này:

    Too much memory allocated : 1022496
    The service is exited

    Em đã set các biến như sau:

    ANT_HOME=C:\source_code\apache-ant-1.8.2

    CATALINA_HOME=C:\source_code\apache-tomcat-7.0.11
    CATALINA_OPTS=-Xms64m -Xmx128m

    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_24
    Em đang làm btập thực hiện cuộc gọi SIP giữa 2 máy thông qua server tomcat mà lần nào bắt đầu nó cũng báo thế

  33. Võ Văn Hải said

    trog file server.xml bạn xem thử có cấp bộ nhớ cho nó quá lớn không? sửa lại ít chút!

  34. Duy Linh said

    Thầy ơi em cài được sakai chạy trong cổng 8081 nhưng cài lại win sửa file server.xml trong tomcat\conf từ 8080 sang 8081 khi start thì nó start port 8081 mà chạy gõ locahost:8081 lại không chạy gõ localhost:8080 mới chạy em cũng không hiểu lun. Trước khi cài lại máy chạy bình thường. Thầy có gặp tình huống này chưa giúp em với (help me)

  35. Nguyễn Hùng said

    Em đã thử vào file server.xml nhưng không thấy cài đặt bộ nhớ ở đâu cả.Anh có thể hướng dẫn cụ thể hơn ko,vì em thấy trong file này toàn là config port mà

  36. Võ Văn Hải said

    Sorry. Tôi nhầm. Muốn cấp thêm bộ nhớ cho tomcat, bạn làm như sau:

    1. Right click My Computer.
    2. Click Properties.
    3. Click the Advanced tab (or click Advanced system settings in Windows Vista).
    4. Click the Environment Variables button
    5. Under System variables, click New…
    6. Set variable name to CATALINA_OPTS and variable value to -Xmx2048M (Note the dash in front of the X)
    7. Click OK.
    8. Click OK on the Advanced tab to close the window.
  37. Võ Văn Hải said

    CHưa thấy. Có lẽ em xem lại thuộc tính redirectPort thử xem sao.

  38. Nguyễn Hùng said

    Em có thử theo hướng dẫn của anh, nhưng vẫn không chạy dc, tomcat của em gặp vấn đề rất kì quặc là:
    khi nhấn nút start service thì nút start bị mờ đi,và nút stop nổi lên(có thể nhấn stop)
    nhưng khi kích vào nút service details thì nó vẫn báo lỗi:

    too much memory allocated
    the servicce is existed

    sau đó quay lại màn hình thì service đã dừng(nút stop mờ đi và nút start nổi lên (nên em nghĩ là service chưa hoạt động)

    anh có thể xem giùm em ở 2 link ảnh này

  39. Duy Linh said

    Em lại gặp vấn đề với tomcat 5.5.33 nó không chạy được localhost:8080 trong khi tomcat 5.0, 6.x, 7.x lại chạy tốt. Vẫn start port ok mà gõ localhost:8080 thì không thấy gì hết. Thầy có thể giúp em không? Em restart máy lại nhiều lần mà nó vẫn vậy.

  40. Võ Văn Hải said

    Tại sao phải dùng đúng với phiên bản 5.5.53 đó nhỉ!
    EM thử cài lại bản mới xem sao!

  41. hung said

    Em xin chào Thầy Hải!
    Thầy cho em hỏi khi em chạy file jsp này thì báo lỗi , em đã sữa nhiều chổ mà không hết, mong thầy coi dùm em. Em xin cảm ơn thầy.

    In-place deployment at C:\Program Files\Java\javaSofts\apache-tomcat-7.0.12\webapps\HelloWorld\vidung\build\web
    Deployment is in progress…
    deploy?config=file%3A%2FC%3A%2FUsers%2FUSER%2FAppData%2FLocal%2FTemp%2Fcontext7140656883408497314.xml&path=/
    http://localhost:8080/manager/deploy?config=file%3A%2FC%3A%2FUsers%2FUSER%2FAppData%2FLocal%2FTemp%2Fcontext7140656883408497314.xml&path=/
    C:\Program Files\Java\javaSofts\apache-tomcat-7.0.12\webapps\HelloWorld\vidung\nbproject\build-impl.xml:683: The module has not been deployed.
    BUILD FAILED (total time: 37 seconds)

  42. hung said

    hi cac ban!
    Ban nao co ban tomcat share cho minh voi sau minh down ma van file thu muc classes.
    xin cam on!

  43. Võ Văn Hải said

    Bạn không nên để tomcat trong “program files”. copy bản portable tôi đề cập lên 1 thư mục nào đó rồi tham chiếu trong IDE mà xài.

  44. tuan anh said

    em lam web java chay tren tomcat
    khi chay tren netbean thi chay rat binh thuong, nhung khi em tat netbean chay tren tomcat thi lai co loi xay ra.
    Theo cach thay chi thi giai nen no ra nguoi programfile, nhung nhu the thi cung nhu chay tren netbean rui thay
    Co cach nao ma cho no chay tren TomCat khong vay.
    org.apache.jasper.JasperException: Unable to compile class for JSP:

    An error occurred at line: 6 in the generated java file
    Only a type can be imported. model.pojo.Mall resolves to a package

    An error occurred at line: 8 in the generated java file
    Only a type can be imported. model.pojo.Mall resolves to a package

    An error occurred at line: 32 in the jsp file: /shop_2/web/mall.jsp
    Mall cannot be resolved to a type
    29: event
    30:
    31: <%
    32: ArrayList list = (ArrayList) request.getAttribute(“listMall”);
    33: for (int i = 0; i < list.size(); i++) {
    34: Mall m = list.get(i);
    35:

    An error occurred at line: 34 in the jsp file: /shop_2/web/mall.jsp
    Mall cannot be resolved to a type
    31: <%
    32: ArrayList list = (ArrayList) request.getAttribute(“listMall”);
    33: for (int i = 0; i
    37:

    Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:95)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

  45. Võ Văn Hải said

    Em dùng netbean viết, xong em build. Vào thư mục dist của nó trên đĩa, copy file jar rồi paste nó vào thư mục wbapps của tomcat. sau đó khởi động tomcat, bạn sẽ có ứng dụng web được triển khai và có thể truy xuất.

  46. chamhoc said

    Thầy ơi, thầy nói rõ cụ thể lại bước 2 và bước 3 được ko ạ ? E ko hiểu về bước 2, b3 lắm:

    2> Bạn thêm 1 biến môi trường có tên JAVA_HOME và có giá trị là đường dẫn đến thư mục cài đặt JDK

    3> Trong Tùy biến môi trường PATH, bạn hiệu chỉnh lại và thêm vào ;.;%JAVA_HOME%\bin;

    Mong thầy nói rõ chi tiết 2 biết trên giúp e với. Thanks thầy nhiều.

  47. chamhoc said

    àh, sau 15 phút đã hiểu hết rồi. Thanks thầy nhiều.

    Nó chạy rồi

  48. TranNam said

    Cứu Cứu Cứu với. Thầy ơi !
    Em đã làm và chạy OK rồi, xong rồi e quay lại bước :

    (Mẹo: bạn nên tạo 1 shortcut của tập tin startup.bat ra desktop, sau đó nhấn chuột phải lên shortcut này, chọn properties. Bạn gắn 1 phím tắt cho nó trong mục Shortcut Key là tổ hợp phím nào đó(ví dụ Ctrl-Alt-J))

    Ý em là trong bước này em muốn thay đổi biểu tượng startup.bat, trở thành 1 biểu tượng khác, và tất cả những gì .bat cũng thay đổi theo biểu tượng mới.
    Sau khi thay đổi biểu tượng thì nó ko chạy nữa (Cho dù nhấn tổ hợp phím, hay là click vào biểu tượng startup.bat) chán thiệt.
    Xóa đi rồi down bản khác về, nó cũng ra lại biểu tượng đó, chứ ko là biểu tượng cũ, giờ phải làm sao hả thầy ? Thầy chỉ cách cho e nhé. Thanks Thầy.

  49. Võ Văn Hải said

    Bạn xem ở đây

  50. vui_ve_nao said

    Chào anh, em đang tìm hiểu cơ chế logging của tomcat, em dùng tomcat 6
    Em thấy trong thư mục cài đặt Tomcat (C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs) thì file log của nó không giống như các webserver khác, toàn là java
    Em muốn biết khi truy cập 1 trang web thì nó lưu log khi mình mở trang nào, POST/GET, trình duyệt sử dụng, IP, v.v… thì xem ở đâu ạ?

  51. chung said

    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_24
    bien = CATALINA_HOME va duong dan toi tomcat

  52. Minh tuan said

    Thầy cho em hỏi mới đầu thì tomcat chạy bình thường , sau khi em khơi động lại thì nó báo lỗi này

    thầy chỉ em cách fix với

    thank thầy

    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    Created dir: D:\web server\WebApplication1\build\web\WEB-INF\classes
    Created dir: D:\web server\WebApplication1\build\web\META-INF
    Copying 1 file to D:\web server\WebApplication1\build\web\META-INF
    Copying 3 files to D:\web server\WebApplication1\build\web
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    Created dir: D:\web server\WebApplication1\build\empty
    compile:
    compile-jsps:
    Starting Tomcat process…
    Waiting for Tomcat…
    Starting of Tomcat failed.
    D:\web server\WebApplication1\nbproject\build-impl.xml:683: Deployment error:
    Starting of Tomcat failed.
    See the server log for details.
    BUILD FAILED (total time: 23 seconds)

  53. Khoa said

    Cảm ơn thầy rất nhiều.

  54. MyNhi said

    Mình bị lỗi dưới đây mà không biết sao hết , mong bạn giúp mình với ! Cám ơn bạn nhiều.
    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: /index.jsp (line: 6, column: 1) Page directive must not have multiple occurrences of pageencoding
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:102)
    org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:194)
    org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
    org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
    org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
    org.apache.jasper.compiler.Validator.validateDirectives(Validator.java:1749)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:194)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:601)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.16 logs.

  55. Võ Văn Hải said

    Bạn xem lại directive @page tại dòng 6 cột 1 có bị trùng với 1 cái directive nào đã khai báo chưa?

  56. Võ Văn Hải said

    có khi Tomcat Server bị lỗi. EM download bản khác về thử.

  57. hieu said

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    java.lang.NullPointerException
    CL.PictureCO.processRequest(PictureCO.java:142)
    CL.PictureCO.doGet(PictureCO.java:164)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.

    kiem tra dum em cai loi nay voi thay. hieurobin@yahoo.com

  58. Thưa thầy,
    Em có gặp 1 vấn đề nhỏ mong nhận được sự giúp đỡ của thầy :

    Em đã cài Tomcat và JDK để chạy rồi , cũng đã set biến môi trường theo hướng dẫn của thầy tại bài viết này nhưng khi duyệt web vẫn không được. Em load 1 file index.jsp đơn giản , nội dung :

    .:Hello JSP:.

    Hello JSP world!
    Current Time:

    Và trình duyệt báo lỗi :

    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: Unable to compile class for JSP
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    root cause

    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
    org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
    org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
    org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    Apache Tomcat/5.0.28

    Đọc qua lỗi em cũng hiểu là do không tìm được công cụ biên dịch. Tuy nhiên em không biết vì sao , mong thầy giúp đỡ . Cảm ơn thầy rất nhiều .

    àh , khi em truy cập http://localhost:8080/ vẫn ok. Còn khi truy cập http://localhost:8080/hello/index.jsp ( file index với nội dung như trên ) thì lại bị lỗi đó .

  59. Võ Văn Hải said

    File jsp của em bị lỗi rồi. Em thử lại 1 trang khác đi.

  60. Võ Văn Hải said

    Lỗi ở dòng 142 file PictureCO.java. Và lỗi ở đây là NullPointerException. Bạn xem đối tượng bạn dùng ở chỗ đó có init (new chưa) hoặc load thành công không.

  61. Cảm ơn thầy rất nhiều, em đã fix được rồi ạ .

  62. van said

    anh ơi cho em hỏi, hùi đó e xài win 64bit, làm như anh thì chạy ok, em mới cài lại win 32bit, cũng làm như vậy, nhưng khi chạy file startup thì hiện lên màn hình đen, start server lên rồi tự detroy lun, e ko vô đc localhost, vậy nó bị sao hả anh. em có chụp lại lỗi, như ko bit gửi lên thế nào.

  63. van said

    khi start server thì hiện lên như sau:
    Sep 30, 2011 9:31:59 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: Loaded APR based Apache Tomcat Native library 1.1.22.
    Sep 30, 2011 9:32:00 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
    Sep 30, 2011 9:32:02 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler [“http-apr-8080”]
    Sep 30, 2011 9:32:02 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler [“ajp-apr-8009”]
    Sep 30, 2011 9:32:02 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 5127 ms
    Sep 30, 2011 9:32:03 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Sep 30, 2011 9:32:03 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.20
    Sep 30, 2011 9:32:03 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory docs
    Sep 30, 2011 9:32:03 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory examples
    Sep 30, 2011 9:32:04 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory host-manager
    Sep 30, 2011 9:32:04 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory manager
    Sep 30, 2011 9:32:04 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory ROOT
    Sep 30, 2011 9:32:04 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler [“http-apr-8080”]
    Sep 30, 2011 9:32:04 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler [“ajp-apr-8009”]
    Sep 30, 2011 9:32:04 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1845 ms
    Sep 30, 2011 9:32:04 PM org.apache.catalina.core.StandardServer await
    SEVERE: StandardServer.await: create[localhost:8005]:
    java.net.SocketException: Permission denied: listen failed
    at java.net.DualStackPlainSocketImpl.listen0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketListen(Unknown Source)
    at java.net.PlainSocketImpl.socketListen(Unknown Source)
    at java.net.AbstractPlainSocketImpl.listen(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.(Unknown Source)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:422)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:709)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:654)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)

    Sep 30, 2011 9:32:04 PM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler [“http-apr-8080”]
    Sep 30, 2011 9:32:05 PM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler [“ajp-apr-8009”]
    Sep 30, 2011 9:32:06 PM org.apache.catalina.core.StandardService stopInternal
    INFO: Stopping service Catalina
    Sep 30, 2011 9:32:07 PM org.apache.coyote.AbstractProtocol stop
    INFO: Stopping ProtocolHandler [“http-apr-8080”]
    Sep 30, 2011 9:32:07 PM org.apache.coyote.AbstractProtocol stop
    INFO: Stopping ProtocolHandler [“ajp-apr-8009”]
    Sep 30, 2011 9:32:07 PM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler [“http-apr-8080”]
    Sep 30, 2011 9:32:07 PM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler [“ajp-apr-8009”]

    theo như e thấy thì đã start đc server, lỗi ở dòng: java.net.SocketException: Permission denied: listen failed
    như vậy thì sửa làm sao ạ.

  64. Võ Văn Hải said

    Bạn dùng command-line gõ lệnh : “netstat -a” xem thử có cái chương trình nào chiếm cổng 8080 chưa.

  65. Võ Văn Hải said

    có lẽ bạn chưa tạo biến môi trường JAVA_HOME

  66. bichvan said

    Em chào thầy..thầy có thể cho em hỏi
    Em đang làm 1 bài tập về gomba webservice.. em tạo 1 project web, và down gomba_0.8.0 về nhưng chẳng biết add vào project và thao tác với gomba như thế nào cả..em nhờ thầy hướng dẫn cho em.
    Cảm ơn thầy nhiều

  67. Võ Văn Hải said

    Tôi không biết gomba là cái gì hết em ơi. Em thử tự down cái manual của nó mà làm thử.

  68. init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    compile:
    compile-jsps:
    Undeploying …
    undeploy?path=/_qeqwe
    OK – Undeployed application at context path /_qeqwe
    In-place deployment at D:\apache-tomcat-7.0.22-windows-x64\apache-tomcat-7.0.22\webapps\ưqeqwe\build\web
    Deployment is in progress…
    deploy?config=file%3A%2FC%3A%2FUsers%2FVOANHT%7E1%2FAppData%2FLocal%2FTemp%2Fcontext5403147387685437166.xml&path=/_qeqwe
    FAIL – Deployed application at context path /_qeqwe but context failed to start
    D:\apache-tomcat-7.0.22-windows-x64\apache-tomcat-7.0.22\webapps\ưqeqwe\nbproject\build-impl.xml:721:
    The module has not been deployed.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
    BUILD FAILED (total time: 1 second)
    ———————————————

    Lỗi này là lỗi gì vậy thầy ơi??
    Em đã làm như thầy hướng dẩn, nhưng khi test thử thì bị lỗi này :((

  69. Phan Đăng Hưng (nick swenteiger7) said

    Em chào thầy Hải. Cả đêm thứ 7 hôm qua em mport cái myFaces vào thì nó lúc import vào lib xong server cứ thông bao kết quả là the module hasn’t been deployed. Em đặt Tomcat tại ổ D như thầy hướng dẫn thì nó ra là lỗi ở build.xml.

    Em xin gửi ảnh hệ thống ở đây ạ. Cả tối hôm qua import myFaces vào mà ko nổi. Em cũng làm các bước như trên mạng họ hướng dẫn nhưng làm xong thì…. lại ko run được (hình như là do chỉnh web.xml), chán nản kinh khủng.

    Thầy ơi thầy đã gặp vấn đề này bao h chưa ạ

    1. Lúc đầu e ko tham chiếu đến thư viện tomahawk nó chạy bình thường. Thêm cái tomahawk thì lỗi. Làm đúng như cấu hình tomahawk ở đây (http://myfaces.apache.org/tomahawk/extensionsFilter.html) thì nó càng ko chạy được project nên em rất sợ 😦

    2. Khi em bỏ cái tham chiếu đến library của tomahawk nó ra cái lỗi này: http://i970.photobucket.com/albums/ae190/swenteiger7/loi1_bolibrary.png. Em ko hiểu là em có để lib ở trong WEB-INF đâu mà nó cứ chỉ vào chỗ đấy.

    3. Em đã chuyển TomCat sang ổ D nhưng ko ăn thua.

    Thầy đã bao giờ bị thế này chưa ạ :(. Em ko hiểu nổi nữa, gần 1/2 ngày mà config ko nên thân, chán nản và bực mình kinh khủng, Thầy giúp e với. Em cám ơn thầy trước ạ.

  70. Võ Văn Hải said

    Thử nhấn chuột phải lên project, chọn clean. vào thư mục source của em (explorer) xóa thư mục build đi thử xem sau đó build lại.

  71. Tai said

    Em vừa cài tomcat theo như hướng dấn trên.Nhưng đến lúc thử file index thì bị lỗi này.Thầy fix hộ e :-< k bik bị gì :-< có cần thiết phải tạo file index = netbean hay eslipse k ? e tạo = file txt .
    HTTP Status 404 – /HelloWorld/index.jsp

    type Status report

    message /HelloWorld/index.jsp

    description The requested resource (/HelloWorld/index.jsp) is not available.

    Apache Tomcat/6.0.33

  72. Võ Văn Hải said

    Em coi server thử nó có chạy chưa. Có lẽ là chưa chạy.

  73. Tai said

    server e start rồi mà vẫn thế :(.Ngoài tomcat e còn cài appserv

  74. dinh phi said

    thay sửa giúp em lỗi này với thanks thầy

    E:\BAI HOC\lap trinh ung dung mang\BAI TAP\aaaaaaaa\nbproject\build-impl.xml:721:
    The module has not been deployed.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

  75. pham chiến said

    em chạy tomcat va CMD hiện lên hai dòng này, đã hiệu chỉnh lại Environmental Variables thêm biên JAVA_HOME và lấy đường dẫn về bộ cài JDK rồi nhưng tomcat vẫn không chạy mong anh giúp em với nha mail: phamdinhchien.105@gmail.com
    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    At least one of these environment variable is needed to run this program

  76. Võ Văn Hải said

    “Neither the JAVA_HOME nor the JRE_HOME environment variable is defined. At least one of these environment variable is needed to run this program”
    Bạn xem kỹ lại JAVA_HOME của bạn chỉ đúng vào thư mục bạn cài đặt JDK không.

  77. Trung Trần said

    Thầy cho em hỏi là nếu em cài Appserv rồi thì có cần thiết cài Apache tomcat không ạ, Vì em thấy trong Appserv cũng đã có Apache rồi.

  78. Nguyen Trong Minh said

    Chao thay!
    Em la nguoi ngoai dao, chi su dung thoi. Em dung mang noi bo xi nghiep the kiem tra an toan. Hai hom dau chay tot, den hom thu 3 thi bao loi the nay:

    HTTP Status 500 –

    ——————————————————————————–

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException
    ru.bitel.action.TilesRequestProcessor.processException(TilesRequestProcessor.java:142)
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:423)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    ru.bitel.satellite.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:67)
    ru.bitel.satellite.filter.OneUserFilter.doFilter(OneUserFilter.java:120)
    ru.bitel.satellite.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:67)

    root cause

    java.lang.NullPointerException
    ru.bitel.action.DispatchGuestActionBase.getUserLocale(DispatchGuestActionBase.java:406)
    ru.bitel.action.DispatchGuestActionBase.execute(DispatchGuestActionBase.java:44)
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    ru.bitel.satellite.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:67)
    ru.bitel.satellite.filter.OneUserFilter.doFilter(OneUserFilter.java:120)
    ru.bitel.satellite.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:67)

    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.

    ——————————————————————————–

    Apache Tomcat/5.5.9

    Thay xem co the giup em tung buoc mot de khac phuc duoc khong?
    Em cam on thay nhieu!

  79. Võ Văn Hải said

    Xem như vậy thật khó để hướng dẫn. Lỗi là java.lang.NullPointerException nhưng không biết web-app của bạn làm thế nào sao mà fix được.

  80. HO Phuong said

    Chao thay Hai.
    Em dang phat trien ung dung web voi Java Strust with Hibernate 2.0, su dung server Tomcat 5.
    Em muon moi lan phia client truy cap dia chi web tai web server thi se gui ve thong tin cua PC client.
    Trong file java em da viet code lay thong tin cua PC, chay voi netbean o may dang lap trinh thi ok.
    Sau khi build thanh file war roi deploy len server thi voi moi PC client no luon tra ve thong tin cua may chu web.
    Nho thay chi giup em cach cau hinh tren server tomcat de dap ung yeu cau voi ah
    Cam on thay!

  81. HO Phuong said

    sorry, sai email: phuongh.qtr@vietcombank.com.vn
    Neu co dieu kien thay co the gui hdan vao email cho em voi.

  82. Hieu said

    Chao thay!
    Hien tai netbean6.7.1 cua em khong thay servers trong services dau ca. Thay cho em hoi lam cach nao de hien no ra de add them tomcat.
    Em cam on.

  83. Võ Văn Hải said

    Trong netbeans có khác đôi chút. Em vào menu Tool, chọn Server rồi Add Server vào. Chúc vui!

  84. Hieu said

    Em chao Thay! Thay cho em hoi bang cach nao de tao luoc do quan he (diagram) trong mot co so du lieu cua mysql. Em cam on thay nhieu.

  85. Võ Văn Hải said

    “Em chao Thay! Thay cho em hoi bang cach nao de tao luoc do quan he (diagram) trong mot co so du lieu cua mysql. …”
    Viết câu lệnh SQL em à!

  86. hdph said

    E chao thay.thay cho e hoi la: e dung 12 tomcat ket noi den 12 db trong mysql thi duoc,nhung dung hon nua thi bao loi ket noi lien,vay co cach nao de tang gioi han do len ko thay

  87. Nguyễn Hoàng said

    Chào thầy,
    Cho em hỏi lỗi này là lỗi gì thế thầy ơi

    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
    org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:148)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:430)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:499)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560)
    org.apache.jasper.compiler.Parser.parse(Parser.java:130)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:161)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:307)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.35 logs.

  88. minhhue said

    Em chào thầy, em mắc phải lỗi này thầy có thể fix giúp em được không ạ. Em cảm ơn thầy nhiều.
    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    java.lang.NullPointerException
    diemmonhoc.doGet(diemmonhoc.java:72)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.29 logs.
    Apache Tomcat/7.0.29

  89. Võ Văn Hải said

    Lỗi có số hiệu 500 là lỗi phía server, hay nói cho rõ là code của bạn bị lỗi. Tùy tình hình cụ thể mà chỉnh. tốt hơn là nên debug để sửa. Thân.

  90. heohana said

    thầy ơi e cài phần mềm OPENBRAVO đã hoàn tất(có cài TomCat 6.0) nhưng khi chạy trên IE thì báo lỗi không kết nối tới máy chủ localhost,khi em start Tomcat thi k thể strat được và báo lỗi.e mong thay gup dum e

  91. kimoanh said

    Em chào thầy ! thầy giúp em lỗi này với.cảm ơn thầy nhiều!
    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: @CODE=@There are no connections available in jdbc:apache:commons:dbcp:openbravo_myPool
    org.openbravo.base.secureApp.SeguridadData.valido(Unknown Source)
    org.openbravo.base.secureApp.LoginHandler.doPost(Unknown Source)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    org.openbravo.base.HttpBaseServlet.service(Unknown Source)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.openbravo.utils.SessionExpirationFilter.doFilter(Unknown Source)
    org.openbravo.utils.CharsetFilter.doFilter(Unknown Source)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.

  92. manh said

    thầy cho em hỏi về việc truy cập các trang jsp trong mạng LAN. Ví dụ giờ em có 2 máy A và B nối LAN với nhau, trên máy A em xây dựng 1 ứng dụng web jsp, bây giờ muốn từ máy B truy cập được web này thì em phải cài đặt những gì vậy thầy, máy A đóng vai trò server nên đã được cài Tomcat, còn máy B thì cần phải cấu hình ra sao? Chờ hồi âm của thầy

  93. Cuong said

    Khi ghé qua diễn đàn này với vài nội dung về J2ee, em đã nhận thấy sự nhiệt tình của thầy Hải.
    Em cảm ơn thầy với những support tận tình với tất cả các thành viên tham gia.
    Em nghĩ trong tương lai không xa , sẽ có nhiều thành viên ủng hộ trang web này.
    Chúc thầy gặt hái được nhiều thành công trong tương lai gần.

    Nếu tất cả anh em tham gia diễn đàn này đồng tình với mình thì Post Khẩu Hiệu “Cảm Ơn Thầy Hải ” ở phần cuối lời Post trong 2 ngày.

  94. ghhg said

    Tôi bị lỗi như sau: “Without these scripts you will not be able to start nor stop Tomacet from within the IDE.This problem usually occurs if Tomcat was installed using installer, it is recommended to use the Tomcat archive distribution instead”

  95. ghhg said

    sau đó chạy ứng dụng thì được báo lỗi, xin chỉ tôi cách khắc phục
    Deployment error: Access to Tomcat server has not been authorized. Set the correct username and password with the “manager-script” role in the Tomcat customizer in the Server Manager.
    See the server log for details.
    BUILD FAILED (total time: 3 seconds)

  96. Manh Ha said

    Thầy cho em hỏi là em có 11 page của các đơn vị khac nhau, nhưng trong list của Goto không hiển thị hết 11 page này, Vậy xin thầy hướng dẫn cho em hiển thị cả 11 page nay. Xin cảm ơn thầy

  97. Quốc Tuấn said

    Port 8080 required by Tomcat v7.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
    Em nhờ thầy một vấn đề ngoài lề một chút ạ. Khi em cấu hình Tomcat v7.0 với eclipse thì nhận được thông báo như trên, dù đã đổi cổng nhưng vẫn không thể start được sever. Mong thấy giúp đỡ.

  98. Hoài Nam said

    thầy ơi thầy xem giúp em được không ạ
    HTTP Status 404 –

    type Status report

    message

    description The requested resource () is not available.

    Apache Tomcat/5.5.31

    lỗi này phải sửa làm sao hả thầy

  99. Tấn Lực said

    Chào Anh Hải
    Tôi đã cấu hình tomcat xong nhưng khi chạy ứng dụng nó báo lỗi : như sau mong anh chỉ giúp tôi .Chân thành cảm ơn anh nhiều. Mong nhận đươc hồi âm trong gian sớm nhất .
    Deployment error:
    Access to Tomcat server has not been authorized. Set the correct username and password with the “manager” role in the Tomcat customizer in the Server Manager.
    See the server log for details.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:207)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:281)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
    Caused by: java.lang.IllegalStateException: Access to Tomcat server has not been authorized. Set the correct username and password with the “manager” role in the Tomcat customizer in the Server Manager.
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:397)
    at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:625)
    at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:436)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:403)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:359)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:308)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:305)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:427)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:169)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:566)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:172)
    … 16 more
    Caused by: org.netbeans.modules.tomcat5.AuthorizationException
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:398)
    … 26 more

  100. Chandongxung said

    Thầy ơi cho em hỏi Tomcat có thể cài nhiều server để san tải cho 1 ứng dụng được không?
    nếu có thầy có thể hướng dẫn em ko ạ

  101. Võ Văn Hải said

    Thầy ơi cho em hỏi Tomcat có thể cài nhiều server để san tải cho 1 ứng dụng được không?
    nếu có thầy có thể hướng dẫn em ko ạ

    Cái này không có, em có thể dùng 1 AS như jboss chẳng hạn để load balancing

  102. Manh said

    chao thay,em co 1 loi nay mong thay giup do giai quyet
    Em lap trinh web bang JSP nhieu roi nhung lan nay bong dung no bi loi ” Could not find …. catalina.bootstrap”.Dai khai la no k tim dc file catalina gi do.Em khong biet sua lam sao.Mong thay giup do a!

  103. Võ Văn Hải said

    down tomcat mới thôi

  104. vu said

    cho em hoi ti : trong sql voi nebean em ket noi chay dc roi . em xuat bai tap do ra file jar roi chay ok . ma sao trong mang lan em chay file jar no bao loi server

  105. Em chào thầy. Em cấu hình tomcat mới nhất là 8.0 rồi chạy startup.bat thì thành công.
    Nhưng sau khi vào địa chỉ localhost:8080 thì nó báo lỗi sau ở cmd tomcat

    02-May-2014 14:46:28.406 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2178 ms
    C:\Program Files\Java\jdk1.8.0_05\jre\lib\rt.jar: error reading zip file
    02-May-2014 14:46:53.750 SEVERE [http-nio-8090-exec-1] org.apache.coyote.http11.AbstractHttp11Processor.process Error pr
    ocessing request
    java.lang.ExceptionInInitializerError
    at org.apache.catalina.connector.CoyoteAdapter.parsePathParameters(CoyoteAdapter.java:966)
    at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:711)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException
    at java.nio.charset.Charset.put(Charset.java:540)
    at java.nio.charset.Charset.access$200(Charset.java:271)
    at java.nio.charset.Charset$3.run(Charset.java:578)
    at java.nio.charset.Charset$3.run(Charset.java:573)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.nio.charset.Charset.availableCharsets(Charset.java:572)
    at org.apache.tomcat.util.buf.B2CConverter.(B2CConverter.java:49)
    … 11 more

    02-May-2014 14:46:54.265 SEVERE [http-nio-8090-exec-2] org.apache.coyote.http11.AbstractHttp11Processor.process Error pr
    ocessing request
    java.lang.NoClassDefFoundError: Could not initialize class org.apache.tomcat.util.buf.B2CConverter
    at org.apache.catalina.connector.CoyoteAdapter.parsePathParameters(CoyoteAdapter.java:966)
    at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:711)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

  106. Nguyễn Sỹ Lưu said

    Em bị lỗi 403 này thì phải chữa làm sao ạ?
    403 Access Denied

    You are not authorized to view this page.

    If you have already configured the Manager application to allow access and you have used your browsers back button, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager appliction’s HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.

    If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.

    For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

    Note that for Tomcat 7 onwards, the roles required to use the manager application were changed from the single manager role to the following four roles. You will need to assign the role(s) required for the functionality you wish to access.

    manager-gui – allows access to the HTML GUI and the status pages
    manager-script – allows access to the text interface and the status pages
    manager-jmx – allows access to the JMX proxy and the status pages
    manager-status – allows access to the status pages only
    The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:

    Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
    If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.
    For more information – please see the Manager App HOW-TO.

  107. Võ Văn Hải said

    Trong file tomcat-users.xml của thư mục conf trong TOMCAT_HOME, thêm các role và các user như sau

    <tomcat-users>
        <role rolename="tomcat"/>
        <role rolename="manager"/>
        <role rolename="manager-gui"/>
        <role rolename="manager-console"/>
        <role rolename="admin"/>
        <user password="tomcat" roles="tomcat" username="tomcat"/>
        <user password="tomcat" roles="tomcat,manager" username="both"/>
        <user password="admin" roles="manager,admin,manager-gui,manager-script" username="admin"/>
    </tomcat-users>
    
  108. Võ Văn Hải said

    Cài lại JDK, JRE đi bạn. Nhớ đừng cài vào “Program Files” nhé. Tốt nhất là cài ra đĩa C hoặc D

  109. mcr mcr said

    Em cảm ơn thầy vì bài viết hữu ích này!

  110. Tenz said

    Thầy ơi, e có làm 1 software java bằng netbeans (k phải eclipse), E xài extends JFrame. Lập trình chạy rất ổn trên nền windows. E muốn bỏ lên website, vì chỗ làm e mún bỏ lên cho mọi ng cùng xài. E đc bik họ xài IIS server. E k bik làm cách nào để đem cái java app của mình lên web hết. Cái lập trình đó cỡ 6000 codes, e k mún phải làm lại từ đầu.
    E có xài web start (sau 1 hồi google), chạy trong máy tính thì ổn, nhưng khi để lên server lại hiện lỗi :
    Mong thầy giúp

    java.lang.SecurityException: unexpected excpetion
    at com.sun.deploy.security.ruleset.RuleId.pathIncludes(Unknown Source)
    at com.sun.deploy.security.ruleset.RuleId.compareStringToURL(Unknown Source)
    at com.sun.deploy.security.ruleset.RuleId.onExceptionList(Unknown Source)
    at com.sun.deploy.security.ruleset.RuleId.isException(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDefaultOrException(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
    at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMainDeploymentRuleSet(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getMatchImpl(Unknown Source)
    at com.sun.javaws.jnl.LaunchDesc.getJREMatcher(Unknown Source)
    at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
    at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.URISyntaxException: Relative path in absolute URI: file://C:///inetpub/estimation/folder/dist/launch.jnlp
    at java.net.URI.checkPath(Unknown Source)
    at java.net.URI.(Unknown Source)
    at java.net.URI.(Unknown Source)
    … 20 more

  111. Hữu Lợi said

    cho e hỏi: cách cấu hình Ram trong tom cat chỉnh nhu the nao ?

  112. Thom_thao said

    Cho em hỏi để thay đổi giáo diện (UI) của CAS SERVER thì mình làm như thế nào vậy Thầy?

  113. Anh said

    Em chào thầy! e xem ví dụ ở trên thầy hướng dẫn nhưng khi chạy . Thầy xem giúp e với:
    type ステータスレポート

    tin nhắn /hello/index.jsp

    giải thích The requested resource is not available.

  114. Anh said

    e sua duoc roi thay a

  115. hung said

    Apr 26, 2018 10:35:30 AM org.apache.catalina.startup.Catalina start
    SEVERE: The required Server component failed to start so Tomcat is unable to start.
    org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:958)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

    Apr 26, 2018 10:35:30 AM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler [“http-nio-8082”]
    Apr 26, 2018 10:35:30 AM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler [“ajp-nio-8011”]
    Apr 26, 2018 10:35:30 AM org.apache.catalina.core.StandardService stopInternal
    INFO: Stopping service [Catalina]
    Apr 26, 2018 10:35:30 AM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler [“http-nio-8082”]
    Apr 26, 2018 10:35:30 AM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler [“ajp-nio-8011”]

    Em chạy tomcat 9 trên chương trình sử dụng Elasticsearch nhưng lại bị lỗi ntn , thầy xem giúp em cách sửa lỗi này như thế nào với ạ , em cảm ơn

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.