2014年5月14日星期三

Suggesting that no class javax.servlet.http.HttpServletResponse

in Eclipse
previously been using MyEclipse, did not pay attention , because of the need to use response in the Struts2 action class, so I had to write their own code to get context HttpServletResponse, but today input HttpServletResponse, shortcut keys Ctrl + Shift + M to import classes , but it has not reacted , hand written on it, but also an error . . . . I use eclipse-jee version, there should be support Jsp servlet ah, why would not find it , do I still need to manually add ? ?

If you know the heroes look to the wing . . . Next grateful


------ Solution --------- -----------------------------------
you put the package into the j2ee liberary not
------ Solution ------------------------------------------- -
manually add the servlet-api.jar package under the project lib.
------ For reference only -------------------------------------- -

need to go to the next eclipse \ plugins package the relevant import it? ? ?
------ For reference only -------------------------------------- -

servlet-api.jar trouble to ask where to find ? ? ?
------ For reference only -------------------------------------- -


In tomcat 's lib directory can be found . .

If you add buildPath J2EE- related packages to go inside , it should not go wrong .
------ For reference only -------------------------------------- -
tomcat \ servlet-api.jar common \ lib under added to build path in
------ For reference only ------------ ---------------------------
to the tomcat installation path \ lib \ servlet-api.jar copied to the WEB-INF / lib under the project name and then press F5, should the OK
------ For reference only ----------------------- ----------------

Thank you
------ For reference only ------------------------------- --------

------ For reference only ----------- ----------------------------
solution is to look at what
------ For reference only ---------------------------------------
posts good ! Myself have encountered this problem
------ For reference only ------------------------------ ---------
upstairs that method works , I encountered this problem today , that is the way to solve.
------ For reference only -------------------------------------- -
thank you very much , a small problem, always troubled people for a long time . Thank here
------ For reference only ------------------------------------ ---
this post big help , thank you
------ For reference only ------------------------ ---------------
good
good
------ For reference only --------------------------------- ------
good ah ! ! !
------ For reference only -------------------------------------- -
although the old posts , but to solve the problem in relation to Dingyiding Dingding Dingding Dingding Dingding Dingding
------ For reference only ----- ----------------------------------
has not yet been solved , has servlet-api.jar package import, also tried by hand , but also with the build path, with no success
------ For reference only ------------------- --------------------
Good, but also help me. Is to copy the Tomcat Lib following servlet-api.jar to Lib works under WEB-INF inside .

没有评论:

发表评论