Using owa_cookie.send with JSPs

Hello all... I have a procedure that I use owa_cookie.send to send a cookie in the HTTP header. How do I get it from a JSP now? If I include this cookie in my xxx.home procedure, do I need to do anything special to be able to get it when I navigate to my JSP?
Thank you all in advance.
Jonathan Coreil

-- GET_ALL returns an array of name/value pairs of all HTTP_COOKIES
-- sent from the browser. The name/value pairs appear in the order
-- that they were sent from the browser.
PROCEDURE owa_cookie.get_all
(names OUT vc_arr,
vals OUT vc_arr,
num_vals OUT INTEGER);
the number of vals is > 0 if the cookie is stored at the clients side. I implement it just.
I quest the number of cookies
if l_NumVals = 0 then
Send cookie;
redirect_URL('...');
else
get_Cookie_Content;
end if;
It may not help you. Please specify your problem if possible.
Regards Torsten

Similar Messages

  • Using java bean with jsp

    hello friends,
    i'm new to jsp. i want to create an html form that accepts username and a value from four radio buttons and display back the entered name and checked radio button's value using java bean.
    i use the <jsp:setProperty id="" property="*"> method. i don't know how to access the radio buttons value from the html.
    also when i use an additional field other than username the jsp page is showing error.
    Please give me the correct method to use java bean with jsp in this circumstance.
    thank you.

    thank you, but i have a problem left. the case is like this.
    i got the jsp and bean worked fine when i have a sinle input text field.
    but when i added a second text field i recieved the following error.
    javax.servlet.ServletException: basket.newbean.getUserPass()Ljava/lang/String;
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.newform.process_jsp._jspService(process_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    where userPass is the new form element. I have made the subsequent chanes in my bean program and jsp file.
    pls hlp.

  • Scope when using a JavaBean with JSP

    what is the meaning of this question .....?
    "Which of the following can not be used as the scope when using a JavaBean with JSP? "
    question 4
    site :http://java.sun.com/developer/Quizzes/jsptut/

    The question is clearly written. I don't see how you can be confused. But let's assume you are since you would not have posed the question.
    Dumbed-down:
    There are 4 scopes or areas of variable visibility in JavaServer Pages. Which of those can areas can not be used with JavaBeans?
    Does that help?

  • Use of Threads with JSP's

    Can you use threads in a web application that uses JSP's plus Servlets and Beans ?
    We have a JRUN 3.1 application using JSPs, Servlets and Beans. Shortly after we went live it became apparent that any 2 users using the same object experienced problems as one object was overwriting another. In a panic the problem was solved by whacking SYNCHRONISED on all objects.
    Now we want to write another application, are there strategies for using Threads with JSPs?
    Would this be part of the webserver configuration or would the application be coded in a certain way ?
    Please can you give me a simplistic answer or point me to some documentation that gives a simple overview.
    Thanks Steve

    Hi,
    You can use thread with jsp, i am sending u a example
    package thread;
    import java.io.Serializable;
    public class TaskBean implements Runnable, Serializable {
    private int counter;
    private int sum;
    private boolean started;
    private boolean running;
    private int sleep;
    public TaskBean() {
    counter = 0;
    sum = 0;
    started = false;
    running = false;
    sleep = 100;
    protected void work() {
    try {
    Thread.sleep(sleep);
    counter++;
    sum += counter;
    } catch (InterruptedException e) {
    setRunning(false);
    public synchronized int getPercent() {
    return counter;
    public synchronized boolean isStarted() {
    return started;
    public synchronized boolean isCompleted() {
    return counter == 100;
    public synchronized boolean isRunning() {
    return running;
    public synchronized void setRunning(boolean running) {
    this.running = running;
    if (running)
    started = true;
    public synchronized Object getResult() {
    if (isCompleted())
    return new Integer(sum);
    else
    return null;
    public void run() {
    try {
    setRunning(true);
    while (isRunning() && !isCompleted())
    work();
    } finally {
    setRunning(false);
    And JSP page start.jsp
    <% session.removeAttribute("task"); %>
    <jsp:useBean id="task" scope="session"
    class="thread.TaskBean"/>
    <% task.setRunning(true); %>
    <% new Thread(task).start(); %>
    <jsp:forward page="status.jsp"/>
    ///////////////// status .jsp
    <jsp:useBean id="task" scope="session"
    class="thread.TaskBean"/>
    <HTML>
    <HEAD>
    <TITLE>JSP Progress Bar</TITLE>
    <% if (task.isRunning()) { %>
    <SCRIPT LANGUAGE="JavaScript">
    setTimeout("location='status.jsp'", 1000);
    </SCRIPT>
    <% } %>
    </HEAD>
    <BODY>
    <H1 ALIGN="CENTER">JSP Progress Bar</H1>
    <H2 ALIGN="CENTER">
    Result: <%= task.getResult() %><BR>
    <% int percent = task.getPercent(); %>
    <%= percent %>%
    </H2>
    <TABLE WIDTH="60%" ALIGN="CENTER"
    BORDER=1 CELLPADDING=0 CELLSPACING=2>
    <TR>
    <% for (int i = 10; i <= percent; i += 10) { %>
    <TD WIDTH="10%" BGCOLOR="#000080"> </TD>
    <% } %>
    <% for (int i = 100; i > percent; i -= 10) { %>
    <TD WIDTH="10%"> </TD>
    <% } %>
    </TR>
    </TABLE>
    <TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD ALIGN="CENTER">
    <% if (task.isRunning()) { %>
    Running
    <% } else { %>
    <% if (task.isCompleted()) { %>
    Completed
    <% } else if (!task.isStarted()) { %>
    Not Started
    <% } else { %>
    Stopped
    <% } %>
    <% } %>
    </TD>
    </TR>
    <TR>
    <TD ALIGN="CENTER">
    <BR>
    <% if (task.isRunning()) { %>
    <FORM METHOD="GET" ACTION="stop.jsp">
    <INPUT TYPE="SUBMIT" VALUE="Stop">
    </FORM>
    <% } else { %>
    <FORM METHOD="GET" ACTION="start.jsp">
    <INPUT TYPE="SUBMIT" VALUE="Start">
    </FORM>
    <% } %>
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    ////////////////////////////// stop.jsp
    <jsp:useBean id="task" scope="session"
    class="thread.TaskBean"/>
    <% task.setRunning(false); %>
    <jsp:forward page="status.jsp"/>
    deploy it into ur server and run start.jsp
    and see whatb happens

  • How to generate html-code using csv input with JSP or JAVA???

    Hello,
    I want to read out a .csv-file and generate html-code dynmically with JSP in an EP6 Application. The problem is, that the csv-file can’t be located or openend.
    BTW if every knows a good tutorial or weblog for this, please post the link.
    It’s located in a par-archive under:
    />dist>files
    I tried various methods, in the doContent mehtod or with JSP. Everytime same result.
    Here part of the code I tried in the doContent():
    public class CSV extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
            String strWRoot = request.getWebResourcePath();
            String contentCSV="", line="";
            String linesep = System.getProperty("line.separator");
            File fileLoadCSV = new File(strWRoot+"/files/ma_infosysteme.csv");
            boolean exCSV = fileLoadCSV.exists();
            boolean reCSV = fileLoadCSV.canRead();
            int a=0;
            if(exCSV&&reCSV){
                response.write("ok");
                try {
                  BufferedReader inputCSV = new BufferedReader(new FileReader(fileLoadCSV));
                  while((line=inputCSV.readLine())!=null){
                    contentCSV=contentCSVlinelinesep;
                    a++;
                  inputCSV.close(); 
                catch(IOException ioex){
                    System.out.println("Fehler");  
            else {
                response.write("not ok");
            response.write("<br>Wroot: "+strWRoot);
            response.write("<br>File: "+fileLoadCSV);
            response.write("<br>exists: "+exCSV);
            response.write("<br>read: "+reCSV);
            response.write("<br>Input: "+contentCSV);
    The Output is:
    not ok
    Wroot: /irj/portalapps/DHTML
    File: \irj\portalapps\DHTML\files\ma_infosysteme.csv
    exists: false
    read: false
    Input:
    So thanks to everyone who can give me a good hint.
    Bye.

    Without really looking too much into this it looks like the problem is with the way in which you are trying to open the file. I believe that when creating a File object you need to use a physical path. By using the getWebResourcePath() method you are retrieving the URL to this file and not the physical path name. There is another method (can't remember the exact name) called getPublicResourcePath() (or something similar) which will return the physical path to this file, i.e. c:\usr\sap\.....etc. If you try it this way it may well work
    I hope this helps
    D

  • Using java files with JSP

    Ok, so im pretty new to this JSP lark and have a question.
    I have Java Classes resting in .java files, i need to know how
    do i link these files to my .jsp page so that the classes/variable etc.
    declared with the java files are recognised when they are come
    across in the .jsp file.
    I dont know if I have explained that properly.

    Just include this statement at the top of your jsp:
    <%@page import="yourpackage.yourclass"%>
    The .java files should of course be compiled into .class files prior to using (and you don't include the extension when importing).

  • Using video sender with Youview box

    I have just set up my new youview box.
    With my previous BT box I was able to use a nikkai video sender so I could control and watch the TV/box in another room.
    This doesn't seem to work with this new box. Is is incompatible for some reason?
    Is that I just haven't put the "receiver" widget near enough to the infra red on the box.
    Greatful for any help! Thanks

    Hi Poynders,
    Thanks for posting. Take a look at YouView screens not visible over AV / video sender . It’s an older thread but might help. Let us know how you get on.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Problem using JDBC driver with JSP

    Hi, I am trying to connecto to my mysql server via a JSP page, but it seems that there is a problem with the driver call or something in my configuration that unables me to connect. I have the mysql-connector-java-3.0.7-stable driver.
    This is how my classpath looks like:
    CLASSPATH=/home/hooper/Sources/mysql-connector-java-4.0.7-stable/lib:/home/hooper/Sources/mysql-connector-java-3.0.7-stable/com:/home/hooper/Sources/mysql-connector-java-3.0.7-stable/mysql-connector-java-3.0.7-stable-bin.jar:/usr/java/j2sdk1.4.1_02:.:/usr/java/j2sdk1.4.1_02/lib/tools.jar:/usr/java/j2sdk1.4.1_02
    And this is my JSP page code:
    <%@ page language="java" import= "java.sql.*"%>
    <%
    Connection con = null;
         String userName = "hooper";
         String password = ""; //No password
         String url = "jdbc:mysql://localhost/test";
         //Load the Driver class file
         Class.forName("com.mysql.jdbc.Driver");
         //Make a connection to the MySQL database
         con = DriverManager.getConnection (url, userName, password);
         out.println ("Database connection established");
              if (con != null){
                   //Close the connection
                   con.close();
    %>
    And this is the error I get from Tomcat4.1.18:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: com.mysql.jdbc.Driver
    root cause
    javax.servlet.ServletException: com.mysql.jdbc.Driver
    I hope someone can help me with this.
    Thanks,
    Luis

    Hi..
    Try using this way
    String userName = "hooper";
    String password = ""; //No password
    String url = "jdbc:mysql://localhost:3306/test";
    Class.forName("org.gjt.mm.mysql.Driver");
    try to download the driver for mysql and add it to your classpath
    Hope this works
    Regd
    Vasi

  • Problem in using java bean with jsp

    Hi,
    This is my code and i get this error. Not able to trace the mistake.
    bean.html
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Fname</title>
    </head>
    <body>
    <form method="POST" action="http://localhost:8080/beanjsp.jsp">
         <p>Fname: <input type="text" name="T1" size="20"></p>
         <p>Lname: <input type="text" name="T2" size="20"></p>
         <p> </p>
         <p> </p>
         <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
    </form>
    </body>
    </html>
    beanjsp.jsp
    <jsp:useBean id="bean" class="beans.FirstBean" scope="application" />
    <jsp:setProperty name="bean" property="fname" param="T1" />
    <jsp:setProperty name="bean" property="lname" param="T2" />
    THE FIRST NAME IS <%=bean.getFname() %>
    THE LAST NAME IS <%=bean.getLname() %>
    FirstBean.java
    //CREATING A BEAN
    package beans;
    import java.io.*;
    public class FirstBean
         private String fname;
         private String lname;
         FirstBean()
              fname="";
              lname="";
         public void setFname(String fn)
              fname=fn;
         public void setLname(String ln)
              lname=ln;
         public String getFname()
              return fname;
    public String getLname()
              return lname;
    error report
    org.apache.jasper.JasperException: /beanjsp.jsp(2,0) The value for the useBean class attribute beans.FirstBean is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I have placed the beans package folder containing FirstBean.class inside classes folder of ROOT directory.
    I don't know what s wrong with my code :( ... Plz help asap.
    Thanks,
    Akshatha

    I have placed the beans package folder containing FirstBean.class >inside classes folder of ROOT directory.Place it in the WEB-INF/classes folder
    ram.

  • Using RDBMS Realm with JSP, again

    I submitted this post using the web interface after I "asked Bea" and now it
    seems like I'm a total newbie :) So I repost to make it more readable..
    Hi,
    I am fairly new to J2EE and I am trying to figure out how I can apply the
    RDMSRealm to restrict access to jsp files
    Do I use ACL's in the database to restrict access to jsp's or,
    Do I use the web.xml deployment descriptor in the a similar fashion as the
    Gold_customer in the petstore,
    What is the difference?
    Does anyone know about a nice example?
    Sincerely,
    ilya

    We have used the <security-constraint> tags in web.xml. This tag specifies which
    'security roles' has access to specific resource collection (e.g. one or more
    servlets or JSPs). The 'security roles' are then mapped in weblogic.xml to one
    ore more groups and/or users as defined in the group and user tables in the RDBMS.
    regards,
    Simen R.
    "ilya" <[email protected]> wrote:
    I submitted this post using the web interface after I "asked Bea" and
    now it
    seems like I'm a total newbie :) So I repost to make it more readable..
    Hi,
    I am fairly new to J2EE and I am trying to figure out how I can apply
    the
    RDMSRealm to restrict access to jsp files
    Do I use ACL's in the database to restrict access to jsp's or,
    Do I use the web.xml deployment descriptor in the a similar fashion as
    the
    Gold_customer in the petstore,
    What is the difference?
    Does anyone know about a nice example?
    Sincerely,
    ilya

  • I can not use adobe send with my acrobat pro how come?

    I just bought acrobat send and want to send an acrobat pro file but it keep referring back to page to buy the product which I already did.
    NursePro

    There is a solution (I'm running Snow Leopard on a Core2Duo iMac, but this problem arose when I was running Leopard on a G4 PowerBook too).
    Problem:
    You download the OS X driver for the scanner from Canon's site. I already had the CanoScan Toolbox (4.1) stored on an external drive.
    You unzip the driver and run the VISE installer. After a search it finds your copy of Photoshop (and maybe even the CanoScan Toolbox), and you click to install on that/those location(s).
    You get a couple of error messages, which you click through.
    You restart your computer and try to run the scanner but you get an error that the driver is wrong or missing and the process will abort.
    Solution:
    BEFORE you restart, and with the installer package still open -
    1. Copy the Into_CFMSupport_Login & Into_CMPrefs folders to
    Applications : Canon Utilities
    Applications : Canoscan Toolbox
    and remove the prefix Into_ from each folder
    2. Check whether the installer placed N067U_Library.shlb into the top level (not User level)
    Library : CFMSupport
    and if it didn't, move it there yourself
    THEN restart, and try again. It worked for me (via Photoshop), but whether it will work for everyone, I don't know.

  • How Use Multi Pages with JSP pages

    I have a lot of records, so i want to display from 10 to 10 and use a numeric menu in the botton of the page. the problem is how a make that with java code and html or java script.
    thanks for your help
    LeonMex. from M�xico City

    Search for pager taglibs. Ur solution lies there.
    Moreover u can refer www.jsptags.com , I am using the pager taglib from jsptags and it's quite easy to use.
    Hope that Helps.
    thanks and regards.

  • Error while using Send With Document service

    Hi,
    I am using the send with document email service, and trying to pass an attachment (a text document). When i invoke the process using java component i get the following error:
    com.adobe.workflow.engine.PEUtil logFailedFaultRouting An exception was thrown with name com.adobe.idp.dsc.email.SendMailFailedException message:Failed to send email to mail server: null:25. Cause: null while invoking service EmailService and operation sendWithDocument and no fault routes were found to be configured.
    Can someone give me an idea of how to resolve this issue?
    Thanks..

    From the exception fragment it is complaining that your email properties are not set correctly. In this case the email server name is resolving to null. Make sure they are all set up correctly. The no fault routes just means you have no route in your workflow to handle any errors/exceptions.

  • What RAD tool should i use with JSP??

    I would like to know what RAD (opensource) to use to work with JSP and MySQL.
    If anyone could help
    thank you

    If you are using the Sun Java System Enterprise Studio, the Web Application Framework will provide you with all the tools you need to create a JSP/Servlet based web application that scales in performance like no other framework. Coupled with a WYSIWYG HTML editor like Dreamweaver and your RAD app dev is covered.
    For MySQL, there are some really nice GuI clients out there. This is a link to the one I have used:
    http://www.mysql.com/products/
    If you are using the Sun Java Studio, don't forget to add the MySQL jdbc driver so that you can access your DB at development time and use the Sql Model wizards from within the Web Application Framework tools.
    If your app is not concerned with serious scalability, and you are looking to build your app using the latest standards (JSF - Java Server Faces), you can download the Sun Java Studio Creator. It's more of a VB.NET/ASP like development environment with a WYSIWYG HTML form painter. Very slick. You can download here:
    http://developers.sun.com/prodtech/javatools/jscreator/index.jsp
    Here's a primer for Creator:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/primer.html
    The Creator forum is here:
    http://swforum.sun.com/jive/forum.jspa?forumID=123
    To recap, use Web Application Framework if you require the utmost in a mature, stable, and scalable web application. WAF apps can be deployed to any J2EE server.
    If you require a webapp based on the latest standard JSF implementation, and dev productivity is more important than enterprise strength scalability, then Creator is a great choice.
    cheers
    craig

  • Forte with JSP?

    hi all
    i'm using FORTE 4.0 to work with java, and i'd like to use it also with JSP, but i have a little problem... jsp page's graphical design....
    so i thought it's impossible to use it as a stand alone jsp editor, don't you?
    please, send me your opinion
    thanx
    sandro

    You can try to create a HTML layout using any GUI editor, like dreamweaver, frontpage, etc. Then paste the html code on Forte's source editor. Insert/modify codes where necessary. It helps a lot for those with little knowledge of HTML. Hope that helps.

Maybe you are looking for

  • General problem with preloaders

    Hallo there, i am using a preloader from an external file, that when the main animation loads, it displays it, clasicaly. the problem i encounter is this. when the animation loads, it doesn't start from frame 1, but instead from frame 50, for example

  • How to compress DV into smaller size?

    Hi. I need to know how to compress a DV file to say 60% of it's original size. I'm trying to pre-compress these files so that they will fit on a single DVD without using Toast on the final burn. In other words I want to compress the DV files without

  • I get blue boxes with "?" marks in them instead of words

    I have tried everything I have read about. If I go to the apple website and check out the Battery Recal page at the bottom, I get those blue boxes instead of words. Pages won't build correctly also. I've removed the com.apple Safari from my user/pref

  • Y axis Time chart

    Hi group, I am new to Numbers and wondering whether it can do what I want (and how to do it!). I've never worked with charts before... Basically, I want to create a chart with Addresses on the X Axis and Years on Y Axis. I want to be able to say that

  • IMAP, iPhone and Mail

    I picked up an iPhone a month ago. and switched to IMAP for my mail reading. Mail has been working great for a few weeks, but recently my laptop is having sync issues with the mailbox. New messages are coming in on my iPhone with no problem. On the d