How to include a jsp in child window?

Hi,
I've a jsp which creates a new window(a new jsp using window.open()) while clicking a button.In the new jsp i'm including another jsp using ,
<jsp:directive.include file="first.jsp"/>
but in the window jsp's is not getting included.I've tried <%@ ..
include also.But all in vain.
Additionaly I'm giving css in the window using
<link ref="stylesheet" href="/editor/mystyle.css"/>
which is also not working.
Can somebody help on this?
Thanks,
Shabeer.

hi
I think this url can helps to your for resolve your issue.
http://www.oracle.com/technology/sample_code/tech/java/jsps/ojsp/jspxml/Example.jsp.html
Regards,
Sridhar

Similar Messages

  • How to include a jsp page in another jsp jsp page

    hi,
    i m trying to include a jsp page name "header.jsp" into one jsp page name"selectattribute.jsp" i m using these commands in "selectattribute.jsp"
    <%@include file "header.jsp"%> bcz both these jsp page are C:\program files\tomcat 4.0\webapps\examples\jsp\Poject\
    but the problem is that , i m invoking this jsp page "selectattribute.jsp" from a servlet reportcontroller.java using REQUEST DISPATCHER.
    the servlet is in
    C:\Program files\tomcat 4.0\webapps\examples\WEB-INF\classes\Project\
    i want to know how to include some other jsp page in a jsp page and how to invoke applet from jsp page when that particular jsp page is being invoked by servlet.
    plz help
    manish

    use this for including in your selectattribute.jsp
    <jsp:include page="header.jsp" flush="true"/>
    I never tried calling an applet. I think you can write the code for calling the applet in a javabean method and call the method in the jsp

  • How to pass a data from child window to parent window

    Hi,
    I have a jsp page with two hidden fields and a button, On clicking the button a popup will come out. There are two combobox in the popup and a search button. After putting a value in the comboboxes,if I click the search button, I need the datas of the combobox to pass to the parent's hidden fields then I need to do a data base search with that values of hidden fields and display the result in the parent page.
    I could I solve this problem, Please help, Its urgent.
    Thanks and Regards
    Rajib Sharma

    I think that you can use the JavaScipt as follow to pass a data from child window to parent window
    <HEAD>
    <script>
    function passData(){
    opener.form1.test1.value=form2.test2.value; //pass the value of test2 to the parent's test1
    window.close();
    </script>
    </HEAD>
    <BODY>
    <form name=form2>
    <input name=test2 type=text>
    <input type=button onclick="passData()" value=CLOSE>
    </form>
    </BODY>

  • How to include more jsp?

    Hi,
    I've header.jsp, footer.jsp, content.jsp (which is loaded dynamically) and a main.jsp. I would include all jsp into main.jsp.
    This is the header.jsp
    <div id="logo" align="top">
    <img src="http://www.company.com/images/logo-red.gif"/>
    <div class="user-info">Welcome, <h:outputText value="#{user.email}"/></div>
    </div>
    The footer.jsp is
    <div id="footer">
    <div id="footer-copyright">Copyright &copy; 2006 MyCompany, Inc.</div>
    </div>
    The content.jsp is
    <h:dataTable value="#{controller.renderedSteps}" var="vitem"
    rowClasses="stepdescription-text">
    <h:column>
    <h:outputText id="stepDescription" value="#{vitem.step.description}"/>
    </h:column>
    <h:column>
    <h:commandButton value="next step"
    action="#{controller.nextStep}"
    rendered="#{vitem.isRendered}"
    disabled="#{vitem.isDisabled}" />
    </h:column>
    </h:dataTable>
    The body of main.jsp is
    <body>
    <f:view>
    <h:panelGrid>
    <jsp:include page="header.jsp"/>
    <jsp:include page="content.jsp"/>
    <jsp:include page="footer.jsp"/>
    </h:panelGrid>
    </f:view>
    </body>
    The problem is that when I load the main.jsp seems that the <div> are ignored.
    I'm very new in JSF and JSP\HTML.
    Thanks

    Use f:subview and use f:verbatim.
    First, f:verbatim... This JSF tag allows you to write HTML verbatim to your page. Whenever you have an HTML tag in any included page from a JSF app, it must be wrapped in f:verbatim. It is also good practice to use f:verbatim in your main page too, though it is not absolutely required. Do not wrap JSF tags in f:verbatim, it will not work.
    A general rule of thumb is to attempt to use as little HTML as possible. The JSF tag set with CSS actually eliminates the need for a great deal of HTML. I suggest picking up a good book that explains each component in the JSF library. Such as Core JavaServer Faces by David Geary and Cay Horstmann. Some free chapters can be found here (Check out "Basic Standard Components): http://www.horstmann.com/corejsf/
    Seconly, use f:subview when including a page. Either inside the included JSP or around the include statement. Like so:
    <f:subview id="header">
        <jsp:include page="header.jsp"/>
    </f:subview>
    OR
    <f:subview id="header">
    <f:verbatim><div id="logo" align="top">
    <a href="http://www.mycompany.com/">
    <img src="http://www.company.com/images/logo-red.gif"/>
    </a>
    <div class="user-info">Welcome, </f:verbatim><h:outputText value="#{user.email}"/><f:verbatim></div>
    </div></f:verbatim>
    </f:subview>For more information, check out this related forum posting:
    http://forum.java.sun.com/thread.jspa?threadID=715984&start=10&tstart=0
    Hope this helps!
    CowKing

  • How to include a jsp file in servlets and javabeans

    Hi to all..I have a jsp file which contains some database connections and I would like to include in that file in my servlets and javabeans.What coding can i use?Can show me sample coding.

    Hi to all..I have created a javabean storing the
    database connections. How do i include and call that
    bean in my servlet and javabeans?Can pls show me some
    sample coding?I am new to servlets and beans.The same way you do with normal Java Classes. If you are new to Java, I suggest you go to http://java.sun.com/docs/books/tutorial/index.html and look through the first couple of tutorials.
    As a note, it is best to put all your objects into packages, especially if you use JDK 1.4 or higher.

  • How to include a JSP page contained in a JAR file ?

    Hello,
    I have a Servlet in which I would like to include, in the Response, the content of a JSP page contained in an external JAR file included in my lib directory ?
    Could someone help me please ?
    Thanks in advance.
    bgOnline

    I don't think thats possible with the standard j2ee server.
    There are probably ways around it, but it would involve a large component of custom coding.

  • How to include a jsp file from other site

    Hi all,
    I met a problem in my recent work. I need to include another seperate jsp file into my current jsp file, but the file is located at the different site (different physical server). Is there a way to include?
    Cheers
    Chris

    Thanks tolmank, but our weblogic server didn't support jstl, so when I try to using <c:import.. > it doesn't work. If I use <jsp:include page="..."/>, nothing display on the page.

  • Include a JSP inside another JSP

    Hi SDN,
    I am stuck with a problem. There is a JSP file available. In this JSP I have to add some more fields. But when I try to ad new fields I am getting a Portal Runtime Error stating that "Code Too Large". So now I thought of putting the new code in another JSP and include that JSP inside my main JSP. Here I cannot use <@include file="..."> because this finally compiles both the JSPs as one.
    So I tried to use <JSP:include>. Some one please help me with how to include a JSP inside another using <JSP:include>. Here both the JSPs are having HBJ content inside.
    I know that <jsp:include page="relPathOfChild.jsp"/> will include the child.jsp into my main jsp. Problem is both the JSPs are having HBJ content, so If I dont declare <hbj:content> tag inside the child jsp, it is throwing an error. But If I declare a <hbj:content> tag inside my child jsp, only child content is coming and main jsp content is not coming.
    Please help me..
    Regards,
    SrinivaS

    Hi,
    This Problem is solved. Now I am able to include a child JSP inside the parent JSP. But now the problem is,
    This Parent JSP will have 8 tabs. Now my chils JSP should come inside 7th tab.  but it is coming above the parent JSP.
    Below is how I am including my child JSP.
    <% try{ if(isCAR){
         %>
                   <tr>
    <jsp:include page="/pagelet/CAREligibility.txt" />
                   </tr>
                <%} } catch(Exception e) {}%>
    Please help.
    Regards,
    SrinivaS

  • Including a jsp page onto other jsp

    Could any one tell me how to include a jsp on other jsp
    For ex: including header.jsp and footer.jsp on all pages of application.
    Thanks

    There are a number of ways.
    You can copy/paste the contents of header and footer into each and every individual jsp file in your system.
    You can use <jsp:include>
    You can use the include directive <%@ include %>
    (JSP2.0 required) You can configure a "prelude" and "coda" in web.xml which are automatically included like directives at the top and bottom of every JSP page.
    Cheers,
    evnafets

  • How to parse parameter from child window to parent window in JSP

    I have two JSP i.e. course1.jsp and course2.jsp. I would want to find out how I could parse the parameter/value from child window to the parent window when the child window get closed.
    What I am trying to do is actually a file upload process. The child windows will open for user to upload the file, and when close, the file name will be parse into the parent form for database update. Is this something possible at all? or is there any other better approaches.
    Thank you.
    These are the two files:
    --------course1.jsp ------------
    Attach File <p>
    <FORM name="courseForm" action="course2.jsp" method="post" enctype="multipart/form-data">
    <TABLE cellSpacing=1 cellPadding=3 border=0 WIDTH=500>
    <TR >
    <TD>
    <input type="text" NAME="f_file_name" size="30" VALUE="this value should be taken from child windows">
    get file name
    <p>
         <INPUT class="buttons" TYPE="submit" NAME="submit" VALUE="Submit">
    </TD>
    </TR>
    </TABLE>
    </FORM>
    ---- course2.jsp -------
    <%
    String filename = "this is the string needs to go back to parent windows when I click on close";
    %>
    <p>
    close

    In course2.jsp, you have to write some javascript code to reload the parent window document to reload the document with an added parameter. But, instead of doing this, you can also do simple thing; in course2.jsp, you can reference course1.jsp controls via javascript object, "parent". On closing event of course2, you can write:
    parent.courseForm.f_file_name.text = '<%=filename%>' ;
    window.close() ;
    But for this to work, you must open your course2.jsp document thru window.open() function instead of simple hyper link (as you did thru ).
    So, modify the hyperlink line like below:
    get file name
    Hope it helps.

  • How to close child windows when parent window closed in jsp

    how to close child windows when parent window closed in jsp
    becoz it can't be able to recognise it's parent
    with the whole application
    plz send me some sample code of it

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • How to include all the child OU groups of a master OU group in LDAP authentication

    Dear All,
    I am using Apex 4.2 on windows server 2012 on internet explorer with database 11g R2 all 64 bit.
    we are using Microsoft Active Directory Authentication in our domain.
    I have created two protals, Staff Portal and Student Portal
    I have two groups, Staff and Students. these two groups coming under HCT group.
    I want to configure LDAP authentication for these groups, so that student cannot login to staff portal and vice versa.
    I had created on authentication schema in apex.
    inititally I configured as below
    for example I have a group ETC, inside ETC I have CSS in active directory,
    DN String=cn=%LDAP_USER%,dc=hct,dc=org
    Use Exact distinguish name=YES
    LDAP Username edit function=
    return apex_escape.ldap_dn (
                 p_string => :USERNAME,
                 p_escape_non_ascii => false ) || ',ou=users,ou=css,ou=etc,ou=staff,ou=hct'   ;
    Username Escaping=NO ESCAPING
    and it is working,
    now I have another group under ETC, which is ESS. how to include ESS also? I mean how to include all the child groups of a master group?
    because I will then only include the STAFF ou and the rest of the ou which coming under staff will come automatically.
    please refer to this thread for more details.
    Re: Re: Different LDAP authentication for Student and Staff Active directory groups
    Thank you.

    Powershell (or vbscript if you want to be old school).
    You can trigger a powershell script which will remove the offending user(s) easily enough with out resorting to a TOLDAP pass.  Nearly any script type thing would work but powershell is preferred.  It can be triggered separately from the TO AD stuff and will take multiple objects to run in one pass if you can construct the command line (or create a text file and feed it in).
    Otherwise, TOLDAP is the way to write to AD...
    Peter

  • How to close child windows at logout?

    I was wondering how i can ensure that when a user loggs out,
    any related open child windows from that session are automaticaaly
    closed. The Application is written in ASP VBscript.
    Basically the user can logout two ways, either by clicking on
    the logout link or by closing the browser window. For the latter
    what i did was to create an even for the "onUnload" event of the
    browser. So when the user closes the window, it will also logg the
    user out.
    Now i also wanted to automatically close any child windows
    that the user may have opened when he either loggs out or closes
    the browser window. How can I accomplish that without prompting the
    user that the window is about to close?
    B.T.W. I use the
    window.open method to open the child windows, using either
    javascript or vbscript.

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • How can I include a JSP, Maximized, and retain look and feel(WSRP)

    I have created a page group and defined a root page with a certain look and feel. There are two portlets on the page. Once the user clicks on a submit button, the portlet performs some action and includes a jsp included in the EAR file. The portlet needs to maximize the UI to display the jsp correctly.
    Once control returns back to the screen, the look and feel is lost and uses Oracle's default style. I have two questions:
    1. From the portlet, how can I retain the look and feel of the page group when referencing "external" jsp (i.e JSPs in the deployed portal EAR file).
    2. How can I "redirect" the user to the home page in a standard way? If there is not a standard way, how do I use the Oracle specific utilities to do it?
    All of my JSPs are developed externally out of the scope of the Oracle Portal.
    Environment - Oracle Portal 10.1.4 on Release 2 using WSRP to contact Oracle Release 3, hosted EAR file (WSRP Producer).
    Thanks in advance.

    Hi José,
    I don't think that is possible. But you can import the css files that ep uses for its look and feel and try to give your web pages similar look and feel. The tables and other controls used in EP are totally different and are done through complex JavaScript coding instead of simple HTML tags. If you want exact lok and feel then i thin you must go for a Webdynpro based application rather then a J2EE application with JSPs.
    Regards,
    Guru.
    PS: Give points for helpful replies.

  • How to include the javafx program in JSP page

    I am working on a college project and i have got a problem that how will I can use the javafx program in JSP.
    plz imform me as soon as possible

    The JavaFX app can be included in JSP as an Applet.

Maybe you are looking for

  • Filter on column from different list

    Hi,<o:p></o:p> I have created a list account and a list project. Each Project is linked to an account. When I click on a accountI have create a display where you have the account details en on top you have the project list appearing. What I would lik

  • My ipod touch keeps rebooting I restored from the back up it but it keeps rebooting,

    My Itouch started rebooting, when i plugged it into itune it told me I needed to restore from back up after several attemps ( I received an error 9 message) I finaly got it to restore, but it just keeps rebooting!

  • Help! Music not "playing" in Itunes

    So I updated to the newest version of iTunes (7.3.2) today and upgraded my iPhone to 1.1.1. Now, any music in my iTunes library will not play. The top of the screen shows the song title and artists name/album, and the run time...but nothing happens.

  • When Parameter field is blank

    Hi, I am writing a report in Oracle 6i and window 98. I have a parameter that allows me enter the customer's name and get the data associated with this name. Is there any way that I can do: 1)if I enter a specific customer's name, I can get the data

  • Netweaver Gateway Architecture

    Hello All, I am looking for architecture of Netweaver Gateway. We are planning to implement Netweaver Gateway 2.0 in Standalone mode. The main objective to implement Netweaver Gateway is to consume apps based on UI5/HTML5 and probably Fiori Apps in f