How to display html form information

I know you can create an html form where visitors can input data and that data can then be sent to the specified email address. But I am wondering, is it possible to have this data that they enter create and displayed on a new page in a specified layout/template? As in, if I visit the site, and I enter my name, contact information, and maybe 2 pictures, is it possible to have this information displayed in a certain format on a new page for each visitor?
Thanks

when you posted this question you added information into a form and submitted it to be displayed on another page so I would imagine that it's possible.
Step 1.) choose a server side scripting language.
Step 2.) learn your chosen language.

Similar Messages

  • How to display images and information

    how to display images and information(e.g. like questions) on a jsp page that stored in a database

    Look As far as i can see....
    Utlimately every file could be expressed as a bytes buffer.
    so say if you have a bean called Choice Bean which is expressed as
    public class ChoiceBean{
       private String choiceid;
       private String choicedesc;
       private byte image[];
       public void setChoiceId(String choiceid){
              this.choiceid = choiceid;
        public String getChoiceId(){
               return this.choiceid;
          public void setChoiceDesc(String choicedesc){
               this.choicedesc = choicedesc;
           public String getChoiceDesc(){
               return this.choicedesc;
           public void setImage(byte image[]){
                  this.image = image;
             public byte[] getImage(){
                  return this.image;
    }QuestionList.java:
    ===============
    public class QuestionList{
         private List<ChoiceBean> choicelist;
          /*Other member variable declarations*/
           public  List<ChoiceBean> getChoiceList(){
                    /*Custom code where you may build the list by querying the DA layer*/
                     return this.choicelist;
         public int search(String choiceid){
                 int index = -1;
                 for(int i =0 ; i < this.choicelist.size() ; i++){
                        ChoiceBean cb = this.choicelist.get(i);
                         if(cb.getChoiceId().equals(choiceid)){
                                index = i;
                                break;
                 return index;
        /* Other member method declarations */
    }and you are retreving List<ChoiceBean> from DB using your query & have created a session attribute / <jsp:useBean> named ChoiceList
    NOTE: sometimes your application server can go out of bounds as you are consuming a lot of memory by creating an arraylist object.
    use the following methodology to display images & choices
    sample.jsp:
    =========
    <jsp:useBean id="QuestionList"  class="com.qpa.dao.QuestionList" scope="session"/>
    <TABLE>
    <%
    /* QuestionList.getChoiceList() is a method which fetches data from the DB & returns it in form of  List<ChoiceBean> */
    List<ChoiceBean> choicelist = QuestionList.getChoiceList();
    for(int i =0 ; i < choicelist.size() ; i++){
    %>
    <TR>
    <TD><%!=choicelist.get(i).getChoiceId()%></TD>
    <!-- calling servlet which renders an images in JPG format based upon given choiceid(unique field) -->
    <TD><IMAGE src="ImageServlet?choiceid=<%!=choicelist.get(i).getChoiceId()%>"/> </TD>
    <TD><%!=choicelist.get(i).getChoiceDesc()%></TD>
    </TR>
    <%
    %>
    </TABLE>
    <%
        session.remove("QuestionList");
    %>
    NOTE: usage of JSTL or any other custom built tag-libraries makes life more simpler in the following case
    ImageServlet.java:
    ===============
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            byte buffer[] = null;
            HttpSession session = request.getSession(false);
            /*getting the QuestionList from the session*/
            QuestionList ql = null;
            String choiceid = new String("");
            try{
                 choiceid = request.getParameter("choiceid");
                 /*getting the QuestionList from the session*/
                ql = (QuestionList)  session.getAttribute("QuestionList");
            } catch(Exception exp){
            if(choiceid.equals("") == false &&  ql != null ){
                List<ChoiceBean> clist = QuestionList.getChoiceList();           
                   assuming that you have created a serach method which searches the entire choice list and would give you
                   the index of that object which is being refered by unique choiceid and returns -1 if not found
                int index =  QuestionList.search(choiceid);
                if(index != -1){
                   ChoiceBean cb = clist.get(index);
                   buffer = cb.getImage();
            if(buffer != null){
                 // assuming that we have stored images in JPEG format only
                 JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new ByteArrayInputStream(buffer));
                 BufferedImage image =decoder.decodeAsBufferedImage();
                 response.setContentType("image/jpeg");
                 // Send back image
                 ServletOutputStream sos = response.getOutputStream();
                 JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
                 encoder.encode(image);
            } else {
               response.setContentType("text/html");
               response.getWriter().println("<b>Image data not found</b>");              
    }However,i still feel there are few loopholes with this approach where Application Server can eat up a lot of heap space which may result in outofmemorybound exception.
    Hope this might help :)
    REGARDS,
    RaHuL

  • How to display the form of time statement, which was created in trans. PE50

    Hi to all!
    I have created the salary statement with the PE50 and I want the form to be displayed in the ESS.
    How to display this form?
    Thank.

    Dear Siddharth,
    I am getting this error for Time Statement here also we have used PE50 to create time statement for r/3 purpose, Which would be feasible one to work with for getting the display of Time Statement.
    Form TH_TIME_ST does not exist
    com.sap.pcuigp.xssfpm.java.FPMRuntimeException: Form TH_TIME_ST does not exist
         at java.lang.Throwable.<init>(Throwable.java:194)
         at java.lang.Error.<init>(Error.java:49)
         at com.sap.pcuigp.xssfpm.java.FPMRuntimeException.<init>(FPMRuntimeException.java:34)
         at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:112)
         at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:122)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.reportBapiRet2Error(FcRepFramework.java:525)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.callRfcExecAction(FcRepFramework.java:357)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.initModel(FcRepFramework.java:292)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFramework.initModel(InternalFcRepFramework.java:256)
         at com.sap.xss.hr.rep.fcrfw.FcRepFrameworkInterface.initModel(FcRepFrameworkInterface.java:136)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface.initModel(InternalFcRepFrameworkInterface.java:198)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface$External.initModel(InternalFcRepFrameworkInterface.java:258)
         at com.sap.xss.hr.tim.per.selection.VcTimPerSelection.onInit(VcTimPerSelection.java:238)
         at com.sap.xss.hr.tim.per.selection.wdp.InternalVcTimPerSelection.onInit(InternalVcTimPerSelection.java:246)
         at com.sap.xss.hr.tim.per.selection.VcTimPerSelectionInterface.onInit(VcTimPerSelectionInterface.java:162)
         at com.sap.xss.hr.tim.per.selection.wdp.InternalVcTimPerSelectionInterface.onInit(InternalVcTimPerSelectionInterface.java:144)
         at com.sap.xss.hr.tim.per.selection.wdp.InternalVcTimPerSelectionInterface$External.onInit(InternalVcTimPerSelectionInterface.java:220)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:467)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:438)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:196)
         at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:359)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:755)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:278)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:722)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:623)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:215)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:113)
         at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:70)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:818)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.create(AbstractApplicationProxy.java:220)
         at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1265)
         at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:355)
         at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:548)
         at com.sap.portal.pb.PageBuilder.wdDoRefresh(PageBuilder.java:592)
         at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:864)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:750)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:715)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:113)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:107)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:278)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:623)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:215)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:113)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:60)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:332)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:0)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:335)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:963)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:249)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:0)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:92)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:30)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:35)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:101)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Appreciate your help on this.
    Regs,
    Raj

  • How to display the Form output in multiple languages ? ------ Urgent

    How to display the Form output in multiple languages ? -
    Urgent

    Hi,
    Do u mean the Form output in 2-3 languages ...like form output will be having english russian etc...
    for the above case , what u have to do ...
    first have to get the transalations for all the fields
    say for example : if the english word is PO Number , then u have to get the transalation text for PO Number :
    after this , what u have to is ,,, Log on to SAP with russian language ,  then in the form o/p u have to paste that russian test ( translation text ) ...
    do like this for all the components in the form .
    Reward Points if it is Useful.
    Thanks,
    Manjunath MS

  • I want to display html textbox information in worddoc when i click submit

    hi ,
    my problem is i want to display html textbox information in worddoc when i click on submit button. i want do open word doc when i perform submit
    please help its very urgent.
    Thanks.
    Raj

    Send the request to a servlet, make it create the doc file, set the response MIME type and stream the file through the response's output stream to show it in the Office IE plug-in.

  • How to display struts form list values?

    HI,
    How to display struts form list values?
    I am having master and child data.
    I can set list values master and child in action class.
    How to display the master and child data in struts jsp form.
    <logic:iterate id="result" name="listofEmployees" >
    <td ><bean:write name="result" property="id"/></td>
    <td ><bean:write name="result" property="name"/></td>
    <td > <bean:write name="result" property="list"/>  </td>
    </tr>
    </logic:iterate>Here I am displaying master data succesfully.
    How to iterate values of <td ><bean:write name="result" property="list"/></td>in action class i added bean class to this list.
    how to iterate this list with java bean and display my child data
    Thanks
    sai

    Struts 1 or 2?
    I guess 2 'cause you're just talking about Action, without mentioning the Form.
    In STRUTS 1 it goes like this: forward to the page and use logic:iterate tag. Don't know about STRUTS 2, but It shouldn't be too different.
    bye.

  • How to display HTML response file in user's browser following submission of Livecycle form

    I have a PDF form created via Livecycle that does a HTTP submit to the webserver. The server returns a HTML 'submission receipt' page which is either opened in Acrobat or the user's web browser.
    Previously this process worked fine when submitting from adobe reader - the html receipt file would always automatically open OK in the user's browser. However, with newer versions of Reader (11.0.0+) I now get this error and no attempt to open the user's web browser:
    An error occurred during the submit process. Cannot process content of type text/html
    I realise why I get the error - Adobe reader can't display HTML files.
    What I don't understand is why it doesn't open the html file in the user's browser like it has been doing for years.
    Does anyone have any idea how I can fix this (without changing the response content type to PDF/FDF)?

    I had the same issue as you and we used FDF status, then eventually went with returning an XDP  that filled out a receipt section of the form.

  • How to display html in SBO forms

    Dear Developers,
    I would like to know how can I display html content in a SBO form. Has anyone any experience in this theme?
    Html viewer in active x or else?
    I have a UDF with <html> code. Is it possible to showing content in B1 forms?
    Thank you in advance.
    Regards,
    Nghia

    simply add activeX WebBrowser control to yout form
    Dim oWebX As SHDocVw.WebBrowser
                oItem = balanceform.Items.Add("browser", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)
                oItem.Left = 5
                oItem.Top = 55
                oItem.Width = 980
                oItem.Height = 495
                ' Create the new activeX control
                AcXTree = oItem.Specific
                AcXTree.ClassID = "Shell.Explorer.2"
                oWebX = AcXTree.Object
                oWebX.Navigate("about:blank")
                oWebX = Nothing
                GC.Collect()
    You may chnage the url (file) displayed there trhough oWebX.Navigate("url/file")
    Edited by: Petr Verner on May 7, 2010 7:04 AM

  • URGENT: JEditorPane (a Java Browser) displaying HTML form

    Hi,
    I am using JEditorPane to display the wb pages but geeting problem as
    I don't get any kind of event when I click on the HTML form SUBMIT button though it does work but didn't allow me to get the URL of the new page that I got after hitting this SUBMIT button..
    I searched the whole net and it seems to me that lot of people got this problem...
    As I need this for my project please HELP me as soon as possible.

    This may be too late for you (hopefully not), but I had the same problem a little while ago and just figured out how to fix it. Basically, you need to examine the Element structure of the html yourself and manually handle the form, as far as I can tell. There are several ways to display a URL in a JEditorPane, but the most straight-forward (JEditorPane.setPage(URL url)) doesn't actually store the Element structure anywhere accessible. Here's the code to load the page:
    JEditorPane contents;
    HTMLEditorKit kit = new HTMLEditorKit();
    HTMLDocument htmlDoc = new HTMLDocument();
    contents.setEditorKit(kit);
    contents.setDocument(htmlDoc);
    URL url = new URL("http://blahblahblah.com");
    contents.read(url.openStream(), htmlDoc);Now that you have the page loaded correctly, you can access to the Elements within. You can use htmlDoc.getDefaultRootElement() to get the root and then iterate recursively through all the child Elements, checking out the Attributes of each. This will look for the submit button and add a listener to it for you:
    private void parseElements(Element elem) {
        AttributeSet atts = elem.getAttributes();
        //If this is the submit button, add a listener:
             Object model = atts.getAttribute(StyleConstants.ModelAttribute);
             Object type = atts.getAttribute(HTML.Attribute.TYPE);
             if ((type != null) && (type.equals("submit"))) {
                 DefaultButtonModel btn = (DefaultButtonModel) model;
                 btn.addActionListener(new ActionListener() {
                     public void actionPerformed(ActionEvent event) {
                         System.out.println("Yay!");
        //Recurse
        for (int i = 0; i < elem.getElementCount(); i++)
             parseElements(elem.getElement(i));
    }Of course, printing out "Yay!" is not really very helpful. When you're parsing through the Elements, check for the attribute StyleContsants.ModelAttribute. If that exists, you can cast it to the correct type of Model (see the documentation for HTMLDocument.HTMLReader.FormAction for information about what types of models to expect from what types of HTML elements) and store it until the "submit" button is pressed. Then all you have to do is get all the data from the models, format it and submit it to the action URL in either a "get" or a "post." The action URL is stored, in Java 1.3, in the HTML.Tag.Form attribute of one of the Elements (I don't remember which one). Getting that attribute returns a SimpleAttributeSet, and you get the HTML.Attribute.Action out of that. In Java 1.4 it's easier to find, you just have to look for the HTML.Attribure.Action attribute in one of the Elements.
    Why isn't this all automatically done for you? I don't know. Good luck.
    -Nathan

  • Problems displaying PDF in Portal EP7 - only able to display HTML form

    Hi,
    Anyone knows how to force showing of PDF based form instead of HTML form in the portal? We're currently on EP7 SPS10.
    We have tested ADS in backend, meaning that travelforms show up as PDF there and we can control what to show with a switch in a table. But it doesn't seem to be picked up in the portal. Regardless of whether we set the parameter sap.xss.tra.UsePDF or not (both in the iview property Application Parameters and/or in the resource "EMPLOYEE_TRAVE_TRIP_FORM_PDF" of service "EMPLOYEE_TRAVEL_TRIPFORM") it still displays the HTML form.
    Has anyone experienced this before? We're having a hard time figuring out where and how to enable PDF forms. Any help is greatly appreciated!
    Thanks,
    Hans Petter Bjørn

    Hans,
    We have the same problem.Did you figure out how to do this? Any info would be extremely helpful.
    Thanks
    Ronnie

  • How to display html document returned by utl_http package (POST method)

    I am using oracle forms 10g, data base version is 10g.
    I have written a database procedure that calls utl_http package POST method and request returns an html document. How do display this html document from oracle form?
    Thank you
    Hema

    Here you have...
    A Full Web Browser Java Bean - Oracle Forms PJCs/Java Beans
    http://forms.pjc.bean.over-blog.com/article-26251949.html

  • How to display custom forms or reports on portal pages?

    Hi friends
    I am new to Portal. I knew that we can create forms and reports in portal.
    But how can i display a custom form ( ex: employee.fmb) on a portal page?
    Thanks
    Ravi

    Are you meaning Oracle Forms Module and Oracle Reports?
    If so
    please check the following
    Reports
    http://download-uk.oracle.com/docs/cd/B14099_15/bi.1012/b14048/pbr_conf.htm#sthref494
    Forms (you can only invoke forms using the SSO)
    http://download-uk.oracle.com/docs/cd/B25016_02/doc/dl/web/B14032_02/security.htm#sthref42
    Otherwise you can create your custom HTML form and report using the following technologies:
    http://download-uk.oracle.com/docs/cd/B14099_15/portal.1014/b14135/pdg_matrix.htm#CHDJIEIH
    Please refer also to:
    http://download-uk.oracle.com/docs/cd/B14099_15/portal.1014/b14135/pdg_understand.htm#sthref35
    Hope this helps
    Cheers
    Diego

  • How to display HTML file from Unix server on UI at runtime

    Hi Experts,
    My requirement is to display  HTML files,  related to some particular person, on UI. The file is existing on a separate UNIX server and a file related to one person may have a lot of attached files as well , as is the case generally with HTML files, including pictures etc. So it is no use transferring file on my CRM system, as the files are kept separately on this UNIX server which is particularly for this kind of storage.
    I am able to show files residing on MIME repository ( I created some new HTML files )  of my CRM system on UI. but I don't know how to go ahead with this particular requirement.
    One idea is that I can map one folder of my application server to that unix server so that I can see the HTML files in this particular folder. but I don't know how to map MIME repository folder to application server directory or directly to the UNIX server .
    Please advise. Is my approach correct or is there any other way ?
    thanks in advance.
    Regards,
    Vikas

    Maybe this is too simple, but have you got an HTTP server on the UNIX machine? You could simply link the URL into you CRM application and display the contents directly from UNIX.
    cheers Carsten

  • How to reference html form element in javascript ?

    Dear all,
    My DPK portlet is like this:
    I created a html form within it there a several textfields, a hidden field and a SUBMIT button.
    The application will call itself to insert a new record to database table on pressing the SUBMIT button.
    My problem is that since all the form textfields and the hidden field ara all the qualified names, and I want to set the hidden field to some value, say "ADD" on the onsubmit event in the form. How can I reference the hidden field in javascript ?
    Or can you suggest another strategy to do that ?
    Many thanks
    George (HK)
    Here are the code fragment:
    String portletParamSubmit = "mSubmit";
    String portletParamTitle = "mTitle";
    String portletParamURL = "mURL";
    String portletParamAction = "mAction";
    //Fully qualified URL.
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    String formName = UrlUtils.htmlFormName(pReq, null);
    String fTitle = HttpPortletRendererUtil.portletParameter(request, portletParamTitle);
    String fURL = HttpPortletRendererUtil.portletParameter(request, portletParamURL);
    String fAction = HttpPortletRendererUtil.portletParameter(request, portletParamAction);
    String vl_Title = "";
    String vl_URL = "";
    String vl_Action = "";
    String vl_result = "";
    if( pReq.getQualifiedParameter(portletParamAction) == "ADD")
    vl_Title = pReq.getQualifiedParameter(portletParamTitle);
    vl_URL = pReq.getQualifiedParameter(portletParamURL);
    //Add News.
    try{
    CallableStatement cs_2 = conn_erp03.prepareCall("{call XXCT_PORTAL_NEWS_PKG.P_ADD_NEWS(?,?,?,?,?,?)}");
    cs_2.setString(1, "ADD");
    cs_2.setString(2, pReq.getUser().getName());
    cs_2.setString(5, vl_Title);
    cs_2.setString(6, vl_URL);
    cs_2.registerOutParameter(10,Types.VARCHAR);
    cs_2.execute();
    vl_result = cs_2.getString(10);
    cs_2.close();
    catch (SQLException se) {
    sb.append("Query: SQL Exception: " + se.toString());
    System.out.println(sb);
    %>
    <head>
    <script language = "Javascript">
    <!--
    function SetAction() {
    document.<NAME THE OF HIDDEN FIELD>.value = 'ADD'; <====How to refer it ?
    return 1;
    // -->
    </script>
    </head>
    <body>
    <form name="<%=formName%>" method= "POST" action="<%=UrlUtils.htmlFormActionLink(pReq, UrlUtils.PAGE_LINK)%>" onSubmit="return SetAction()">
    <%= UrlUtils.htmlFormHiddenFields(pReq, UrlUtils.PAGE_LINK, formName)%>
    <table>
    <tr>
    <td>Title</td>
    <td><input type="text" length=100 name="<%=fTitle%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td>URL</td>
    <td><input type="text" name="<%=fURL%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><INPUT type="submit" name="mysubmit" value="ADD NEWS"></td>
    <td><input type="hidden" name="<%=fAction%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    </table>
    </body>

    hi Neeraj Sidhaye,
    After trying your suggest codings,
    I come to the problem of null pointer exception message captured in the application log file as:
    06/08/11 11:48:57 Prj_News: [instance=212602_PORTLET_NEWS_49519249, id=79187977878,4] ERROR: AbstractResourceRenderer.renderBody - recieved ServletException. Root cause is
    java.lang.NullPointerException
    What's wrong ?
    George (HK)
    Here is my coding:
    <%@page contentType="text/html; charset=Big5"
    import="javax.naming.*"
    import="javax.sql.*"
    import="java.sql.*"
    import="oracle.jdbc.*"
    import="java.sql.Date"
    import="java.util.*, oracle.portal.provider.v2.*"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    import="oracle.portal.provider.v2.render.PortletRendererUtil"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"
    import="oracle.portal.provider.v2.url.UrlUtils"
    %>
    <%
    StringBuffer sb = new StringBuffer();
    PortletRenderRequest pReq = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    %>
    <%
    //Database connection.
    InitialContext ic = new InitialContext();
    DataSource ds_erp03 = null;
    Connection conn_erp03 = null;
    try {     
    ds_erp03 = (DataSource)ic.lookup("jdbc/ERP03_DS");
    conn_erp03 = ds_erp03.getConnection();
    catch (SQLException se) {
    sb.append("Connection: SQL Exception: " + se.toString());
    System.out.println(sb);
    catch (NamingException ne) {
    sb.append("Connection: Naming Exception: " + ne.toString());
    System.out.println(sb);
    %>
    <%
    //Self defined names.
    String portletParamSubmit = "mSubmit";
    String portletParamMainCat = "mMainCat";
    String portletParamSubCat = "mSubCat";
    String portletParamTitle = "mTitle";
    String portletParamURL = "mURL";
    String portletParamDescription = "mDescription";
    String portletParamEffDateFm = "mEffDateFm";
    String portletParamEffDateTo = "mEffDateTo";
    String portletParamAction = "myAction";
    //Fully qualified URL.
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    String formName = UrlUtils.htmlFormName(pReq, null);
    String fMainCat = HttpPortletRendererUtil.portletParameter(request, portletParamMainCat);
    String fSubCat = HttpPortletRendererUtil.portletParameter(request, portletParamSubCat);
    String fTitle = HttpPortletRendererUtil.portletParameter(request, portletParamTitle);
    String fURL = HttpPortletRendererUtil.portletParameter(request, portletParamURL);
    String fDescription = HttpPortletRendererUtil.portletParameter(request, portletParamDescription);
    String fEffDateFm = HttpPortletRendererUtil.portletParameter(request, portletParamEffDateFm);
    String fEffDateTo = HttpPortletRendererUtil.portletParameter(request, portletParamEffDateTo);
    // String fAction = HttpPortletRendererUtil.portletParameter(request, portletParamAction);
    String fAction="myAction";
    String vl_MainCat = "";
    String vl_SubCat = "";
    String vl_Title = "";
    String vl_URL = "";
    String vl_Description = "";
    String vl_EffDateFm = "";
    String vl_EffDateTo = "";
    String vl_Action = "";
    String vl_result = "";
    %>
    <%
    if( pReq.getQualifiedParameter(portletParamAction).equals("ADD")) <= This line cause the null pointer exception <<<<<<<<
    vl_MainCat = pReq.getQualifiedParameter(portletParamMainCat);
    vl_SubCat = pReq.getQualifiedParameter(portletParamSubCat);
    vl_Title = pReq.getQualifiedParameter(portletParamTitle);
    vl_URL = pReq.getQualifiedParameter(portletParamURL);
    vl_Description = pReq.getQualifiedParameter(portletParamDescription);
    vl_EffDateFm = pReq.getQualifiedParameter(portletParamEffDateFm);
    vl_EffDateTo = pReq.getQualifiedParameter(portletParamEffDateTo);
    //Add News.
    try{
    CallableStatement cs_2 = conn_erp03.prepareCall("{call XXCT_PORTAL_NEWS_PKG.P_ADD_NEWS(?,?,?,?,?,?,?,?,?,?)}");
    cs_2.setString(1, "ADD");
    cs_2.setString(2, pReq.getUser().getName());
    cs_2.setString(3, pReq.getQualifiedParameter(portletParamMainCat));
    cs_2.setString(4, pReq.getQualifiedParameter(portletParamSubCat));
    cs_2.setString(5, pReq.getQualifiedParameter(portletParamTitle));
    cs_2.setString(6, pReq.getQualifiedParameter(portletParamURL));
    cs_2.setString(7, pReq.getQualifiedParameter(portletParamDescription));
    cs_2.setString(8, pReq.getQualifiedParameter(portletParamEffDateFm));
    cs_2.setString(9, pReq.getQualifiedParameter(portletParamEffDateTo));
    cs_2.registerOutParameter(10,Types.VARCHAR);
    cs_2.execute();
    vl_result = cs_2.getString(10);
    cs_2.close();
    catch (SQLException se) {
    sb.append("Query: SQL Exception: " + se.toString());
    System.out.println(sb);
    %>
    <SCRIPT SRC="<%=HttpPortletRendererUtil.absoluteLink(pReq,"clock.js")%>"></SCRIPT>
    <LINK REL=stylesheet TYPE="text/css" HREF="<%=HttpPortletRendererUtil.absoluteLink(pReq,"tables_style.css")%>">
    <head>
    <script language = "Javascript">
    <!--
    function doSubmit(myAction)
    // alert(myAction);
    if(myAction == 'ADD')
    document.forms[0].<%=fAction%>.value="ADD";
    else if(myAction == 'DELETE')
    document.forms[0].<%=fAction%>.value="DELETE";
    document.forms[0].submit();
    // -->
    </script>
    </head>
    <body>
    <form name="<%=formName%>" method= "POST" action="<%=UrlUtils.htmlFormActionLink(pReq, UrlUtils.PAGE_LINK)%>">
    <%= UrlUtils.htmlFormHiddenFields(pReq, UrlUtils.PAGE_LINK, formName)%>
    <table>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Page</td>
    <td>
    <select name="<%=fMainCat%>">
    <option value="X">-- Please select --
    <option value="FAE">FAE
    <option value="PM">Product Marketing
    <option value="RD">R&D
    <option value="BU">Business Unit
    </select>
    </td>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Region</td>
    <td>
    <select name="<%=fSubCat%>">
    <option value="X">-- Please select --
    <option value="1">Region 1
    <option value="2">Region 2
    <option value="3">Region 3
    <option value="4">Region 4
    </select>
    </td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Date From</td>
    <td><input type="text" size="6" maxlength="10" name="<%=fEffDateFm%>"></td>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Date To</td>
    <td><input type="text" size="6" maxlength="10" name="<%=fEffDateTo%>"></td>
    </tr>
    </table>
    <table>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Title</td>
    <td><input type="text" size="100" maxlength="100" name="<%=fTitle%>"></td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">URL</td>
    <td><input type="text" size="100" maxlength="200" name="<%=fURL%>"></td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Description</td>
    <td><textarea id="description" rows="5" cols="76" maxlength="500" name="<%=fDescription%>"></textarea></td>
    </tr>
    <tr>
    <td><input type="hidden" id="<%=fAction%>" name="<%=HttpPortletRendererUtil.portletParameter(request, portletParamAction)%>"></td>
    <td><input type=button value="Add" onClick="doSubmit('ADD')"></td>
    </tr>
    </table>
    </form>
    </body>

  • How to display HTML formatted text in the field with Item Style: Raw Text

    How can I display HTML formatted text in the field with Item Style: Raw Text.
    Currently the Item Style is Raw Text, but the text is being displayed along with HTML tags without formatting.
    Regards

    Hi,
    Use Item Style formattedText.
    Regards,
    Gyan

Maybe you are looking for

  • Problems syncing iPad Air with iTunes 12.1

    I cannot seem to get my iPad Air to sync with 12.1 so there is no way to properly back up and no way to upload any new content.  Please help.

  • I can't print from my Mac wirelessly

    I have to use the cord to print from my Mac.  But surprisingly others in my home can print to the HP Office Jet Pro 8600.  What gives? This question was solved. View Solution.

  • Function in Essbase Add-In

    <p>In Excel, you can click on the fx that's beside the formula barto display the Insert Function window. There's a category called"Essbase Add-In" in the drop-down list box.</p><p> </p><p>Which directory would I paste my macro excel file, in order fo

  • I am a newb to the mac...please help me with a problem in safari

    Let me start by telling you how much I love my imac ! OK, on to the issue.... Recently i tried to watch a video and was told that I needed to download a "windows mp patch" for the video to download properly....Well, short story is that I did (I know,

  • ::"setup could not detect any sound blaster audigy on your system

    Hej! Har ominstallerat WinXP PRO och tappade bort ljudet helt! Datorn kan se ( via Windows update) att det ?ren ljudenhet installerad men kan inte hitta drivrutiner, gick d?refter in p? er sida och provade f?rst med manuell nedladdning men d? kommer