User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 425,893 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,960 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 626 | Replies: 2 | Solved
Reply
Join Date: Jun 2008
Posts: 2
Reputation: arunagar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
arunagar arunagar is offline Offline
Newbie Poster

How to pass the paramter from main JSP to the included JSP

  #1  
Jun 18th, 2008
We have 2 JSPs

A.jsp ==> Main screen JSP
tabs.jsp ==> The jsp, which has the header and have several tabs

JSP 'A' "includes" JSP 'tabs'


Now I want that when page 'A.jsp' loads, it should make some check and set a Flag.
This Flag should pass to JSP 'tab.jsp', and based on it should enable some tabs and disable some tabs.


Problem is --
I am setting the flag in A.jsp and setting as hidden parameter.
in tabs.jsp i have using request.getParamter(), still there I am getting NULL


Even in A.jsp, I added this flag as param in include tag, and used getAttribute in tabs.jsp
Still its displaying NULL in tabs.jsp

How can I pass the value from main jsp to included jsp????
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 117
Reputation: Thirusha is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 13
Thirusha Thirusha is offline Offline
Junior Poster

Re: How to pass the paramter from main JSP to the included JSP

  #2  
Jun 23rd, 2008
I am not yet an expert in jsp, but i think u have to submit the page before any of your parameters are set.
Reply With Quote  
Join Date: Jun 2008
Posts: 2
Reputation: arunagar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
arunagar arunagar is offline Offline
Newbie Poster

Re: How to pass the paramter from main JSP to the included JSP

  #3  
Jun 23rd, 2008
Thanks Thirusha...
I used request.getAttribute() and request.setAttribute, to pass the values. It worked.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JSP Forum

All times are GMT -4. The time now is 7:14 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC