Author | Message |
---|---|
vluu2
Posts: 64
|
Posted 17:12 Feb 03, 2015 |
Hi guys, so I keep getting these 3 errors whenever I try to run my code on eclipse (localhost) and I have no idea if it's my code or something else 1) java.util.concurrent.ExecutionException This is my code, as you can see I've barely did anything so far but it's still giving me this error.... Can anyone help me? package cs320.Homework2; import java.io.IOException; import javax.servlet.ServletContext; import cs320.homework1.*; public class Login extends HttpServlet public void init() throws ServletException { if(context.getAttribute("UserInfo") == null) protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } } |
hippiewho
Posts: 46
|
Posted 17:25 Feb 03, 2015 |
I think - and i could be wrong - something is wrong in your java class possibly in ur constructor.
EDIT: also your closing html tag is missing an < Last edited by hippiewho at
17:26 Feb 03, 2015.
|
vluu2
Posts: 64
|
Posted 17:28 Feb 03, 2015 |
That could be the case if I didn't copy and paste this from my Homework 1... which worked last week. Also, when I go back to Lab 2, it doesn't work either. I checked my Java Complier, yes it's Java 1.7. and I am using Tomcat 7.0 as well, so... idk |
hal255
Posts: 51
|
Posted 17:29 Feb 03, 2015 |
I just copied your code and fixed the package names, and it ran without errors. |
hippiewho
Posts: 46
|
Posted 17:30 Feb 03, 2015 |
have u created a new web.xml? maybe the records are missing? |
hippiewho
Posts: 46
|
Posted 17:32 Feb 03, 2015 |
@hal yea i did the same and had no problem which is why i thought maybe the class was messed up or the arguments being passed which may be why ur getting an illegal argument exception |
vluu2
Posts: 64
|
Posted 17:33 Feb 03, 2015 |
@HIPPIEWHO This is on my localhost, they run fine on the server. @HAL255 Thanks for testing on your localhost. In this case, I guess i'll have to keep uploading to the server just to test things..... unless I find a solution to this |