Output of a servlet inside another page

I like to include the result of a servlets output on a diffrent server inside an static html page. is this possible? I know that you can do this with cgi but how is it done with a servlet

Ok actualy this is what you do.
first you create a servlet but the output needs to be a javascript code
for example:
PrintWriter out = res.getWriter();
out.println( "function getOutput(){" );
out.println( "document.write('bla bla bla');" );
out.println( "}" );
out.close();
then you link a javascript file to this servlet. so the html would look like this:
<html>
<head>
<script src="url of the servlet"></script>
</head>
<body>
<script>
// a call to the java script function that your servlet outputs.
getOutput();
</script>
</body>
</html>
the result is that bla bla is printed in this page

Similar Messages

  • Servlet with no dynamic code inside jsp pages

    Hello,
              I saw that a servlet is created even if there is no dynamic code inside jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am using portal 8).
              By the way, do you know if is it possible to define apache in order to avoid to send to bea the jsp which have no dynamic code inside ?
              thank you !

    JSP's always generate a servlet on all web containers. Apache/Tomcat is no
              different. If you have static content, make it an HTML page.
              Bill
              "hournon jc" <[email protected]> wrote in message
              news:22255787.1103297053148.JavaMail.root@jserv5...
              > Hello,
              >
              > I saw that a servlet is created even if there is no dynamic code inside
              jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am
              using portal 8).
              >
              > By the way, do you know if is it possible to define apache in order to
              avoid to send to bea the jsp which have no dynamic code inside ?
              >
              > thank you !
              

  • Tab page inside another tab page

    I have a requirement to create a tab page inside another tab page.is it possible?
    if possible pls give me the solution...............

    iTs possible. Place both tab-canvases on their respective content-canvas on the the correct positions. Then, in the WHEn-TAb-PAGE-CHANGED-trigger, make the second tab visile or invisble, using SHOW_VIEW or HIDE_VIEW.

  • How can I import a servlet inside a JSP?

    Hi! I have seen tons of instructions on importing beans inside a JSP page but I want to use servlets instead. This question might be stupid, but I'm not really adept with JSPs yet and I hope you can help me.
    I need to import classes inside my JSP page so that I can use the methods and manipulate them through the JSP.
    Thank you!
    lauramos

    I'm curious, have you looked into using the MVC or Struts framework? One idea would be to map the Servlet you created to a JSP via XML (or any other mapping you want #?.jhtml for all that matters) and jsp:include as needed. Just a few mappings needed in WEB-INF/web.xml for instance...
    <servlet>
    ��<servlet-name>HeaderPageHandler</servlet-name>
    ��<servlet-class>packagename.HeaderPageHandler</servlet-class>
    </servlet>
    <servlet-mapping>
    ��<servlet-name>HeaderPageHandler</servlet-name>
    ��<url-pattern>/header_page.jsp</url-pattern>
    </servlet-mapping>
    In the JSP:
    <jsp:include page = "header_page.jsp" flush = "true" />
    The Servlet could forward the information over to another page using the getRequestDispatcher(String url).include(req, resp); From there, use the application or request scope to handle the jsp:useBean to output what you need. You could take that further and customize some of your own TLDs so you could state simple tags like <tag:output class="text">some text here</tag:output>

  • Spreadsheet functionality: Output is always crammed in 1 page.

    Hi!
    Whenever i do spreadsheet outputs in Reports, i get the proper Excel spreadsheet alright. I'm able to edit away, move around in cells, etc. But when its printout time, all the data is crammed inside 1 page when its supposed to span multiple pages.
    I know Oracle's spreadsheet output is not paginated (i.e no page setup info is saved in output), but is there a work around to this "issue", short of copying the data and pasting it in another work sheet?

    Hi, this problem has been resolved.
    Apparently, the PAGE SETUP > SCALING defaults to "fit to 1 page", which is why my reports always run on 1 page regardless of the data.
    The easy solution is just clicking on the Adjust to 100% size radio box.
    =)

  • How can I put a message in a page after an action in another page?

    Hi everybody, I know that what I try to explain is a bit difficult to understand without know all the context but I try to do it the same:). I have a datatable that contains a list of student. In another page I insert a new student. When I click on "save" button I save the new student and I return to the page with the datatable. The problem is: when I add a student I must notify the user that the student is added correctly with a message in the 1st page like "The student is added correctly". This message must display only after I added the student not when I see for the first time the page with the datatable. How can i do this? Thanks to all.

    I use your suggestion but it doesn't work. I create a bean named MessageHandler with scope request. In its constructor i put an empty value for the variable addStudent_message, and in the page that the message should be I have this line of code:
    <h:outputText rendered="#{!empty messageHandler.addStudent_message}" value="#{messageHandler.addStudent_message}"/>
    In the bean I used to add a student I have a MessageHandler object and in the method that add a student, before the return statement, I put this:
    handler.setAddStudent_message("Studente aggiunto correttamente");
    When I run, it gives me this error:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error calling action method of component with id _idJsp1:save
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
    root cause
    javax.faces.FacesException: Error calling action method of component with id _idJsp1:save
         org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
         javax.faces.component.UICommand.broadcast(UICommand.java:106)
         javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
         org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
         org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
    root cause
    javax.faces.el.EvaluationException: Exception while invoking expression #{addStudentBean.save}
         org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
         org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
         javax.faces.component.UICommand.broadcast(UICommand.java:106)
         javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
         org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
         org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
    root cause
    java.lang.NullPointerException
         beanDomain.AddStudentBean.save(AddStudentBean.java:68)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
         org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
         javax.faces.component.UICommand.broadcast(UICommand.java:106)
         javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
         org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
         org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
    It seems that it doesn't find the MessageHandler object. What do you think?

  • How to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • Giving Error while forwarding a page from another page

    Hi I am getting below error while forwarding a page from another page.
    Please reply as i am new to OA frame work.
    oracle.apps.fnd.framework.OAException: No data found for region (/mhe/oracle/apps/ak/susanta/webui/EmployeeUpdatePG).
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:519)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3782)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3459)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    Exception:
    oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = /mhe/oracle/apps/ak/susanta/webui/EmployeeUpdatePG, XML Path = C:\Soumya\JDeveloper9\jdevhome\jdev\myclasses\JRADXML;C:\Soumya\JDeveloper9\jdevhome\jdev\myprojects;C:\Soumya\JDeveloper9\jdevbin\jdev\oamdsxml\fwk. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1343)
         at oracle.adf.mds.MElement.findElement(MElement.java:97)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:493)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3782)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3459)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Exception:
    oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = /mhe/oracle/apps/ak/susanta/webui/EmployeeUpdatePG, XML Path = C:\Soumya\JDeveloper9\jdevhome\jdev\myclasses\JRADXML;C:\Soumya\JDeveloper9\jdevhome\jdev\myprojects;C:\Soumya\JDeveloper9\jdevbin\jdev\oamdsxml\fwk. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1343)
         at oracle.adf.mds.MElement.findElement(MElement.java:97)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:493)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3782)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3459)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

    refer http://prasanna-adf.blogspot.com/2008/02/deploying-oafwk.html
    to know about how to import the PG into the instance..
    --Prasanna                                                                                                                                                                                                                                                                                       

  • In portlets, how to use a html form passing  values to the another page?

    it is well known that in web developing , we have two methods to pass values to another page.<!--
    1. passing values
    2.<form action="nextPage" method ="post"></form>-->
    but how to use two methods in oracle portal portlets?
    I have got a simple example which submit two values to the page for itself, means a page has a form with submit botton, user input the form with values and then submit them by submit botton, then the page recevice those values and show it .
    this example is powered by oracle ,
    please have a look at these code:
    <br><br>
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@page import="java.util.*, oracle.portal.provider.v2.*" %>
    <%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRendererUtil" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %>
    <%@page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil" %>
    <%@page import="oracle.portal.provider.v2.url.UrlUtils" %>
    <%
    // The form submit URL refers to the current Portal page. All portlets
    // on this page share this URL. This means that the per portlet parameters
    // are in the same request. Portlets must ensure that its paramerters don't
    // collide either with other portlets or other instances of itself. This
    // is generally accomplished by using "fully-qualified" parameter names. A
    // fully-qualified parameter name prepends the (unique) portlet reference to
    // the parameter. The JPDK provides a utility to accomplish this.
    String portletParamName = "mName";
    String portletParamAge = "mAge";
    String portletParamSubmit = "mSubmit";
    String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
    String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    // These are the session attribute names used to store the current values.
    // Because all instances of this portlet share the same user session we must
    // also fully-qualify these names to avoid collisions.
    String sName = HttpPortletRendererUtil.portletParameter(request, "sName");
    String sAge = HttpPortletRendererUtil.portletParameter(request, "sAge");
    PortletRenderRequest pRequest = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    String formName = UrlUtils.htmlFormName(pRequest,null);
    ProviderUser user = pRequest.getUser();
    ProviderSession providerSession = user.getSession();
    if (providerSession == null)
    %>
    Your provider session has been terminated or has timed out
    and you need to logout and then login to re-establish the session.
    <%
    else
    // Record, in session storage, the last values submitted.
    if (pRequest.getQualifiedParameter(portletParamSubmit) != null)
    providerSession.setAttribute(sName, pRequest.getQualifiedParameter(portletParamName));
    providerSession.setAttribute(sAge, pRequest.getQualifiedParameter(portletParamAge));
    %>
    <!-- Output the HTML content -->
    <center>
    <table width="70%">
    <tr>
    <td>
    <b>This portlet shows how to post and process information from HTML forms.</b>
    </td>
    </tr>
    </table>
    <form name="<%= formName %>" method="POST"
    action="<%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %>">
    <%= UrlUtils.htmlFormHiddenFields(pRequest,UrlUtils.PAGE_LINK, formName) %>
    <table>
    <tr>
    <td>
    <b>Name :</b>
    </td>
    <td>
    <input type="text" size="20" name="<%= fName %>" value="">
    </td>
    </tr>
    <tr>
    <td>
    <b>Age : </b>
    </td>
    <td>
    <input type="text" size="3" name="<%= fAge %>" value="">
    </td>
    </tr>
    </table>
    <br>
    <INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
    </form>
    <%
    if ((providerSession.getAttribute(sName) == null)&& (providerSession.getAttribute(sAge) == null)) {
    %>
    <b>No values have been submitted yet.</b>
    <%
    } else {
    %>
    <b> Last submitted values:</b><br>
    <table>
    <tr>
    <td>
    <b>Name: </b>
    </td>
    <td>
    <b><%= providerSession.getAttribute(sName) %></b>
    </td>
    </tr>
    <tr>
    <td>
    <b>Age: </b>
    </td>
    <td>
    <b><%= providerSession.getAttribute(sAge) %></b>
    </td>
    </tr>
    </table>
    <%
    %>
    </center>
    <%
    %>
    <br><br>
    <br><br>
    <br><br>
    but I want to write the form in a page , and then show it on another page , how to write it ?
    I have read the pdk:
    oracle.portal.provider.v2.url Classes
    UrlUtils
    then I use these method , as this :
    //frist page:
    <br><br><br><br>
    <%@page contentType="text/html; charset=Big5"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    %>
    <%@ page import="oracle.portal.provider.v2.*"%>
    <%@ page import="oracle.portal.provider.v2.render.PortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.url.UrlUtils"%>
    <%
    PortletRenderRequest pReq = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    %>
    <P>Hello <%= pReq.getUser().getName() %>.</P>
    <P>This is the <b><i>Show</i></b> render mode!</P>
    this is a program to test the passing value
    <%
    String portletParamName = "mName";
    String portletParamAge = "mAge";
    String portletParamSubmit = "mSubmit";
    String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
    String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    PortletRenderRequest pr=(PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    String formName=UrlUtils.htmlFormName(pr, null);
    %>
    <form name="<%=formName%>" method="post" action="<%=UrlUtils.htmlFormActionLink("/htdocs/passingvalues4/getValues.jsp")%>">
    <%= UrlUtils.htmlFormHiddenFields("/htdocs/passingvalues4/getValues.jsp") %>
    name:<input type="text" size="20" name="<%= fName %>" value="">
    p w :<input type="text" size="3" name="<%= fAge %>" value="">
    <INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
    </form>
    //getValues.jsp<br><br>
    <br><br>
    <%@page contentType="text/html; charset=Big5"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    %>
    <%@ page import="oracle.portal.provider.v2.*"%>
    <%@ page import="oracle.portal.provider.v2.render.PortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.url.UrlUtils"%>
    <% String portletParamName = "mName";
    String portletParamAge = "mAge";
    String portletParamSubmit = "mSubmit";
    String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
    String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Big5">
    <title>untitled</title>
    </head>
    <body>
    Name:<%=fName%>
    Age :<%=fAge%>
    </body>
    </html>
    <br>then I deployed them on the portal , run it , the result is :after I submit it , the browser give me : http 404 page not found!
    [b]here is the provider.xml<br>[b[i]]<?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>PassingValues4</name>
    <title>PassingValues4</title>
    <description>PassingValues4</description>
    <timeout>60</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage>/htdocs/passingvalues4/PassingValues4InputPage.jsp</showPage>
    <showPage>/htdocs/passingvalues4/getValues.jsp</showPage>
    </renderer>
    </portlet>
    </provider>
    <br><br><br>
    <br><br>
    would you kind enough to help me ? thanks!!!
    Message was edited by:
    moonsoft

    Hi Moonsoft,
    I have already answered this query in the other post at Re: how to link more than one links in portlet?(jsp develop)
    <form name = "showPageForm" method = "POST" action = "<%= UrlUtils.htmlFormActionLink(pReq,UrlUtils.PAGE_LINK) %>">
      <%= UrlUtils.htmlFormHiddenFields(pReq,UrlUtils.PAGE_LINK, "showPageForm") %>
      <input type="text" name="param1">
      <input type="text" name="param2">
      <input type="hidden" name="myPPN" value="/htdocs/page2.jsp">
    </form>then in your jsp code on page2.jsp, you will extract the parameters by specifying
    <%
      String p1 = request.getParameter("param1");
      String p2 = request.getParameter("param2");
    %>
    >>this is easy common jsp or asp development, but in oracle is too diffcult!!!!
    :-) .. there is a difference between web-applications and portlets, you just need to get used to it once. I hope this does clarify your doubts.
    thanks,
    Harsha

  • How to put an MSO inside another MSO

    Hello all!
    An interesting question came up in the following post by Folobo:
    http://forums.adobe.com/message/4572897#4572897
    "Is it possible to use a slideshow embedded in a big overlay slideshow?"
    I'd like to rephrase this question:
    "Is it possible to put a MultiStateObject (MSO) inside another MultiStateObject?"
    And further: if the answer is "yes", could we put that to use with the DPS?
    @Folobo – this is an interesting question. A quick test is showing that you cannot do it in the UI (correct me if I'm wrong).
    Let's try it this way:
    If you have two objects:
    1. an MSO #1 (with two rectangles, rectangle #1, rectangle #2)
    2. Another rectangle on the page: rectangle #3
    Now select the two objects and make an MSO out of it (using the "Object States" panel).
    You would think, now I get an MSO with two states, state 1 with rectangle #3 together with state 2 with MSO #1.
    But not so:
    Result: One new MSO with three states (rectangle #1, rectangle #2, rectangle #3)
    Hm. I don't give up on that. Let's try it another way:
    Could we select at least two objects inside a state of an MSO and make that a new MSO?
    Sure, We could select two objects inside a state, but since we are *inside* an MSO the "Object States" panel does not show the possibility to make a new MSO. You can only add states or add objects to states…
    Frustrating. End of story? Maybe…
    Be forewarned. The following is highly experimental!
    Let's try it by scripting (ExtendScript/JavaScript).
    The scripting reference is showing that an MSO "MultiStateObject" object has an add()-method. And further on, that add()-method could be applied to:
    Document
    Spread
    MasterSpread
    Page
    Layer
    pageItem
    And that is the key to a possible solution. We could add a new MSO to a "pageItem" object.
    A simple rectangle should be qualify for a "pageItem" object; and that, of course, could reside in a state of an MSO.
    So, we could add a new MSO to a rectangle inside of a MSO!
    How can we access a rectangle inside a MSO? Easy: We could select it and work with that selection.
    So let's do that: select the rectangle in the first state of an MSO and run this one-line-script (be sure you did select the rectangle and not the MSO or one of its states:
    app.selection[0].multiStateObjects.add();
    We now have an MSO inside another MSO!
    Explanation:
    A "generic MSO" was added with the add()-function to a selection (the container object: in our case the selected rectangle).
    The "generic MSO" is a two state MSO consisting of one rectangle in each state of a very small size (10px x 10px).
    At first it is invisible, because it is very likely that it is positioned outside the geometric bounds of its container object (the rectangle).
    But we can customize this!
    Go to the layers palette and select the new MSO, move it inside the geometric bounds of its container object, readjust its size, add states as you wish, populate the states with images, and other objects etc.pp.
    So, what can we do with an MSO inside another MSO? (As I already said, this is highly experimental.)
    My experiments with that are very fresh. I did not try a lot. But it seems that we could at least autoplay this MSO.
    I have to test more thoroughly what is possible and what will work with buttons etc.pp…
    I really like to hear from you what you will find out and if you can put it to any use.
    Uwe
    Message was edited by: Laubender

    @Mobly – in case it did not work out for you, here some screen grabs for the different steps:
    1. Select an MSO:
    2. Select a "graphic frame" inside the MSO; in this case a "<square>"; you can see the big blue dot in the Layers panel behind the generic name "<square>":
    3. Open the Scripts Panel and select the script:
    4. Run the script by double-clicking the script; the generic name of your selected object has changed to "graphic frame", but trust me, it's still a square…
    5. Click the "Ok" button of the message and InDesign will select the new MSO ("Multi-state 2") as you can see here. It has two states with one rectangle each,  fill and stroke is "None":
    And: you can see that this new MSO is nested inside the MSO ("Multi-state 1").
    What you do with that construct is up to you:
    6. Color the "<square>" of state 1 of "Multi-state 2":
    7. Resize and change position of "Multi-state 2":
    8. But remember: "Multi-state 2" is nested in the graphic frame you selected before running the script:
    I hope you get the picture now…
    Uwe

  • What is the best way to call a servlet from another servlet?

    I have a project with 9 servlets (class project). The way I have been moving from servlet to servlet is like this
    doPost(...)
    {      response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head><title>Functions</title>");
    out.println(f"<form name=frm6 method=post action=/servlet2");
    out.println("<input type=submit name='btn' value='servlet2'>");
    out.println("</form>");
    So I have these 9 servlets - I call any 8 of them from the first servlet so I have 8 buttons on 8 forms <form=frm1, frm2, ...frm8 method = post...> But when I bring up the first servlet only 6 buttons show up. I was thinking about using hyperlinks instead, but I would like to do this with buttons. I wanted to do this with javascript and the location object, but I was advised to use jsp. I just want to move from one servlet to the next. Any suggestions appreciated for the best/preferred method for moving from one servlet to the next.
    Thanks

    I think you may need some clarification of terminology etc..
    First off, JSP isn't an alternative to javascript, it's an alternative to coding a servlet. A JSP is a mixture of java code and HTML and is translated into a servlet by the system. JSPs are primarilly for generating HTML pages with variable content. JSPs very frequently generate HTML which includes Javascript.
    You probably shouldn't think of what you're doing as one servlet invoking another, that does happen; a servlet can transfer an transaction to another servlet or JSP. In fact it's standard practice that a servlet does the logical stuff (like interpretting form data) then transfers to a JSP to generate the response page. However in this case it's the browser that can invoke one of the 8 servlets, the first servlet merely creates the page from which they are invoked.
    It's not obvious why only some of your buttons are showing up. In a case like this use the "view source" option on your browser to find out what HTML the servlet is actually delivering. What's wrong should be evident from that.
    You can put a hyperlink arround a button, or an image. Mostly people turn up their noses at the buttons supplied by HTML and use their own images for buttons. You
    can do somthing like this:
    <img src="/images/button3.png" border="0">
    (Of course this arrives as a GET transaction not a POST).
    Or you can do a bit of javascript like:
    <img src="/images/button3.png" style="Cursor: pointer;"
    onclick="document.locations.href='/servlet3';">

  • Loading a SWF inside another SWF question

    Hello friends,
    1. (IMPORTANT) As all we know when putting some Flash SWF
    inside an HTML page, normally it starts playing as soon as its
    first frame is loaded.
    Now in my case I have to load a SWF (let call it Flash A)
    inside another Flash, I used mx.controls.Loader control to do this.
    But this internal loaded SWF (Flash A) doesn't display untill it is
    completely loaded. Although what is interesting is that if it
    contains a sound track I can hear it while it is being loaded.
    I wana know is there any way that we can make this Flash
    display while being still loaded.
    2. Is there anyway to change a Flash playback FPS at runtime?
    Thank you so much for any note and help.
    - M

    damatrixhasu wrote:
    > i want to know how i can load a flash inside another
    flash container
    go to help - search for 'loadmovie'
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Navigate to another page in the same window problem

    Hi,
    I have a problem with the following scenario:
    When a user clicks on a link in a portal, a web dynpro page opens in new window with the url similar to this
    http://server:port/irj/servlet/prt/portal/prtmode/runtime/prtroot/pcd!3aportal_content!2fCompany!2fIntranet_v2!2fApplications!2fZZ!2fPages!2fBrowseCopies
    So basically in this way we only want to display this single application, without portal top level navigation, inner page, masthead etc.
    The problem occurs when we try to implement navigation from this web dynpro application to another page
    When we use WDPortalNavigation a new window opens but we want the navigation to happen in the same window.
    We cannot use LinkToUrl control with _self parameter because its not supported.
    We also cannot use HttpServletResponse by getting it through com.sap.tc.webdynpro.services.sal.adapter.core.IWDWebContextAdapter class.
    We also cannot use ExitPlugs because the error occurs with the message that the ExitPlugs cannot be used in portal.
    Basically I need a redirect to another page. Any ideas how to solve this problem?
    Regards,
    Ladislav

    Hi,
    the link which initially opens this web dynpro application page is contained in a html page.
    Here is the code:
    WDPortalNavigation.navigateAbsolute(
      "ROLES://portal_content/Company/Intranet_v2/Applications/ZZ/Pages/PurchaseRequests",
      WDPortalNavigationMode.SHOW_INPLACE,
      WDPortalNavigationHistoryMode.NO_HISTORY,
      "requestNr="+wdContext.currentContextElement().getRequestNr());
    Regards,
    Ladislav
    Edited by: Ladislav Pomezny on Jul 2, 2009 1:23 PM

  • How to refer image shown in one page in another page in same application

    Hi,
    I am facing some issue in show images on plugin, I uploaded imaged on table, I am able to show those images on region and report. But not able to show the image inside the plugin
    I am using apex 4.1 and oracle 10 express edition installed
    I am using plugin org chart plugin to show the organization details details of the plugin is mentioned below
    >>http://apex-plugin.com/oracle-apex-plugins/region-plugin/google-visualizations-orgchart_187.html
    To display image on report and region i am using the below method
    >><img src="'|| apex_util.get_blob_file_src('P3_PHOTO_BLOB',l_hr_id) ||'" width="200px" />
    I need expert suggestion why i am not able to display inside plugin region, Also I was thinking like show the image in another page and refer that in side plugin.
    I am able to display workspace image inside plugin only issue is with not able to show the table stored images.
    Thanks
    Sudhir

    Hi,
    Its working fine in http://apex.oracle.com Please find the below credential details
    UserName: MERUDEV
    WorkSpace: [email protected]
    Password: MERUDEV
    Application ID = 43986
    Created two pages
    Page - 1 is where we upload the image,
    Page -2 is where i have uploaded the google org chart and populating the employee reporting structure.
    inside this org region i need to show the uploaded image.
    It's working fine here in the ape.oracle.com.
    In my local machine its not working, Dont know what is the issue. I am using apex4 and oracle 10g xe version. Please suggest me
    Thanks
    Sudhir

  • C:forEach tag inside another c:forEach tag

    Hi,
    I've got en error when I tried to use <c:forEach> inside another <c:forEach> to display a vector of String arrays.
    The error message is:
    javax.servlet.ServletException: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
    The concerned section of the javabean mybean.java is:
    //connect to database to get the resultset
    ResultSet rs = cst.getResultSet();
    if (rs != null) {
    myVector = new Vector();
    while (rs.next()) {
    String myArray[] = new String[10];
    myArray[0]=rs.getString(1);
    myArray[1]=rs.getString(2);
    myArray[9]=rs.getString(10);
    myVector.addElement(myArray);
    rs.close()
    The concerned jsp calling the bean is:
    <jsp:useBean id="theBean" scope="session" class="mybean" />
    <jsp:setProperty name="theBean" property="..." />
    <%
    Vector myVector=theBean.getResultFromDatabaseIntomyVector();
    pageContext.setAttribute("myVector",myVector);
    %>
    <table>
    <c:forEach var = 'vectorItem' items='${myVector}'>
    <tr>
    <c:forEach var = 'arrayItem' items='${vectorItem.value}'>
    <td><c out value='${arrayItem}'/></td>
    </c:forEach>
    </tr>
    </table>
    Can anyone show me what's the right jsp for displaying a vector of String arrays?
    Thanks in advance.
    Geraldine

    I think your problem is with the second forEach loop.
    The first for loop goes through the items in "myVector"
    Each item "vectorItem" should be of type String[]
    Accessing ${vectorItem.value} is what creates the error.
    JSTL converts this as
    vectorItem["value"] , can't turn the string "value" into an integer (to use as an array index) and thus throws an error.
    To fix: use ${vectorItem} rather than ${vectorItem.value}
    (nb you would use {vectorItem.value} if you were iterating over a Map, as the iterator exposes an object of type Map.Entry
    Also in your code, I only see one closing tag for a forEach.
    I think it should be like this (indented for readability)
    <table>
    <c:forEach var = 'vectorItem' items='${myVector}'>
    <tr>
      <c:forEach var = 'arrayItem' items='${vectorItem}'>
        <td><c out value='${arrayItem}'/></td>
      </c:forEach>
    </tr>
    </c:forEach>
    </table>Cheers,
    evnafets

Maybe you are looking for

  • No suitable driver found for jdbc:mysql

    Running : Windows XP ver 5.1 on x86 Java 1.6.0_03 VM Java HotSpot Client VM 1.6.003-b05 Java jdk1.6.0\jre MySQL ver 14.12 Distrib 5.0.45 for Win32 (ia32) NetBeans IDE 5.5.1 (Build 200704122300) Classpath set to: E:\Programfiler\Java\jre1.6.0_03\lib\e

  • Image quality of slide shows using Aperture 3 seems inferior to iPhoto '08

    I haven't previously used Aperture. I've been using a copy of iPhoto '08 for several years. I've shot everything in RAW for the last several years and process it in DXO on my Mac Pro (3 1/2 years old with 7 gigs of RAM). I then load the jpegs into iP

  • Using external LDAP to create a web server

    Hello everyone, I am working on a project for the university I work for. We have an iPlanet LDAP server that contains the identities of everyone (faculty, staff, students). I have set up an experimental OS X server that we'd like to play with; in par

  • How to handle dynamically generated schemas

    Hello! Experts In my last query (subject-- JABX implementation Query)which posted in this forum i asked whether JAXB can be used in situation where schema of the xml files are generate dynamically.I came to know through the reply that JAXB can be use

  • Block ad making an exception

    when I play games or browse videos, there is a tiny white box in the top right corner, when I click it a window opens asking if I want to make a exception and allow the player, most of the time it allows me to see the videos or play the games. When I