• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using sendRedirect between 2 different packages

 
John ortega
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
alright so here are my 2 servlets. my login page is suppossed to redirect to the mynotes page after a successsful login. I use useresponse.sendRedirect("/Homework2/MyNotes"); in my login page at the bottom to try and accomplish that , but it doesnt work. my guess was because these belong to 2 different packages. which is homework1 and homework2. so my question is how can I map it so that my login page directs the user to the mynotes page? If i put Mynotes in my homework1 package , it works perfectly , so It has to be because its 2 different packages. but i have no idea how to make it work.

also , the error i get is HTTP Status 404 - /cs320stu38/Homework1/MyNotes

which means its still sending to the homework1 package , how can i change it so that its the homework2 package?



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you putting your .class files?
 
John ortega
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Where are you putting your .class files?





cs320\workspace\cs320stu38\build\classes\cs320\Homework1\Login

cs320\workspace\cs320stu38\build\classes\cs320\Homework2\MyNotes
i think thats what you asked lol
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you running the servlets? Through an IDE?
 
John ortega
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:How are you running the servlets? Through an IDE?



im using eclipse and running them on apache
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I'll copy this to the IDEs forum. Running a web app from an IDE is its own ball of wax.
 
John ortega
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:OK, I'll copy this to the IDEs forum. Running a web app from an IDE is its own ball of wax.


aaah sorry about that. thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John nava wrote:
aaah sorry about that. thank you

No problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic