JSP Input to Portlet

Hello, World! (it was a lot funnier in my head)
I posted this in the "New to Java", but I think it's much better suited in here...
Anyways, I have this portlet application running where it is displaying genral news such as events, contests, etc.
I'm using a database and hibernate to retrieve the data.
It works fine for display, but now I am trying to create my doEdit() method. Right now what I want to do is get the "Edit News" part working (I figure Creating News will be a snap once I get this done). What it's doing now is taking the story that you want to edit, and it is loading it up on my editNews.jsp page. Basically, what this is going to do is display all the information from the story on the page, with the values in the input boxes.
What I need to do is have it 'save' the changes the administrator would be making to my database once the "Submit" button is clicked.
Any help on the quickest, most painless, and easiest wasy to do this would be a great help.
Thank you very much.

Hi Anders,
Make pageflow in portlet A to forward to pageflow in portlet B's action
login, done just after register is executed in flow A.
in Portlet A: register():
* @jpf:forward name="success" path="/portletBpageflow/login.do"
Flow will continue in Portlet B's action login.
- Björn Syse
"Anders Thornberg" <[email protected]> wrote in message
news:[email protected]..
Hello,
Is this possible?
I have to pageflow portlets:
Portlet A:
Page : input.jsp form executes action=register
Action: register() forwards to postregister()
Action: postregister()
Portlet B:
Action: postregister() forwards to login
Action: login()
Portlet B listens to portlet A.
I want B.postregister() to be executed when A.postregister() is executed.
I can make it work if skip A.register and let jsp go to postregister()
which will contain all logic from register(). The problem is that
B.postregister() is executed BEFORE A.postregister() which mean that
user is not registred when portlet B tries to run login.
Best Regards
Anders Thornberg

Similar Messages

  • How to deploy a jsp app as portlet in portal?

    i'm a new bee to this portal & portlet stuff.
    so, pls let me know if my questions doesn't make sense.
    i have a jsp app sitting in jdeveloper 9.0.3
    can i deploy this jsp app as portlet and see it from
    my portal?
    srini

    Hi Benjamin.
    Can u explain more detail about the deployment..
    I also use JDev and want to do like you do (that is deploy to 9iAS using JDev.
    I tried to create new connection via Remote DCM..
    but it gave me error.
    I also read & tried the article that u suggested..
    but still failed..
    So, my questions are:
    1)In step one, where in EM should i install Oc4jDcmServlet.ear? in OC4J_Portal(the same place i deploy jpdk)?
    "Install the DCM Servlet, Oc4jDcmServlet.ear, to a running Oracle Enterprise Manager instance. This servlet is required to run in the same OC4J instance (same JVM) as the Enterprise Manager servlet. The DCM Servlet is located in:
    <jdev_install>/dcm/lib/Oc4jDcmServlet.ear "
    2)I download JDev into my drive C.
    and i did found /dcm/lib/Oc4jDcmServlet.ear
    I not sure what to type..and where should i run the command..
    In the article,it run from c:\winnt\system32\cmd.exe.
    But when i ty to run it, it gave me error
    "Exception in thread "main" java.util.zip.ZipException: The system cannot find th
    e path specified
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)"
    should i run the command in the server?Where?
    What command should i type?
    Java -jar ${ORACLE_HOME}/j2ee/home/admin.jar ormi://${EM_OC4J_HOST}:${EM_OC4J_PORT} ${IAS_ADMIN_USER} ${IAS_ADMIN_PASS} -deploy -file Oc4jDcmServlet.ear -deploymentName Oc4jDcmServlet "
    Thanks..

  • %sign in jsp input box

    Hi Gurus,
    This code was working fine. Then I added a common utility required and it does still run correctly but not when I enter a % sign
    for example if I enter G339% the system out displays G339"a small square box"oe=partno
    so it seems to transform the number and append other code after the number when calling the servlet.
    jsp:
    <input type="text" name="searchvalue" value=<%=searchvalue%>>
    servlet:
    String searchvalue = request.getParameter("searchvalue");
    System.out.println("in the search value is: " + searchvalue);Please help and could you please give some code in the reply. I tried encode URL and nothing seems to work. I tried escape character that did not seem to work either. Really going crazy on this one.
    Thank you !
    I got this half way to work
    I put this code on the javascript of the button:
    document.forms[0].searchvalue.value = escape(document.forms[0].searchvalue.value);but if the user hits enter it goes right to the servlet and I am trying to do this but it does not work:
    String searchvalue = request.getParameter(escape(("searchvalue"));I know this is java and I am trying to do javascript but I want to do something like what I have above...
    Thank you!

    You are encountering a "feature" of the browser.
    If there is only one text field on the page, and you hit the enter key, it will avoid running the onclick method of the submit button.
    Workaround solution: put another textfield on the page: even if it has a style="display:none" to hide it.
    That is sufficient for the browser to then recognise it needs to run the onclick when you hit enter.
    [another link|http://stackoverflow.com/questions/756466/html-form-with-single-text-field-preventing-postback-in-internet-explorer]
    cheers,
    evnafets

  • PUBLISHING OC4J JSP as web portlet

    I have developed a JSP page in OC4j and want to publish this page on portal 3.0.9 as web portlet. I have created web provider and registered this page as portlet. When I view the portlet it comes as a Blank Page.
    Can anyone tell me how to publish a JSP page developed in OC4J as a web portlet? Can I publish JSP web pages developed in OC4J as web portlet without modifying any JSP code?
    I have installed all JPDK samples and they are working fine.
    Regards

    Here is what we are forced to do, because V2 has had a great delay in the time scheduling.
    Hope it helps. Anyone better ideas?
    Michael.
    ------------8<----------------8<----------------8<-----------
    1. use mod_proxy in httpd.conf
    <IfModule mod_proxy.c>
    ProxyRequests On
    ProxyPass /pof/ http://localhost:7779/pof/
    ProxyPassReverse /pof/ http://localhost:7779/pof/
    </IfModule>
    2. create JSP under JServ, use hidden fields to transfer parameter
    <%
    try{
    PortletRenderRequest portletRequest = (PortletRenderRequest) request.getAttribute(HttpPro
    vider.PORTLET_RENDER_REQUEST);
    ProviderUser pUser = (ProviderUser) portletRequest.getUser();
    String vUser = pUser.getName();
    if ( !vUser.equalsIgnoreCase("PUBLIC") )
    %>
    <input type="hidden" name="user" value="<%= vUser %>">
    <%
    3. in the action-Tag, use the mapped URL to connect to OC4J
    <form action="/pof/ ....

  • WLIntegration Worklist.jsp in a portlet problem

    I am using the BEA WLIntegration client example and have managed to get the initial
    page displayed in a portal. The Worklist.jsp uses bean ResponseHandler. When trying
    to display Worklist.jsp the server returns ResponseHandler not found. For portlets
    where a JSP uses a bean where should the baen reside and what references in the
    deployment descriptor are required.
    The Worklist.jsp works fine when used outside of the portlet framework.

    Another example of a multi-page portlet is described in Case Study: Building Portlets with JavaBeans.
    Regards,
    -rh
    null

  • Changing button label;JSP; input type="submit" name="jboEvent" value="Search"

    Hello everybody,
    I try to develop a multilanguage application in which the button labels will change accordingly with the browser's regional settings.
    The line in the generated DataQueryComponent.jsp file is the following:
    <input type="submit" name="jboEvent" value="Search">
    If I want to change the value like value="Rechercher" the application will not execute the query.
    In fact the section
    <jbo:ViewCriteriaIterate datasource="dsQuery" >
    </jbo:ViewCriteriaIterate>
    is not executed.
    I tried to generate the button with:
    <input type="submit" name="jboEvent" value="Rechercher" onClick="this.value='Search'"> ,
    but for a long query the name Search will remain as button label on the screen.
    Any new solutions, please?
    Thanks in advance.

    Visit that Jakarta web site. There is an i18n tag library that you will find useful.
    http://jakarta.apache.org/taglibs/doc/i18n-doc/intro.html

  • Jsps from pageflow portlet in navigation (or from portlet to book pages)

    Hi all,
    I'm a Weblogic newbie. I was wondering if anyone could please tell me how to get the name or title of a jsp from a pageflow portlet in navigation?
    I have page1.jsp (title: "Step 1"), page2.jsp ("Step 2") and page3.jsp ("Step 3") in a page flow that goes from page1.jsp to page2.jsp to page3.jsp. This page flow is made into a portlet. This portlet is the ONLY thing on the page in the portal book and the ONLY way to get to page3 is from page2 and to get to page2 is from page1, although you can return to page1 at any point.
    I would like my navigation programming--the single level across the top--to show the name of the jsp that is showing or the title. I've seen how to get the book and the pages of the book in the navigation, but not how to get further than that.
    Has anyone else done this?
    Thanks so much in advance.

    Have you resolved this problem? I'm stuck at the same place.
    <br>
    Thnx, Rajiv

  • Publish Internal JSP Page as Portlet

    9ias 9.0.2.0.1
    Portal 9.0.2.0.3
    I have written some Internal JSP pages that I now want to display as a portlets within a normal portal page. However I am unable to locate a "Publish As Portlet" option in the properties of the JSP pages.
    Does anyone know if this is possible and if so, point me in the right direction?
    Thanks,
    Paul.

    Hiya (and bump, I do realize this post is ancient...).
    It seems to me that one simply cannot publish a jsp-page as a portlet. I have this exact issue as well, pl/sql implementation of what I'm trying to do (utilizing utl_http) is so buggy it will not work, jsp works beautifully with just a few lines of code, but what use is a jsp page when I cannot utilize it?
    What is the point of jsp-pages in Oracle portal?

  • Calling a Servlet from a JSP within Portal Portlet

    We've created a JSP that calls a Servlet when the form is submitted. The servlet handles the request, does some basic processing and then forwards back to a JSP. This works fine outside of Portal.
    What needs to be done in order for this to work within a portlet in Portal? We can get to the first JSP which is in a portlet, but as soon as we click the submit button (which tries to call the servlet) we get the basic page not found error. We need to click the button, go to the servlet and have the servlet forward back to our portlet.
    I know this is not the ideal way of using Portal however...
    Any ideas?
    Thanks!
    -Teri Kemple
    [email protected]

    I was wondering is there any way I can call a servlet from jsp? There are two scenarios here
    1 - if the jsp is currently being executed/evaluated on the server, then you can use <jsp:include> to "call" a servlet, or <jsp:forward> to cancel the jsp and transfer the control to the servlet.
    2 - if the page is already loaded and running in the client, then the only way to call a servlet is making a HTTP request as from any other html page. Jave code does not execute on the client, so you have to use html/javascript at that point.
    Calling a servlet within another servlet.
    lets say one servlet maintains all dynamic html. I call this servlet from another servlet to create a dynamic page and then insert values into it.Close, but the standard pattern is the reverse of that. What normally happens is you retrieve the values to put in the page, and then call the page, passing in those values. Thats why often you get a servlet/actionbean getting called, which then forwards to a JSP to display the result. The servlet/bean loads all the values required into scope, and then the JSP presents the data.

  • Publish web layout of jsp report as portlet

    Hi All:
    Please let me know how can i run web layout of jsp report and publish it as portlet?
    I have successfully deployed my jsp report(web layout),namely my_rpt.jsp, as a J2EE application and when i write URL direlctly in address bar of browser it runs successfully.
    I have also published (as portlet) successfully my_rpt.jsp, with "execute" type "servlet", and it runs paper layout of report.
    But i m unable to run the web layout of this report,with "execute" type "JSP"
    i have provided "Oracle Reports Web Gateway URL for JSP reports " = http://webserver.domain_name:port/
    Please help me out whats the problem and how can i run my jsp report with web layout?.One thing more its not the problem with only my_rpt.jsp
    but other reports also shows the same behaviour.
    Any suggestion/solution would be highly appreciated.
    Regards
    Sam

    Hi sam ,
    Can you please tell me full process of to publish the report made in report builder in a portal (portlets). i am new to portal .
    can u please provide me guidance
    thanx
    anand

  • Re: Linking .jsp input fields to JSPBeans

    You can accomplish what you want by passing parameters to the Servlet like the following.
    <input type =text title=""name="refcode" value= "" size= "20" class= "textbox" maxlength= "18" >Then on your servlet, the value corresponding to the refcode will be at a parameter called "refcode"(the name of the parameters will be the same name you give to your fields on the jsp page. So gessing the name of the other fields on your jsp page the pice of your doPost method from your servlet posted below should be like:
    String strRefCode = request.getParameter("refcode");
    String strAuthCode = request.getParameter("authcode");
    String strCostCode = request.getParameter("costcode");Be sure that your are informing your servlet name on the action parameter of the form tag on the jsp page so that the above may really work.
    Hope I have made sense.
    Thank you,
    Thiago Santana

    Hi There,
    As it turns out, my boss (who sent me on this wild goose chase) doesn't know all that much about Java either.
    He had suggested that there was a method similiar to the process in VC++ where you can link an input field to a class member, and let the framework handle all the data updating and processing. (I'm sure there is something similiar in Java application programming)
    As it turns out, there isn't, as I'm sure everyone here is aware. Once I stopped being distracted by trying to find something that wasn't there, I found that there is some fairly obscure code in our application that does use getParameter calls to pull out the information.
    To summarise: My boss and I are both idiots, and don't know what we're talking about when it comes to Java.
    Thanks for your help though!!
    Cheers,
    Riv

  • Load CSS  in JSP - Deploying in Portlet

    Hello:
    I work development Portlets in netbeans and jetspeed 2.
    A Portlet include a jsp page (include(request, response) ), this jsp have a css pagestyle. a view in my browser very good, but this page into the portlet not load a css page (No color, no fonts, plain tables, etc ).
    Help me please!!!

    You will have to in clude the css inside the jsp in <style> tags
    Cheers
    Varun rathore

  • Jsp into web portlet

    How do i put a .jsp created whit JDeveloper into a portlet whithin Portal????

    The Portal Development Kit contains all of the information for building web portlets. It is located at: http://otn.oracle.com/products/iportal/files/pdkjan/index.html
    There is also another forum called Oracle Portal Development Kit (PDK) specifically for portlet development issues.
    null

  • JSP - Input form - Email Issue

    Good Morning Everyone,
    I have an input form that has 6 input boxes, seperated in 2 groups. Names and Email addresses.
    I am currently attempting to send the input values to the JSP page as an array, which will then be looped emailing each user that i have previously entered from the first page.
    The problem comes if i dont input values in all the forms on the first page i get an error. If it is all filled out then it all goes fine and dandy.
    I have edited the html code down to protext page size.
    HTML page.
    <form action="formname.jsp" method="POST">
    <table>
    <tr><td>
    Name <input type="text" name="name" value=""></td>
    <td>
    Email <input type="text" name="email" value=""></td>
    </tr>
    <tr><td>
    Name 2<input type="text" name="name" value=""></td>
    <td>
    Email 2<input type="text" name="email" value=""></td>
    </tr>
    <tr><td>
    Name 3<input type="text" name="name" value=""></td>
    <td>
    Email 3<input type="text" name="email" value=""></td>
    <td colspan="2">
    <input type="submit" name="submit" value="Select"></td>
    JSP Page
    <body>
    <%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
    <%
    // define variables and assign values to variables
    String[] nName = request.getParameterValues("name");
    String[] nEmail = request.getParameterValues("email");
    // print by iterating through array
    for(int counter = 0; counter < nName.length; counter++)
    Properties props = new Properties();
    props.put("mail.smtp.host", "localhost");
    Session s = Session.getInstance(props,null);
    MimeMessage message = new MimeMessage(s);
    InternetAddress from = new InternetAddress("[email protected]");
    message.setFrom(from);
    InternetAddress to = new InternetAddress(nEmail[counter]);
    message.addRecipient(Message.RecipientType.TO, to);
    message.setSubject(nName[counter]);
    message.setText("Mail Message Body!");
    Transport.send(message);
    %>
    <p align="center">The Message has been sent.</p>
    </body>
    Edited Error Code
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Illegal address
    ~~
    root cause
    javax.mail.internet.AddressException: Illegal address in string ``''
    <end>
    So the above error message happens if i dont put data in all of the input forms, but if i do it has no error. The mail will get sent to the addresses i have specified but will come up with an error if only one is inputed with a name.
    Also how would i also add a html email to this, instead of plain text.
    Thanks!

    Edited :(
    Good Morning Everyone,
    I have an input form that has 6 input boxes, seperated in 2 groups. Names and Email addresses.
    I am currently attempting to send the input values to the JSP page as an array, which will then be looped emailing each user that i have previously entered from the first page.
    The problem comes if i dont input values in all the forms on the first page i get an error. If it is all filled out then it all goes fine and dandy.
    I have edited the html code down to protext page size.
    HTML page.
    <form action="formname.jsp" method="POST">
    <table>
    <tr><td>
    Name <input type="text" name="name" value=""></td>
    <td>
    Email <input type="text" name="email" value=""></td>
    </tr>
    <tr><td>
    Name 2<input type="text" name="name" value=""></td>
    <td>
    Email 2<input type="text" name="email" value=""></td>
    </tr>
    <tr><td>
    Name 3<input type="text" name="name" value=""></td>
    <td>
    Email 3<input type="text" name="email" value=""></td>
    <td  colspan="2">
      <input type="submit" name="submit" value="Select"></td>JSP Page
    <body>
    <%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
    <%
    // define variables and assign values to variables
    String[] nName = request.getParameterValues("name");
    String[] nEmail = request.getParameterValues("email");
    // print by iterating through array
    for(int counter = 0; counter < nName.length; counter++)
      Properties props = new Properties();
      props.put("mail.smtp.host", "localhost");
      Session s = Session.getInstance(props,null);
      MimeMessage message = new MimeMessage(s);
      InternetAddress from = new InternetAddress("[email protected]");
      message.setFrom(from);
      InternetAddress to = new InternetAddress(nEmail[counter]);
      message.addRecipient(Message.RecipientType.TO, to);
      message.setSubject(nName[counter]);
      message.setText("Mail Message Body!");
      Transport.send(message);
    %>
    <p align="center">The Message has been sent.</p>
    </body> Edited Error Code
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Illegal address
    ~~
    root cause
    javax.mail.internet.AddressException: Illegal address in string ``''
    <end>So the above error message happens if i dont put data in all of the input forms, but if i do it has no error. The mail will get sent to the addresses i have specified but will come up with an error if only one is inputed with a name.
    Also how would i also add a html email to this, instead of plain text.
    Thanks!

  • JSP into the portlet

    I have a JSP application, I have depoly in my Oracle Application Server this application.
    Now I want this application is deploy in my OraclePortal into the portlet.
    Can I how resolve the my problem???
    Regards
    Basilisco Giorgio

    Check out the Packaging and Deploying Your Providers article.
    If you plan on building your own portlets, you can also consider the 2 day training on Java portlets.

Maybe you are looking for

  • USB Ethernet is not working after upgrade to 10.8

    Hi, I am not getting connected to the LAN with my USB ethernet. Anyone with similar situations? Don't tell me to convert to thunderbolt please.

  • Increasing the length of Infoobject from 60 to 240 characters

    Hi... I want to increase the length of the infoobject from 60 to 240 characters, because that particular field in R/3 has texts with length 200 characters. I want to create 4 infoobjects each of length 60, breakup the texts coming from R/3, in transf

  • Install Adobe Download Assistant

    I am trying to download the trial for CS5 Master Suite. I have downloaded the Adobe Download Assistant, however I keep getting the error: "Error extracting the product installer (Error 102), Try downloading the product again". I have uninstalled the

  • Fix/set incorrect date&time on wrt600n

    is there anyway to fix the current date/time on the router? i've tried changing the time zones a few times thinking that this might do it, but it doesn't help. the current system time is just a LITTLE off... Firmware Version:   1.01.36 build 4_200805

  • Optical drive doesn't...exist..?

    Right, I use my iBook G4's optical drive probably on a more than daily basis, and until this morning it just stopped working. I inserted an audio cd into the drive, and it did all the normal things it does...whirring, making reading sounds and whatev