HELP - Problem in running a servlet

I have developed an application of internet payment gateway(IPG). The application architecture is a cardholder visits a shoping cart and from the payment page he fill out his payment information such as credit card number, amout etc. on submit this payment form frowards a request to a merchant payment servlet that recieve the request, perform some action on it and forwards a request to the IPG. The IPG servlet receives the merchant servlet request and forward to a switch. Switch performs tranasction and replies back to the IPG servlet and then IPG servlet will response back to the merchant servlet about the transaction response.
The IPG is connected each time with switch on specific IP and Port which is predefined in switch for this IPG and this is only 1 IP and 1 port assigned to this IPG. When IPG servlet completes the transaction request now it is disconnected with Switch.
My issue is when 2 or more transaction request are generated at the same time the IPG servlet processes each request separate in a servlet (as i understand) but due to only 1 IP and Port is assigned to the IPG, the IPG can connect only one time with the switch and if IPG is connected then other requests can not processed by IPG because second and so on request are unable to connect with switch on the same IP and Port when for the first reuest IPG is already connected on this IP and Port.
I have successfully implemented this modal in a desktop application which can handles multiple request on the same IP and Port at a time.
Is there any possibility in servlets that IPG servlet will connects only one time with switch on IP and Port when i started the web server and all request in IPG uses the same channel to forward request to switch and recieve response from the switch.
I will be very very thankfull if anyone will solve my problem because my 3 clients are waiting for my application and i have in trouble to solve the problem.
IT IS A HUMBLE REQUEST AND HOPE YOU WILL REPLY AS SOON AS POSSIBLE.
Thanks
Wajid Hussain

Your piece code seems fine but just make sure that your switch is as below
Have ReaderThread class implementing Runnable
In your main program create a server socket (in main method or whereever)
ServerSocket listener = new ServerSocket(Integer.parseInt(host.getARValuePort()));now
while(true){
  Socket socket = listener.accept();
  // after this instantiate ReaderThread as below
  ReaderThread theThread = new ReaderThread (socket);
// Start the thread with this ReaderThread object as below
       Thread t = new Thread(theThread);
        t.start();
}Now ReaderThread is as below
class ReaderThread implements Runnable{
         private Socket server;
             ReaderThread (Socket server) {
                  this.server=server;
        public void run () {
            // Here play around with your socket to read write or what ever and close.
            DataInputStream in = new DataInputStream (server.getInputStream());
            PrintStream out = new PrintStream(server.getOutputStream());              
}Hope the above steps should solve your problem.

Similar Messages

  • Problems in running the servlet in Oracle JDeveloper

    I have problems in running servlets(http servlet) in oracle jDeveloper.
    Heres the code
    package view;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head><title>Servlet1</title></head>");
    out.println("<body>");
    out.println("<p>The servlet has received a GET. This is the reply.</p>");
    out.println("</body></html>");
    out.close();
    When Im about to run this code in the IDE it throws a fatal error
    Error initializing server: At least one valid code-source or import-shared-library element is required for shared-library "global.libraries" in /D:/jdevstudio10132/jdev/system/oracle.j2ee.10.1.3.40.66/embedded-oc4j/config/server.xml.
    07/09/12 21:37:43 Fatal error: server exiting
    does anyone know here whats the problem???

    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head><title>Servlet1</title></head>");
    out.println("<body>");
    out.println("
    The servlet has received a GET. This is the reply.
    "); out.println("</body></html>");
    out.close();
    When Im about to run this code in the IDE it throws a fatal error Error initializing server: At least one valid code-source or import-shared-library element is required for shared-library "global.libraries" in /D:/jdevstudio10132/jdev/system/oracle.j2ee.10.1.3.40.66/embedded-oc4j/config/server.xml. 07/09/12 21:37:43
    Fatal error: server exiting does anyone know here whats the problem???

  • Problem in running the servlet

    I have compiled the servlet and put the class file HelloWorld.class inside
    $CATALINA_HOME$/webapps/ROOT/WEB-INF/classes/
    directory, under tomcat6.0.18
    and also mapped servlet in
    $CATALINA_HOME$/webapps/ROOT/WEB-INF/web.xml, as below
    web.xml:
        <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You under the Apache License, Version 2.0
      (the "License"); you may not use this file except in compliance with
      the License.  You may obtain a copy of the License at
          http://www.apache.org/licenses/LICENSE-2.0
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    -->
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
       version="2.5">
      <display-name>Welcome to Tomcat</display-name>
      <description>
         Welcome to Tomcat
      </description>
      <servlet>
        <servlet-name>HelloWorld</servlet-name>
        <servlet-class>HelloWorld</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>HelloWorld</servlet-name>
        <url-pattern>/HelloWorld</url-pattern>
      </servlet-mapping>
    </web-app>and run the servlet using this url......*.http://localhost/HelloWorld*
    but I got following error code under tomcat 6.0.18
      type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error allocating a servlet instance
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         java.lang.Thread.run(Thread.java:619)
    root cause
    java.lang.NoClassDefFoundError: HelloWorld (wrong name: hall/HelloWorld)
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         java.lang.Thread.run(Thread.java:619)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.is there something I did wrong?
    Edited by: san_4u on Mar 16, 2009 1:20 AM

    root cause
    java.lang.NoClassDefFoundError: HelloWorld (wrong name: hall/HelloWorld)Is your servlet contains first line as package hall;If it is there,remove it from the servlet code. And run your program.
    If you want to keep it, then make a folder named hall in classes folder and put your HelloWorld.class there. Also change <servlet-class> as
    <servlet>
        <servlet-name>HelloWorld</servlet-name>
        <servlet-class>hall.HelloWorld</servlet-class>
      </servlet>

  • Problem with running multiple servlet in same webapplication with tomcat 3

    Hi all,
    I am using Tomcat 3.0 as webserver with jdk1.3, Servlet 2.0,
    Templates for html file and oracle 8i on UNIX platform.
    I have problem with multiple servlet running same webapplication.
    There are two servlet used in my application. 1) GenServlet.class
                   and 2) ServletForPrinting.class
    All of my pages go through GenServlet.class which reads some property files
    and add header and footer in all pages.
    I want reports without header & footer that is not possible through GenServlet in my application.
    So I have used another servlet called ServletForPrinting --- just for reading html file.
    It is as follow:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ServletForPrinting extends HttpServlet {
    public void service (HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
    // set content-type header before accessing the Writer
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    File f1 = null;
    String report = null;
    String path = request.getPathInfo();
    try{
    String p = "/var/home/latif/proj/webapps/WEB-INF/classes" + path;
    System.out.println(p);
    f1 = new File(p);
    p = null;
    if (f1.exists()) {
    FileReader fr = new FileReader(f1);
    BufferedReader br = new BufferedReader(fr);
    report = new String();
    while ((report = br.readLine()) != null) {
    out.println(report);
    }catch(Exception e) {
    out.close();
    report = null;
    path = null;
    f1 = null;
    } // end class
    It works fine and display report properly.
    But now Problem is that if report is refreshed many times subsequently,
    WebServer will not take any new change in any of java file used in web-application.
    It works with the previous class only and not with updated one.
    Then I need to touch it. As soon as I touch it, webserver will take updated class file.
    Anybody has any idea regarding these situation?
    Is there any bug in my ServletForPrinting.java ?
    Any solution ????? Please suggest me.
    Suggestion from all are invited. That will help me a lot.
    Thanks in advance
    Deepalee.

    Llisas wrote:
    I solved the problem, I just had to wire the blocks in a sequential way (I still don't know why, but it works).
    Feel free to delete this topic.
    I would strongly suggest at least reading this tutorial to give you an idea of why your fix worked (or maybe only appeared to work).  Myself, I never just throw up my hands and say, "Whatever," and wash my hands of the situation without trying my best to understand just what fixed it.  Guranteed you'll run into the same/similar problem and this time your fix won't work.
    Please do yourself a favor and try to understand why it is working now, and save yourself (or more likely, the next poor dev to work on this project) some heartache.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • HELP - problem in running SSLSocket client/server application

    Hi,
    I want to create a SSLSocket based client/server application for this i have used EchoServer.Java and EchoClient.Java files. Both files are successfully compiled and when i ran EchoServer it throws an exception "Server certificate not found".
    I want to make a complete auto-controlled client/server application which will automatically gets certificate and all configuration itself from program because i will use both client and server application in as a servlet part.
    I did as per following instructions:
    -Create a keystore to hold the private and public keys for the server. e.g.
    keytool -genkey -keystore mykeystore -alias "myalias" -keypass "mysecret"
    -Export the X509 certificate from this store
    keytool -export -alias "myalias" -keystore mykeystore -file mycertfile.cer
    -Import this into a trustStore for the client
    keytool -import -alias "myalias" -keystore mytruststore -file mycertfile.cer
    -Run the server using the keystore
    java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="mysecret" EchoServer
    -Run the client using the truststore
    java -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="mysecret" EchoClient localhost
    EchoServer.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.Socket;
    import javax.net.ssl.SSLServerSocket;
    import javax.net.ssl.SSLServerSocketFactory;
    public class EchoServer {
    public static int MYECHOPORT = 8189;
    public static void main(String argv[]) {
    try {
    SSLServerSocketFactory factory =
    (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
    SSLServerSocket sslSocket =
    (SSLServerSocket) factory.createServerSocket(MYECHOPORT);
    while (true) {
    Socket incoming = sslSocket.accept();
    new SocketHandler(incoming).start();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(30);
    class SocketHandler extends Thread {
    Socket incoming;
    SocketHandler(Socket incoming) {
    this.incoming = incoming;
    public void run() {
    try {
    BufferedReader reader =
    new BufferedReader(new InputStreamReader(incoming.getInputStream()));
    PrintStream out =
    new PrintStream(incoming.getOutputStream());
    boolean done = false;
    while (!done) {
    String str = reader.readLine();
    if (str == null)
    done = true;
    else {
    System.out.println("Read from client: " + str);
    out.println("Echo: " + str);
    if (str.trim().equals("BYE"))
    done = true;
    incoming.close();
    } catch (IOException e) {
    e.printStackTrace();
    EchoClient.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    public class EchoClient {
    public EchoClient(){}
    public static final int MYECHOPORT = 8189;
    public static void main(String[] args) {
    /*if (args.length != 1) {
    System.err.println("Usage: Client address");
    System.exit(1);
    String sAddress="localhost";
    InetAddress address = null;
    try {
    //address = InetAddress.getByName(args[0]);
    address = InetAddress.getByName(sAddress);
    } catch (UnknownHostException e) {
    e.printStackTrace();
    System.exit(2);
    Socket sock = null;
    try {
    sock = new Socket(address, MYECHOPORT);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    SSLSocketFactory factory =
    (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket sslSocket = null;
    try {
    sslSocket =
    (SSLSocket) factory.createSocket(sock, args[0], MYECHOPORT, true);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    BufferedReader reader = null;
    PrintStream out = null;
    try {
    reader = new BufferedReader(new InputStreamReader(sslSocket.getInputStream()));
    out = new PrintStream(sslSocket.getOutputStream());
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    String line = null;
    try {
    // Just send a goodbye message, for testing
    out.println("BYE");
    line = reader.readLine();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    System.out.println(line);
    System.exit(0);
    } // Client
    Can anybody will please help me to solve my problem i am using JDK1.4.2_07
    Thanks in advance.

    Hi,
    I want to create a SSLSocket based client/server application for this i have used EchoServer.Java and EchoClient.Java files. Both files are successfully compiled and when i ran EchoServer it throws an exception "Server certificate not found".
    I want to make a complete auto-controlled client/server application which will automatically gets certificate and all configuration itself from program because i will use both client and server application in as a servlet part.
    I did as per following instructions:
    -Create a keystore to hold the private and public keys for the server. e.g.
    keytool -genkey -keystore mykeystore -alias "myalias" -keypass "mysecret"
    -Export the X509 certificate from this store
    keytool -export -alias "myalias" -keystore mykeystore -file mycertfile.cer
    -Import this into a trustStore for the client
    keytool -import -alias "myalias" -keystore mytruststore -file mycertfile.cer
    -Run the server using the keystore
    java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="mysecret" EchoServer
    -Run the client using the truststore
    java -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="mysecret" EchoClient localhost
    EchoServer.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.Socket;
    import javax.net.ssl.SSLServerSocket;
    import javax.net.ssl.SSLServerSocketFactory;
    public class EchoServer {
    public static int MYECHOPORT = 8189;
    public static void main(String argv[]) {
    try {
    SSLServerSocketFactory factory =
    (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
    SSLServerSocket sslSocket =
    (SSLServerSocket) factory.createServerSocket(MYECHOPORT);
    while (true) {
    Socket incoming = sslSocket.accept();
    new SocketHandler(incoming).start();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(30);
    class SocketHandler extends Thread {
    Socket incoming;
    SocketHandler(Socket incoming) {
    this.incoming = incoming;
    public void run() {
    try {
    BufferedReader reader =
    new BufferedReader(new InputStreamReader(incoming.getInputStream()));
    PrintStream out =
    new PrintStream(incoming.getOutputStream());
    boolean done = false;
    while (!done) {
    String str = reader.readLine();
    if (str == null)
    done = true;
    else {
    System.out.println("Read from client: " + str);
    out.println("Echo: " + str);
    if (str.trim().equals("BYE"))
    done = true;
    incoming.close();
    } catch (IOException e) {
    e.printStackTrace();
    EchoClient.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    public class EchoClient {
    public EchoClient(){}
    public static final int MYECHOPORT = 8189;
    public static void main(String[] args) {
    /*if (args.length != 1) {
    System.err.println("Usage: Client address");
    System.exit(1);
    String sAddress="localhost";
    InetAddress address = null;
    try {
    //address = InetAddress.getByName(args[0]);
    address = InetAddress.getByName(sAddress);
    } catch (UnknownHostException e) {
    e.printStackTrace();
    System.exit(2);
    Socket sock = null;
    try {
    sock = new Socket(address, MYECHOPORT);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    SSLSocketFactory factory =
    (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket sslSocket = null;
    try {
    sslSocket =
    (SSLSocket) factory.createSocket(sock, args[0], MYECHOPORT, true);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    BufferedReader reader = null;
    PrintStream out = null;
    try {
    reader = new BufferedReader(new InputStreamReader(sslSocket.getInputStream()));
    out = new PrintStream(sslSocket.getOutputStream());
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    String line = null;
    try {
    // Just send a goodbye message, for testing
    out.println("BYE");
    line = reader.readLine();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    System.out.println(line);
    System.exit(0);
    } // Client
    Can anybody will please help me to solve my problem i am using JDK1.4.2_07
    Thanks in advance.

  • PLEASE HELP Can't run my servlet url-pattern with Tomcat

    Hi I'm trying to run servlet with Tomcat.
    I have don the servlet with tomcat ide abd its runnig ok with Forte with the internal Tomcat
    When I'm runing it with external Tomacat its not running at the url that I have given in the web.xml
    web.xml file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>ClaimsServlet</servlet-name>
    <servlet-class>ild.claims.ClaimsServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>ild.claims.LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ClaimsServlet</servlet-name>
    <url-pattern>/ild/claims/claims</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/ild/claims/LoginServlet</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    90
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>
    default.jsp
    </welcome-file>
    <welcome-file>
    index.html
    </welcome-file>
    <welcome-file>
    index.htm
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if I runnig the url: /ild/servlet/ild/claims/ClaimsServlet
    its running
    but //ild/claims/claims
    I got: The requested resource (/claims/claims) is not available.
    Thanks for help
    Snir

    Do you have to use <url-pattern>/ild/claims/claims</url-pattern>
    or you can use <url-pattern>/claims</url-pattern> ?

  • Help: Problem in running a simple EJB client

    Hi All,
    I have just started learning EJB and I am facing an issue in running a client for the EJB I developed (a "Hello World" EJB)
    I have deployed my application in Sun's reference implementation of j2ee server. I have the following client code through which I intend to access EJB methods
    // EJB client code in main()
    Context ctx = new InitialContext();
    Object hwobj = ctx.lookup("HelloWorldApp");
    HelloWorldHome hworldHome = (HelloWorldHome)
    PortableRemoteObject.narrow(hwobj,HelloWorldHome.class); // exception here
    HelloWorld hworld = hworldHome.create();
    String msg = hworld.sayHelloWorld();
    System.out.println(msg);
    When I am running my client I am getting the following exception. Can anyone tell me why ?
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    at HelloWorldClient.main(HelloWorldClient.java:13)
    Thanks
    Ratheesh

    * I found the solution for this . Add j2ee.jar and Client jar returned by deploytool [ if we check return client jar ] to classpath when running client .
    * Then I got CORBA_NO_PERMISSION error . After searching in forum , I found the solution. Posting
    Forum Home > Enterprise JavaBeans
    Topic: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Welcome ratheeshpai!
    Search Forum
    Not watching this topic.
    This topic has 4 replies on 1 page (Most recent message: Nov 19, 2002 7:59 AM)
    [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: NicholasHsiao Oct 28, 2001 5:51 AM
    Hi,
    I was trying to deploy one simple session bean into J2EE RI Server. It works fine. And I wrote one client to access this session bean, it show me
    java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
    org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
    Context ic = null;
    try
    ic = new InitialContext();
    catch(Exception e)
    System.out.println("1: "+e.toString());
    This exception is happend when I try to lookup the jndi name
    This error message is happend only on J2EE 1.3 (1.3_01) . If I downgrade to J2EE 1.3Beta or even 1.2, everything would be okay. Any one know how to solve such problem ??
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: cdunn5
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Oct 31, 2001 10:04 PM
    Reply 1 of 4
    hi,
    I don't know the solution but I have the exact same problem. I see your message was posted in October, have you found any solutions yet?
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: scottiep
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Nov 22, 2001 11:21 AM
    Reply 2 of 4
    Da:Frederik Hansen ([email protected])
    Message 2 in thread
    Soggetto:Re: J2EE - NO_PERMISSION
    Newsgroups:dk.edb.programmering.java
    View this article only
    Data:2001-11-10 03:32:12 PST
    For at svare p� mit eget sp�rgsm�l: Access and Security Issues Q1: Some applications that ran under J2EE SDK 1.3
    beta 2 stop running under the 1.3 FCS release with the
    following message: java.rmi.AccessException: CORBA
    NO_PERMISSION 0 No. Why does this happen and what
    can be done about it? When your application ran under the 1.3 beta 2
    version of the reference implementation (RI), security permissions may
    not have
    been checked. For example, the beta 2 RI allowed
    calls to enterprise beans that required username-password permission,
    even
    when the client provided no username-password
    information. With 1.3 FCS release, the J2EE SDK became strict
    about checking adherence to the security policies of J2EE components. How can you make your application run under the
    FCS release? 1.If you don't want security checks, do the
    following: Use the deploytool to build a deployment
    descriptor that does not require a strict security policy: Under the Security screen of the EJB wizard
    or the Security tab of the EJB inspector in deploytool, click
    "Deployment
    Settings..". Under the box "Client
    Authentication", make sure "Support Client Choice" is checked instead of
    "Certificate"
    or "Password". 2.To require the application pass security
    checks to run, do the following: When an enterprise bean specifies
    "Certificate" or "Password" as the method of Client Authentication, use
    a J2EE
    application client, instead of a stand-alone
    Java application, to access the bean. You will need to login as a valid
    J2EE
    user.
    By : scottiep
    Thanks
    Ratheesh

  • HELP - problem in running

    I am using JBuilder 7. and have set all paths including library J2SDK1.4.2.
    I have complied a java project which include swing components.
    This project was previously compiled and run many time successfully. But few days i did not run on my pc.
    I have tested this project on my friends pc and there it ran fine.
    I have tested a simple 'Hello World' program on my pc and it compiled and ran fine. But my project did not run.
    I reinstalled jdk1.4.2 and jre1.4.2 many times but problem still exists.
    My project compiled successfully but on run it gives the error in a message box.
    'Java Virial Machine Launcher. Fatal Execption occured. Program will exit'
    and shows the following error in message window.
    java.lang.SecurityException: no manifiest section for signature file entry com/microsoft/jdbc/vprt/SSLexTableRow.class
         at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:260)
         at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:172)
         at java.util.jar.JarVerifier.processEntry(JarVerifier.java:239)
         at java.util.jar.JarVerifier.update(JarVerifier.java:194)
         at java.util.jar.JarFile.initializeVerifier(JarFile.java:300)
         at java.util.jar.JarFile.getInputStream(JarFile.java:362)
         at sun.misc.URLClassPath$5.getInputStream(URLClassPath.java:616)
         at sun.misc.Resource.getBytes(Resource.java:57)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at login.LoginFrame.<init>(LoginFrame.java:54)
         at login.LoginApplication.<init>(LoginApplication.java:11)
         at login.LoginApplication.main(LoginApplication.java:26)

    I am guessing, based a few non-english Google hits;
    the file mssqlserver.jar (*) may be corrupt?
    (*) where com/microsoft/jdbc/vprt/SSLexTableRow.class resides?

  • How to run a servlet in tomcat 5.5

    Hi,iam new to servlets,please help me regarding running a servlet in tomcat 5.5,
    I just want an example servlet to run first,
    the below is the code for the same :-
    //ExampleServlet.java
    package sig;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ExampleServlet extends HttpServlet {
         public void init(ServletConfig config) throws ServletException{
              super.init(config);
         public void service(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException{
              PrintWriter out = res.getWriter();
              out.println("<HTML>");
              out.println("<BODY>");
              out.println("<p>Hello World</p>");
              out.println("</BODY>");
              out.println("</HTML>");
    I have created a new folder named "SignatureServlet" under the "webapps" folder of tomcat and have created a "WEB-1NF" folder under it,
    again i have kept my "ExampleServlet.class" inside the "WEB-1NF->classes" folder and the entries for my servlet in the "web.xml" file are:-
    <servlet>
    <servlet-name>ExampleServlet</servlet-name>
    <servlet-class>ExampleServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ExampleServlet</servlet-name>
    <url-pattern>/ExampleServlet</url-pattern>
    </servlet-mapping>
    still when iam trying to access the servlet using "http://localhost:8080/ExampleServlet/"
    iam getting a HTTP:404 error
    The requested resource () is not available.,
    please help

    You better ask this on a Tomcat forum...
    Timo

  • Problem Running my servlet

    Hi,
    I use Tomcat 5.5.17 to run servlets. I can run the example servlets that come with Tomcat successfully. I have configured the java_home and class path variables. When I create a new servlet in the webapps/servlets-examples folder, I can run it.
    However, when I try creating a new folder under webapps (named trial) and when I try to run my servlet from there I get the 404 Servlet not found error.
    The steps I followed are:
    1.Created a new folder trial under C:\apache-tomcat 5.5.17\webapps
    2.Created the WEB_INF folder under trial and then the classes folder under it.
    3. Put my servlet HelloServlet.class under the classes folder.
    4.Put WEB.XML under the C:\apache-tomcat 5.5.17\webapps\trial\WEB_INF folder and made the following entry
    <servlet>
    <servlet-name>HelloServlet</servlet-name>
    <servlet-class>HelloServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloServlet</servlet-name>
    <url-pattern>/HelloServlet</url-pattern>
    </servlet-mapping>
    5. I tried to access my servlet using the following URL:
    http://localhost:8080/trial/HelloServlet
    and that gives the 404 error.
    Are there any additional steps when we are running a servlet a folder we create?
    I searched the internet and found something about setting the context path but I could not understand how to do it for Tomcat 5.5.17 as the documents I found on the net were for older versions.
    I would be grateful if someone could help me out. Thanks in advance!
    Aniticipating your help!
    Thanks and Regards,
    Asana

    Hi.. You can check your application context path through Tomcat Manager application.
    URL is :
    http://localhost:8080/manager/list
    or
    http://localhost:8080/manager/html/list

  • Problems compiling and running a servlet

    I have been trying to compile and run my servlet program to no avail. Please help. I am using Tomcat 5.5 and j2sdk1.4.2
    These are the errors I keep getting. I have already set the classpath appropriately.
    MyServletTest.java:5: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    MyServletTest.java:6: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    MyServletTest.java:10: cannot resolve symbol
    symbol : class HttpServlet
    location: class MyServletTest
    public class MyServletTest extends HttpServlet {
    ^
    MyServletTest.java:13: cannot resolve symbol
    symbol : class HttpServletRquest
    location: class MyServletTest
    public void doGet (HttpServletRquest req, HttpServletResponse resp)
    ^
    MyServletTest.java:13: cannot resolve symbol
    symbol : class HttpServletResponse
    location: class MyServletTest
    public void doGet (HttpServletRquest req, HttpServletResponse resp)
    ^
    MyServletTest.java:48: cannot resolve symbol
    symbol : class HttpServletResponse
    location: class MyServletTest
    private void printResultSet (HttpServletResponse resp, ResultSet rs)
    throws SQLException {
    ^
    MyServletTest.java:52: cannot resolve symbol
    symbol : method prinln (java.lang.String)
    location: class java.io.PrintWriter
    out.prinln("<html>");
    ^
    7 errors

    Thank you. I have managed to compile the program but
    when I run it I get:
    Exception in thread "main"
    java.lang.NoSuchMethodError: main
    How should I run a servlet?Servlets are not run like applications. You need to deploy them to a servlet container, and they get invoked and initialized by constructor, init() method and goGet/doPost().

  • Help needed to run JSTL 1.1 in Tomcat 6.0.16

    Hi All,Help needed to run JSTL 1.1 in Tomcat 6.0.16. I am trying to run the example given in http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html The example tries to connect to MySQL database from JSP using JSTL and JNDI Datasource.I am running the example using Eclipse 3.4.2 using Sysdeo plugin to start and stop Tomcat server from Eclipse IDE.
    My web.xml file has <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    </web-app>
    and test.jsp has proper taglib directives
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    I have placed the jstl.jar and standard.jarof the jakarta-taglibs-standard-1.1.2.zip under E:\Deepa\workspace\DBTest\WebContent\WEB-INF\lib directory also placedcontext.xml file under E:\Deepa\workspace\DBTest\WebContent\META-INF and the content of context.xml is as below
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
    </Context>
    Now while running the example, Eclipse creates one DBTest.xml file under C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
    which has the following line:
    <Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest" workDir="E:\Deepa\workspace\DBTest\work" />
    I am getting the following error when running http://localhost/DBTest/WebContent/test.jsp
    in Browser:
    <HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
    org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
    org.apache.jasper.compiler.Parser.parse(Parser.java:138)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    In the Tomcat Server console, I am getting the following error:
    INFO: Server startup in 7295 ms
    May 20, 2009 6:36:48 AM org.apache.jasper.compiler.TldLocationsCache processWebDotXml
    WARNING: Internal Error: File /WEB-INF/web.xml not found
    May 20, 2009 6:36:48 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application
    what is the problem with my code?
    When running the same example, by creating a local server in Eclipse(creating new Server connection pointing to same Tomcat 6.0 installation) it runs fine without any error.

    Hi evnafets,
    Wow, very helpful information, great insight into working of Eclipse. Thanks a lot.
    I have one more question. I have a context.xml file under {color:#0000ff}E:\Deepa\workspace\DBTest\WebContent\META-INF{color} folder and that has the Resource element to connect to MySQL database:
    {code{color:#000000}}{color}<Context path="/DBTest" docBase="DBTest" debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
    {color:#0000ff}url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>{color}
    {color:#0000ff}</Context>{color}As usual when running application in local Tomcat server of Eclipse, this data source works fine. But when I run the application on Tomcat, by starting Sysdeo plugin from Eclipse, the DBTest.xml file created in C:\Tomcat 6.0\conf\Catalina\localhost has the context entry as<Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest\WebContent" workDir="E:\Deepa\workspace\DBTest\work">
    </Context>The<Resource> element I have specified in the context.xml of \WebContent\META-INF folder is not taken into account by Tomcat and it gives the following error:May 21, 2009 5:20:04 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException_: Cannot create JDBC driver of class '' for connect URL 'null'"
    _at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(_QueryTagSupport.java:276_)
    at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(_QueryTagSupport.java:159_)
    at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(_test_jsp.java:113_)
    at org.apache.jsp.test_jsp._jspService(_test_jsp.java:66_)
    at org.apache.jasper.runtime.HttpJspBase.service(_HttpJspBase.java:70_)
    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
    at org.apache.jasper.servlet.JspServletWrapper.service(_JspServletWrapper.java:374_)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(_JspServlet.java:342_)
    at org.apache.jasper.servlet.JspServlet.service(_JspServlet.java:267_)
    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(_ApplicationFilterChain.java:290_)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(_ApplicationFilterChain.java:206_)
    at org.apache.catalina.core.StandardWrapperValve.invoke(_StandardWrapperValve.java:233_)
    at org.apache.catalina.core.StandardContextValve.invoke(_StandardContextValve.java:191_)
    at org.apache.catalina.core.StandardHostValve.invoke(_StandardHostValve.java:128_)
    at org.apache.catalina.valves.ErrorReportValve.invoke(_ErrorReportValve.java:102_)
    at org.apache.catalina.core.StandardEngineValve.invoke(_StandardEngineValve.java:109_)
    at org.apache.catalina.connector.CoyoteAdapter.service(_CoyoteAdapter.java:286_)
    at org.apache.coyote.http11.Http11Processor.process(_Http11Processor.java:845_)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(_Http11Protocol.java:583_)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(_JIoEndpoint.java:447_)
    at java.lang.Thread.run(_Thread.java:619_)
    {code}
    So to overcome this error I had to place the <Resource> element in DBTest.xml under C:\Tomcat 6.0\conf\Catalina\localhost {color:#000000}and then it works fine. {color}{color:#ff0000}*Why is the context.xml file in META-INF not considered by Tomcat server using Sysdeo Plugin?*
    *Thanks,*
    *Deepa*{color}
    {color}
    Edited by: Deepa76 on May 26, 2009 9:32 PM

  • Problem to run a report

    Hi all,
    I have a problem to run report in report server other than the report server in process.I installed 9IDS on 2 PCs.I use one PC as a small Appserver.Exactly, i run OC4J on it, i also create a report server on it, .Both OC4J and report server are permantly ran on my small AppServer.When i run a report using the report server in process, it work well.But when i try to run a report using my report server, i receive these errors messages:
    REP-110:Impossible to open the report
    REP-1070:Error when trying to open or save report.
    I don't know what wrong!Every answers to help are welcomed.
    Thanks!

    a couple more things .. since you are running your server as a real user, make sure the directory your report file is in allows access for this particular user.
    if your reports come from a mapped drive, it will not work as windows services don't have access to mapped drives.
    if you are using a CGIMAP-key, make sure your CGICMD.DAT is available. you can check this by submitting the showmap servlet command (like you did the showenv).
    you can find even more hints in the following tech note:
    Article-ID: <Note:215469.1>
    Circulation: PUBLISHED (EXTERNAL)
    Folder: tools.Developer.Reports.Generic
    Topic: Errors
    Title: Comprehensive REP-110 Troubleshooting and Overview Guide
    which is available via matalink.
    thanks,
    ph.

  • PLEASE HELP!!! using servlet to generate an image in jsp page

    Hi,
    I am so stuck on this... please help.
    I have a servlet that generated a gif image dynamically. It uses a bean that stores the gif image in a byte array.
    The servlet outputs the byte data to the output stream. The code is really simple and looks like this:
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            //HttpSession session = request.getSession();
            try {
                ServletOutputStream stream = response.getOutputStream();
                ImageByteInformation imageByteInfo = (ImageByteInformation) request.getAttribute("imageByteInformation");
                response.setContentType("image/gif");
                response.setContentLength(imageByteInfo.getByteData().length);
                stream.write(imageByteInfo.getByteData(), 0, imageByteInfo.getByteData().length);
                stream.flush();
            }catch( Exception e){   
                System.out.println("You are hooped!: " + e.getMessage() + " " + e.toString());           
            }When I redirect from the dispatch servlet straight to this servlet an image shows up in the browser window.
    However when I try to use this jsp page to display the image nothing happens...
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <h2>Hello World!</h2>
            <img src="servlets/Map24ImageDisplayServlet"/>
             //I also tried src/servlets/Map24..., /src/servlets/Map24..., /display, servlets/display
            <h2>Did you see the image?</h2>
        </body>
    </html>My web.xml is here if it helps...
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
      <display-name>HelloProject</display-name>
    <servlet>
        <display-name>ServletDispatcher</display-name>
        <servlet-name>ServletDispatcher</servlet-name>
        <servlet-class>servlets.ServletDispatcher</servlet-class>
      </servlet>
      <servlet>
        <display-name>Map24ImageDisplayServlet</display-name>
        <servlet-name>Map24ImageDisplayServlet</servlet-name>
        <servlet-class>servlets.Map24ImageDisplayServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>ServletDispatcher</servlet-name>
        <url-pattern>/hello</url-pattern>
      </servlet-mapping>
      <error-page>
        <error-code>404</error-code>
        <location>/404_error.html</location>
      </error-page>
      <servlet-mapping>
        <servlet-name>Map24ImageDisplayServlet</servlet-name>
        <url-pattern>/display</url-pattern>
      </servlet-mapping>
    </web-app>I can never get an image to come up. In fact I can never get the jsp page to run the servlet at all! HELP!!! What am I doing wrong?
    Thanks
    Edited by: Kind_of_Green on May 5, 2008 3:55 PM
    Edited by: Kind_of_Green on May 5, 2008 4:00 PM

    OK... so you WERE absolutely right about the src path for the image tag.
    However I also had another problem that was quite a bit more insidious and mostly just a symptom
    of how little I know about what goes on under the hood of a web app.
    My bean storing the image info was stored as a request attribute. When the servlet was called from the
    jsp page the request object was either reset or just never initialized. Anyway it is not the same request
    object I assumed it was being passed in the doGet method. I added my bean as a session
    attribute and everything is sparkly :)
    I can only assume that when a request is neither forwarded nor included (as is the case with
    calling the servlet from the img tag) it is disappeared.
    Anyway, thanks a mint man. I so totally appreciate your time.
    Ciao :)

  • How to run the servlet without getting message window?

    while running servlet,i got a message window that 'Do you want to save:val?'how to rectify this problem while running servlet.
    Actually i saved the servlet files as HTTP and Generic.java respectively.
    In web.xml file,the content is as follows
    <servlet>
    <init-param>
         <param-name>title</param-name>
         <param-value>GenericServlet Example</param-value>
         </init-param>
         <init-param>
    <param-name>heading</param-name>
    <param-value>Servlet Program</param-value>
    </init-param>
    <servlet-name>G</servlet-name>
    <servlet-class>Generic</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>H</servlet-name>
    <servlet-class>HTTP</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>G</servlet-name>
    <url-pattern>/generic</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>H</servlet-name>
    <url-pattern>/http</url-pattern>
    </servlet-mapping>
    ======================================================
    The html file is as follows
    <html>
    <body>
    <form action="generic" method="get">
    User Name<input type=text name=t1><br>
    Password<input type=password name=t2><br>
    <input type="submit" value="GenericServlet Output">
    </form>
    <form action="val" method="get">
    User Name<input type=text name=t3><br>
    Password<input type=password name=t4><br>
    <input type="submit" value="HttpServlet Output">
    </form>
    </body>
    </html>
    ======================================================
    I executed the servlet as http://localhost:8080/stalin/sample.html
    and clicked the sumit button in the html page.
    During that time i got a problem but not getting the output.The problem is I got a message window?
    can anyone help me clarify my doubt plz

    That would occur if either the content type in the header is wrong (e.g. it is not text nor image, those content types with which the useragent used is associated), or if you have set content disposition in the header to attachment instead of inline.
    So, doublecheck the headers.

Maybe you are looking for

  • No mail in my Exchange account after update

    After updating, I've got my two mail accounts, but the Exchange one only has the last email received in it; none of the rest (which are still on the server).  I can't see a setting to change to get the mail displayed.  I've currently got it set using

  • Users opposing- the Import PO  process

    hi experts, As we all know in case of import creation of PO, MIGO, and MIRO is a lengthy and tedious process as while creating PO we have to enter all custom duties and against each condition the vendor and if the PO has many items say 50 then it bec

  • Standard outbound services for SOAMANAGER and LPCONFIG

    Hi, experts. I've got a question about logical port setup for outbound services. I'm trying to test stanadard outbound services, like 'PurchaseOrderCreatedInformation_Out', so at first I've tried to set up logical port for that service using 'SOAMANA

  • Cannot open Canon D5 RAW in CS4..?

    Hello, sorry to ask maybe this basic question, but I am really desperate. I got RAW fotos from a friend and I cannot open them, she has a canon 5D mark 2.. I do have an old Canon 5D myself and they are fine. Where can I download the plug in that I ne

  • Impersonalized form document rights are no longer valid after db lookup

    Hi, I have an impersonalized form which does some client side database lookup. The idea is that I can fill the data off-line, save it and submit it when online. Everything is working fine if I am entering all the data manually. I am able to use the s