Author | Message |
---|---|
mnava18
Posts: 86
|
Posted 23:56 Oct 20, 2015 |
anyone else having this problem? the part were we use response.sendredirect to redirect the user to the Mynotes page from the login. I cant get it to work. Since mynotes servlet is in a different package (homework2) and the login servelet is in (homework1) It wont work. Im assuming this is because there both in different packages. Because If i move the MyNotes servelet into homework1's pacakge , it works just fine. but when i put it in homework2 package i get an error HTTP Status 404
so i guess the question is , can we redirect to servlets in different packages? We know it works when everything is in the same package
Last edited by mnava18 at
00:00 Oct 21, 2015.
|
khanglam314
Posts: 25
|
Posted 00:06 Oct 21, 2015 |
try "../Homework2/MyNotes" Last edited by khanglam314 at
00:06 Oct 21, 2015.
|
mnava18
Posts: 86
|
Posted 00:41 Oct 21, 2015 |
aaah!!! thank you!!! finally got it to work |
GeorgeAria
Posts: 14
|
Posted 00:42 Oct 21, 2015 |
Well instead of thinking about redirecting servlets to different packages, you can think of it like redirecting servlets to a certain link on the cs3 server. You should be able to redirect a user to another Servlet by giving a link that will take the browser to that Servlet. EX: I go to cs3.calstatela.edu:8080/cs320stu01/Homework1/Login. It opens a page for me to put in my credentials. After doing so, the page/server then redirects me to cs3.calstatela.edu:8080/cs320stu01/Homework2/MyNotes. Assuming the servlet is uploaded to the server, the page should open and NOT give a 404 error, because it does exist there. Hope this helps, and sorry if it doesn't. Typing this at 12:40AM probably isn't a good idea :p. I should have some clear answers once I'm finished with Homework 1. Edit: DANG, I wrote all this for nothing Q_Q Last edited by GeorgeAria at
00:43 Oct 21, 2015.
|