How access textarea in jsp ?

Hai
I am new to j2ee, please give me an idea that
how can i access textarea values by using session varibale in jsp ?
I try the following coding but it s say error msg "cannt resolve the symbol
Enter the Address <textarea name=address cols=20 rows=5></textarea><br>
<%
String addr=request.getParamenter( "address" );
session.setAttribute( "theaddress", addr);
%>
<%= session.getAttribute("theaddress") %>Regards
Merlina,

String addr=request.getParamenter( "address" );It should be getParameter(). I guess it would be more helpful if you post the complete error message.

Similar Messages

  • 10.1.3.4 - how to secure access on a jsp page ?

    I have a simple jsp page that takes in some user values and then kicks off a workflow. I want to restrict the access on the jsp page so that only users of a certain group can use it. right now it is completely open and anyone can just go the page and start of a transaction.

    found an article on this
    http://www.oracle.com/technology/products/jdev/howtos/1013/adfsecurity/adfsecurity_10132.html

  • How to use session variable in JSP function  & How to use both JSP  Servlet

    Hi,
    I am new to JSP and servlets
    Still I am devloping a website in JSP. I am not mixing JSP with servlets, but I do create Java files for bean, logic and database works.
    I try to keep the hard coding part out of JSP.
    I dont how to use both JSP and Servlets in combination.
    Hence If needed I write some functions in JSP.
    but it gives me error
    +<%! public void abc()+
    +{+
    int intUserId = Integer.valueOf((Integer) session.getAttribute("MySession_UserID"));
    +}+
    +%>+
    Saying cannot find symbol session
    1) So can u please tell how can I access session variables within JSP function
    2) And also give me some links/tutorials about useing both JSP and Servlets in combination.
    Thanks
    Venkat

    The application architecture when you use Servlets and JSP in a standard MVC pattern is explained here (under the heading "Integrating Servlets and JSP Pages") and here ...

  • How to deploy a jsp file?

    Hello,
    I am new to Java. I have been developing a small web application which contains three files HTML,SERVLET and a JSP. I don't have any problem with the html & Servlet, It runs well and I get the desired output.
    I use the JSP file for validation.
    But, How to run this JSP?
    i.e. I want to run this JSP page from Servlet while performing some validations.
    Plz let me know
    where should I put this JSP? (I am using Tomcat server)
    Is there any need to enter data into web.xml similar to Servlet?
    Is there any need to set some environmental variables etc etc...
    Hope a quick respone.
    Thank you.

    This is my servlet code........
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ServerConfig extends HttpServlet
    Connection con;
    Statement st;
    ResultSet rs;
    public void init(ServletConfig config) throws ServletException
         super.init(config);
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         con=DriverManager.getConnection("jdbc:odbc:ServerConfig"," "," ");
         st=con.createStatement();
         }catch(Exception se){System.out.println("problem with connection establishment");}
    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
         String s1,s2,s3,s4;
         res.setContentType("text/html");
         PrintWriter out = res.getWriter();
         int branches = Integer.parseInt(req.getParameter("txtBranches"));
         int users = Integer.parseInt(req.getParameter("txtUsers"));
         int accounts = Integer.parseInt(req.getParameter("txtAccounts"));
         int transactions = Integer.parseInt(req.getParameter("txtTransactions"));
         out.println("<HTML>");
         out.println("<HEAD><TITLE>Server Configuraion</TITLE></HEAD>");
         out.println("<BODY>");
         out.println("<B>Best Server Configuraion</B><HR>");
         out.println("<FORM>");
         out.println("Branches: " + branches);
         out.println("<BR>");
         out.println("Users: "+ users);
         out.println("<BR>");
         out.println("Accounts: "+ accounts);
         out.println("<BR>");
         out.println("Transactions: "+ transactions);
         out.println("<HR>");
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         System.out.println("DriverLoaded");
         Connection con=DriverManager.getConnection("jdbc:odbc:ServerConfig"," "," ");
         System.out.println("Connected");
         Statement st=con.createStatement();
         ResultSet rs=st.executeQuery("select DatabaseConfig,ApplicationConfig,WebConfig,BranchConfig from Configuration                     where Branches="+ branches +" and Transactions="+ transactions +" and                                         Accounts="+ accounts +" and Users="+ users +";");
         rs.next();
         s1 = rs.getString(1);
         s2 = rs.getString(2);
         s3 = rs.getString(3);
         s4 = rs.getString(4);
         if (s1.length()==0)||(s2.length()==0)||(s3.length()==0)
    //Plz let me know how should I call JSP?????
    out.println("Database Server:<BR>    <textarea rows=5 cols=30>"+s1+"</textarea><BR>");
         out.println("Application Server:<BR>    <textarea rows=5 cols=30>"+s2+"</textarea><BR>");
         out.println("Branch Server:<BR>    <textarea rows=5 cols=30>"+s3+"</textarea><BR>");
         out.println("Web Server:<BR>    <textarea rows=5 cols=30>"+s4+"</textarea><BR>");
         out.println("</FORM>");
         out.println("</BODY>");
         out.println("</HTML>");
         con.close();
         }catch(Exception ex){System.out.println(ex);ex.printStackTrace();}
    };

  • How to unload a JSP app

    Folks,
    I was wondering can anyone suggest how to unload a JSP application? Is there a command that I could use
    to allow a user to exit the application??
    I would be grateful for any help
    Peter

    Peter,
    You have to get your client/server model in your head straight. With JSP's you are talking about an "WEB-application". This means the application is running on a remote server (or local), and is accessed through a web browser on a client PC. Of course the running and configuration cannot be influenced from the client (but from using servlets on the server that have been designed to do so by the software dleiverer of the server (to make life easier), these are usually protected by passwords, so that not everybody can change the configuration of YOUR webserver and application server).
    Unloading servlets is done by the AS (application server), when the AS is stopped or re-started.
    If you want to make users "leave" the application. Re-root them to the home page set in the browser and clear the complete history in a javascript function (client side programming).
    regards,
    Jeroen.

  • How to open a JSP page from a form ??? plz help

    hi ..
    i want to know how to open a jsp page from a oracle apps form using a button .
    the requirement is that whenever we click on the button created on the form, it opens a jsp page.
    plz help me ..its urgent !! :-(

    In portlet project, to navigate between pages, you should not use the URL property to link to a page. Instead, portlets use navigation via action handling. You use the Page Navigation editor to set up links to pages; that is, the navigation editor sets the action property.
    Here is an example to hyperlink ans button to open a new page:
    # From within the IDE, create a new portlet project. This action creates the project and one page, PortletPage1.jsp.
    # Create a second portlet page, called PortletPage2.jsp, for the project.
    # Drop a Hyperlink component onto the first portlet page, PortletPage1. (You can drop the Hyperlink on the page in the Design window or on the PortletPage1 node in the Outline window.) Change the Hyperlink's text property to Next Page.
    # Drop a Button component (found in the Basic section of the Palette) onto the second portlet page, PortletPage2.
    # Open the Page Navigation Editor. It displays the two pages (PortletPage1.jsp and PortletPage2.jsp) of the application.
    # Click the PortletPage1.jsp icon in the Navigation window to expand it, and then drag a connector from hyperlink1 to PortletPage2.jsp. Change the name of the connector from case1 to Page2.
    # Click the PortletPage2.jsp icon in the Navigation window to expand it, and then drag a connector from button1 to PortletPage1.jsp. Change the name of the connector from case1 to Page1.
    # Run and deploy the portlet. The browser displays PortletPage1 and you should see the Next Page hyperlink. When you click the Next Page hyperlink, the Apache Pluto Portal server displays PortletPage2. Click the Page2 button to return to PortletPage1.
    Sherry
    Creator Team

  • How to configure Oracle jsp engine on OAS4.0.8.1

    1. How to configure Oracle jsp engine on OAS4.0.8.1 for linux
    2. How to set the parameter on OAS. The Ojsp document only give examples depict the syntax used when running in an Apache/JServ 1.0 environment

    Anyone?

  • How to add existing jsp file to a project?

    I am trying out 10g developer preview. Looks like a lot of bugs are there in the tool. I would like to know how to add existing jsp file into a project. I tried the Import functionality, but it shows the option to create a project and include only Java files. Is there a way to do this? Thank you

    Just copy the files in the directory where the rest of your source file is.

  • How to call a jsp page from oaf and run in jDeveloper

    Hi all,
    I created sample jsp and then tried.
    String temp = "sample.jsp?";
    pageContext.setForwardURL(temp,
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    It worked.
    But when i tried with one of the custom page that i downloaded from server it is giving error.
    But now i need to call that page.
    Its Code is given on below link:
    Re: how to call a jsp page from oaf
    Please help me to do this.
    Thanks in advance.
    Regards,
    Raj

    Raj,
    1. Hope you have placed the custom jsp page (which you have downloaded from server) under "jdevhome\jdev\myhtml\OA_HTML" directory ?
    2. Try to run the custom jsp page from Jdeveloper directly and check whether its working properly or not ?
    (i.e. add jsp page to any project in Jdeveloper then right click on jsp page and select Run xxx.jsp)
    3. If page errors out then custom jsp page seems require few parameters to run it successfully. Pass all requied parameters and test.
    4. There is no problem in the way you are calling jsp page from OAF page.
    regards,
    Anand

  • How to call a JSP page from Applications menu?

    Hi partners,
    I am still looking for "how to call a JSP page from Applications menu?", I mean instead of calling a form, I want to call a JSP page which is staying in a OC4J repository which is located in another server.
    Any idea will be really appreciated.
    Thanks in advance.
    Frank Mtz.

    Hi Frank,
    if u know the solution please share it with me. i'm looking for the same scenario.
    thanks in advance,
    anish

  • How to call a .jsp file from Applet

    Could any one guide me how to call a .jsp file from a Applet using action Event.
    Thanks

    http://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post

  • How to invoke a jsp value to another jsp

    Hi i have a problem on how to invoke a jsp page from jsp page.
    I have this function in index.jsp:
    <script language="JavaScript">          function price(){           window.location="search_date.jsp" + document.forms['test'].getElementById('price');           }          </script>"document.forms['test'].getElementById('price'); " are getting the values from another jsp (search_date).
    <div class="tabbertab" title="Price" id="price"><h2>Tab 2</h2><p> <form name="test">There are three tabs in search_date jsp, the above codes are for price tab.
    Im going to click on an image link in index.jsp, it will direct me to the price tab instead of two other tabs. How can i achieve this?
    Thanks,
    tiffany

    This appears to be more of a javascript than java/JSP question.
    If you are trying to pass a parameter to the jsp search_date.jsp, you need to follow the standard syntax for parameters , with ? for the first and & for any subsequent ones..
    ie
    search_date.jsp?firstParam=1&secondParam=2
    so possibly you meant:
    window.location="search_date.jsp?myParam=" + document.forms['test'].getElementById('price');
    However I am not sure.
    What is clicking on this image link supposed to do?
    Are you wanting to reload a page, or just show hide things without reloading?

  • How to get another jsp by clicking a h:commandLink in jsf page

    Hi,
    I am new to JSF. pls send sample code me how to get another jsp by clicking a commandLink in jsf.
    SUB: TO go to the page "report7.jsp"
    -->By getting help from samples i wrote for above in 2 ways.
    1)
    <td><h:commandLink id="RO0007" action="r7" >Sharing of Information from Foreign FIU</h:commandLink></td>
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    2) Sending request through bean method
    <td><h:commandLink id="RO0007" action="#{RBean.report7()}" >Sharing of Information from Foreign FIU</h:commandLink></td>
    in RBean the method form is
    public String report7(){          
         return "r7";
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    Some problem in both i think as it is not going to next page. i need to go to th next page by calling Bean Method.
    please get me out of this problem. It is very urgent. Thank you.
    **************************************************************

    What error is it throwing? If it is throwing a Page not found, then maybe you should try mapping to "report7.faces" instead of "report7.jsp"
    Can you post your faces-config please

  • How to redirect a JSP page after the session is killed

    Hello!
    I am quite new to JSP. I have a question about how to redirect a jsp page after the session is killed. Could anyone help?
    thanks a lot in advance!

    You can't, directly. There's no connection betweenthe server and browser.
    even after invalidating the session. we can do it
    directly using the statement
    response.sendRedirect("....");
    or we can use the meta refresh tag.if session is invalidated and if we try to do response.sendRedirect(".. ") it throws IllegalStateException

  • How to pass a jsp variable into javascript??

    <p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
    <p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <p><html>
    <p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
    <p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
    <p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
    <p>Time until next game
    <p><c:forEach var="tuple" items="${tuples}">
    <p><c:if test="${fn:contains(tuple, 'row ')}">
    <p> <p><code>
    <p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
    <p> <font color="blue">
    <p> <c:out value="${values[17]}" />
    <p><c:set var="remainingtime" value="${values[17]}" />
    <p> </font>
    <p> </code>
    <p></c:if>
    <p></c:forEach>
    <p><form name="counter"><input type="text" size="8" name="d2"></form>
    <p><script>
    <p>var milisec=0
    <p>var seconds=eval("document.myForm.remaining").value;
    <p>function display(){
    <p> if (milisec<=0){
    <p> milisec=9
    <p> seconds-=1
    <p>}
    <p>if (seconds<=-1){
    <p> milisec=0
    <p> seconds+=1
    <p> }
    <br>else
    <p> milisec-=1
    <p> document.counter.d2.value=seconds+"."+milisec
    setTimeout("display()",100)
    <p>}
    <p>display()
    <p></script>
    <p></body>
    <p></html>
    <p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001

    Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
    <html>
    <body>
    <form name=f>
    <%!
    String str = "A String"
    %>
    <script>
    var avariable = <%=str%>
    <script>
    </form>
    </body>
    </html>
    Let me know if you face any problem

Maybe you are looking for