Simple servlet help - please

I am trying to write a simple servlet that based on the client ip redirect to a new page.
I can get the client ip and return it. But what I am not sure how to do next is to take that ip address and search through the text file and return the second field (i.e abc.html)
I have setup a text file that is tab delimmited that looks like the following:
XXX.XXX.XXX.XXX abc.html
XXX.XXX.XXX.123 apps/index.html
Any suggestions greatly appreciated.

A simple solution:
Format your file correctly and use it as a properties file.(Take a look at the Properties Class: http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html )
To check the values, load your file as a Properties:
  public static final String PATH_OF_THE_FILE = "textFile.properties";
  private Properties props;
    InputStream sFile= null;
    try
      sFile= ClassLoader.getSystemResourceAsStream(PATH_OF_THE_FILE );
      props = new Properties();
      props.load(sFile);
      sFile.close();
    }catch(Throwable t){...}..and ask for the property you need:
String value= props.getProperty(theIP);Another solution would be to load your ip/url pairs into a static HashMap (check HashMap class: http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html )
HTH

Similar Messages

  • Hi when i send imessages it keeps showing up as my email address on the receiving device. I know its something simple! Help please.

    Hi when i send imessages it keeps showing up as my email address on the receiving device. I know its something simple! Help please.

    Hi Megamanfx,
    If you are having issues with the Sent From settings in iMessage on your iPhone, you may find the following article helpful:
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    Regards,
    - Brenden

  • JSP and Servlet - help please

    Hello,
    I am making this feedback for fun and a bit of learning too. I have an INDEX.JSP page, where the user selects the very first option. Depending upon the selected option he is moved another page PRODUCTFEEDBACK.JSP (so far I have completed this). Here as usual there are many fields to be filled in. As a spams protection i have done this;
    I have a AdditionClass, which is a seperate class where two number are generated at random. This numbers are called by PRODUCTFEEDBACK.JSP. The user is then asked to perform the addition. The completed form is then sent to ProductFeedback servlet.
    When I compile my PRODUCTFEEDBACK.JSP I get this error. Can you please tell whats wrong?
    PRODUCTFEEDBACK.JSP
          *<td>Please help us to prevent Spams by performing this simple mathematical Calculation. We appreciate your effort </td>*
        *</tr>*
      *</table>*
      *<jsp:useBean id = "AddTest" class = "go.AdditionClass" />*
      *<table width="53%"  border="0" align="center">*
        *<tr>*
          *<td><div align="center">*
      *<input name="textfield8" type="text" size="3" value ="<jsp:getProperty name="AddTest" property = "randNum1" />">*
    *  + * 
      *<input name="textfield9" type="text" size="3" value="<jsp:getProperty name="AddTest" property = "randNum2" />">*
    *  = *
    *<input name="_total" type="text" size="5">*
          </div></td>
        </tr>
        <tr>
          <td> </td>
        </tr>
      </table>
      <br>
      <table width="37%" height="23"  border="0" align="center">
        <tr>
          <td width="33%"> </td>
          <td width="67%"><input type="submit" name="Submit" value="Click here to send us this form"></td>
    AdditionalClass.java
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package go;
    import java.util.Random;
    * @author MAC
    public class AdditionClass {
        Random generator = new Random();
        int randNum1; // First Random Number
        int randNum2; // Second Random Number
        public void SetNum1(){
            randNum1 = generator.nextInt(10); // Generate First Random Number
        public int getNum1(){
            return randNum1; //Return First Random Number
        public void SetNum2(){
            randNum2 = generator.nextInt(10); // Generate Second Random Number
        public int getNum2(){
            return randNum2; // Return Second Random Number
        // send the Random Numbers to ProductFeedback class
        public void productFeedbackRandNum1(){
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber1(randNum1);
        public void productFeedbackRandomNum2(){
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber2(randNum1);
    }Erros that I am getting:
    org.apache.jasper.JasperException: Cannot find any information on property 'randNum1' in a bean of type 'go.AdditionClass'
    C:\Documents and Settings\MAC\My Documents\NetBeansProjects\FeedBack\nbproject\build-impl.xml:462: The following error occurred while executing this line:
    C:\Documents and Settings\MAC\My Documents\NetBeansProjects\FeedBack\nbproject\build-impl.xml:440: Java returned: 1
    BUILD FAILED (total time: 1 second)

    Thank you for replying. I modified my Bean class then what is posted above, so thought to repost the code again and seek help. There seems to be no error now but it just dont generate any random numbers, All i get very time is 0. I am wondering, is my code generating 0 as random number, every time :-)
    package go;
    import java.util.Random;
    public class AdditionBean {
        int randNum1; // First Random Number
        int randNum2; // Second Random Number
        public void generateRandomNum1(){
            Random generator = new Random();
            int num1 = generator.nextInt(10);
            SetRandNum1(num1);
            // Send num1 value to ProductFeedback.java
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber1(num1);
        } // End of generaeRandomNum1
        public void generateRandomNum2(){
            Random generator = new Random();
            generator = new Random();
            int num2 = generator.nextInt(10);
            SetRandNum2(num2);
            // Send num1 value to ProductFeedback.java
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber2(num2);
        } // End of generateRandomNum2
        public void SetRandNum1(int num1){
            randNum1 = num1;
        public int getRandNum1(){
            return randNum1; //Return First Random Number
        public void SetRandNum2(int num2){
            randNum2 = num2;
        public int getRandNum2(){
            return randNum2; // Return Second Random Number
    }// End of classThank you,

  • PLEASE HELP:not able to load a simple servlet

    Hi,
    I'm new to weblogic server.I'm trying to setup weblogic 510.Everything was
    going fine until I got stuck to this small thing.I'm not able to load a
    simple servlet!.
    I would appreciate any pointers regarding this.Please Help me!!!
    Here is what I tried:
    I have installed weblogic510 plug-in for IIS.I could successfully run jsp
    files.However I am not able to load simple servlets;It gave an exception
    "java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/FileSource from class
    weblogic/servlet/internal/WarClassFinder"
    Details of my configuration:
    WebServer - IIS 4.0
    IIS port=80
    Weblogic port=7001
    I had set it in such a way that all the requests first go to IIS and then
    IIS redirects them to Weblogic.I've followed the steps according to the
    document "Installing the Weblogic ISAPI Plug-in".
    I've registered the servlet in weblogic.properties as following:
    weblogic.httpd.register.hello=examples.servlets.HelloWorld2
    I tested the servlet by URL http://localhost:7001/hello
    Following is the eact text for the exception I got in the WeblogicServer
    window:
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Error loading
    servlet:
    examples.servlets.HelloWorld2
    java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/Fi
    leSource from class weblogic/servlet/internal/WarClassFinder
    at
    weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.jav
    a, Compiled Code)
    at
    weblogic.servlet.internal.WarClassFinder.getClassSource(WarClassFinde
    r.java:110)
    at
    weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:381)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
    loadClass(RecursiveReloadOnModifyClassLoader.java:234)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLo
    calClass(RecursiveReloadOnModifyClassLoader.java:109)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:172)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:291)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
    java:164)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:99)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:742)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:686)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:247)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:361)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Servlet failed
    with Ex
    ception
    I dont think there were any problems in the classpath or
    servletpath;Basically WeblogicServer was able to locate the servlet but when
    it tried to load the servlet it gave this exception.
    I would appreciate any ideas/suggestions.
    Thanks,
    Sravan

    Nice to hear it works!
    However, one mistake you have in the configuration you provided:
    You put D:\weblogic\BDL\servletclasses in both CLASSPATH and
    weblogic.class.path, remove it from CLASSPATH.
    Cheers - Wei
    Sravan Thella <[email protected]> wrote in message
    news:[email protected]...
    Hi Michael and Wei,
    Thank you very much for the response.
    My servlet details:
    Name - HelloWorld2.class
    package - examples.servlets
    Location - d:\weblogic\BDL\servletclasses ---- here BDL is my new folder
    where I want to keep my servlets
    My CLASSPATH(environment) settings:
    D:\weblogic\BDL\servletclasses;d:\weblogic\classes\boot;d:\weblogic\eval\clo
    >
    udscape\lib\cloudscape.jar;d:\weblogic\lib\poolorb.jar;D:\java\jre\lib\rt.ja
    r;
    my weblogic classpath settings(set it thru wlconfig)
    D:\weblogic\BDL\servletclasses;d:\weblogic\classes\boot;d:\weblogic\eval\clo
    >
    udscape\lib\cloudscape.jar;d:\weblogic\lib\poolorb.jar;D:\java\jre\lib\rt.ja
    r;
    My weblogic.policy:
    grant codeBase "file:d:/weblogic/-" {
    permission java.io.FilePermission "d:${/}weblogic${/}-",
    "read,write,delete,execute";
    permission java.net.SocketPermission "localhost:1-9000",
    "connect,accept,listen,resolve";
    permission java.awt.AWTPermission "accessClipboard";
    permission java.awt.AWTPermission "accessEventQueue";
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.io.SerializablePermission"enableSubclassImplementation";
    permission java.io.SerializablePermission "enableSubstitution";
    permission java.lang.RuntimePermission "accessClassInPackage.*";
    permission java.lang.RuntimePermission "accessDeclaredMembers.*";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "createSecurityManager";
    permission java.lang.RuntimePermission "defineClassInPackage.*";
    permission java.lang.RuntimePermission "exitVM";
    permission java.lang.RuntimePermission "getClassLoader";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "getProtectionDomain";
    permission java.lang.RuntimePermission "loadLibrary.*";
    permission java.lang.RuntimePermission "modifyThread";
    permission java.lang.RuntimePermission "modifyThreadGroup";
    permission java.lang.RuntimePermission "readFileDescriptor";
    permission java.lang.RuntimePermission "setContextClassLoader";
    permission java.lang.RuntimePermission "setFactory";
    permission java.lang.RuntimePermission "setIO";
    permission java.lang.RuntimePermission "setProtectionDomain";
    permission java.lang.RuntimePermission "setSecurityManager";
    permission java.lang.RuntimePermission "writeFileDescriptor";
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    permission java.net.NetPermission "requestPasswordAuthentication";
    permission java.net.NetPermission "setDefaultAuthenticator";
    permission java.security.SecurityPermission "getPolicy";
    permission java.security.SecurityPermission "setPolicy";
    permission java.util.PropertyPermission "*", "read,write";
    grant codeBase "file:d:/weblogic/BDL/servletclasses/-" {
    permission java.io.FilePermission
    "d:${/}weblogic${/}BDL{/}servletclasses{/}-", "read,write,delete,execute";
    permission java.net.SocketPermission "localhost:1-9000",
    "connect,accept,listen,resolve";
    permission java.awt.AWTPermission "accessClipboard";
    permission java.awt.AWTPermission "accessEventQueue";
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.io.SerializablePermission"enableSubclassImplementation";
    permission java.io.SerializablePermission "enableSubstitution";
    permission java.lang.RuntimePermission "accessClassInPackage.*";
    permission java.lang.RuntimePermission "accessDeclaredMembers.*";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "createSecurityManager";
    permission java.lang.RuntimePermission "defineClassInPackage.*";
    permission java.lang.RuntimePermission "exitVM";
    permission java.lang.RuntimePermission "getClassLoader";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "getProtectionDomain";
    permission java.lang.RuntimePermission "loadLibrary.*";
    permission java.lang.RuntimePermission "modifyThread";
    permission java.lang.RuntimePermission "modifyThreadGroup";
    permission java.lang.RuntimePermission "readFileDescriptor";
    permission java.lang.RuntimePermission "setContextClassLoader";
    permission java.lang.RuntimePermission "setFactory";
    permission java.lang.RuntimePermission "setIO";
    permission java.lang.RuntimePermission "setProtectionDomain";
    permission java.lang.RuntimePermission "setSecurityManager";
    permission java.lang.RuntimePermission "writeFileDescriptor";
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    permission java.net.NetPermission "requestPasswordAuthentication";
    permission java.net.NetPermission "setDefaultAuthenticator";
    permission java.security.SecurityPermission "getPolicy";
    permission java.security.SecurityPermission "setPolicy";
    permission java.util.PropertyPermission "*", "read,write";
    I dont know what is wrong here. In the weblogic.policy file,I tried
    differrent combinations but it never worked.
    I find weblogic documentation for troubleshooting to be pathetic.Notuseful
    at all.Documentation looks
    good to read ;not for practical purposes.I'm not sure whether others have
    similar opinion.
    I'm stuck at this thing for the past few days,I still have lot of work todo
    to purusue our management team to buy weblogic
    but I'm still stuck at this thing.
    Thank you very much for your time.
    Thanks,
    Sravan
    "Sravan Thella" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I'm new to weblogic server.I'm trying to setup weblogic 510.Everything
    was
    going fine until I got stuck to this small thing.I'm not able to load a
    simple servlet!.
    I would appreciate any pointers regarding this.Please Help me!!!
    Here is what I tried:
    I have installed weblogic510 plug-in for IIS.I could successfully runjsp
    files.However I am not able to load simple servlets;It gave an exception
    "java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/FileSource from class
    weblogic/servlet/internal/WarClassFinder"
    Details of my configuration:
    WebServer - IIS 4.0
    IIS port=80
    Weblogic port=7001
    I had set it in such a way that all the requests first go to IIS andthen
    IIS redirects them to Weblogic.I've followed the steps according to the
    document "Installing the Weblogic ISAPI Plug-in".
    I've registered the servlet in weblogic.properties as following:
    weblogic.httpd.register.hello=examples.servlets.HelloWorld2
    I tested the servlet by URL http://localhost:7001/hello
    Following is the eact text for the exception I got in the WeblogicServer
    window:
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Error loading
    servlet:
    examples.servlets.HelloWorld2
    java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/Fi
    leSource from class weblogic/servlet/internal/WarClassFinder
    at
    weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.jav
    a, Compiled Code)
    at
    weblogic.servlet.internal.WarClassFinder.getClassSource(WarClassFinde
    r.java:110)
    at
    weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:381)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
    loadClass(RecursiveReloadOnModifyClassLoader.java:234)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLo
    calClass(RecursiveReloadOnModifyClassLoader.java:109)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:172)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:291)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
    java:164)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:99)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:742)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:686)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:247)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:361)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Servlet failed
    with Ex
    ception
    I dont think there were any problems in the classpath or
    servletpath;Basically WeblogicServer was able to locate the servlet butwhen
    it tried to load the servlet it gave this exception.
    I would appreciate any ideas/suggestions.
    Thanks,
    Sravan

  • Servlet not inserting into Access Databse. help please

    I have the following code which is inserting three fields into a database. The database name is contacts.mdb, and the table is contacts. I have setup the ODBC connection on the server, of which I have both IIS and Tomcat running. The form.html that I am accessing is on the tomcat server root and that code is below as well. After hitting the submit button on the form I get forwarded to the servlet, and the page is blank. However, when I open the database, no updates have occured. Please help. I hope I have provided enough detail. Thanks so much.
    -------- servlet code start --------------
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class WebServlet
    extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
    IOException {
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String sourceURL = "jdbc:odbc:terry_web_contacts";
    Connection databaseConnection = DriverManager.getConnection(sourceURL);
    Statement stmt = databaseConnection.createStatement();
    String jname = request.getParameter("Name");
    String jemail = request.getParameter("Email");
    String jcomments = request.getParameter("Comments");
    String sqlInsertString ="INSERT INTO contacts (name, email, comments) VALUES ('" + jname +"', '" jemail "', '" + jcomments + "')";
    stmt.executeUpdate(sqlInsertString);
    databaseConnection.close();
    catch(ClassNotFoundException cnfe)
    System.err.println("Error loading Driver");
    catch (SQLException sqle){
    System.err.println("SQL Error");
    ---------- servlet code end ---------------------
    ---------- html form code start ------------------
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY BGCOLOR="WHITE">
    <TABLE BORDER="2" CELLPADDING="2">
    <TR><TD WIDTH="275">
    <H2>I'm a Simple Form</H2>
    <FORM METHOD="POST" ACTION="/servlet/WebServlet">
    <p>
    <INPUT NAME="Name" TYPE="TEXT" id="Name" SIZE=30>
    </p>
    <p>
    <INPUT NAME="Email" TYPE="TEXT" id="Email" SIZE=30>
    </p>
    <p>
    <textarea name="Comments" id="Comments"></textarea>
    </p>
    <P>
    <INPUT TYPE="SUBMIT" VALUE="Click Me">
    <INPUT TYPE="RESET">
    </FORM>
    </TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    ------------- html code end ------------------

    Okay, here is my modified code. However, I catch a sql error. It prints out "sql error". If I try to isolate the different lines of code with try catch blocks, the compiler says it does not recognize the symbols for example stmt, or databaseConnection. Arggh, what can I do? Help please.
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class WebServlet
        extends HttpServlet {
      public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException,IOException
         PrintWriter out = response.getWriter();
         String jname = (String) request.getParameter("Name");
         String jemail = (String) request.getParameter("Email");
         String jcomments = (String) request.getParameter("Comments");
    try
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(ClassNotFoundException e)
         out.println("class error");
    try
         Connection databaseConnection = DriverManager.getConnection("jdbc:odbc:terrycontacts");
         Statement stmt = databaseConnection.createStatement();
         String sqlInsertString ="INSERT INTO contacts(name,email,comments) VALUES('"+jname+"','"+jemail+"','"+jcomments+"')";
         stmt.executeQuery(sqlInsertString);
         databaseConnection.commit();
         databaseConnection.close();
    catch(SQLException e)
         out.println("sql error");
         out.close();
    }

  • I've just updated my iPad and can't open mime attachments can anyone help in simple English h please?

    I've just updated my iPad and can't open mime attachments can anyone help in simple English h please?

    I've just updated my iPad and can't open mime attachments can anyone help in simple English h please?

  • HT4972 My ipad 1 has never been updated and can't run many apps which makes it of not much use, how do I update it ? A simple step by step idiot proof guide would be best ! Can anyone help please ?

    My ipad 1 has never been updated and can't run many apps which makes it of not much use, how do I update it ? A simple step by step idiot proof guide would be best ! Can anyone help please ?

    You can only update the iPad to iOS 5.1.1and you cannot go any higher. If you never updated that high, you can do so by using iTunes on your computer. You will have to connect the iPad to your computer with the cable and launch iTunes
    You can read more here. Make sure that you read the section about using iTunes. The article starts off with using the Settings on the iPad for WiFi updates. That only works with the iPad 2 and higher that is already running iOS 5.
    Update your iPhone, iPad, or iPod touch - Support - Apple

  • I am struggling to know how to download music on to mp3. am useless with computers. simple help please !

    am really struggling to transfer music to mp3. not a clue how its done. Help please!

    You do not download music from iTunes as an MP3, all music is downloaded as an AAC file.
    iTunes 11 for Windows: Save a copy of a song in a new format

  • Problem With Deploying a very simple Servlet

    HELP REQUIRED:
    Hi,
    I'm including code of a very simple Servlet application (I shd not call it an application):
    index.html
    ==========
    <html><body bgcolor="#FFFFFF">
         <head>
         <title> Rajeev Asthana </title>
    <form action = "/HelloWorldApp/HelloWorld" method = "POST" >
    Please press Submit
    <input type = "submit" value = "Press Me!">
    </form>
    </body></html>
    HelloWorld.java
    ===============
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
         public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
              throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<html><body bgcolor=\"#FFFFFF\">");
              out.println("<p>Hello World!</p>");
              out.println("</body></html>");
              out.close();
    web.xml
    ========
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>HelloWorldApp</display-name>
    <servlet>
    <display-name>HelloWorld</display-name>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    </web-app>
    sun-web.xml
    ===========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
    <sun-web-app xmlns="http://java.sun.com/xml/ns/j2ee">
    <context-root>/HelloWorldApp</context-root>
    <session-config>
    <session-manager persistence-type="memory">
    <manager-properties/>
    <store-properties/>
    </session-manager>
    <session-properties/>
    <cookie-properties/>
    </session-config>
    <cache enabled="false" max-entries="4096" timeout-in-seconds="30">
    <default-helper/>
    </cache>
    <class-loader delegate="true"/>
    <jsp-config/>
    </sun-web-app>
    I have deployed it in following directory structure:
    C:\Sun\AppServer\domains\domain1\applications\j2ee-modules\HelloWorldApp\
    |
    |
    |               |               |               |
    |               |               |               |
    META-INF          WEB-INF          HelloWorld.java          index.html
                   |
                   |
              |          |          |          |
              |          |          |          |
         classes          sun-web.xml     web.xml          sun-j2ee-ri-project
         |
         |
         HelloWorld.class
    While generating HelloWorldApp.war (which is the war file for this app), I specifies /HelloWorldApp as context root (sun specific).
    Now, when I deployed it thru Admin Tool and then clicked on "Launch", it displays a page with :
    Please press Submit Press Me!
    But when I click the button "Press Me!", it says:
    "The requested resource (/HelloWorldApp/HelloWorld) is not available."
    What should I do to correct the problem?
    Thanks in advance.
         

    Yes, you need to add a servlet -mapping element and adjust your form to submit to the appropriate URL mapping.
    <servlet-mapping>
    <servlet-name>HelloWorldServlet</servlet-name>
    <url-pattern>/servlet/Hello</url-pattern>
    </servlet-mapping>

  • Weblogic error while deplying a simple servlet program

    Hi This is a very simple servlet program.
    I am trying to deploy it on the weblogic server but i get this error as follow
    Unable to access the selected application.
    *javax.enterprise.deploy.spi.exceptions.InvalidModuleException: [J2EE Deployment SPI:260105]Failed to create*
    DDBeanRoot for application, 'E:\AqanTech\WebApp1\myApp.war'.
    I have checked everything, right from my code to my web.xml file. I have used a build.bat file to build my war file.
    PLEASE HELP ME TO SOLVE THIS HUGE PROBLEM OF MINE ?
    Thanks,
    Shoeb

    Hi,
    The J2EE Error code siply suggest that there is something wrong in your Deployment Descriptors...
    Can u please post the XML files available inside your "WEB-INF" directory?
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • Unable to deploy a simple servlet using WAR file on Oracle9iAS v9.0.3

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modifying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi All,
    I am facing problem while deploying a simple servlet
    using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3
    on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2
    (9.0.3)      
    I referred following link to Deploy Applications
    Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed
    following steps to deploy WAR file:
    1] I have created a war file by name
    SimpleServlet.war. In SimpleServlet.war, there is a
    servlet by name Simple which prints time at which
    servlet was accessed.
    2] I have modified
    <ora9ias_home>\j2ee\home\config\application.xml and
    added following web module entry:
    <web-module id="SimpleServlet"
    path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web,
    I have modified file
    <ora9ias_home>\j2ee\home\config\default-web-site.xml
    and added following entry:
    <web-app application="SimpleServlet"
    name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP
    Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to
    user. I have verified that SimpleServlet.war is
    extracted to SimpleServlet folder under
    <ora9ias_home>\j2ee\home\applications folder. I found
    that Simple.class is stored under WEB-INF/classes
    folder and web.xml contains correct entry for url
    pattern for servlet Simple.
    What else could be the problem? Am I placing the war
    file in wrong place or modifying application.xml or
    default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your
    valuable comments on this.
    Thanks in advance.
    Regards,
    SandeshHave you restarted you http server and then tried to load it again? Are you using the right port; maybe you have to use port 7778? Check you server settings in the http server instance. Also check your url binding of you application at Farm > Application Server: infrastructurehost > OC4J_instance > Application: appname > Web Module: modulename
    Good luck!
    rgds Thomas

  • Unable to deploy a simple servlet using WAR file

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle 9i App Server. I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modfiying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi Juliana,
    Thanks a lot for your suggestion.
    I am sorry if I have posted this message to a wrong forum. This is first time I am posting a message to OTN. I will resend message to J2EE forum as per you suggestion.
    Meanwhile, please note information you asked for is as below:
    I installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    Please do reply at the earliest.
    Once again thanks and look forward to hear from you.
    Regards,
    Sandesh

  • Urgent Help Please : Peer not authenticated

    Hello Everyone,
    I am using JBoss with Tomcat. I have imported my CER file into the JRE/lib/cacerts file as a trusted certificate. I have a simple client and a simple servlet.
    Here is the code.
    Client
    import java.io.*;
    import java.io.FileInputStream;
    import java.security.KeyStore;
    import java.security.KeyStoreException;
    import java.security.NoSuchAlgorithmException;
    import javax.net.ssl.*;
    public class TestSecureClient
    private SSLContext ctx;
    private TrustManagerFactory tmf;
    private KeyStore ks;
    private char[] passphrase = "localhost".toCharArray();
    public TestSecureClient()
    // System.setProperty("javax.net.ssl.trustStore","C:\\j2sdk1.4.0_01\\jre\\lib\\security\\cacerts");
    System.setProperty("javax.net.debug", "ssl");
    try
    loadKeystore();
    catch (Exception e)
    e.printStackTrace();
    private void loadKeystore()
    throws Exception
    System.out.println("set up context, keystore and trustManagerFactory");
    ctx = SSLContext.getInstance("SSL");
    tmf = TrustManagerFactory.getInstance("SunX509");
    ks = KeyStore.getInstance("JKS");
    System.out.println(
    "set context to ssl, tmf to X509 and keystore to JKS");
    ks.load(new FileInputStream("C:\\keys\\.keystore"), passphrase);
    System.out.println("loading testkeys using passphrase");
    tmf.init(ks);
    System.out.println("initialise keystore using passphrase");
    ctx.init(null, tmf.getTrustManagers(), null);
    System.out.println("initialise the key manager");
    connect();
    private void connect()
    throws Exception
    SSLSocketFactory factory = ctx.getSocketFactory();
    System.out.println("got socket factory, now trying to create socket");
    SSLSocket socket = (SSLSocket)factory.createSocket("localhost", 8443);
    System.out.println("starting handshake");
    socket.addHandshakeCompletedListener(new HandshakeCompletedListener() {
    public void handshakeCompleted(HandshakeCompletedEvent event)
    System.out.println("Handshake finished!");
    System.out.println("\t CipherSuite:" + event.getCipherSuite());
    System.out.println("\t SessionId " + event.getSession());
    System.out.println(
    "\t PeerHost " + event.getSession().getPeerHost());
    socket.startHandshake();
    System.out.println("SSL Socket Connected");
    postToServlet(socket);
    private void postToServlet(SSLSocket pSocket)
    try
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(pSocket.getOutputStream())));
    out.println(
    "GET https://localhost/httpstest/SimpleServlet HTTP/1.1");
    out.println();
    out.flush();
    * Make sure there were no surprises
    if (out.checkError())
    System.out.println(
    "SSLSocketClient: java.io.PrintWriter error");
    /* read response */
    BufferedReader in = new BufferedReader(new InputStreamReader(pSocket.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null)
    System.out.println(inputLine);
    in.close();
    out.close();
    pSocket.close();
    catch (Exception e)
    System.out.println(e);
    public static void main(String[] args)
    new TestSecureClient();
    Here is my SimpleServlet
    import java.io.*;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.io.PrintWriter;
    import java.io.Serializable;
    import java.security.*;
    import javax.net.ssl.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class SimpleServlet
              extends HttpServlet
         * Handle the HTTP GET method by building a simple web page.
         *@param request
         *@param response
         *@exception ServletException
         *@exception IOException
         public void doGet( HttpServletRequest request, HttpServletResponse response )
              throws ServletException, IOException
              System.setProperty( "javax.net.ssl.trustStore", "C:\\j2sdk1.4.2_03\\jre\\lib\\security\\cacerts" );
              PrintWriter out;
              String title = "Simple Servlet Output";
              System.setProperty( "javax.net.debug", "ssl" );
              // set content type and other response header fields first
              response.setContentType( "text/html" );
              // then write the data of the response
              out = response.getWriter();
              out.println( "<HTML><HEAD><TITLE>" );
              out.println( title );
              out.println( "</TITLE></HEAD><BODY>" );
              out.println( "<H1>" + title + "</H1>" );
              out.println( "<P>This is output from SimpleServlet." );
              out.println( "</BODY></HTML>" );
              out.close();
    When I run my client I get the following output
    Working directory is C:\httpstest
    java -classpath C:\httpstest TestSecureClientset up context, keystore and trustManagerFactory
    set context to ssl, tmf to X509 and keystore to JKS
    loading testkeys using passphrase
    adding as trusted cert:
    Subject: CN=Joyce Stack, OU=Digisoft, O=Digisoft, L=Cork, ST=Cork, C=IE
    Issuer: CN=Joyce Stack, OU=Digisoft, O=Digisoft, L=Cork, ST=Cork, C=IE
    Algorithm: DSA; Serial number: 0x4020d3da
    Valid from Wed Feb 04 11:13:30 GMT 2004 until Tue May 04 11:13:30 GMT 2004
    initialise keystore using passphrase
    trigger seeding of SecureRandom
    done seeding SecureRandom
    initialise the key manager
    got socket factory, now trying to create socket
    starting handshake
    %% No cached client session
    *** ClientHello, TLSv1
    RandomCookie: GMT: 1078739209 bytes = { 61, 63, 239, 146, 243, 227, 70, 130, 242, 150, 202, 206, 5, 23, 7, 105, 12, 35, 16, 133, 45, 22, 144, 68, 228, 239, 35, 15 }
    Session ID: {}
    Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
    Compression Methods: { 0 }
    main, WRITE: TLSv1 Handshake, length = 73
    main, WRITE: SSLv2 client hello message, length = 98
    main, READ: TLSv1 Handshake, length = 1180
    *** ServerHello, TLSv1
    RandomCookie: GMT: 1078739209 bytes = { 145, 80, 195, 109, 127, 182, 76, 181, 210, 119, 119, 44, 187, 165, 173, 75, 3, 93, 72, 45, 14, 90, 168, 94, 147, 39, 208, 212 }
    Session ID: {64, 76, 65, 9, 142, 208, 247, 95, 51, 150, 99, 147, 143, 113, 220, 153, 78, 69, 189, 136, 130, 100, 6, 252, 61, 169, 146, 195, 155, 252, 19, 57}
    Cipher Suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA
    Compression Method: 0
    %% Created: [Session-1, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]
    ** TLS_DHE_DSS_WITH_AES_128_CBC_SHA
    *** Certificate chain
    chain [0] = [
    Version: V1
    Subject: CN=Joyce Stack, OU=Digisoft, O=Digisoft, L=Cork, ST=Cork, C=IE
    Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3
    Key: Sun DSA Public Key
    Parameters:DSA
         p: fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80 b6512669
    455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b 801d346f f26660b7
    6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6 1bf83b57 e7c6a8a6 150f04fb
    83f6d3c5 1ec30235 54135a16 9132f675 f3ae2b61 d72aeff2 2203199d d14801c7
         q: 9760508f 15230bcc b292b982 a2eb840b f0581cf5
         g: f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b 3d078267
    5159578e bad4594f e6710710 8180b449 167123e8 4c281613 b7cf0932 8cc8a6e1
    3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f 0bfa2135 62f1fb62 7a01243b
    cca4f1be a8519089 a883dfe1 5ae59f06 928b665e 807b5525 64014c3b fecf492a
    y:
    8195bc0c 910d19d2 56cfa64c 1f3fbcd0 9d4298fd 2edf919f 230e035e 4a11b3f1
    6a0a5ca2 ca14752f dec12729 39657256 b074eff3 87e97309 e3cb5ab5 3e975434
    113119cd 1c0314d5 a33b893f 80dce9c6 a81dab21 9b3fd4e2 066e3834 f302c091
    a04d0701 66e8201c f3d013cf 6011bd54 85c4104c ba3a9514 ccb6d662 f774ca02
    Validity: [From: Wed Feb 04 11:13:30 GMT 2004,
                   To: Tue May 04 11:13:30 GMT 2004]
    Issuer: CN=Joyce Stack, OU=Digisoft, O=Digisoft, L=Cork, ST=Cork, C=IE
    SerialNumber: [    4020d3da]
    Algorithm: [SHA1withDSA]
    Signature:
    0000: 30 2E 02 15 00 92 12 A2 F2 12 5A A2 EE 3A 11 8D 0.........Z..:..
    0010: 09 7A 68 1A 04 49 AE 73 DE 02 15 00 8A D4 5E 9A .zh..I.s......^.
    0020: C6 25 B5 23 BB A4 CB 46 78 8B F3 D8 9C 11 0B D0 .%.#...Fx.......
    Found trusted certificate:
    Version: V1
    Subject: CN=Joyce Stack, OU=Digisoft, O=Digisoft, L=Cork, ST=Cork, C=IE
    Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3
    Key: Sun DSA Public Key
    Parameters:DSA
         p: fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80 b6512669
    455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b 801d346f f26660b7
    6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6 1bf83b57 e7c6a8a6 150f04fb
    83f6d3c5 1ec30235 54135a16 9132f675 f3ae2b61 d72aeff2 2203199d d14801c7
         q: 9760508f 15230bcc b292b982 a2eb840b f0581cf5
         g: f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b 3d078267
    5159578e bad4594f e6710710 8180b449 167123e8 4c281613 b7cf0932 8cc8a6e1
    3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f 0bfa2135 62f1fb62 7a01243b
    cca4f1be a8519089 a883dfe1 5ae59f06 928b665e 807b5525 64014c3b fecf492a
    y:
    8195bc0c 910d19d2 56cfa64c 1f3fbcd0 9d4298fd 2edf919f 230e035e 4a11b3f1
    6a0a5ca2 ca14752f dec12729 39657256 b074eff3 87e97309 e3cb5ab5 3e975434
    113119cd 1c0314d5 a33b893f 80dce9c6 a81dab21 9b3fd4e2 066e3834 f302c091
    a04d0701 66e8201c f3d013cf 6011bd54 85c4104c ba3a9514 ccb6d662 f774ca02
    Validity: [From: Wed Feb 04 11:13:30 GMT 2004,
                   To: Tue May 04 11:13:30 GMT 2004]
    Issuer: CN=Joyce Stack, OU=Digisoft, O=Digisoft, L=Cork, ST=Cork, C=IE
    SerialNumber: [    4020d3da]
    Algorithm: [SHA1withDSA]
    Signature:
    0000: 30 2E 02 15 00 92 12 A2 F2 12 5A A2 EE 3A 11 8D 0.........Z..:..
    0010: 09 7A 68 1A 04 49 AE 73 DE 02 15 00 8A D4 5E 9A .zh..I.s......^.
    0020: C6 25 B5 23 BB A4 CB 46 78 8B F3 D8 9C 11 0B D0 .%.#...Fx.......
    *** Diffie-Hellman ServerKeyExchange
    DH Modulus: { 244, 136, 253, 88, 78, 73, 219, 205, 32, 180, 157, 228, 145, 7, 54, 107, 51, 108, 56, 13, 69, 29, 15, 124, 136, 179, 28, 124, 91, 45, 142, 246, 243, 201, 35, 192, 67, 240, 165, 91, 24, 141, 142, 187, 85, 140, 184, 93, 56, 211, 52, 253, 124, 23, 87, 67, 163, 29, 24, 108, 222, 51, 33, 44, 181, 42, 255, 60, 225, 177, 41, 64, 24, 17, 141, 124, 132, 167, 10, 114, 214, 134, 196, 3, 25, 200, 7, 41, 122, 202, 149, 12, 217, 150, 159, 171, 208, 10, 80, 155, 2, 70, 211, 8, 61, 102, 164, 93, 65, 159, 156, 124, 189, 137, 75, 34, 25, 38, 186, 171, 162, 94, 195, 85, 233, 47, 120, 199 }
    DH Base: { 2 }
    Server DH Public Key: { 141, 230, 60, 171, 152, 244, 227, 94, 165, 6, 166, 49, 28, 143, 106, 97, 130, 220, 0, 77, 153, 189, 151, 141, 253, 7, 162, 141, 32, 251, 80, 129, 8, 193, 79, 130, 240, 22, 21, 68, 185, 27, 253, 69, 190, 136, 9, 117, 147, 143, 193, 134, 226, 95, 62, 17, 17, 80, 34, 227, 229, 218, 173, 34, 3, 75, 29, 202, 89, 88, 220, 221, 96, 226, 160, 29, 79, 139, 242, 204, 223, 25, 255, 47, 196, 173, 40, 133, 234, 49, 161, 68, 208, 29, 67, 143, 7, 138, 124, 43, 60, 52, 12, 207, 247, 218, 36, 195, 237, 10, 251, 39, 87, 205, 42, 60, 175, 202, 168, 127, 142, 8, 218, 30, 241, 190, 62, 126 }
    Anonymous
    *** ServerHelloDone
    *** ClientDiffieHellmanPublic
    DH Public key: { 243, 101, 241, 11, 194, 68, 62, 212, 66, 86, 168, 117, 239, 154, 190, 75, 93, 94, 222, 53, 150, 202, 232, 200, 64, 174, 162, 89, 24, 144, 88, 235, 151, 92, 255, 22, 110, 49, 124, 214, 130, 196, 165, 129, 245, 100, 235, 61, 227, 50, 154, 78, 159, 83, 53, 227, 111, 228, 146, 72, 82, 180, 222, 181, 142, 156, 4, 90, 117, 193, 107, 144, 28, 201, 138, 10, 253, 232, 93, 197, 58, 181, 242, 65, 214, 131, 167, 143, 87, 162, 194, 26, 169, 116, 228, 142, 19, 217, 58, 38, 24, 225, 78, 139, 32, 6, 218, 128, 182, 242, 162, 237, 241, 231, 198, 87, 204, 253, 190, 153, 63, 198, 102, 18, 62, 190, 60, 133 }
    main, WRITE: TLSv1 Handshake, length = 134
    SESSION KEYGEN:
    PreMaster Secret:
    0000: 1B 0D FB 74 3D E0 23 74 BB 83 02 BD BF 14 E4 43 ...t=.#t.......C
    0010: 8D F7 1D 44 10 46 31 C4 BD BB 46 65 FD 97 BD 71 ...D.F1...Fe...q
    0020: 64 79 05 0D 44 B3 37 91 A6 11 77 B5 5E 02 79 A9 dy..D.7...w.^.y.
    0030: 7A 35 1D 4A E6 BF 9F 99 BD D9 2F B1 B0 B8 CB FC z5.J....../.....
    0040: 26 82 AA 93 EC 9A F7 B7 9A 67 A6 8F C7 60 68 96 &........g...`h.
    0050: 0B 5A C9 A4 B0 6B 95 50 56 82 54 CC C9 04 C4 03 .Z...k.PV.T.....
    0060: B3 E0 93 BB 60 B6 84 36 0F 3A 5E 27 23 B3 53 63 ....`..6.:^'#.Sc
    0070: E8 EC 41 5F 18 83 FD E6 BD 73 51 22 16 D5 93 6B ..A_.....sQ"...k
    CONNECTION KEYGEN:
    Client Nonce:
    0000: 40 4C 41 09 3D 3F EF 92 F3 E3 46 82 F2 96 CA CE @LA.=?....F.....
    0010: 05 17 07 69 0C 23 10 85 2D 16 90 44 E4 EF 23 0F ...i.#..-..D..#.
    Server Nonce:
    0000: 40 4C 41 09 91 50 C3 6D 7F B6 4C B5 D2 77 77 2C @LA..P.m..L..ww,
    0010: BB A5 AD 4B 03 5D 48 2D 0E 5A A8 5E 93 27 D0 D4 ...K.]H-.Z.^.'..
    Master Secret:
    0000: 7D A1 14 9A 48 7C ED 98 CF 3F D8 92 3C EE E5 05 ....H....?..<...
    0010: 05 BF 1A 8D 10 68 DC E2 A4 88 CF A4 AC FF 1D E2 .....h..........
    0020: E0 D4 FC F8 CB BA B8 7C B0 38 B2 BE 31 82 24 BC .........8..1.$.
    Client MAC write Secret:
    0000: CB 03 D5 D7 1C C2 85 4C 5A 26 0D 24 82 B9 4D 81 .......LZ&.$..M.
    0010: D9 3B E6 86 .;..
    Server MAC write Secret:
    0000: 42 9B 99 CB 1E B9 6C 1C 24 EC C1 15 9B 9A 44 5B B.....l.$.....D[
    0010: DD 69 D9 7D .i..
    Client write key:
    0000: 98 43 93 ED 3D 19 30 BA CF 49 07 60 44 6C EA 53 .C..=.0..I.`Dl.S
    Server write key:
    0000: C3 29 D5 46 BF 83 D9 C6 DD 87 8F A1 CB 0C 63 EA .).F..........c.
    Client write IV:
    0000: B5 8F 11 7C 52 44 A1 BD 6C 52 30 6F B2 E4 44 98 ....RD..lR0o..D.
    Server write IV:
    0000: A8 9D A4 EB 18 F1 72 3A A0 F7 ED DB 0B 24 1A 3D ......r:.....$.=
    main, WRITE: TLSv1 Change Cipher Spec, length = 1
    JsseJce: Using cipher AES/CBC/NoPadding from provider SunJCE
    *** Finished
    verify_data: { 214, 56, 105, 255, 211, 177, 74, 194, 123, 99, 106, 59 }
    main, WRITE: TLSv1 Handshake, length = 48
    main, READ: TLSv1 Change Cipher Spec, length = 1
    JsseJce: Using cipher AES/CBC/NoPadding from provider SunJCE
    main, READ: TLSv1 Handshake, length = 48
    *** Finished
    verify_data: { 118, 147, 184, 159, 16, 28, 169, 25, 218, 82, 145, 10 }
    %% Cached client session: [Session-1, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]
    SSL Socket Connected
    main, WRITE: TLSv1 Application Data, length = 80
    Handshake finished!
         CipherSuite:TLS_DHE_DSS_WITH_AES_128_CBC_SHA
         SessionId [Session-1, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]
         PeerHost localhost
    main, READ: TLSv1 Application Data, length = 160
    HTTP/1.1 200 OK
    Content-Type: text/html
    Content-Length: 154
    Date: Mon, 08 Mar 2004 09:46:51 GMT
    Server: Apache Coyote/1.0
    main, READ: TLSv1 Application Data, length = 176
    <HTML><HEAD><TITLE>
    Simple Servlet Output
    </TITLE></HEAD><BODY>
    <H1>Simple Servlet Output</H1>
    <P>This is output from SimpleServlet.
    </BODY></HTML>
    main, READ: TLSv1 Alert, length = 32
    main, RECV TLSv1 ALERT: warning, close_notify
    main, called closeInternal(false)
    main, SEND TLSv1 ALERT: warning, description = close_notify
    main, WRITE: TLSv1 Alert, length = 32
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    Process java exited with code 0
    Working directory is C:\httpstest
    My JBoss has the following error
    09:46:51,171 DEBUG [JSSE14Support] Error getting client certs
    javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(DashoA6275)
    at org.apache.tomcat.util.net.jsse.JSSE14Support.getX509Certificates(JSSE14Support.java:151)
    at org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:161)
    at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:748)
    at org.apache.coyote.Response.action(Response.java:222)
    at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:321)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    at java.lang.Thread.run(Thread.java:534)
    Can someone please help me. What do I do now ? What am I suppose to be doing...???
    Cheers,
    Joyce

    Just in case someone else needs this. I was using JBoss 3.2.2 and I upgraded to JBoss 3.2.3. I think this was a bug in the Tomcat bundle.

  • Jdbc-servlet help!!!!!!!!

    excuse my english.
    hey folks, i got this problem:
    i`m trying to do a simple servlet that`s throw a html with a result, but i always got this error:
    java.lang.NullPointerException
    at ConsultaServlet.doPost(ConsultaServlet.java:45)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    THIS IS THE CODE I HAVE:
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HolaServlet extends HttpServlet {
    private Connection con;
    private PrintWriter out;
    private Statement stmt;
    public void init(ServletConfig conf)
    throws ServletException {
    super.init(conf);
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con =DriverManager.getConnection("jdbc:odbc:MS Access Database");
    }catch(Exception e) {
    System.err.println(e);
    public void service(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException {
    res.setContentType("text/html");
    try {   
    out = res.getWriter();
    out.println("<html>");
    out.println("<head>");
    out.println("<title> Sample JDBC Servlet Demo" +
    "</title>");
    out.println("</head>");
    out.println("<body>");
    stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("select * from empleados");
    out.println("<UL>");
    while(rs.next()) {
    out.println("<LI>" + rs.getString("nombre"));
    out.println("</UL>");
    rs.close();
    stmt.close();
    } catch(SQLException e) {
    out.println("An SQL Exception was thrown.");
    } catch(IOException e) {
    System.err.println("An IOException was thrown.");
    out.println("</body>");
    out.println("</html>");
    out.close();
    public void destroy(){
    try{
    con.close();
    }catch(SQLException e) {
    Can someone tell me what i`m doing wrong.
    THANK.

    Hi,
    I have intalled the Javawebserver2.0
    Its been installed on C:\javawebserver2.0.
    After this I have set the autoexec.bat path as
    PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\ORAWIN95\bin;c:\Oracle\Ora81\bin;"C:\ProgramFiles\Oracle\jre\1.1.7\bin";c:\j2sdk1.4.2_04\bin;c:\JavaWebServer2.0\bin;c:\Jsdk2.0\bin
    rem - By Windows 98 Network for Netware Upgrade - c:\windows\odihlp.exe
    set classpath=.;c:\j2dsk1.4.2_04\jre\lib;c:\j2dsdk1.4.2_04\lib;c:\j2sdk1.4.2_04\bin;c:\JavaWebServer2.0\lib;c:\Jsdk2.0\lib
    rem -;c:\jsdk2.1\src ;c:\jsdk2.1\lib;c:\Jsdk2.0\src
    After doing this I wrote my first servlet program in the servlets directory of javawebserver2.0 saved and when I went to compile its not compiling throwing an error showing that it is unable to locate all the servlet packages. So in I thought might be there are 2 things one is either I have not imported javax.servlet.* and javax.servlet.httpServlet.* package, but I had included it, the next thing was to check the autoexec.bat path. I included in that javawebserver2.0 path. Now first I am not able to compile the servlet program. Can you help me with it.
    I had downloaded jsdk2 from net and have given its path also in the autoexec but nothing is happening. I am using the following package to write and develop Java programs "j2sdk1.4.2_04". Can you explain to where I am going wrong. Please its a bit urgent.
    Following is the program:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class helloWorld extends HttpServlet
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
    res.setContentType("text/html");
    PrintWriter out=res.getWriter();
    out.println("<html>");
    out.println("<head><Title>Hello World</title></head>");
    out.println("<body><big>Hello World</big>");
    out.println("</body>");
    out.println("</html>");
    Help!!!!!!!!

  • Run a simple servlet in WLS6.1

              Hi,
              I am new to WLS 6.1
              I have a simple servlet that outputs a string on webpage.
              I am trying to run this servlet using the WLS6.1
              I have compiled the source code and copied the class file (MyFirstServlet.class)
              into
              D:\BEA\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
              I have the web.xml file in web-inf directory as below
              <?xml version="1.0" ?>
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <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>
              <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              </welcome-file-list>
              <servlet> <servlet-name> MyFirstServlet </servlet-name> <servlet-class> MyFirstServlet
              </servlet-class> </servlet>
              <servlet-mapping> <servlet-name> MyFirstServlet </servlet-name> <url-pattern>
              MyFirstServlet </url-pattern> </servlet-mapping>
              </web-app>
              HelloWorls is also another simple servlet.
              then in the browser I give
              http://localhost:7001/MyFirstServlet
              this is the error I get
              Error 404--Not Found
              From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
              10.4.5 404 Not Found
              The server has not found anything matching the Request-URI. No indication is given
              of whether the condition is temporary or permanent.
              If the server does not wish to make this information available to the client,
              the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code
              SHOULD be used if the server knows, through some internally configurable mechanism,
              that an old resource is permanently unavailable and has no forwarding address.
              what is the problem?
              Please anyone help me in this matter!
              Thanks in Advance
              SP
              

              Hi,
              I am new to WLS 6.1
              I have a simple servlet that outputs a string on webpage.
              I am trying to run this servlet using the WLS6.1
              I have compiled the source code and copied the class file (MyFirstServlet.class)
              into
              D:\BEA\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
              I have the web.xml file in web-inf directory as below
              <?xml version="1.0" ?>
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <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>
              <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              </welcome-file-list>
              <servlet> <servlet-name> MyFirstServlet </servlet-name> <servlet-class> MyFirstServlet
              </servlet-class> </servlet>
              <servlet-mapping> <servlet-name> MyFirstServlet </servlet-name> <url-pattern>
              MyFirstServlet </url-pattern> </servlet-mapping>
              </web-app>
              HelloWorls is also another simple servlet.
              then in the browser I give
              http://localhost:7001/MyFirstServlet
              this is the error I get
              Error 404--Not Found
              From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
              10.4.5 404 Not Found
              The server has not found anything matching the Request-URI. No indication is given
              of whether the condition is temporary or permanent.
              If the server does not wish to make this information available to the client,
              the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code
              SHOULD be used if the server knows, through some internally configurable mechanism,
              that an old resource is permanently unavailable and has no forwarding address.
              what is the problem?
              Please anyone help me in this matter!
              Thanks in Advance
              SP
              

Maybe you are looking for

  • Auto clearing of customer open items

    Dears, We have implemented for a retail client, wherein we create sale order, collect money, deliver and billing. The collection will generate multiple document since it will be many types (cash, cheques, card, span, transfer etc), my requirement is

  • HT201250 Original files after I backup on time machine?

    What happens to the original files still on my computer after I backup on time machine? Should I trash them now to free up disk space. In other words are the backups all I need now?

  • ATI & Hewlett-Packard

    WHY does HP need to know about my video card problems, I have a Toshiba Satellite.  However, I've received the following error message: Consider sending additional information ATI display driver has stopped working properly. At this time, we don't kn

  • CSS: Centering via the CSS box model

    I have a page where I want a short line of text to center both horizontally and vertically. I've successfully used margin:0 auto in the past to center horizontally, but it's not working vertically. Any tips on why not and what route I should take?

  • BPM,Time bound based message collection

    Dear all, I need to collect messages of the employee information daily at 6.pm IST and send to the Receiver. For this I took Loop(condition is the Problem)->Receive container to append->tranformation here I assigned line item to multiline element. is