473,394 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Session detection JSP determing content?

Paks
13
Hi there,
developing a web application and got a total mind block.

I'm using the frameworks hibernate, struts and spring.
And when you click on a link to a JSP-page, I want to redirect depending on the sessions value, which contains a User-object. Get a value from the object and depending on whether this value is null or not I want to redirect to different JSP-pages.

Does anyone know how to do this? In which layer should the controll be done?

The most annoying thing is that I've done a similar thing a couple years ago, but now I have no idea :/

Thankful for any help.

-- Paks
Jun 12 '08 #1
3 1472
JosAH
11,448 Expert 8TB
Have a look at the Filter interface; they can intercept requests (and responses
in the 2.mumble specs) and redirect them to another page.

You have to implement that interface and declare in your xml file where that filter
is supposed to be located logically.

I haven't done anything with that web stuff since years so I can't help you any
further; sorry for that.

kind regards,

Jos
Jun 12 '08 #2
ajos
283 100+
Hi there,
developing a web application and got a total mind block.

I'm using the frameworks hibernate, struts and spring.
And when you click on a link to a JSP-page, I want to redirect depending on the sessions value, which contains a User-object. Get a value from the object and depending on whether this value is null or not I want to redirect to different JSP-pages.

Does anyone know how to do this? In which layer should the controll be done?

The most annoying thing is that I've done a similar thing a couple years ago, but now I have no idea :/

Thankful for any help.

-- Paks
As said by jos you need a Filter, In order to redirect depending upon session value you need to use HttpSessionListener, just google around to know about Filters and HttpSessionListeners.

cheers.

regards,

ajos
Jun 13 '08 #3
Paks
13
Thanks for your help :)
The filters had completely slipped my mind, will look in to it right away!

-- Paks
Jun 16 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: doltharz | last post by:
Please Help me i'm doing something i though was to be REALLY EASY but it drives me crazy The complete code is at the end of the email (i mean newsgroup article), i always use Option...
7
by: George Hester | last post by:
In one Application (2) the client is redirected to a Logon ASP in a different Application (1). A Session Variable is made in Application 2 which needs to be recognized in Application 1. Can I do...
60
by: Fotios | last post by:
Hi guys, I have put together a flexible client-side user agent detector (written in js). I thought that some of you may find it useful. Code is here: http://fotios.cc/software/ua_detect.htm ...
6
by: Gustav Medler | last post by:
Hello, there is a known problem with Opera and the execution of content shown in <NOSCRIPT> tag. Everythings works fine, if there is only one simple script like:...
3
by: Nhi Lam | last post by:
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store with fail over support. The "SQL Server Mode" seems...
5
by: ASP.Confused | last post by:
As you can tell from my previous posts on this issue...I'm really confused :-/ I have a few ASP.NET web applications on my web host's "https" server. Our web host has a single "bin" folder for...
5
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when...
7
by: Csaba Gabor | last post by:
I'd like to detect the shift key when a button is "clicked" in Firefox/Mozilla. If the button is clicked with the mouse, no problem. However, if the onclick event is keyboard originated, then my...
4
by: rgparkins | last post by:
Hello I am running out of time with a problem I have running PHP 5.04 and Apache 2.0 and really need help :(. I have a page that stores a variable in session but each time I reload that page the...
4
by: sjpolak | last post by:
sorry, I put the original text instead of my changed one in the previous mail sorry hello, I am new to this forum and a laymen. I have awebsite www.earlyflute.com. I make baroque flutes as you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.