• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using sendRedirect between 2 different packages

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?



 
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where are you putting your .class files?
 
John ortega
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John nava wrote:
aaah sorry about that. thank you


No problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic