Vishal Sinha

Greenhorn
+ Follow
since Jul 17, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Vishal Sinha

Hi,
I have 3 jsp pages...
Page1 is part of application1.
Page1 contains a anchor element which points to page2. Page2 redirects to page3 which is a part of different application, lets say application 2.
(page2 does response.sendRedirect(page3) to redirect to the application2).

My question is how can I find out url of page 2 on page 3 using javascript. Please note that document.referrer in javascript gives url of page1. Also I want to run javascript code only on page3

Any help regarding it will be appreciated.
Can someone let me know how to accomplish it. I want the webapp root directory in my application. How can I do it?
16 years ago
Hello,
In my web application when I do (new File(".").getAbsolutePath()) the path returned is <tomcat_home>/bin directory. I want to change it to <tomcat_home>/webapps/<app_name> directory. Basically, I want to change the default directory for my web application to app directory.

Please let me know how to do it.
16 years ago
Hi James,
Actually my application is a part of portal and runs in the same JVM. Earlier without using struts2 (when it was plain JSP)I was able to get the session object. So may be I am not getting the session object correctly or may be Struts2 is creating a new session object. What is the correct way of accessing the session object with all its attributes. Please let me know the changes in struts-config also.

Regards...
16 years ago
Hey,
I am really breaking my head to get session object in my action class.
When I login to a certain portal, the portal sets the user name to the session object. Now on the portal user clicks on my application which is written in struts2. When I get the session map using sessionaware interface, I get an empty map.
I also tried using ServeletrequestAware interfacae to get httprequest and called getSession() on it. Still I am getting empty session.

Can someone tell me how can I get the session which contains username set by the portal? Do I need to change something in struts-config.xml?
16 years ago
Hey,
I am really breaking my head to get session object in my action class.
When I login to a certain portal, the portal sets the user name to the session object. Now on the portal user clicks on my application which is written in struts2. When I get the session map using sessionaware interface, I get an empty map.
I also tried using ServeletrequestAware interfacae to get httprequest and called getSession() on it. Still I am getting empty session.

Can someone tell me how can I get the session which contains username set by the portal? Do I need to make any changes to struts-config.xml for getting the session.
16 years ago