java - Mapping a servlet in my JSP -
i have java ee application has war file , ejb file. war file contains jsps/html , ejb contains servlets/beans , ejb. try call servlet in 1 of jsp pages, cant find it. file im looking authenticate. located in ejb file figure path
action="../../ejbshoppingcart-ejb/build/classes/servlet/authenticate
i played around url, modifying taking taking away build or classes , bunch of other ways.... servlet has @webservlet(name = "authenticate", urlpatterns = {"/authenticate"}) annotation.
i know can transfer of files ejb file war file , think solve problem. there way map correctly?
urlpatterns = {"/authenticate"}
so, it's mapped on url pattern of /authenticate
. assuming server runs on localhost:8080 , webapp context name myapp
, /web-inf/web.xml
conform servlet 3.0 spec, can access http://localhost:8080/myapp/authenticate
i'm not entirely sure whether @webservlet
class inside ejb ever located , loaded servletcontainer. servlets go in war , end in /web-inf/classes
. inside jar in /web-inf/lib
possible, has contain servlet 3.0 compatible /meta-inf/web.xml
Comments
Post a Comment