JSP Popup - Access PortletRenderRequest

Hello,
I am having problems solving this problem.
I would like a popup window that is one of my JSP pages in my portlet. I only want that page to show up in the popup and no other portlets. Has anyone done this before?
Using:
HttpPortletRendererUtil.absoluteLink(request,"Popup.jsp") opens the file but I do not have access to the PortletRenderRequest because it opens it locally to where it is deployed.
Using:
HttpPortletRendererUtil.parameterizeLink(request,PortletRendererUtil.PAGE_LINK, HttpPortletRendererUtil.portletParameter(request, "next_page") + "=SelectionPage.jsp") opens the file in a popup but all other portlets show up in this page as well.
I would appreciate any help on this.
Thanks,
Jamey

You can create a popup window that shows a html or jsp file with a simple html link. This jsp won't have access to PortletRenderRequest!
What you can do is the following:
Create a new portal page, and place your portlet on it.
Create page parameters that are connected to portlet parameters.
Create a parameterized page link and open it in a popup window.
You have to change your portlet that it should forward to Popup.jsp when the porlet is in popup window.
(Make use of page page parameters to set this flag.)
Alternativ way is to create a new portlet that shows Popup.jsp.
A better place to ask question like this is
http://forums.oracle.com/forums/forum.jspa?forumID=4

Similar Messages

  • Is it possible for an applet within a jsp to access a server session?

    I was trying to find info (and sample code) where an applet that is embedded and running within a JSP page accesses the same session of the jsp page it is in.
    The need is for the the applet to access a string within the session and capture it's value and then perform some actions with the string client side within the applet. The value of the string is not important for the example, just being able to access it is.
    Also can javascript cause the applet to call the server on say an "onclick" event? If so, how is this done?
    In otherwords, can javascript interact with an applet?

    Check out the documentation on Heterogeneous Connectivity.
    Hope this helps!

  • How to connect jsp & ms-access

    hi,
    i need to retrive data from database.how to connect jsp & ms-access.i m using weblogic8.1.

    hi,
    i need to retrive data from database.how to connect jsp & ms-access.i m using weblogic8.1.

  • JSP page access regular Java class

    I am new to JSP. But most of the time people say JSP page access Java Bean classes.
    I want to know what if I want to access regular Java classes?? Should I do like this
    in the code:
    <%
         NormalJavaClass cl = new NormalJavaClass();
         cl.process();
    %>
    <%-- JSP page access Java Bean -- %>
    <jsp:useBean scope="session" id="formDataBeanObj" class="formdatatest.FormDataBean"/>
    <jsp:setProperty name="formDataBeanObj" property="*"/>
    <HTML>
    <HEAD>
    <TITLE>page1.jsp</TITLE>
    <BODY>
    <FORM METHOD="POST" ACTION="page2.jsp">
         <H2>User Name = <jsp:getProperty name="formDataBeanObj" property="username"/></H2>
    <%
         NormalJavaClass cl = new NormalJavaClass();
         cl.process();
    %>
    <P><INPUT TYPE="SUBMIT" VALUE="submit here">
    </FORM>
    </BODY>
    </HTML>
    Please advise. Thanks!!

    Yes, you can instantiate and reference any class visible to the Java runtime from within a JSP just as you can in an "ordinary" Java class. Behind the scenes, a JSP is converted into Java source code for a servlet class, and then compiled into the .class file. When you insert code into JSPs using either taglibs or code delimiters (<% %>, <%= %>), the JSP/servlet "engine" inserts this code into the servlet source code verbatim, and all non-Java text from the JSP is inserted into the source code inside of JspWriter.write(xxx) statements.
    If you'd like to see the source code that your JSP is converted into, run your JSP in Tomcat and look in the "work" folder within the Tomcat folder after you access it the first time. Experiment around with the JSP and see how code within the <% %> and <%= %> blocks is inserted into the .java file.

  • Database access using HTML, JSP, JavaBean, & Access

    I am trying to create an HTML page that a user logs into and can choose to query, add, delete or modify a specified database. I have created the HTML, the JSP, and access database but I can't figure out how to have 4 different JSP pages(one for each option) to get information from one JavaBean. PLEASE HELP

    http://swforum.sun.com/jive/thread.jspa?threadID=53106&tstart=0

  • RE: Using JavaMail with JSP when access relay is denied on smtp mail server

    Could someone please let me know how to get around the problem of sending an automatic email from a JSP when access relay is denied by the smtp mail server. Could it be that the username and password just needs to be added somewhere???
    Any thoughts on how to solve this problem would be greatly appreciated.
    Thank you!

    I know what you are talking about because I setup no relay on my mail server. I understand why you need to supply a username and password because if the server doesn't allow relay, then you must supply a username and password. Doing it by IP address wouldn't work because you have to know the IP address of all people accessing that page. I am in the same boat as you and once I find out the answer, you'll be the first to know. There is one quick workaround. Get your Net Admin to create a user specifically for the page you plan to send from. Get him to allow relaying for that one user. That worked on my setup and like I said, I'm setup the same way you are. Thanks, J

  • JSP popups

    I see there are several people interested in JSP popups.
    I have the same question. I would like to create some kind of popup that does not have the menu bar etc. I have been using a JavaScript but my problem is the pictures are not being refreshed. The user in Netscape must Right click on the image and select reload. I would like to force a reload without the users interaction. I realize that JSP usually cannot change the environment of the browser � it is more for dynamic content. Can this be done using JSP?
    http://wyoroad.info/highway/conditions/dist2.html is the page where I want the popup to originate from.
    Currently I am using:
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function popUpSmall(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=395,height=320,left = 100,top = 100'); ");
    //-->
    </script>
    camera image

    Here's how to make your site work:
    #1: Inside the popup window we are not going to just display the image. We're going to create an HTML page that contains nothing but the image AND some meta tags that will not be seen on the page, but will controll some of it's behaviour. We want the page to never be cached and to refresh automatically every few seconds, or minutes (you can choose).
    Here's the code change:
    <A HREF="javascript:popUpSmall('http://wyoroad.info/highwa
    /webcameras/Casper/I25Casper.html')">camera image web page</a>Actually, you can put the HTML page anywhere you like, as I'm sure putting in the DIR with the photos may be poor structure125Casper.html looks like this:<html><head><META HTTP-EQUIV="Refresh" CONTENT="60;URL=http://wyoroad.info/highwa/webcameras/Casper/I25Casper.html"><title>Look at our State's beautifull concrete!</title></head><body><img src="http://wyoroad.info/highwa /webcameras/Casper/I25Casper.jpg"></body></html>OK, so the content="60 starts the looping of the page every 60 seconds.  You can change that to you liking.You can also add a meta tag called PRAGMA NO CACHE to stop the page from being cached to their browser.  Search on the net for the syntax if need be.Frank KrulGot Node?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Ergent problem with the jsp file access in tomcat. HELP...

    I use tomcat as my server, I have one JSP file located in :
    webapps\abc\war\WEB-INF\jsp\index.jsp
    You see my project name is abc, I want to access the index.jsp file, I define another jsp file in the path: webapps\abc callled outside.jsp. I want to use outside.jsp to invoke the index.jsp.
    Inside outside.jsp it is :
    <html>
    <head>
    <title>index</title>
    </head>
    <body>
    <%@ include file="war/WEB-INF/jsp/index.jsp" %/>
    </body>
    </html>
    When I open the browser, and access, http://localhost:8080/abc/outside.jsp , the content of index.jsp was shown as expect. But, all the link pages of the index.jsp can not shown (PS: the link pages is located in the same path as index.jsp, they are all jsp files). I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file. Is there any method to make all the link pages of index.jsp can be shown when call from outside.jsp???HELP
    Message was edited by:
    Mellon
    Message was edited by:
    Mellon

    I don't know why your links can't be shown, but I can tell you that your suspect:
    I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file.is wrong, because included jsp is dynamic, not static.

  • JSP with Access Database

    Could I use Access Database in JSP source code without Having DSN (DSN-less)
    I mean i do not want to set up a DSN in Control panel.
    I want only give JSP code a access database (.mdb)
    Please tell me the Connection String.
    Thank you

    try the following code:
    String url = System.getProperty("user.dir")+"\\db1.mdb";
    String conStr = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="+url;
    try{
    System.out.println(conStr);
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(conStr);
    JOptionPane.showMessageDialog(this,"connection created");
    }catch(Exception e){System.out.println("Error : "+e);}
    where db1.mdb is the database to be used in application
    find this code working let me ack. at [email protected]

  • Jsp database access using odbc - please help

    Hi friends,
    I�m trying a very simple database access program in jsp data base access using odbc. Odbc has to be used because thin driver or other drivers may not be available in every system of our college and as you know it's not that easy to make changes to those systems. My problem is so simple. I always get an exception in my program.
    My jsp content is as simple as:
    <%@ page import="java.lang.*,java.sql.*,java.io.*,registerbean" %>
    <jsp:useBean id="db" class="registerbean" scope="session"/>
    <%
    String str="insert into reg values('" + db.getName() + "','" + db.getUname() + "','" + db.getPass() + "'," + db.getAge() + ",'" + db.getSex() + "','" + db.getAdd() + "','" + db.getUgcourse() + "','" + db.getUgqual() + "'," + db.getPer() + ",'" + db.getIadd() + "')";
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:yogaesh","scott","tiger");
    Statement stmt=con.createStatement();
    stmt.executeUpdate(str);
    }catch(Exception e1){out.println(str);};
    %>
    the table reg has the structure:
    Name Null? Type
    CNAME VARCHAR2(20)
    UNAME VARCHAR2(20)
    CPSWD VARCHAR2(20)
    CONFPASS VARCHAR2(20)
    CAGE NUMBER
    CSEX VARCHAR2(5)
    CADD VARCHAR2(100)
    COURSE NUMBER
    CQUAL VARCHAR2(10)
    CPER NUMBER
    IADD VARCHAR2(100)
    The registerbean.java file is as below: (This seems to work fine because I tried printing the values using <%= %> tag and it worked out fine and moreover the query string is intact.)
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class registerbean
    private String name,uname,pass,cpass,age,sex,add,ugcourse,ugqual,per,iadd,otherugqual,ccode;
    public void setName(String a)
    name=a;
    public void setUname(String a)
    uname=a;
    public void setPass(String a)
    pass=a;
    public void setCpass(String a)
    cpass=a;
    public void setAge(String a)
    age=a;
    public void setSex(String a)
    sex=a;
    public void setAdd(String a)
    add=a;
    public void setOtherugqual(String a)
    otherugqual=a;
    public void setCcode(String a)
    ccode=a;
    public void setUgcourse(String a)
    ugcourse=a;
    public void setUgqual(String a)
    ugqual=a;
    public void setPer(String a)
    per=a;
    public void setIadd(String a)
    iadd=a;
    public String getName()
    return(name);
    public String getUname()
    return(uname);
    public String getPass()
    return(pass);
    public String getCpass()
    return(cpass);
    public String getAge()
    return(age);
    public String getCcode()
    return(ccode);
    public String getSex()
    return(sex);
    public String getAdd()
    return(add);
    public String getUgcourse()
    return(ugcourse);
    public String getUgqual()
    return(ugqual);
    public String getPer()
    return(per);
    public String getIadd()
    return(iadd);
    public String getOtherugqual()
    return(otherugqual);
    I initially thought the problem was with str but then str seems to be perfect and I get a string of the form �insert into reg values('c','c','c',98,'Male','c','B.Tech, Applied Artificial Neural Networks','HSC',9898,'h')� which I verified through a javascript debugger. The session scope used is to get values through the db bean from another jsp file. The problem is in the executeUpdate() line of this code. I even tried changing the updation table, but in vain. What could be done to rectify this? Please help me out and please do remember that I have no option but to use odbc.
    Thanks in advance.
    R. Yogaesh.

    I didn't verify the type of exception and i'm now going to do that, but then when the string is as perfect as needed, what is the need for a prepared statement? What is the basic difference between the two? And basically what is the problem with this piece of code which creates an exception? Please reply as soon as possible.
    Thankyou very much.
    R. Yogaesh.

  • JSP Database Access : 500 Internal Server Error

    Hello everybody!
    My JSP code run until I write the next:
    Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver").newInstance();
    Connection connDB = DriverManager.getConnection("jdbc:odbc:OracleDB", "carlos_prb", "carlos_prb");
    Statement smentDB = connDB.createStatement();
    ResultSet rsDB = smentDB.executeQuery("SELECT * FROM websites");
    rsDB.close();
    smentDB.close();
    connDB.close();
    I need to access an Oracle Database. This code run in a java class, but not here. If I try to display the portlet the next message appears:
    Error: The listener returned the following Message: 500 Internal Server Error
    Somebody can help me, please?
    null

    Hi Charles,
    Thank you for yout help. I tried change this jar file for old one from
    jdeveloper 9 RC, but problem is still the same.
    I reviewed bcj4html.jar file too, and I did not discover problems in RequestParameters class.
    Have you any idea how to solve it ? I am sure that in project properties "libraries" I have selected
    all possible BC4J classes. (installation of DS and 9i database has made week before on new XP)
    Thank you very much for more info :)
    Ivo

  • JSP Database access - Urgent

    Hi,
    A simple data access program to set values in a db. I have the following problems.
    1. When I dont use if(request.getParameter("name")!=null) or any other parameter for testing null values, a row of null values is inserted each time I enter the jsp file.
    2. One more problem is that the update is not regular. It sometimes works fine, someother times it fails miserably. It seems that the connection is not closed properly as I receive such a message when I try to shut dwon oracle.
    3. A much more peculiar problem, when i paste a url directly into my browser, it runs fine, but not with location.href or a flash link!! eg the register.jsp file is reported as a nonexisting file (HTTP 404) when I provide a link to it from flash in the form http://localhost:8080/reg/register.jsp but when i type this url directly it works fine.
    My code for register.jsp is:
    <%@ page import="java.io.*,java.lang.*,java.sql.*,java.util.*"%>
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:yogaesh","scott","tiger");
    Statement stmt=con.createStatement();
    if(request.getParameter("name")!=null)
    String str="insert into rt values('" + request.getParameter("name") + "','" + request.getParameter("uname") + "','" + request.getParameter("pass") + "','" + request.getParameter("cpass") + "'," + request.getParameter("age") + ",'" + request.getParameter("sex") + "','" + request.getParameter("add") + "'," + request.getParameter("code") + ",'" + request.getParameter("ugqual") + "'," + request.getParameter("per") + ",'" + request.getParameter("iadd") +"')";
    stmt.executeUpdate(str);
    stmt.close();
    con.commit();
    con.close();
    con=null;
    str=null;
    }catch(Exception e){out.println("Database error!!");}
    %>
    Please help me out and thanks in advance...
    R. Yogaesh.

    Hi,
    A simple data access program to set values in a db. I
    have the following problems.
    1. When I dont use
    if(request.getParameter("name")!=null) or any other
    parameter for testing null values, a row of null
    values is inserted each time I enter the jsp file. *********
    * Yup. Use .equals("") or .equals("null") as tests, depends on your servlet container
    2. One more problem is that the update is not regular.
    It sometimes works fine, someother times it fails
    miserably. It seems that the connection is not closed
    properly as I receive such a message when I try to
    shut dwon oracle. *************************
    Use this:
    Connection conn = null;
    try{
       //Do database stuff
    } catch {
       // Report your errors
    } finally{
       try{
         if(conn!= null){
            conn.close();
         }catch{}
    3. A much more peculiar problem, when i paste a url
    directly into my browser, it runs fine, but not with
    location.href or a flash link!! eg the register.jsp
    file is reported as a nonexisting file (HTTP 404) when
    I provide a link to it from flash in the form
    http://localhost:8080/reg/register.jsp but when i type
    this url directly it works fine.***********************
    Maybe your flash is on another computer/server? Try using the link http://<ip address>:8080/reg/register.jsp or http://<dns name>:8080/reg/register.jsp
    My code for register.jsp is:
    <%@ page
    import="java.io.*,java.lang.*,java.sql.*,java.util.*"%>
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection
    con=DriverManager.getConnection("jdbc:odbc:yogaesh","sc
    tt","tiger");
    Statement stmt=con.createStatement();
    if(request.getParameter("name")!=null)
    String str="insert into rt values('" +
    request.getParameter("name") + "','" +
    request.getParameter("uname") + "','" +
    request.getParameter("pass") + "','" +
    request.getParameter("cpass") + "'," +
    request.getParameter("age") + ",'" +
    request.getParameter("sex") + "','" +
    request.getParameter("add") + "'," +
    request.getParameter("code") + ",'" +
    request.getParameter("ugqual") + "'," +
    request.getParameter("per") + ",'" +
    request.getParameter("iadd") +"')";
    stmt.executeUpdate(str);
    stmt.close();
    con.commit();
    con.close();
    con=null;
    str=null;
    }catch(Exception e){out.println("Database error!!");}
    %>
    Please help me out and thanks in advance...
    R. Yogaesh.

  • JSP and Access 2007 database

    i've been trying to look for codes on how to access the Access 2007 database (.accdb).
    i've done a previous JSP app with Access database, but it is of a lower version (.mdb).
    i need something like the following, but for the 2007 version. is it just a matter of changing the extension for both statements, or is there more to it?
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String DBQ = request.getRealPath("sales.mdb");
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" + DBQ + ";DriverID=22;READONLY=true";thanks.

    <%@page import="java.sql.*" %>
    <table boder="1">
    <%
    Statement statement;
    Connection conn;
    String url = "jdbc:mysql://localhost/dbName";
    String user = "username";
    String pass = "password";
    try {
        class.forName("com.mysql.jdbc.Driver");
        conn = DriverManager.getConnection(url, user, pass);
        statement = conn.createStatement();
    String query = "SELECT images FROM database";
    ResultSet results = statement.executeQuery(query);
    while(results.next()) {
    %>
        <tr>
            <td><img src="<%= results.getString("images") %>"></td>
        </tr>
    <% } %>
    </table>The while loop will loop through your result set and print the table row for each image it finds in the query.
    Hope this helps,
    Jon

  • Jsp----microsoft access---image

    Hi everyone,
    I am trying to save an image in a Microsoft Access database, so i can make a query to that image using jsp, and display the image in the .jsp.
    The problem is that I don't know what data type to declare in "access" when i am creating the table.
    I have tried with OLE Object type, and it doesnt work;
    I tried also with Text type, and doesnt work either.
    what data type do i have to declare, and how should I save it in the database, so when i make the query from the .jsp the image will be displayed?
    thanks...

    Hi,
    I did it like this:
    <TD>
    <img src="images/<%= recordset.getString(5)%>">
    </TD>it worked correctly,
    but,
    I am having trouble getting all of the images from one column,
    this is what i'm trying:
        ResultSet result = null;
        ResultSetMetaData rsmd = null;
       int columns=0;
         try {
           rsmd = result.getMetaData();
           columns = rsmd.getColumnCount();
    <table width="60%" height="50%" border="1">
      <tr>
      <%
         try {
           for (int i=1; i<=1; i++) {
                 out.write("<th>" + rsmd.getColumnLabel(i) + "</th>");
      %>
      </tr>
      <%
            while (result.next()) {
               out.write("<tr>");
               for (int i=1; i<=1; i++) {
                 out.write("<td>" + result.getString(i) + "</td>");
               out.write("</tr>");
            }my problem is that I don't know how to insert the:
    <img src="images/what can I do?

  • Feature of JSP for access command of UNIX

    hello sir ,
    I interesting JSP for developer application on internet . Now , I would like feature of JSP that
    what JSP use command for access comand of UNIX example ls ,mail ,bg (background process) and
    return result of command example mail, bg (background process) to JSP ? please tell me too . Thank you very much.

    thank you for reply question to me
    Please talk detail about runtime & process class to me please and example for JSP call command UNIX "mail" via JSP :-)

Maybe you are looking for

  • No Contacts or Address Book app

    My new iPhone doesn't have an icon for Contacts (or Address Book).  Is that something I have to add myself?  That seems odd.  I can see contacts if I set out to create a message, but don't see any way to pull up a list of contacts right from the star

  • Adobe Reader Keeps Crashing On Mac

    I'm having issues with Adobe Reader on my MacBook Pro Retina.  The MacBook is a 13" late 2013 model running OS X Yosemite 10.10.2 and I have the latest version of Adobe Reader (11.0.10) installed.  Whenever I open multiple PDF's Adobe Reader crashes.

  • 0FI_AR_4  datasource is extraction 0 records during Init

    Hi, 0FI_AR_4  datasource is extraction 0 records during Init. But if I run the Full-load I can get the data. I am not sure whether our extractors are uncoupled.  Currently we are using GL and AP extractors as well. We are on EEC6 and PI_BASIS 2005_1_

  • My library deleted some of my songs in iTunes!!

    My library deleted some of my songs and when I go to the iTunes to see if I purchased them it says I never purchased those songs. The songs are on my iPod, but I want all of them back on my library. I can't seem to figure it out, can anyone help me?

  • Setting Date format in dashboard prompt and filter view.

    Hi All: I have created the dashboard promt upon two dates. But it shows date like "11/1/2007 6:00:00 AM" But I want only "dd-mm-yyyy" format. What I can do for it. I use only current_date. Thanks Ali Haroon