Newbie with JSP & JDBC questions

Hi. I have a quick question. I have a client jsp page with a table, listing all the fields from my mySQL table called kellybclients. At the end of each row, I also have a submit button that I would like navigate the user to the campus jsp page that only shows the data associated with the client who's button they clicked on in the table. I'm trying to figure out how to pass this data from my JSP into the rowset.setCommand method in my connection/data bean. I am using a cached row set. Here's the code from my bean:
* To change this template, choose Tools | Templates
* and open the template in the editor.
package ETS;
import java.sql.SQLException;
import javax.sql.rowset.CachedRowSet;
import java.util.ArrayList;
import com.sun.rowset.CachedRowSetImpl;
public class CampusDataBean {
    private CachedRowSet rowSet;
  public CampusDataBean() throws Exception
    Class.forName("com.mysql.jdbc.Driver");
    rowSet = new CachedRowSetImpl();
    rowSet.setUrl("jdbc:mysql://traderseven.nmsu.edu/is470Spring08?relaxAutoCommit=true");
    rowSet.setUsername("is470Spring08");
    rowSet.setPassword("1DoNtier");
    rowSet.setCommand("SELECT campid, clientid, campname,campcounty FROM kellybCampus WHERE clientid=?");
    CampusBean camp = new CampusBean();
    rowSet.setString(1, camp.getClientID());
    rowSet.execute();
  public ArrayList<CampusBean> getCampusList() throws SQLException
    ArrayList<CampusBean> campusList = new ArrayList<CampusBean>();
    rowSet.beforeFirst();
    while(rowSet.next())
      CampusBean campus = new CampusBean();
      campus.setCampID(rowSet.getString(1));
      campus.setClientID(rowSet.getString (2));
      campus.setCampName(rowSet.getString(3));
      campus.setCounty(rowSet.getString(4));
      campusList.add(campus);
    return campusList;
public void addCampus(CampusBean campus) throws SQLException
    rowSet.moveToInsertRow();
    rowSet.updateString(1,campus.getCampID());
    rowSet.updateString(2,campus.getClientID());
    rowSet.updateString(3,campus.getCampName());
    rowSet.updateString(4,campus.getCounty());
    rowSet.insertRow();
    rowSet.moveToCurrentRow();
    rowSet.acceptChanges();
}I'm sorry if this is too vague. I'd appreciate any help, fixes, or pointers on where to learn how to do this. Thank you again.
KellyJo

So the button should be a Submit button for a form. There are a couple of different methods for doing this:
1) Each row on the table can be a different form, each form uses the same action (servlet) target and has a hidden input with a unique identifier for each of the clients:
<table>
  <tr><form action="selectClient" method="post"><td> etc </td><td><input type="hidden" name="id" value="1"/><input type="submit"/></td></form></tr>
  <tr><form action="selectClient" method="post"><td> etc </td><td><input type="hidden" name="id" value="2"/><input type="submit"/></td></form></tr>2) Use a single form with a button type=submit for each row with different values (Note: This is broken in IE7 so you probably shouldn't use it)
<table><form action="selectClient" method="post">
  <tr><td> etc </td><td><button type="submit" name="id" value="1">Submit</button></td></tr>
  <tr><td> etc </td><td><button type="submit" name="id" value="2">Submit</button></td></tr>3) Use a single form, have a hidden value with a blank value. Each row has a submit button with a javascript onclick method that sets the form's hidden value to one appropriate to the row, then submits the form. I won't show you this code but there are examples on the web.
4) Use a single form with an input="submit" element on each row. Each button would have a different name with the ID info encoded in it, then you would have server-side code that takes parameters, finds the right one and parses out the proper row to edit:
<table><form action="selectClient" method="post">
  <tr><td> etc </td><td><input type="submit" name="submit__id_1"/></td></tr>
  <tr><td> etc </td><td><input type="submit" name="submit__id_2"/></td></tr>I think most people end up doing some variant of 3, which I don't like because I hate to rely on JavaScript to make my web apps work properly. I would prefer 4, which takes more work on the server side (which I like better) but 1 works just as well with a lot more typing and uglier HTML code. Actually, I would like 2 the best because that is pretty much what the <button> element was designed for, but Microsoft screwed that up.

Similar Messages

  • [Newbie] Model2 JSP + JDBC + JSTL forEach

    Hi,
    This is my first post.
    I'm running into a bit of brain failure over decoupling my JSP view page from the specifics of the JDBC the model uses.
    I want to avoid the easy route of:
    Controller
    - interogates request as default main listing page.
    - runs a JDBC query
    - pops the ResultSet in the request
    - forwards to the mainlisting.jsp view
    JSP View
    - Uses a scriplet to iterate and display the contents of the results set as an HTML table.
    For a start I don't want to pass a ResultSet to the view page. I'd like to keep it completely ignorant of whether the application is using JDBC, XML or an EJB for it's data tier.
    My first smart? idea was to write an adapter for ResultSet that provides a standard List (or similar) interface, taking data from the ResultSet and returning 'domain' value objects instead of Rows.
    This presents a secondary problem however. In order to provide a List of beans around the result set I either need to copy the whole result set into an ArrayList or Vector on creation, or implement the entire List interface myself (<yawn>).
    So I figured if it's that hard, it can't be the correct way.
    Ultimately I'm after some type of Bean collection I can populate (or wrap around) a ResultSet, so that the following JSP will display the list.
    <ul>
    <c:forEach items="${theListOfItems}" var="item">
    <li><c:out value="${item.foo}" /> - <c:out value="${item.bar}" /></li>
    </c:forEach>
    </ul>
    Any pointers?
    Cheers
    Paul

    I'm quite pleased I was on the right track and I even accepted defeat in finding a pipelining way to iterating over the beans attached to the underlying result set and .. as you suggest .. loading it all into beans on creation.
    I ended up with this:
    package uk.co.cmm.tvrecorder.webapp;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import java.util.Date;
    @SuppressWarnings("serial")
    public class RecordingList extends ArrayList<Recording> {
         public RecordingList(ResultSet res) throws SQLException {
              while( res.next() ) {
                   Recording rec = new Recording();
                   rec.setId(res.getInt("id"));
                   rec.setChannel(res.getString("chan"));
                   rec.setProgName(res.getString("prog"));
                   rec.setPrio(res.getInt("prio"));
                   // Date-Times are stored as Unix long ints
                   // Why?  Legacy database - allows numerical comparison in legacy dvb recorder shell component.
                   // Possible future change to SQL DateTime but not just now.
                   Date d = new Date(res.getLong("start")*1000);
                   rec.setStart(d);
                   d = new Date(res.getLong("stop")*1000);
                   rec.setStop(d);
                   this.add(rec);
    }Which then allowed me to have:
    <table>
    <tr><th>Programme</th><th>Channel</th><th>Date</th><th>Start</th><th>Stop</th><th>Prio</th></tr>
    <c:forEach items="${recordings}" var="item">
         <c:choose>
                     <!-- when is running now -->
              <c:when test="${(now ge item.start) and (now lt item.stop)}">
                   <c:set var="style" value="background-color:red;" />
              </c:when>
              <c:otherwise>
                   <c:set var="style" value="background-color:white;" />
              </c:otherwise>
         </c:choose>
         <tr style="<c:out value="${style}" />">
              <td><c:out value="${item.progName}" /></td>
              <td><c:out value="${item.channel}" /></td>
              <td><fmt:formatDate type="date" dateStyle="FULL" value="${item.start}"  /></td>          
              <td><fmt:formatDate type="time" value="${item.start}" /></td>          
              <td><fmt:formatDate type="time" timeStyle="LONG" value="${item.stop }" /></td>          
              <td><c:out value="${item.prio}" /></td>     
         </tr>
    </c:forEach>That's that sorted, I think.... NEXT!
    Is this the correct way to put a var into an HTML attribute?
         <tr style="<c:out value="${style}" />">Cheers
    Paul

  • Need serious help with JSP + JDBC/Database connection

    Hey all,
    I have to build an assignment using JSP pages. I am still pretty new and only learning through trial and error. I understand a bit now, and I have managed to get a bit done for it.
    I am having the most trouble with a Login Screen. The requirements are that the a form in a webpage has Username/Number and Password, the user clicks Login, and thats about it. The values for the username/number and password NEED to come from the database and I cannot manage to do this. The thing I have done is basically hardcode the values into the SQL statement in the .jsp file. This works, but only for that one user.
    I need it so it checks the username/number and password entered by the user, checks the database to see if they are in it, and if so, give access. I seriously am stuck and have no idea on what to do.
    I dont even know if I have made these JSP pages correct for starters, I can send them out if someone is willing to look/help.
    I have setup 3 other forms required for the assignment and they are reading data from the db and displaying within tables, I need to do this with non-hardcoded values aswell. Im pretty sure I need to use for example 'SELECT .... FROM .... WHERE username= +usrnm' (a variable instead of username="john" , this is hardcoded), I just CANNOT figure out how to go about it.
    Its hard to explain through here so I hope I gave enough info. A friend of mine gave some psuedocode i should use to make it, it seems ok to follow, its just I do not know enough to do it. He suggested:
    get the username and pass from the env vars
    open the db
    make an sql (eg SELECT user, pass FROM users WHERE user = envuser)
    index.jsp points to login.jsp
    login.jsp get the vars you put into index.jsp
    opened the db
    is the query returns nothing - then the user is wrong
    OR if the passwords dont match
    - redirect back to index.jsp
    if it does match
    - set up a session
    - redirect to mainmenu.jsp
    Anyway, thanks for any help you can give.
    -Aaron

    Hi,
    Try this... it may help you...
    mainMenu.jsp
    <html>
    <body>
    <form method="POST" action="login.jsp">
    Username: <input type="text" name="cust_no">
    <p>
    Password: <input type="password" name="password">
    <p>
    <input type="submit" value="LOGIN">
    </form>
    </body>
    </html>
    login.jsp
    <%@ page import="java.io.*, java.sql.*"%>
    <html>
    <body>
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection connection = DriverManager.getConnection("jdbc:odbc:rocky");
    Statement statement = connection.createStatement();
    String query = "SELECT cust_no, password FROM customers WHERE cust_no='";
    query += request.getParameter("cust_no") + "' AND password='";
    query += request.getParameter("password") + "';";
    ResultSet resSum = statement.executeQuery(query);
    if (request.getParameter("cust_no").equalsIgnoreCase(resSum.getString("cust_no") && request.getParameter("password").equalsIgnoreCase(resSum.getString("password"))
    %>
    <h2>You are logged in!</h2>
    <%
    else
    %>
    <h2>You better check your username and password!</h2>
    <%
    }catch (ClassNotFoundException cnfe){
    System.err.println(cnfe);
    }catch (SQLException ex ){
    System.err.println( ex);
    }catch (Exception er){
    er.printStackTrace();
    %>
    </body>
    </html>
    I didn't check the code that I wrote. So you may have to fix some part of it. Also this may not be the best solution, but it will help you to understand the process easily.
    The more efficient method is to check whether the result set returned from the database is null or not.... I hope you got the idea... Good luck!
    Rajesh

  • PS CC newbie with layer translate question

    I am a newbie in PS. Currently I am using Adobe PS CC, in which I want to merge quite a number of images together to form a "collage". Those images are already named with coordinates, like (0, 1).png with size 1280 x 1280 pixel, and I already load all of them into a PS document by photomerge. I suppose each of them is contained in a independent layer, and I can use free transform to move those layers to my required position such that those images can resemble into a large image like a puzzle. When the number of layers is large, doing this by hand is really a tedious work. So I want to automate it with the script. I have try the following script and run it, but without any response; please correct me as I am new (and also new in JavaScript as well)
    # target photoshop
    function Main()
         MoveLayerTo = function(l, x, y) {
               var b = l.bounds;
               var x1 = b[0].as("px");
               var y1 = b[1].as("px");
               var x2 = b[2].as("px");
               var y2 = b[3].as("px");
               var xc = x1 + (x2-x1)/2;
               var yc = y1 + (y2-y1)/2;
               l.translate(x-xc, y-yc);
      var i = 0;
      var j = 0;
      for (i = -6; i < 3; i++) {
      for (j = 3; j > -11; j--) {
      MoveLayerTo(app.activeDocument.layers.getByName("(" + i + ", " + j + ").png"), new UnitValue(640 +  (i + 6) * 1280, "px"), new UnitValue(640 + (3 - j) * 1280, "px"))

    Photo Collage Toolkit
    Photoshop scripting is powerful and I believe this package demonstrates this A video showing a 5 image collage PSD template  being populates with images:
    The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
    Size the photo collage templates for the print size you want - width, height and print DPI resolution.
    Photo collage templates must have a Photoshop background layer. The contents of this layer can be anything.
    Photo collage templates must have alpha channels named "Image 1", "Image 2", ... "Image n".
    Photo collage templates layers above the background layers must provide transparent areas to let the images that will be placed below them show through.
    There are twelve scripts in this package they provide the following functions:
    TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
    CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
    LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
    InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
    ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
    ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
    PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
    BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
    BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
    BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
    PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
    PCTpreferences.jsx - Edit This File to Customize Collage Populating scripts default setting and add your own Layer styles.
    Documentation and Examples

  • IMovie newbie with problems and questions

    I first posted this in iMovie 9 which was incorrect. I am at iMovie version 6.0.3.
    I am new to iMovie and am struggling with my first project. My current problem is with transitions and playback. I have added a transition between my first and second clips and it shows in the clip viewer. However, when I click on the first clip and click play the clip plays to it's end but the transition does not start. If I then click on the transition and click play it goes through the transition but the next clip doesn't start to play. In fact, none of the clips play unless I click on the specific clip and click play. I would expect the entire movie to play from start to finish. Am I missing something? The iMovie Getting Started instructions are not very helpful
    Thank you
    John

    Sorry guys (Klaus and Karsten). I didn't look thoroughly enough (most unlike me)! When the iMovie Help window appears (following the link Klaus provided), it is blank. But then I clicked on the Home button - the middle icon shaped like a house at the top left of the window. Immediately, the Help Index appeared from which I could access all the items.
    How embarrassing - I should have known better, having used Help many times in the past (in all versions of iMovie).
    Apologies also for my comment about Apple removing Support articles! I think baby sitting yesterday threw me off a bit
    For the benefit of other users (including John Hendrie, the OP), this is the link we are talking about (as kindly provided by Klaus): http://docs.info.apple.com/article.html?path=iMovie/6.0/en/imv1096.html
    John
    Message was edited by: John Cogdell

  • Newbie with one small question

    im brand new to cisco, and ive just purchased a catalyst 1900 to start learning on.
    im trying to get some switching started, and i cant seem to get things working.
    what i did was create an ip address for the switch, which is the same ip address for interface 0/1. interface 0/1 goes to the gateway router and then out to the internet(so that we are clear, switch ip = interface 1 ip). the gateway has a static ip, and i have 5 allocatable statics(sticky ip) after that. so the switch has its own static ip(i made sure to set the ip default-gateway on the cisco switch).
    i then set interface 2 ip to a different ip address and then connected that to a linux system with that static ip.
    from the linux box, i can successfully ping the switch, the gateway, and anything else with an ip address. but i cant seem to get internet access on this linux box. i can successfully ping, but when i fire up the browser, i get nothing.
    any ideas. i really appreciate it. i know theres something that im missing. ive got my book in front of me and ive followed all of the steps, but this stuff is all written for simulations, so its a little different.
    thanks a ton.

    ok, turns out i cant ping out on the internet.
    i can tell you what commands ive entered
    ok, the gateway is xxx.xxx.xxx.238
    i have 5 other ip's, 233 - 237
    i have the cable going from the gateway switch into the first port on the switch. theres another ethernet cable going from port 2 to the linux box.
    into the switch:
    ip address xxx.xxx.xxx.236 255.255.255.248
    ip default-gateway xxx.xxx.xxx.238
    interface ethernet 0/1
    ip address xxx.xxx.xxx.236
    exit
    interface ethernet 0/1
    ip address xxx.xxx.xxx.237
    then into the linux box,
    ifconfig eth0 xxx.xxx.xxx.237 netmask 255.255.255.248 broadcast xxx.xxx.xxx.255
    from the linux box, i can successfully ping the switch and another computer that has been assigned a static ip that is connected into the gateway switch, not the cisco switch. i can successfully ping the linux box from that computer, so i can successfully send a ping from a windows computer to the gateway switch, to the cisco switch, and then to the linux box.
    i cannot ping anything beyond the gateway switch.
    any help would be great. i know this has to be a simple problem, sorry.

  • 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?

  • Iterator behaving abnormally with jsp, while correctly with java

    So I have a class that generates a ListIterator for me, which I should process with jsp. However, the iterator behaves illogically.
    In both java & jsp method i.hasPrevious() returns true, in java i.previous() returns previous element, and jsp terminates with NoSuchElementException.
    I just doublechecked, the content of the iterator is in both cases exactly the same.
    I am using Weblogic 6.1.
    Any help,
    anywhere,
    jussi
    // We have a ListIterator
    ListIterator i = lService.listIterator(0);
    while( i.hasNext() && b) {
       System.out.println( ((Map)i.next()).get("name") );
       // Some other things hereprocessing here...
    } // And here we are, at the end of the iteration...
    // Then we output
    System.out.println( ((Map)i.previous()).get("name") );
    System.out.println( ((Map)i.previous()).get("name") );
    System.out.println( "More? = " + i.hasPrevious() );
    System.out.println( ((Map)i.previous()).get("name") );And the output is:
    K�ytt�tapaus1bPyynt�
    Osakkaat
    Osakas
    Osakas
    Osakkaat
    More? = true
    K�ytt�tapaus1bPyynt�
    That's cool...
    But the same with jsp:
    <%
    ListIterator i = lService.listIterator(0);
    while( i.hasNext() && b)
      %><%= ((Map)i.next()).get("name") %><%
    %> <%= ((Map)i.previous()).get("name") %><%
    %> <%= ((Map)i.previous()).get("name") %><%
    %> More? = <%= i.hasPrevious() %> <%
    %>And the output is:
    K�ytt�tapaus1bPyynt� Osakkaat Osakas Osakas Osakkaat More? = true
    Great!
    Then I add one magic line:
    <%
    %> <%= ((Map)i.previous()).get("name") %><%
    %> <%= ((Map)i.previous()).get("name") %><%
    %> More? = <%= i.hasPrevious() %> <%
    %> <%= ((Map)i.previous()).get("name") %><%
    %>Servlet failed with Exception java.util.NoSuchElementException
    and with
    %> <%= i.previous() %><%
    it is, of course the same...
    This one is giving me headache...

    Now I should say "Damn me!", cause I solved the puzzle. I just had problems understanding the jsp-notation...
    Am a bit newbie with jsp. And a bit with java.

  • MySQL(JDBC) with JSP error

    Hello all,
    I'm using MySQL 4.1.1 with JConnector 3.1 or 3.0, and I getting a unexpected result.
    Fetching unicode strings with function ResultSet.getString(), returning "????" instead of Hebrew unicode chars ("&#1488;&#1489;&#1490;&#1491;").
    As in PHP with the same DB, everything is working well.
    When trying to use InputStream of the CLOB, or BLOB, the result comes good.
    Does I need to declare something inorder to use unicode chars with the JDBC?
    I'm connecting in a normal method, so I didn't post any code...

    when you start the server, you can specify unicode, something like this:
    mysqld --unicodelanguage char set
    look into the manu.

  • Newbie to JSP/Struts: Where to get started

    I would like to begin experimenting with JSP and the struts framework. I'm a java newbie but a relatively quick learner.
    First, what products do I need to use struts/JSP ?
    I have 9iAS standard edition release 1.0.2.1 and an oracle database std edition without the JVM installed. Do I need the JVM in the database ? Can JSP use a JVM outside the database ? Do I need enterprise edition ?
    Do I need Jdevelopper 9i or can I learn to use JSP with simple tools (HTML editor) first ?
    Does struts need JSP 2.0 spec or the JSP 1.1 that comes with iAS 1.0.2.1 is OK ? Is JSP 2.0 = JSP 1.2 (Like J2EE = JDK1.2 and up) There is a lot of version/naming confusion going on in java, you got any site that can help me untangle this mess ?
    Thanks a lot
    You can reply to [email protected]

    Thanks for your response.
    We actually use oracle 8.1.7 and 9iAS (PL/SQL gateway and http server). We would like to jump on the Java Bandwagon before we are left in the dust. We first need to be able to understand a lot of technology/concepts/buzzwords.
    We started basic Java programming (Applications) but would prefer to get an idea of "The big picture".
    By that, I mean, we need to be able to understand/design/architect sound applications and be able to talk to the community and understand what they are saying. Right now, reading the media or forums is just a big bunch of buzzwords that are ever changing and we cannot get a grasp on it.
    We not only need to get aquainted with the concepts, but we also need to be able to determine wether product xyz fits in the architecture, etc...
    If you were to get a couple of good books to answer some questions, where would you begin ?
    Kind of questions we might have are:
    - What is the difference between Jserv and Tomcat ?
    - What excatly is tomcat ? A replacement for Jserv ?
    - Can Jserv be used as a container for struts apps or do you need tomcat ? If you need tomcat, does it come with some version of 9ias ?
    - What is a java web service ?
    - I read a lot about Enterprise Java Beans etc.. What are they, what are there purpose ? It seems like it is a standard, what are they used for ? If it is a standard, does this mean that If I buy a set of EJB from a vendor, it would offer the same beans as another vendor ? Is Oracle BC4J an implementation of EJB with added functionality ? Is it proprietary ?
    - Buzzwords everywhere: MVC, EJB, J2EE, BC4J etc.. What are the definitions.
    - Is oracle's java vision proprietary or are they really following the rest of the world ? For example, is BC4J compatible with EJB ?
    - What is a Framework
    - What exactly is JSP.
    - Can STRUTS be used to access an oracle database ? If so, what are the required components (I guess you need JDBC or SQLJ) but does the oracle database need to be java enabled ?
    - Even if you use oracle 9ias as an application server, can you use non-proprietary development methods/architectures/techniques that could be easily implemented somewhere else using another vendor's application server (Ex: Apache + Tomcat, WebSphere, etc...)
    - Struts seems to be an interesting thing. I see that it was developped to encourage code reuse and prevent everyone from reinventing the wheel. But I cannot understand what exactly a developper had to write before struts was there. I mean, there must be alternatives to strut, if so what is the purpose of the framework ?
    A lot of questions, but we need to understand the basics before we jump on the java bandwagon. If we wait, we'll be left in the dust and we need to keep current.
    Thanks in advance.

  • Web Service/ JDBC question

    Hi,
    I have to design an automatic -and periodic- process that performs next tasks:
    1) Read Oracle table to build a XML file
    2) Connect with a Web Service and send the XML. (In the specification says that SOAP with attachments is not supported , so we have to use a "proxy J2EE client" to interact with this web service)
    3) Also this web service uses security sign with a X.509 v3 certificate in BASE64, which must be passed as a 'string' parameter when is invoked.
    I'm new in these subjects, and I need some help, my questions:
    1) Is it possible to define an automatic process with JDEVELOPER that connects to the DB, build the XML file and invoke the Web service?
    2) How could I make this proccess automatic and periodic, for example every friday.
    3) What are the tools I have to use:
    3.1.- To Connect with DB -> JDBC?
    3.2.- To Build XML, programmatically? or is there any tool?
    3.3.- To define it as a periodic proccess??
    4) Others alternatives? Is it possible to develope this directly in PL/SQL as a job in ORACLE?
    thanks in advance...

    This is what we call "Database Web Services" covered in chapter 15 of my book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html
    See also
    a) Oracle Application Server Web Services Developer’s Guide 10g Release 3 (10.1.3.x) for a complete coverage of Oracle AS Web Services Security.
    b) Calling External Web services from stored procedure (it contains an example of batch scheduling for call-out but you are looking for call-in): http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    Kuassi

  • Running other server-side applications with JSP

    Hi,
    I'd like to know, if is possible run with JSP (Servlet, or JavaBean) other application, which support COM. I used something like this in JavaScript:
    application=new ActiveXObject("excel.application");
    and I had all possibilities of its API. I'd like to use excel as data source for user-friendly data input.
    Thanks for all suggestions

    Hi,
    I don't realy understand your question.
    If your javascript work using activeX, this code is executed on the client side (like the excel application and the excel file).
    You can, with a JSP, generate the html page that contain the script.
    Where is the problem ?

  • Language problem with my jdbc connection

    Hello,
    i'm having a problem with my jdbc connection.
    the problem is that i'm connecting to MS- Access db the have arabic tables, and columns, it was working fine on a windows XP environment prepared for arabic language, but when i had to move to windows vista it did not work and it gave me an exception.
    i'm using netbeans 6.1 IDE, and the exception is
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3110)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
    when i printed the select statement and the exception it gave me:
    SELECT [??? ???????], [??? ??????], [??? ?????], [??? ?????], [????? ???????????] FROM EDU_DIVISION; [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect.
    the question marks are very weird to appear!!!!!!
    here is the code:
    public void edu_branch() {
            sucpy = 0;
            eflag = 0;
            asql = "SELECT [\u0643\u0648\u062F \u0627\u0644\u062C\u0627\u0645\u0639\u0629], [\u0643\u0648\u062F \u0627\u0644\u0643\u0644\u064A\u0629], [\u0643\u0648\u062F \u0627\u0644\u0642\u0633\u0645], [\u0643\u0648\u062F \u0627\u0644\u0634\u0639\u0628\u0629], [\u0627\u0633\u0645 \u0627\u0644\u0634\u0639\u0628\u0629], [\u0627\u0633\u0645 \u0627\u0644\u0634\u0639\u0628\u0629 \u0628\u0627\u0644\u0627\u0646\u062C\u0644\u064A\u0632\u064A\u0629], [\u0627\u0644\u0643\u0648\u062F \u0627\u0644\u0645\u062E\u062A\u0635\u0631] FROM EDU_BRANCH;";
            Connection connection;
            Statement statement;
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                connection = DriverManager.getConnection("jdbc:odbc:info");
                System.out.println("Connection to Access file is created...");
                statement = connection.createStatement();
                statement.execute(asql);
                System.out.println("Executing query : " + asql);
                aset = statement.getResultSet();
                if (aset != null) {
    //------------------------------Oracle operations--------------------------------------------------------------------                  
                    while (aset.next()) {
        can you help me please

    arabic language
    SELECT [??? ???????], [??? ??????], [??? ?????], [??? ?????], [????? ???????????] FROM EDU_DIVISION; >[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect.
    the question marks are very weird to appear!!!!!!It failed to understand your unicode sql.
    it was working fine on a windows XP environment prepared for arabic language, but when i had to move to windows vista it did not workStrange. Maybe you need to compare the differences of some system properties on both hosts, for instance, sun.io.unicode.encoding, file.encoding, user.region, and so on.

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • Why JavaBeans with JSP

    Hi,
    I know its an easy question and probably a silly one to ask, but still please take time to answer this. Why do we use JavaBeans with JSP to make use of reusable code. Cant we use simple classes for this?
    Thanks in advance

    Hi,
    JavaBeans technology is the component architecture for the Java 2 Platform, Standard Edition (J2SE). Components (JavaBeans) are reusable software programs that you can develop and assemble easily to create sophisticated applications. By using Java beans, JSP allows you to keep much more of your code separate from the html than other html embedded languages. Java beans basically let you keep all the logic of your page (like the code to connect to a database, manipulate data etc�) in a separate file known as a Java bean. Then from within your html page - all you do is use one tag to 'use' the bean, and then a few other short tags to send data to and from the bean.
    the website http://java.sun.com/products/jsp/html/jsptut.html is a good start, simple and easy understand.
    Good luck!
    jmling

Maybe you are looking for

  • SAPSprint installation on Windows 2008 R2 Server 64-bit

    Dear Gurus, as we change our print server to Windows 2008 R2 Server 64-bit I need to install SAPSprint for SAP printing with connection type 'S' out of a NW7.0 based system on HP-UX. Till now we used SAPlpd on a 32-bit Windows Server...... 1) Do I si

  • ST22 Short Dump  STORAGE_PARAMETERS_WRONG_SET

    Hi We have a NW04 BW 350 system running on Windows 2003 32 Bit/MS SQL 2000 32 Bit. When I go into RSA --> Monitoring --> PSA  it says 'constructing administrators workbench' then fails with the short dump: <b>STORAGE_PARAMETERS_WRONG_SET</b> The shor

  • Fetch Report Program names for a given Package

    Hi,    I need to fetch all the report program names for a given pakage. I tired TADIR table but couldnt fetch report details alone.. thanks, sri Moderator message: very basic, please do more own research before asking, e.g. look at a few TADIR entrie

  • Running Large Backups over an MPLS Network

    We are opening up a second data center at my organization. The location is about 60 miles from our primary data center. At our primary data center we use an MPLS network for our WAN. We have ll remote locations on our WAN and we have a DS-3 that conn

  • How to install j2sdk into Suse Linux

    How to install the j2sdk-1_4_0_03-linux-i586.bin into Suse Linux 8.1