aspose file tools*
The moose likes JSP and the fly likes opening jsp in new tab Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "opening jsp in new tab" Watch "opening jsp in new tab" New topic
Author

opening jsp in new tab

Aditi agarwal
Ranch Hand

Joined: Feb 23, 2011
Posts: 225
In my project i have created many jsp pages with a main project name abc

but the problem is that when ii am logged in & in a new tab i tried to open a jsp like //localhost/abc/xyz.jsp

it is opening xyz.jsp

but if i am not logged in that is logged out then this will no open xyz.jsp

tell me what should i do ???

thank you
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

I don't really follow the problem. Do you know why it is not opening the page you expect? Do you get an error in the logs?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

Could you please clarify bit more. Is the page opening and you don't want it to open or you want to open the page but its not opening?


Swastik
Aditi agarwal
Ranch Hand

Joined: Feb 23, 2011
Posts: 225
thanks to both of you for replying

first of all sorry that i cannot explain my problem in a proper manner

Actually my problem is this:-

My project name is abc i have many jsp files in it for example xyz is one of them now i want that either i am logging in or logged out this file should not be open if directly given the path of it means

localhost/abc/xyz.jsp

at present what is happening is this

i am running my project if i am logged in then in a new tab except the tab in which project is running through tomcat my page is opened but if i am logged out it will not open in new tab


so i basically need is that it should not be open in any of the way

thankyou

if still you cannot understand my problem then please let me know
Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

aaaaah !! Is it that you dont want to open any of the jsp's without logging in ?

well one of the way is validating the user credentials in your actions and mapping each of your jsp's to actions in your struts.xml file.. and if your applications has only jsp's and no actions or no struts then go for the 1980's way of scriptlets inside jsp's to validate the user name and password in the session that you have to put after you log in.

one more way - adding security-constraint tag in web.xml (declarative security)... I read in a O'Reily book. search about it..

and this might help -> Link and this also -> Link 2


Time is what we want the most, but what we use the worst. -- William Penn
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

Aditi,
As far as I have understood your problem, if you keep the file inside WEB-INF folder, and make an url-mapping for that, it might solve your problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: opening jsp in new tab