How to connect particular BAPIs to  jsp page

HI ALL,
I NEED HOW TO CONNECT BAPI TO JSP? I NEED EXAMPLE PROGRAM.
ALREADY ONE TASK IS COMPLETED IN WEBDYNPRO...MY AIM IS CONVERT INTO FULLY JSP PAGE....PLEASE FIND THE SOLUTION..

HI ALL,
     Please anyone tell how to connect bapi to pure jsp page in NDS...
   and how to run pure jsp page in NDS...

Similar Messages

  • How to connect to database in JSP

    Hi, all.
    I am using J2EE and cloudscape. I have written all the EJB classes. But now i have no idea that how to connect to database in jsp such as i get user ID from portal, then i connect to database check the existence of user ID and the password then return true or false value. how to write all this in jsp?
    Thanks very much!
    yayun

    this is the required code
    i hope this will help u
    <html>
    <head>
    </head>
    <body>
    <%@ page import="java.sql.*" %>
    <%
    try
    String fu=request.getParameter("username");
    String fp=request.getParameter("password");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection Con=DriverManager.getConnection("jdbc:odbc:wind","","");
    Statement stmt=Con.createStatement();
    ResultSet rs=stmt.executeQuery("select * from table1 where username='"+fu+"' and password='"+fp+"'");
    if(rs.next())
    %>
    <jsp:forward page="success.jsp"/>
    <%
    else{
    %>
    <jsp:forward page="unsuccess.jsp"/>
    <%
    catch(Exception e)
    %>
    </body>
    </html>

  • How to print new line in jsp page

    hi
    how to print new line in jsp page
    thanks

    \n - new line character is in java specific not HTML
    specific.Well, if the correct line separator sequence (by far not always \n) would be used, it does add a new line to the HTML output. Too bad that you don't want to see HTML but formatted text. The BR tag is a formatting element for the displayed text, not a line break in HTML. ;)

  • Urgent....How can i redirect to my jsp page from servlet in init() method..

    How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
    using RequestDispatcher..its not possible..becoz
    RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
    rd.foward(req,res);
    Here the request and response are null objects..
    So mi question can frame as how can i get request/response in servlet's init method()..

    Hi guys
    did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:519)
    at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
    at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    so plz do let me know how to call a jsp in the start up of a servlet.
    Thanks
    Vidya

  • How to enable the EL in jsp page

    hi can u tell 'how to enable the EL in jsp page'?

    *I am getting below exception in tomcat when i inclued +<%@ page isScriptingEnabled="true" isELEnabled="true"%>+*
    org.apache.jasper.JasperException: /index.jsp(1,1) Page directive has invalid attribute: isScriptingEnabled
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
         org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java:311)
         org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:106)
         org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1700)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • How to call BPEL process in JSP page

    Hi
    I am new to BPEL.please help me how to call BPEL process in JSP page.
    Thank You...

    Check this thread ....
    How can i call asyncronous BPEL process from Java Class????
    Tom..

  • How to Hightlight the Data in Jsp Page

    How to Hightlight the Data in Jsp Page,
    I am doing doing search page,based on values given search page those are sent to servlet,in servlet based on some conditions if particuler id i am getting then i am redirecting to Respective jsp page with highlight the data from database..
    Thanks in advance...

    "Highlighting data in JSP sounds strange".
    Without looking at your search specific algorithms I feel you are finally going to display a page (HTML content) to user which contains highlighted text. Highlighting is not directly related to server side language you use (JSP, ASP, PHP etc.). This is purely HTML and CSS. However, server side script (such as JSP) should generate HTML content for getting highlight effect.
    Following HTML shows highlighted text using background-color property on span element.
    <html>
      <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
      </head>
      <body>
          <p style="font-size:1.1em">This is a long paragraph which contains <span style="background-color: yellow;">highlighted text</span> and non highlighted text.</p>
      </body>
    </html>Thanks,
    Mrityunjoy
    Edited by: mrityunjoy on 14 Jun, 2010 3:30 AM

  • Oepe-12.1.2.1-kepler how to use ADF Templates in JSP page

    Hi all,
        I use oepe 12.1.2.1 kepler 4.3 and creating JSP page but I can't see any ADF Rich Faces Page in JSP Templates Page of Preferences Dialog. How to use ADF Templates in JSP page?
    Thanks,
    Thomas

    Select the JSP Templates link. Is the ADF Rich Faces Page template listed? Refer Creating the Login Page/4.
    Introduction to the Oracle Enterprise Pack for Eclipse (OEPE) IDE

  • How to debug a bean in JSP page with JBX???

    How to debug a bean in JSP page with JBX???
    i have a bean within a JSP page. i wanna find out how do they varibles work and changes of them values.
    are there some ways or tools to get the situations of them in visual way? just like when i debug VB program,i can get the situations in immediately window.

    help me !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • How to pass parameter to intro.jsp page ?

    Hi all,
    Anybody please tell me how to pass parameter to intro.jsp page.
    Is there any param name defined in <forward > syntax ?
    I have made following configuration in struts-config.xml file.
    I want to pass parameter to intro.jsp page
    <global-forwards>
              <forward name="invalidsession" path="/intro.jsp" redirect="true" />
    </global-forwards>
    please reply soon.
    Thanking you.

    Hi all,
    I have a similar kind of question..
    Iam trying to pass a string variable from JSP to servlet thro URL..
    Im using tomcat5
    COde:
    String fname=request.getParamter("filename");
    <jsp:forward page="/servlet/coreservlets.filedownload?name=" +fname />
    It is generating a unterminated tag error..Please help..

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • How to connect MySql database with JSP

    Dear everyone,
    how to connect MySql database with JSP......

    It's too bad that nobody has ever asked this question before...

  • How do I expand my simple JSP page to implement Connection Pooling?

    Hi everyone,
    I have a small SQL database which contains information about Students and a StudenBean which contains their attributes and appropriate get/set methods (which I haven't needed to use yet).
    I want to write a simple JSP page which displays all the students details in one big table. I can do this using the basic prototyping method of adding the dataSource and driver details to the deployment descriptor (web.xml - I'm using the latest version of Tomcat by the way) and then accessing the database using JSP standard SQL actions.
    Here's a snipet of what I've done (just an example, the final code works):
    <sql:query var="temp"
    sql="SELECT * FROM Employee ORDER BY UserName"
    />
    <c:forEach items="${temp.rows}" var="row">
    <td><c:out value ="${row.UserName}"/></td>
    <td><c:out value ="${row.FirstName}"/></td>
    <td><c:out value ="${row.LastName}"/></td>
    Now I want to upgrade! I want to access the dataSource using Connection Pooling and it's causing me a lot of trouble. I already have the required working classes/data such as ConnectionPool.java, ResourceManagerListener.java, the MySQL driver etc.
    However, I don't know what the best way to setup the connection for my purposes would be and where I should do it.
    Do I need to write a servlet or tag handler/custom action to establish the connection and access my bean through it? I would like to keep a similar sort of business logic as I already have developed i.e. be able to use actions in my JSP page to cycle through the database and print out each detail from the row.
    Rather confused and muddled. Thanks for any input!

    Good idea.
    Set up a JNDI data source for your app, according to these docs:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    You'll have to put the right information into your web.xml and a context.xml. Once you've done that, your JSTL JSPs will simply use the connection resource automagically.
    MOD

  • How to use Session scope in jsp page

    Hello, I have login form, where user provides username and password. Then click on submit, it will forward to validation.jsp. Where it will check in database make sure username and password exit. Now i can also retrive accountid of perticular user. I want to put that username and accountid in session scope. so all other pages can use that username and accountid. How can i do that. I'm new at this, so please provide me example too. Here is my code for login.jsp and validation.jsp..
    Validation.jsp
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    //String name = request.getParameter( "username" );//
    //session.setAttribute( "accountID",accountID );//
    <%
    String connURL = "jdbc:oracle:thin:@orca.csc.ncsu.edu:1521:ORCL";
         Connection conn = null;
         Statement stmt = null;
         ResultSet rs = null;
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    conn = DriverManager.getConnection(connURL, "vapatel","pjdas");
    stmt = conn.createStatement();
    String user=request.getParameter("userName");
    String password=request.getParameter("password");
    boolean entrance=false;
    stmt.excuteQuery("SELECT AccountID From Password WHERE USERNAME='"+user+"'");
    rs = stmt.executeQuery("SELECT * FROM Password WHERE USERNAME='"+user+"' AND PASSWORD='"+password+"'");
    while(rs.next()){
    String dbUser = rs.getString("USERNAME");
    String dbPassword= rs.getString("PASSWORD");
    if ((user.equals(dbUser)) && (password.equals(dbPassword))){
    entrance=true;
    if (entrance==true){%>
    <jsp:forward page="form.jsp"/>
    <%}
    else{%>
    <jsp:forward page="login.jsp"/>
    <%}
    %>

    hi,
    to put something into session scope in a jsp page use:
    session.setAttribute("counter", Integer.toString(5));to retrieve is from a jsp page use:
    String counterAttribute = (String)session.getAttribute("counter");

  • Not able to connect to database through JSP page

    Hello Everyone,
    I'm creating a simple JSP page (helloworld.jsp) that would get info from the db and display it but when I point my browser to http://localhost:8080/helloworld.jsp, I get ClassNotFound exception.
    <html>
    <head>
    <title>My first JSP page
    </title>
    </head>
    <body>
    <%@page import="java.sql.*" %>
    <%
         try{
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         String url = "jdbc:mysql:///" + "trylnp";
         String user = "root";
         String pass = "welcome";
         Connection conn = DriverManager.getConnection(url,user,pass); 
         out.println("here");
         if((conn != null)&&(!conn.isClosed()))
              out.println("Connected...");
         String releasenum="3.1.48A";
         String query = "Select * from releasedata where releaseno='" + releasenum + "'; ";
         Statement s = conn.createStatement();
         ResultSet rs = s.executeQuery(query);
         while(rs.next())
              String useraction = rs.getString("useraction");
              String releaseno = rs.getString("releaseno");
              int ninetyfivepercentile = rs.getInt("ninetyfivepercentile");
              int ninetypercentile = rs.getInt("ninetypercentile");
              int fiftypercentile = rs.getInt("fiftypercentile");
              out.println("useraction : ");
              out.println("releaseno : ");
              out.println("ninetyfivepercentile : ");
              out.println("ninetypercentile : ");
              out.println("fiftypercentile : ");                    
         catch(Exception e ){
              out.println(e);
    %>
    </body>
    </html> I've properly set my classpath to C:\Program Files\mysql-connector-java-5.1.6\mysql-connector-java-5.1.6-bin.jar
    and also put the jar file in all the WEB-INF sub folders inside C:\apache-tomcat-6.0.16\webapps (I know it had to go in one of the WEB-INF dir, but as I was not sure which one, I put the jar file in all of the WEB-INF folders)
    Please, do let me know if u know how to resolve the issue. It'll be a big help.
    Thanks.

    I've properly set my classpath to C:\Program Files\mysql-connector-java-5.1.6\mysql-connector-java-5.1.6-bin.jarI don't think that does anything. You aren't compiling a .java file.
    If you put mysql-connector-java-5.1.6-bin.jar in the directory:
    apache-tomcat-6.0.x/libit will be available to all your applications.
    After making a few changes to your code, the following worked for me:
    <html>
    <head>
    <title>My first JSP page</title>
    </head>
    <body>
    <%@page import="java.sql.*" %>
    <%
      try{
      Class.forName("com.mysql.jdbc.Driver").newInstance();
      String url = "jdbc:mysql://localhost/mydb1";
      String user = "me";
      String pass = "jsptest";
      Connection conn = DriverManager.getConnection(url,user,pass);
      out.println("<div>here</div>");
      if((conn != null)&&(!conn.isClosed()))
        out.println("<div>Connected...</div>");
      String name="diane";
      String query = "Select * from mytable2 where name='" + name + "'" ; 
      Statement s = conn.createStatement();
      ResultSet rs = s.executeQuery(query);
      while(rs.next())
        //String useraction = rs.getString("useraction");
        //String releaseno = rs.getString("releaseno");
        //int ninetyfivepercentile = rs.getInt("ninetyfivepercentile");
        //int ninetypercentile = rs.getInt("ninetypercentile");
        //int fiftypercentile = rs.getInt("fiftypercentile");
        //out.println("useraction : ");
        //out.println("releaseno : ");
        //out.println("ninetyfivepercentile : ");
        //out.println("ninetypercentile : ");
        //out.println("fiftypercentile : ");       
        int id_result = rs.getInt("id");
        String name_result = rs.getString("name");
        out.println("<div>" + id_result + " - " + name_result + "</div>");
      catch(Exception e ){
        out.println("<div>something is wrong</div>");
        out.println("<div>" + e + "</div>");
    %>
    </body>
    </html>

Maybe you are looking for