Urgent help(xml, java and  asp)

Hi all,
I,m new with XML and i have to convert a VB application that connects to an ASP using Microsoft XML and I need to know if I can connect from a java application to an ASP using XML for transfering the infornation.
In the ASP side it uses DOM, and I would like not to touch the ASP and create a new application with java and get rid of the VB application

DrClap what I have in the VB side is this:
Private Function SetBalanceForReal(Amount As Currency, Action As String) As Boolean
On Error GoTo ehSetBalance
Dim ohttp As New MSXML.XMLHTTPRequest
Dim oResponseXML As New MSXML.DOMDocument
Dim oDoc As New MSXML.XMLDSOControl
Dim oElement As MSXML.IXMLDOMElement
Dim oNode As MSXML.IXMLDOMNode
ohttp.open "POST", ServerUrl & "ActualizaBalance.asp", False
Set oElement = oDoc.XMLDocument.createElement("ActualizaBalance")
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Client", ""))
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Action", ""))
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Amount", ""))
oElement.childNodes.Item(0).Text = Trim(ClientLogin)
oElement.childNodes.Item(1).Text = Action
oElement.childNodes.Item(2).Text = Amount
ohttp.send (oElement.xml)
oResponseXML.loadXML (ohttp.responseText)
If oResponseXML.documentElement.childNodes.Item(1).Text = "OK" Then
Available = oResponseXML.documentElement.childNodes.Item(0).Text
Else
Available = 0
End If
Set ohttp = Nothing
Set oResponseXML = Nothing
Set oDoc = Nothing
Set oElement = Nothing
Set oNode = Nothing
SetBalanceForReal = True
Exit Function
ehSetBalance:
Set oNode = Nothing
Set oElement = Nothing
Set oDoc = Nothing
Set oResponseXML = Nothing
Set ohttp = Nothing
Available = 0
SetBalanceForReal = False
End Function
Public Function GetConsecutive(Game As String) As Boolean
On Error GoTo ehGetConsecutive
Dim ohttp As New MSXML.XMLHTTPRequest
Dim oResponseXML As New MSXML.DOMDocument
Dim oDoc As New MSXML.XMLDSOControl
Dim oElement As MSXML.IXMLDOMElement
Dim oNode As MSXML.IXMLDOMNode
ohttp.open "POST", ServerUrl & "ObtieneConsecutivo.asp", False
Set oElement = oDoc.XMLDocument.createElement("ObtieneConsecutivo")
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Game", ""))
oElement.childNodes.Item(0).Text = Game
ohttp.send (oElement.xml)
oResponseXML.loadXML (ohttp.responseText)
Consecutive = oResponseXML.documentElement.childNodes.Item(0).Text
Set ohttp = Nothing
Set oResponseXML = Nothing
Set oDoc = Nothing
Set oElement = Nothing
Set oNode = Nothing
GetConsecutive = True
Exit Function
ehGetConsecutive:
Set oNode = Nothing
Set oElement = Nothing
Set oDoc = Nothing
Set oResponseXML = Nothing
Set ohttp = Nothing
Consecutive = 0
GetConsecutive = False
End Function
and the ASP code is this:
<%@LANGUAGE=VBScript%>
<%
     'Variables Simples
     Dim Cliente
     Dim Accion
     Dim Monto
     'Variables Complejas
     Dim oClienteBD
     Dim oClienteInfoXML
     Dim oDoc
     Dim oElemento
     Dim oNode
     'Inicializacion de Variables Complejas
     Set oClienteBD = Server.CreateObject("Casino_Clases.CClient")
     Set oClientInfoXML = Server.CreateObject("MSXML.DOMDocument")
     Set oDoc          = Server.CreateObject("MSXML2.DSOControl")
     oClientInfoXML.async=false     
     oClientInfoXML.load(Request)
     Cliente = oClientInfoXML.documentElement.childNodes.item(0).text
     Accion = oClientInfoXML.documentElement.childNodes.item(1).text
     Monto = oClientInfoXML.documentElement.childNodes.item(2).text
     Set oElemento = oDoc.XMLDocument.createElement("Resultado")
     Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "AVAILABLE",""))     
     Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "ESTADO",""))
     If oClienteBD.UpdateBalance(Cliente, Accion, Monto) = True Then
          If oClienteBD.GetClientBalance(Cliente) = True Then
               oElemento.childNodes.Item(0).Text = oClienteBD.Available
               oElemento.childNodes.Item(1).Text = "OK"
          else
               oElemento.childNodes.Item(0).Text = 0
               oElemento.childNodes.Item(1).Text = "BAD"
          end If
     else
          oElemento.childNodes.Item(0).Text = 0
          oElemento.childNodes.Item(1).Text = "BAD"
     end If
     Response.Write(oElemento.xml)
     Set oClientInfoXML = Nothing
     Set oDoc = Nothing
     Set oClienteBD = Nothing
     Set oNode          = Nothing
     Set oElemento     = Nothing
%>
What I need to do is to change the VB part for a Java application and basicly, I don't know what Class of Java I have to use to connect to the ASP.
If you were so kind of giving me an example to do this I will appreciate it.
Ocorella

Similar Messages

  • Urgent  help needed(java frames)

    Hi,
    I need urgent help for correcting a piece of code.
    I have written a piece of code for building a gui with some buttons, drawing some geometric shapes.The code consists of two files called Graph and Frame.
    The problem I suppose in the last part of the Graph file, which Rectangle and Circle are called together, the only shape that the program draws is rectangle.Here is the code:
    //Graph
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import java.util.*;
    public class Graph extends JPanel {
    LinkedList color;
    LinkedList figures;
    public Graph() {
    setBackground(Color.white);
    figures = new LinkedList();
    color = new LinkedList();
    int z;
    class Point {
    int x;
    int y;
    public Point(int x, int y) {
    this.x = x;
    this.y = y;
    public Point(Point p) {
    x = p.x;
    y = p.y;
    public String toString() {
    return "(" + x + ", " + y + ")";
    public void move(Point dist) {
    x += dist.x;
    y += dist.y;
    abstract class GeomFigur {
    public abstract void move(Point p);
    class Line extends GeomFigur {
    Point p1, p2;
    public Line(Point p1, Point p2) {
    this.p1 = new Point(p1);
    this.p2 = new Point(p2);
    public String toString() { return "Line from " + p1 + " to " + p2;  }
    public void move(Point dist) {
    p1.move(dist);
    p2.move(dist);
    class Rectangle extends Line {
    public Rectangle(Point p1, Point p2) {
    super(p1, p2);
    public String toString() { return "Rectangle from " + p1 + " to " + p2; }
    class Circle extends GeomFigur{
    Point centre;
    int radius;
    public Circle(Point centre, int radius) {
    this.centre = new Point(centre);
    this.radius = radius;
    public String toString() {
    return "Circle, centre " + centre + ", radius " + radius;
    public void move(Point dist) { centre.move(dist); }
    public void addRectangle(int x, int y, Color col) {
    Rectangle r =new Rectangle(new Point(x,y),new Point(x+20,y+20));
    figures.addLast(r);
    color.addLast(col);
    repaint();
    public void addCircle(int x, int y, Color col) {
    Circle c =new Circle(new Point(x,y), 1 );
    figures.addLast(c);
    color.addLast(col);
    repaint();
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    for (int i=0;i < figures.size();i++) {
    Rectangle rect = (Rectangle)figures.get(i);
    //Circle circ = (Circle)figures.get(i);
    g.setColor(Color.black);
    g.drawRect(rect.p1.x,rect.p1.y,20,20);
    g.setColor((Color)color.get(i));
    g.fillRect(rect.p1.x,rect.p1.y,20,20);
    //g.setColor(Color.black);
    // g.drawOval(circ.centre.x,circ.centre.y,20,20);
    // g.setColor((Color)color.get(i));
    // g.fillOval(circ.centre.x, circ.centre.y, 20, 20);
    //Frame
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class Frame extends JFrame implements ActionListener {
    JButton button1, button2, button3, button4, button5 ;
    Graph gr;
    JComboBox cbx;
    JComboBox cby;
    JComboBox col;
    JMenu filemenu;
    JMenuItem quit;
    JMenuBar menubar;
    int x=10;
    int y=10;
    Color color=Color.red;
    public Frame() {
    menubar = new JMenuBar();
    filemenu = new JMenu("File");
    filemenu.setMnemonic('F');
    quit = new JMenuItem("Quit");
    quit.addActionListener(this);
    quit.setMnemonic('Q');
    quit.setAccelerator(KeyStroke.getKeyStroke('Q',Event.CTRL_MASK,false));
    filemenu.add(quit);
    menubar.add(filemenu);
    setJMenuBar(menubar);
    button1 = new JButton("Rectangle");
    button1.addActionListener(this);
    button2 = new JButton("Circle");
    button2.addActionListener(this);
    button4 = new JButton("Ellipse");
    button4.addActionListener(this);
    button5 = new JButton("Triangle");
    button5.addActionListener(this);
    button3 = new JButton("Reset");
    button3.addActionListener(this);
    String[] elements_x= {"10","20","30","40","50","60","70"};
    cbx = new JComboBox(elements_x);
    cbx.addActionListener(this);
    cbx.setActionCommand("cbx");
    String[] elements_y= {"10","20","30","40","50","60","70"};
    cby = new JComboBox(elements_y);
    cby.addActionListener(this);
    cby.setActionCommand("cby");
    String[] elements_color = {"Red","Blue","Green","Orange","Yellow" };
    col = new JComboBox(elements_color);
    col.addActionListener(this);
    col.setActionCommand("col");
    gr = new Graph();
    JPanel top = new JPanel(new BorderLayout());
    JPanel inputs = new JPanel(new GridLayout(6,1));
    inputs.add(button1);
    inputs.add(button2);
    inputs.add(button3);
    inputs.add(button4);
    inputs.add(button5);
    inputs.add(cbx);
    inputs.add(cby);
    inputs.add(col);
    top.add(gr,BorderLayout.CENTER);
    top.add(inputs,BorderLayout.WEST);
    getContentPane().add(BorderLayout.CENTER, top);
    setSize(500,300);//set window size
    //take care of actions
    public void actionPerformed(ActionEvent e) {
    String command = e.getActionCommand();
    if (command.equals("Quit")){
    System.exit(0);//terminate program
    else if (command.equals("Rectangle")){
    //add Rectangle to graph at
    //position x,y and with certain color
    gr.addRectangle(x,y,color);
    else if (command.equals("Circle")){
    gr.addCircle(x,y,color);
    else if (command.equals("Reset")){
    else if (command.equals("Triangle")){
    else if (command.equals("Ellipse")){
    else if (command.equals("cbx")){
    x=Integer.valueOf((String)((JComboBox)e.getSource()).getSelectedItem()).intValue();
    else if (command.equals("cby")){
    y=Integer.valueOf((String)((JComboBox)e.getSource()).getSelectedItem()).intValue();
    else if (command.equals("col")){
    String temp=(String)((JComboBox)e.getSource()).getSelectedItem();
    if (temp=="Red") color=Color.red;
    else if (temp=="Blue") color=Color.blue;
    else if (temp=="Green") color=Color.green;
    else if (temp=="pink") color=Color.pink;
    else if (temp=="lightGray") color=Color.lightGray;
    //main program
    public static void main(String [] args) {
    Frame appl = new Frame();
    appl.setVisible(true);
    Thanks in advance
    Marina

    Hi,
    You are very lucky that I'm currently boored. You should never tag a question as urgent. It might be urgent to you, but not to us who answer. And you should also use code formatting when you post code (see the formatting tips, or use the code-button).
    I made some changes to your Graph class. The most important thing is the abstract draw method that I added to the GeomFigur class.
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    public class Graph extends JPanel {
        LinkedList figures;
        public Graph() {
            setBackground(Color.white);
            figures = new LinkedList();
        int z;
        abstract class GeomFigur {
            protected Color color;
            public GeomFigur(Color color) {
                this.color = color;
            public abstract void move(Point p);
            public abstract void draw(Graphics g);
        abstract class Line extends GeomFigur {
            Point p1, p2;
            public Line(Color c, Point p1, Point p2) {
                super(c);
                this.p1 = new Point(p1);
                this.p2 = new Point(p2);
            public String toString() {
                return "Line from " + p1 + " to " + p2;
            public void move(Point dist) {
                p1.move(dist.x, dist.y);
                p2.move(dist.x, dist.y);
        class Rectangle extends Line {
            public Rectangle(Color c, Point p1, Point p2) {
                super(c, p1, p2);
            public String toString() {
                return "Rectangle from " + p1 + " to " + p2;
            public void draw(Graphics g) {
                System.out.println("Draw rectangle at " + p1 + " with color " + color);
                g.setColor(Color.black);
                g.drawRect(p1.x, p1.y, 20, 20);
                g.setColor(color);
                g.fillRect(p1.x, p1.y, 20, 20);
        class Circle extends GeomFigur {
            Point centre;
            int radius;
            public Circle(Color c, Point centre, int radius) {
                super(c);
                this.centre = new Point(centre);
                this.radius = radius;
            public String toString() {
                return "Circle, centre " + centre + ", radius " + radius;
            public void move(Point dist) {
                centre.move(dist.x, dist.y);
            public void draw(Graphics g) {
                System.out.println("Draw circle at " + centre + " with color " + color);
                g.setColor(Color.black);
                g.drawOval(centre.x, centre.y, 20, 20);
                g.setColor(color);
                g.fillOval(centre.x, centre.y, 20, 20);
        public void addRectangle(int x, int y, Color col) {
            System.out.println("x,y,col " + x + ":" + y + ":" + col);
            Rectangle r = new Rectangle(col, new Point(x, y), new Point(x + 20, y + 20));
            figures.addLast(r);
            repaint();
        public void addCircle(int x, int y, Color col) {
            System.out.println("x,y,col" + x + ":" + y + ":" + col);
            Circle c = new Circle(col, new Point(x, y), 1);
            figures.addLast(c);
            repaint();
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            for (int i = 0; i < figures.size(); i++) {
                GeomFigur drawable = (GeomFigur)figures.get(i);
                drawable.draw(g);
    }/Kaj

  • Help on Java to ASP page

    I have written a zip function that it's used on an ASP page. The java class has a main static function which is as follows:
    public static void main(String[] args) inside the main function I have calls to other functions which will perform the zipping of a directory. Moreover, since main is STATIC, i am forced to declared all of the other functions STATIC as well.
    How do I make reference to the main functions from ASP?
    Currently I have:
    Set objZip = GetObject("java:ZipDirectory") I've tried objZip.main "pathToDIrectory" , which does not work. I've also tried to move all of the functionalities of main into a new function (Start) , once I call start
    objZip.Start "pathToDIrectory"  I keep getting an error, Could it be that since the zip functions written recursively and the static declarations could cause the browser to give out errors.
    Please HELP .....
    Thanks
    Jorge

    You can execute a command line program from an ASP but you have to write a VB COM object to do it. At least that is the only way I was able to do it.
    I think that you may have to make your Java object a COM object in order to access it from ASP. I have heard that this can be done and you may even be doing it. But I have never seen it done nor done it myself.
    However, this post begs me to ask the question. Why are you using ASP and not JSP? I have not done a lot of JSP but I would think that this would be very very easy to do that way. If you have to use ASP, then why Java, why not use VB? VB and ASP are very easy to work together as are Java and JSP. If you have no reason to mix them, then don't.
    Stephan

  • XML, JAVA AND PL/SQL

    Hi,
    I tried to install the XML parser for PL/SQL but this never works... I am using Oacle 8.1.5 on a NT server with the JDK 1.2.1 ...
    I managed to load some of the *.jar archives (ClassGen, xmlparser, xmlplsql, xsu12)...
    but when i want to load things such as OracleXMLSQL, XSU111, XMLParserV2, OracleXSQL, ... I always get the message:
    ORA-29521 referenced name oracle/xml/* could not be found
    so what are the archives I have to install first?
    Thanx.

    I had the same problem. It took some searching, but I finally found the answer.
    You have the wrong version of Java. Oracle 8.1.5 does not work with JDK versions after 1.1.8. Download and install JDK 1.1.8 and make sure it is in the path. Then do a complete Java installation into your database using the initjava.sql file found in your ORACLE_HOME\javavm\install directory. To do this you have to be logged into the database as SYS. (This is mostly documented in the Oracle Java Developers manual which you can find in your Oracle documentation.)
    Watch the error messages closely. Since you already tried to install this stuff with the wrong version of the JDK, you will never get rid of all the errors unless you start with a fresh database. When the error messages only include packages installed by the XML extensions, you are done.
    Be sure you change the database user login ID and password (default scott/tiger) in the scripts to match your database.
    After you have successfully installed JDK 1.1.8 and successfully initialized Java in your database, then you can install/re-install the XML extensions.
    Good Luck,
    Eric
    P.S. You can get more help on installing and using the XML extensions over in the XML discussion area.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by jib:
    Hi,
    I tried to install the XML parser for PL/SQL but this never works... I am using Oacle 8.1.5 on a NT server with the JDK 1.2.1 ...
    I managed to load some of the *.jar archives (ClassGen, xmlparser, xmlplsql, xsu12)...
    but when i want to load things such as OracleXMLSQL, XSU111, XMLParserV2, OracleXSQL, ... I always get the message:
    ORA-29521 referenced name oracle/xml/* could not be found
    so what are the archives I have to install first?
    Thanx.<HR></BLOCKQUOTE>
    null

  • Help with Java and Regular Expression

    Hello,
    I have one line of Java and regular expression that I got from the web :
    String[] opt;
    opt = line.split("\\s+(?=([^\"]*\"[^\"]*\")*[^\"]*$)");
    If "line" contains :
    1 "Hello World"
    this code would give me :
    opt[0] : 1
    opt[1] : "Hello World"
    which is almost what I would like to do except for the double quotes. I wonder if someone could please help me change the regular expression so that it would return :
    opt[0] : 1
    opt[1] : Hello World
    Thank you and Best Regards,
    Chris

    It looks to me like this is a line from a space delimited file so you should use one of the free CSV parsers such as http://opencsv.sourceforge.net/ . These will handle the quotes properly even if a field actually contains a quote.

  • Need Help w/ Java and Mozilla on SuSE 8.2

    I am completely and totally new to Linux. Until not very long ago the only computer I ever worked with was MS. I'm running SuSE 8.2 Professional.
    I used (after much trial and error) the rpm program to remove Mozilla 1.2 (which is installed by default). This is a machine at home so I have root access and regular access. I downloaded Mozilla 1.3 and installed that without a problem. I download j2sdk 1.4.1.02 (I'm pretty sure those are the numbers). I followed the instruction on how to install java and it appears to have worked correctly. I don't know how to test but there is now a directory called j2sdk1.4.1_02 which has several files and directories inside of it (including jre). I also followed the instructions and installed the java web start program.
    Anyway, I've searched the forum for information that would explain how to make mozilla work on website that use java. Most of what I read was greek to me. But there was one that said I should copy the libjavaplugin_osi.so file into the mozilla plugins directory. I did that and when I looked at the "about plugins" page (from Help in Mozilla), it showed a lot of java files. But when I go to any pages that are using java, the page starts to load and then closes. This happened on about 6 different pages (all different web sites). So I think something went wrong. A friend had told me I'm going to have to make a "symlink" (which I don't know how to do). But he's on vacation and won't be back for 2 weeks.
    Can anyone help?
    Here are the directories where everything is stored. Oh, by the way, when I installed mozilla, java and javaws, I did all of it from the root account. If that was wrong, tell me and I'll fix it.
    mozilla is in:
    /usr/local/mozilla/
    java is in:
    /usr/local/java/j2sdk1.4.1_02/
    javaws is in:
    /usr/local/java/javaws/
    Again, as I'm sure you can tell, I'm lost, totally new to linux, mozilla and java. So if you can help, please explain as clearly as possible.
    Thanks in advance.

    Your friend is correct, instead of copying the .so file you should have made a symbolic link. To do that, first remove "libjavaplugin_oji.so" from "/usr/local/mozilla/plugins"; it's on the way. Then create the symlink with the "ln -s <source> <destination>" command, with your configuration it should be something like:
    ln -s /usr/local/java/j2sdk1.4.1_02/jre/plugin/i386/ns610/libjavaplugin_oji.so
    /usr/local/mozilla/plugins/
    (you need to be root to do that)
    To set up web start in mozilla, it might be easiest to go to the demo page and try to launch one of the applications:
    http://java.sun.com/products/javawebstart/demos-nojavascript.html
    When the "what should mozilla do with this file" dialog pops up, click on the "Advanced" button and make Mozilla handle it with the javaws application. Optionally remove the cross in "Always ask before opening .."

  • Need help for java and linux

    Hi, guys,
    I am being involved in a project.My current task is to build an interface using java. This interface will obtain some information from a linux-based software called NistNet, which is done by C and has GUI as well. My question is, can I use this java-based interface to obtain some information that is typed in this NistNet'GUI? If I can, how can I do that?
    Any hint available?
    Thanks!

    You can bridge between Java and C using the "Java Native Interface" (JNI). There used to be a good tutorial on this site but it vanished for no apparent reason in some resent update, so try a websearch.
    See also
    http://java.sun.com/j2se/1.4/docs/guide/jni/
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/

  • Need a little help understanding java and /etc/profile.d/***

    A few days ago I installed jre-6u10-1 and jdk-6u10-1 via pacman on my desktop machine; for the web plugin.
    The packages installed in /opt/java/...
    I later installed jedit, via pacman.  It runs fine as it (/usr/bin/jedit) is hardcoded to look for java in /opt/java/...
    Today, I installed jedit (pacman -S jedit) on my laptop which did not have any java installed.
    Pacman automatically installed openjdk6-jre-6u10-1 as a prerequisite.
    Openjdk installs to /usr/lib/jvm/..., therefore jedit fails as /opt/java... is non-existent.
    I suppose Sun's java and the opensource version are installed in different locations to keep from overwriting each other.
    I could easily edit /usr/bin/jedit to point to the openjdk location and it would work.
    But I'm a little uncertain of the following three files:
    Sun's java installs /etc/profile.d/jre.sh and /etc/profile.d/jdk.sh
    which do the following (respectively):
    export PATH=$PATH:/opt/java/jre/bin
    if [ ! -f /etc/profile.d/jdk.sh ]; then
    export JAVA_HOME=/opt/java/jre
    fi
    and
    export J2SDKDIR=/opt/java
    export PATH=$PATH:/opt/java/bin
    export JAVA_HOME=/opt/java
    The opensource java package installs /etc/profile/openjdk6.sh
    which does the following:
    export J2SDKDIR=/usr/lib/jvm/java-1.6.0-openjdk
    export J2REDIR=$J2SDKDIR/jre
    export JAVAHOME=/usr/lib/jvm/java-1.6.0-openjdk
    #export CLASSPATH="${CLASSPATH:+$CLASSPATH:}$J2SDKDIR/lib:$J2REDIR/lib"
    So I am left with a few options:
    1.  edit /usr/bin/jedit to look in the opensource location
    2.  edit /usr/bin/jedit to use the $J2SDKDIR variable when looking for java
    3.  update the $PATH via /etc/profile.d/openjdk6.sh to include java's location
    I think all three methods would work, but I have limited experience with java and would like some input as to which proposed solution is the best going forward.
    What methods are other java apps using to find java?
    Thanks
    (edit: more descriptive title)
    Last edited by cjpembo (2008-11-11 04:24:47)

    I think the best option would be to ask the maintainer to modify the jedit-bin file, and have it launch
    $J2SDKDIR/bin/jre/java cp $CP -Djedit.home="/usr/share/jedit" -mx${JAVA_HEAP_SIZE}m org.gjt.sp.jedit.jEdit $@
    That way, it should work with both java implementations (completely untested, btw.)

  • Urgent Help with Date and then email in ASP

    Hii,
    USING ASP AND ACCESS
    I am implementing a classified section for my website and I
    am displaying
    everything successfully.
    When the user posts the classified he selects how many days
    he wants his
    POST like 10 days, 20 days or 30 days and i can successfully
    show the posts
    So if the user posts on says 1st of July 2006 and selects 10
    days for his
    post to be showed on my website
    THEN
    8th July 2006 an email shud go to him saying if he wants to
    keep his POST
    for another 10 days, 20 days or 30 days with 3 links
    and IF YES the 1st july 2006 date must be changed to
    Date of Post + Number of days selected initially + Number of
    days selected.
    I am using two columsn in the DB for this date thing one is
    the strPostDate
    and strAddDate
    So basically the number of days selected for the post to be
    shown on the
    website keeps adding up each time the user clicks on the link
    for 10 days,
    20 days or 30 days with 3 links
    please help need it badly :-)

    I have to disagree with my colleages above - this isn't that
    hard at all. I have done it a number of times successfully. It does
    depend on a "trick", but who cares as long as it works.
    Basically, the "trick" says that your site will receive a
    visit once in a while! It better, or why have the site!
    In ASP, use the global.asa file. In the "Session start"
    section of global.asa, which is fired off every time a new comer
    arrives, you have an opportunity to:
    1. check if it's ok to check who needs an email (in other
    words, you don't want to be checking EVERY time someone comines on
    board every last listing on your site. So what i would do is allow
    it to do the full check once daily, say after midnight.
    2. If its ok to check who needs an email, do so, and send the
    emails out.
    3. After sending out emails, fix it so you will not be
    resending uptil teh next time window. You could also set "flags"
    for any lister where you sent an email 1st round email has been
    sent.
    The above is one way.
    Sometimes i do the very same thing, but i simply tie the
    checking routine into the home page.
    Both schemes work as long as you have a single visitor once
    in a while. if you never had a visitor to teh site, not even one,
    then the emails would never be sent. But as i said if you go days
    without a visit, better start looking for a new vocation!
    www.brunswickdowntown.com is a site i did that has a
    sign-up-to-stay informed email system, its been running for a year
    just fine, all automatically, using the method of #1 (but for
    asp.net, same difference!)
    Rick

  • Please HELP, Java and ASP Error

    I�m trying to trigger an asp script from an applet, the server response with a string. But it won�t work(IOException). I�m not certain that this is possible to do from an applet. Anyway here is the java code:
    public void init() {
    try{
    URL test = new URL("http://localhost/hamta.asp");
    URLConnection yc = test.openConnection();
    BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
    while ((inputLine = in.readLine()) != null){
    Message = in.readLine();
    in.close();}}
    catch(IOException e) {Message = "Error";}
    What is wrong?

    Why dont anybody answer this question?

  • Urgent help required "java.lang.Exception: Connection reset"

    Hi Everyone,
    I am getting error message when I access cluster database from grid console.
    Error      java.lang.Exception: Connection reset
    I am unable to create jobs or do other admin stuff on the database, I have searched alot , restarted the repository database, restarted the emgc components, even the agents but of no use. The agent status showing OK as under.
    Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    Agent Version : 10.2.0.3.0
    OMS Version : 10.2.0.3.0
    Protocol Version : 10.2.0.2.0
    Agent Home : /app/oracle/agent/agent10g/rac2.tawaf
    Agent binaries : /app/oracle/agent/agent10g
    Agent Process ID : 19646
    Parent Process ID : 19629
    Agent URL : https://rac2.tawaf:3872/emd/main
    Repository URL : https://tawafapp.tawaf:1159/em/upload
    Started at : 2009-04-02 11:26:10
    Started by user : oracle
    Last Reload : 2009-04-02 11:26:10
    Last successful upload : 2009-04-02 12:27:42
    Total Megabytes of XML files uploaded so far : 3.48
    Number of XML files pending upload : 0
    Size of XML files pending upload(MB) : 0.00
    Available disk space on upload filesystem : 86.22%
    Last successful heartbeat to OMS : 2009-04-02 12:30:20
    Agent is Running and Ready
    The error reported in emoms.log is as under.
    2009-04-02 12:37:25,073 [MetricCollector:RACHOMETAB_THREAD600:60] ERROR rt.RacMetricCollectorTarget _getAllData.184 - oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    at oracle.sysman.emSDK.emd.comm.EMDClient.getResponseForRequest(EMDClient.java:1543)
    at oracle.sysman.emSDK.emd.comm.EMDClient.getMetrics(EMDClient.java:915)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab._getAllData(RacHomeTab.java:180)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab.getData(RacHomeTab.java:91)
    at oracle.sysman.emo.perf.metric.eng.MetricCached.collectCachedData(MetricCached.java:404)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread._collectCachedData(MetricCollectorThread.java:596)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread.run(MetricCollectorThread.java:320)
    at java.lang.Thread.run(Thread.java:534)
    can anyone help me as its very urgent for me to clear this error.
    thanks

    this error is also reported against the cluster database.
         Thread: SeverityLoad https://rac2.tawaf:3872/emd/main java.sql.SQLException: ORA-20613: Severity for unknown target. (target guid = 1938FC9C72DDAC01E0C0F268FFC5F6AD) ORA-06512: at "SYSMAN.EM_VIOLATION_CHECKS", line 174 ORA-04088: error during execution of trigger 'SYSMAN.EM_VIOLATION_CHECKS' Error occured at line : 43, File name:Severity

  • *URGENT HELP REQUIRED* java.sql.SQLException: Invalid Oracle URL specifed

    Hi all,
    In the middle of the last week for my final year project and having to convert to an Oracle database due to compatibility problems with university Tomcat Server and MS Access. I'm having trouble connecting to the Oracle database and would appreciate some help please.
    Running on Windows 98 in the lab here, and the Oracle 9i, release 9.2.0.2.0, J2SDK1.4.0, Classes12.zip installed OK.
    Code for connection looks like this inside the constructor of my class:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    cardSaleConnexion = DriverManager.getConnection("jdbc:oracle:[email protected]:1521:sid","user_name","pwdt");
    System.out.println("Connection Successful ");
    And I'm getting the following error when calling the constructor in a driver program:
    java.sql.SQLException: Invalid Oracle URL specified
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:188)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:171)
         at CardSale.<init>(CardSale.java:30)
         at Driver.main(Driver.java:11)
    Exception in thread "main"
    Please reply on a very urgent basis.
    Kind regards,
    Peter

    Try ojdbc14.jar as the JDBC driver instead of classes12.zip.
    Refer:
    http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
    http://docs.sun.com/source/817-5603-10/index.html
    Database Driver
    This section describes the known database driver issues and associated solutions.
    ID      Summary
    4700531      On Solaris, an ORACLE JDBC driver error occurs.
         This new Java Database Connectivity (JDBC) driver is for Oracle (R) working with JDK1.4. The problem is caused by a combination of the Oracle 9.1 database and ojdbc14.jar. Applying the patch will fix the problem on Solaris 32-bit machine, running an Oracle 9.0.1.3 database.
         Solution
         Obtain and apply the patch to your server from the Oracle Web site for Bug 2199718. Perform the following steps:
         1.��Go to the Oracle web site.
         2.��Click the 'patches' button.
         3.��Type 2199718 in the patch number field.
         4.��Click the 32-bit Solaris OS patch.Go to Metalink.oracle.com.
         5.��Click patches.
         6.��Under patch number, enter 2199718.
         7.��Click the 32 bit Solaris OS patch.
    4707531      On Solaris, accessing an Oracle 9.1 database with an Oracle 9.2 Client may cause data corruption.
         If you use an Oracle (R) 9.2 client to access an Oracle 9.1 database, data corruption might occur when a number column follows a timestamp column.
         The problem might be caused by using the ojdbc14.jar file with an Oracle 9.1 database. Applying the patch might assist in addressing the situation on Solaris 32-bit machines, running an Oracle 9.1 database. This JDBC driver is for Oracle working with JDK1.4.
         Solution
         Obtain the patch that Oracle might make available from the Oracle web site for Bug 2199718 and apply it to your server.
    Regards,
    Pankaj D.

  • Need urgent help on Java Bean

    Can some one help me to find a place for step by step documentation on how to create java bean and load an image thru java Bean on a form. I'm not loading from the same server it must be loaded from a different server.
    Very urgent please. I really appreciate any help.
    Thanks in advance.

    Hi,
    for the first part of your question: start Forms Builder, press F1 and the seach for Bean Area. The online help also comes with code examples
    for the second part, this URL will give you a head start: http://www.particle.kth.se/~lindsey/JavaCourse/Book/Java/Chapter11/loadingImages.html
    Frank

  • I NEED URGENT HELP IN JDEVELOPER AND OID

    Hello.
    Please I need to know about some tutorial that this explains step to step a code in JDeveloper that obtains and send data of the Oracle Internet Directory (OID).
    The only code source that I found is the Grocery Store but I need to know more, from the beginning.
    Please I need HELP, it is really URGENT.

    Hi,
    Try http://java.sun.com/products/jndi/reference/codesamples/index.html. I think Oracle is not using their own JNDI wrapper any more and just using the regular API.
    Good luck, Hernando
    hjbconsulting at comcast dot net

  • Need some urgent help with Java code...

    Hello
    i am taking a java class..beginner..and i am a dud at programming...
    had a couple of questions ..how do make a program ignore negative
    integer values,make it terminate when zero is entered instead of a number ,how should i calculate maximum minimum of integers..please help me..
    thanks
    damini

    You got some good advice from Java_Jay.
    Here is a snippet I keep handy for console input and output. It doesn't do your home work but gives you a working example of getting numbers from stdin:
    import java.io.*;
    public class DemoKeyboardInput {
         public static void main(String[] args) throws IOException {
              // open keyboard for input (call it 'stdin')
              BufferedReader stdin = new BufferedReader(new InputStreamReader(
                        System.in), 1);
              // get input from the keyboard
              System.out.print("Please enter your name: ");
              String name = stdin.readLine();
              System.out.print("Please enter your age: ");
              String s1 = stdin.readLine();
              System.out.print("Please enter the radius of a circle: ");
              String s2 = stdin.readLine();
              // perform conversions on input strings
              int age = Integer.parseInt(s1); // string to int
              double radius = Double.parseDouble(s2); // string to double
              // operate on data
              age++; // increment age
              double area = Math.PI * radius * radius; // compute circle area
              // output results
              System.out.println("Hello " + name);
              System.out.println("On your next birthday, you will be " + age
                        + " years old");
              System.out.println("Area of circle is " + area);
    }

Maybe you are looking for

  • MS word opened with pages Black marks

    When I open a Microsoft word document in pages I get a black square with a circle in it at the end of some lines. How can I remove them ?(Delete doesn't work. The cursor dosen't recognize that they are there, but the printer does.) Is there a prefere

  • BB curve headset

    I have a problem with my BB. My BB curve 8530 always wants me to use headset to make n receive calls so that I can hear the person properly, And even if my headset are nt inserted in my fone it kips on cuts de convesation.. On de screen it the headse

  • Mission control annimation

    On MBP - I have no mission control "annimation" (like the dock annimation) when I mouse-over the desktops at the top... Is anybody else seeimg this little glitch?

  • CAML-Query external List

    Hi, I am just wondering if there is a limitation on using the <IN>-tag in a CAML-Query on external lists. Whenever I try to use it, I get this error: Original error: Microsoft.SharePoint.SPException: Search could not be performed. The underlying CAML

  • Ipod failing to sync old podcasts that aren't there

    I have a 30GB video iPod. Trying and failing to sync with iTunes on MacBook Pro. First of all it says some items in the iTunes library including xxxx were not copied because they could not be found. It then gives a list of OLD podcasts that I can't f