DIGIT-ARC read-only archive · snapshot: July 23, 2026

Redirection Help!

8 posts · originally from https://geek.digit.in/community/threads/redirection-help.100219/

A
anuj919 Original post #1
Oct 20, 2008 at 5:54 PM
I am making Cyber Cafe management system, In which I want to redirect the user request(for any page etc.) to home page (i.e., login page) untill he/she logs in.

Can anyone tell me how to do this with Java, J2EE, javascript (I don't know what to use), & without .NET ??
B
Bandu #2
Oct 21, 2008 at 9:47 PM
On your login page submit action, save something in the session - some flag or something.

Have a common jsp page included in all your application pages. This page checks for the flag / variable being present in the session. If it does, no probs; if it does not, do a response.sendRedirect() back to the login page.

If you need more inputs, do let me know.

- Bandu.
amitava82
Oct 21, 2008 at 9:57 PM
there are many cyber cafe management system for free. Google for it
Zangetsu
Oct 22, 2008 at 2:25 PM
I am making Cyber Cafe management system, In which I want to redirect the user request(for any page etc.) to home page (i.e., login page) untill he/she logs in.

Can anyone tell me how to do this with Java, J2EE, javascript (I don't know what to use), & without .NET ??

do u need a software or u r programming the system from scratch....:confused:
D
Oct 24, 2008 at 12:19 PM
in jsp / servlet
response.sendRedirect("*destination");
if you are developing application in j2ee than consider using struts 2 it is quite easy if compare to jsp and servlet.
A
anuj919 #6
Oct 27, 2008 at 11:30 AM
Thanks to all of you.
Sorry for the late reply.

@KaranTh85 & amitava82
I am making it as a project in my college so obviously I am making it from scratch.

@ Bandu & Desi-Tek.com
Thanks for the help, but when I redirect request( using sendRedirect()) to any other page which is not in my application(say www.google.com) then browser tells that request not found. :confused: So can you help me solve it out?
I have to submit my project shortly so I can't try out strut 2, but thanks for the suggestion, will surely see that after exams.
C
Oct 27, 2008 at 12:35 PM
Code:
response.sendRedirect("*www.google.com");

It works fine for me. Dunno what goes wrong for you. Are you sure your internet connection was fine when it was run?
A
anuj919 #8
Oct 28, 2008 at 5:15 PM
Thanks chandru.in
I don't know where I went wrong but It works now..

Thanks again :D