Java and Tomcat SSL

I have a java swing application that implements a servlet using Tomcat.  I want to be able to encrypt the data being sent to Tomcat and vice versa and I wasn't exactly sure of the process.  Would I just use HTTPS from the client side and configure SSL on Tomcat?  Any help would be great.
Thanks in advance.

Yes, using ssl is the best/simplest option.

Similar Messages

  • How to install Java and Tomcat on my VPS

    Hello,
    I am new in Java.
    I would like to install Java and Tomcat on my VPS server.
    Do you know which doc or info i should read?
    Thanks a lot.
    Gil

    The free Perian will do it for you automatically.
    Additional free new machine setup stuff:
    Install and update your Flash here
    http://get.adobe.com/flashplayer/
    Install Perian (addiitonal Quicktime codecs)
    http://perian.org/
    Install the Unarchiver (uncompress software)
    http://wakaba.c3.cx/s/apps/unarchiver.html
    Flip for Mac (for Windows media in Quicktime)
    http://www.telestream.net/flip4mac-wmv/overview.htm
    VLC (plays anything just about)
    http://www.videolan.org/
    Easy Find (finds everything on a Mac)
    http://www.devon-technologies.com/download/index.html
    OnyX (maintenance, cleanup, repair utility)
    http://www.titanium.free.fr/

  • Possible causes for memory leak in Java and Tomcat

    I would like to enquire what are the typical mistakes done by programmers that will cause memory leak in Java and Tomcat.

    Please refer the below site. It will give more points about the memory leak and how to rectify it.
    http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Q_20981562.html?cid=336

  • How to Install and Configure Java and Tomcat

    Hi Everybody,
    I am using the following versions of java and tomcat:
    JAVA: j2sdk-1_4_2_13
    Tomcat: jakarta-tomcat-5.0.5
    I tried to configure several times both but everytime the result is the same. I am setting the following variables:
    PATH: .;D:\j2sdk1.4.2_13\bin;D:\Tomcat 5.0\bin
    CLASSPATH: .;D:\j2sdk1.4.2_13\lib;D:\Tomcat 5.0\common\lib\servlet-api.jar
    JAVA_HOME: D:\j2sdk1.4.2_13
    Please correct what mistake i am doing again and again. I appreciate your effort.
    Thanks in advance.
    Himanshu

    Fine sir, I will tell evrything in detail what steps i am following during installation and configuring java and Tomcat.
    1) I am using the following versions(exe) of java and tomcat:
    JAVA: j2sdk-1_4_2_13-windows-i586-p
    Tomcat: jakarta-tomcat-5.0.5
    2) Then, i follow exactly the same variable names and values to configure java as mentioned below to make java work under User variables header:
    PATH: .;D:\j2sdk1.4.2_13\bin
    CLASSPATH: .;D:\j2sdk1.4.2_13\lib
    JAVA_HOME: D:\j2sdk1.4.2_13
    Above steps i follow only for installing java. And it also not working properly. If i run my .java file from the destination of the file then it will be execulted but if i try to execute from any other location then it doesn't, it shows the following message in the DOS prompt:
    error: cannot read: Hello.java
    1 error
    Now, please correct what mistake i am doing.
    Thanks
    Himanshu

  • Latest java and tomcat version

    what's the latest java and tomcat version? i would be migrating from j2se 1.4 and tomcat 4.1 to the latest j2ee and tomcat. it also has to be compatible with Novell
    Thanks

    But only the Application Server is a BETA release.
    i don't need the Sun Application Server, because I'm
    using TomcatYes, you don't need it and I don't think that was the point which you have been asking. When the J2EE 5 SDK will be officially released, you will find it on the main download page, rather than a preview and the Sun application server is bundled with the J2EE SDK, whether you need it or not. Anyway, JBoss has already released its latest version for the new specifications, mainly the ERB 3.0 implementation.

  • Java and Tomcat: Why do I need the port number when accessing Tomcat?

    My ultimate goal is to setup a website that displays data from a database. I will use Java, Apache, Oracle, and whatever else I need to create a website the uses servlets, JavaServer Pages, and JDBC.
    I�ve got four Pentium III computers:
    1. Windows 2000 Server to be the web server (MyWebServer, IP = 10.10.1.1).
    2. Windows 2000 Professional to be the database server (MyDatabaseServer, IP = 10.10.1.2).
    3. Windows 2000 Professional that I use to develop and test (MyDeveloperPC, IP = 10.10.1.3).
    4. Windows 2000 Professional that I use as a client to connect to the website (MyClientPC, IP = 10.10.1.4).
    I installed Java Web Services Developer Pack on MyWebServer. It requires Java 2 Standard Edition (J2SE), so I installed that first. The files I downloaded and installed are as follows:
    J2SE: j2sdk-1_4_0-rc-win.exe
    JWSDP: jwsdp-1_0-ea1-win.exe
    After installing these products, I set the environment variables as follows:
    JAVA_HOME = c:\j2se
    JWSDP_HOME = c:\jwsdp
    Path = c:\j2se\bin;c:\jwsdp\bin; [and other previous statements]
    On MyWebServer I start Tomcat (from the JWSDP menu option). It starts properly (as far as I can tell).
    Then, from MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1
    �The page cannot be displayed�.
    I then try again and add the port number:
    http://10.10.1.1:8080
    This displays the page c:\jwsdp\webapps\root\index.html.
    Here�s my question: Why do I have to enter the port number to get a page displayed? Do I have to have Apache HTTP Server running on MyWebServer to display pages without entering the port number?
    Thanks for your help.

    When you web server is running at the default Http Port, then you do not have to specify the port yourself.(The browser does it automatically)
    So if you run your web server at port 80, then you will not have to specify the port explicitlyin the url.
    If you want to use tomcat only as a jsp/servlet processing engine then install a web server (either IIS, or apache web server) and run it on port 80. (so that you dont have to specify the port)
    Now configure tomcat to run as a servlet engine for this web server. for this refer to the tomcat documentation.
    If you do not want to have an external webserver then you can configure tomcat itself to run at port 80 (in this case tomcat would do the work of both the web server as well as jsp/servlet engine... but this is not the setup for a production site). this can be done by changing the server.xml file in the conf directory of tomcat installation.
    hope this helps.
    regards,
    Abhishek.

  • Java and Tomcat

    Good afternoon.
    Is there any way to restart tomcat from java?

    shell.exec ...Ugly... and if you've got an administrator who's not smart enough to workout how to restart a tomcat server by tradition methods then you're real problem is how get him/her sacked for complete and total ignorance of the problem domain, which leads naturally to utterly incurrable incompetence.
    Cheers. Keith.

  • Problem with Java Studio Creator and Tomcat Server

    Hi Gays ,
    I have problem:
    here is the error from tomcat 5
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.lang.RuntimeException: java.sql.SQLException: statement handle not executed: getMetaData
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java: 601)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.ja va:316)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87 )
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    if i develop application on my pc ( java studio creator with sun apps bundlled) is working perfectly,
    but i migrated application to Tomcat Server ( Database the same - Oracle 10 g)
    i can't show value ( as text) from datasoruce ( is in SessionBean1)
    (Category-.>Subcat->Items->details( url from items table[items.jsp])
    this is a working url "/faces/testpage.jsp?auk_id=31 "
    ( working with sun apps server , but not on Tomcat 5)
    below prerender method in details.java and fragment of details.jsp
    public void prerender() {
    try {
    String idauk = (getExternalContext().getRequestParameterMap().get("auk_id").toString());
    System.out.println("wartosc auk_id " + idauk);
    if (idauk != null) {
    getSessionBean1().getDetailsRowSet().setObject(1,idauk);
    getSessionBean1().getDetailsDataProvider().refresh();
    details.jsp
    xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <ui:page binding="#{testpage.page1}" id="page1">
    <ui:html binding="#{testpage.html1}" id="html1">
    <ui:head binding="#{testpage.head1}" id="head1">
    <ui:link binding="#{testpage.link1}" id="link1" url="/resources/stylesheet.css"/>
    </ui:head>
    <ui:body binding="#{testpage.body1}" id="body1" style="-rave-layout: grid">
    <ui:form binding="#{testpage.form1}" id="form1">
    <ui:staticText binding="#{testpage.staticText1}" id="staticText1" style="position: absolute; left: 120px; top: 96px" text="#{SessionBean1.testDataProvider.value['Name']}"/>
    </ui:form>
    </ui:body>
    </ui:html>
    </ui:page>
    </f:view>
    </jsp:root>
    Help People ! Any Ideas I'm stuck, why is working with Sun Servet but not with Tomcat and only just thing ?
    Thanks in advance for helping me to resolve the night problem :)

    Hi I found solution, i puted on the page a table -component (with brand new automaticly created dataprovider) , then i set properties visible= false for table, and now I can bind statictext with database field and deploy on tomcat server .
    But i think it is not a elegant solution in page source i habe noused-code.
    Have Any another Ideas. HELP PEOPLE !!!!
    Mariuszek: I use Creator.because right now I can see result of my job and i can qickly change ideas ,
    I tried with JDeveleper but i did'nt find this functionality (wich version do you prefered ?) , unfortunately i have to deploy my application on Tomcat. This is my study project, and i make this to become a Master of Techinal Univeristy ;), Deadline time is 30 th September :(
    greetings

  • Problem with ssl and tomcat

    Hi to all, I'm trying to do ssl in a intranet. I have tomcat 4.1 and JDK 4.1_02. I have following all steps thats indicate the tomcat ssl documentation, I have copied the jcert.jar jnet.jar and jsse.jar to the directorie jre\lib\ext I have generated the keystore and verisign have sent me the keys. I have modified the server.xml where I have put the new port and the factory tag but I cannot see a page through https.
    I have port 8080 that redirects to 8443, which have the scheme=https.
    if I put http:\\localhost:8080 appear the tomcat home page.
    if I put https:\\localhost:8443 not appear nothing.
    if I put http:\\localhost:8443 not appear error but don't show nothing.
    I have seen the log of tomcat and appear an exception:
    org.apache.commons.digester.Digester error
    Parse Error al line 89 column 11: the content element type "web-app" must match (icon?,display-name?....
    this exception don't appear previously,it seems that is a problem of xerces.
    Any idea or help it is welcome.
    THANKS.

    Obviously you have a syntax error in your one of your .xml files. Most likely in either the global web.xml or the application specific one.

  • Why do I need to restart Apache and Tomcat every time a java file is change

    If a java file is changed and complied the changes are not reflected if Tomcat is not restarted.
    The settings in server.xml are as:
    <!-- Tomcat Manager Context -->
    <Context path="/manager" docBase="manager" debug="0" privileged="true"/>
         <Context path="/cf" docBase="cf" debug="0" reloadable="false"/>
    Here "cf" is my Application folder under webapps. The reloadable property when set to "true" for standalone Tomcat on Windows98 reflects the changes for compiled java files without restarting Tomcat. But on Linux 7.1 with Apache 1.3.19 and Tomcat 4.0.3 this is not working.
    Also tried out with Manager Application of tomcat-users.xml with reloadable="false" as well as reloadable="true",
    But when I reload the application using the command
    http://servername:8080/manager/reload?path=/appli.name
    It tells me that the application is reloaded but changes in the java file are still not reflected.
    Also when reloaded through Manager Servlet, Only my load-on-startup servlet is reloaded, but other java classes are not.
    Is it neccessary to execute this reload command from the server itself. I m executing it from a remote m/c. and have mapped the application with a domain name virtually.
    Is it the case with Tomcat on Linux with Apache. Or is something going wrong on my part.
    Can someone Help out plz.
    Regards,
    Rupali

    or you can "touch" your web.xml file.
    touch web.xmlor that command is for *nix systems, not sure what the Windows command is.  But basically, when you edit the web.xml, even if it means updating the last modified time, it will restart only your application and you should see the changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Java application (tomcat) and Oracle RAC 10gR2

    Hi, I have an Oracle RAC 10gR2 (10.2.0.3) on Suse Linux Enterprise Server (3 nodes).
    I have several application running on tomcat 5.X and tomcat 6.X with java 1.5 and java 1.6. Sometimes, because of hardware fail, network problems,... one of the nodes fails, and then the other 2 nodes still working and my database is up. However, the most of applications lose the connection with the database, and I must to restart the tomcat. I want to have a system more reliable and robust, and I want to prepare the tomcat's and java application for prevent it. I have read the http://drdobbs.com/java/222700353?pgno=1 and http://db360.blogspot.com/2007/01/is-your-java-application-failoverproof.html. I've been tried the example of the first url, but I don't connect with my database. However, I've probe the sample on another oracle rac (10.2.0.4) and it works. In the samples, it use the ucp.jar (11g) and ons.jar (10g) and ojdbc6.jar (11g driver).
    Anyone can help me how can I configure my application for I must not to restart the tomcats??
    Thanks you very much!!.

    The best solution for your problem is ORACLE SUPPORT.. Please raise an SR and coordinate with them.. GoodLuck!

  • Change from 1.4.2_04-b05 to  (Java 1.3.1_02 and Tomcat 4.0.1)

    I'm afraid i am completely new to configuring machines for use with Java.
    I need to configure a server to run on a prior version of Java and am not sure how to do this as there are no uninstall options either in the application directory or through the control panel. If anyone could help it would be greatly appreciated as to configure the same roll back on my local machine took a real fudge of altering the registry and manually changing the Java.exe to a proir version. Although this has not caused any problems i would like to run through a cleaner process on the server.
    Thanks in advance
    Mark Harrison

    NPOJI610.dll is a very important file for Java Plugin to work with Netscape/Mozilla. So first check whether that file exisits in your system or not. If no, you probably need to reinstall JRE.
    If yes, you can try the following.
    1. Would you be able to open "Java Console" from Netscape's Tools->Web Development?
    2. Also you can try to rename C:\Document And Settings\Username\Application Date\Mozilla directory and then re-launch the browser to see whether it works or not.
    Xiaobin

  • SSL and tomcat

    how can i configure tomcat to run with SSL? any ideas?

    here you are - http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ssl-howto.html

  • Anyrelation between the .keystore exisitng in the system and tomcat keystor

    there is a .keystore under documents & settings\ username\
    by default for getting digital certificates we need to create a keystore.
    when i created a keystore of my own name it showed some error.
    i then created a keystore with name .keystore and password changeit.
    it worked when i replaced my keystore over the exisitng .keystore under documents and settings...
    no body know abt the signature and all when i posted.
    atleast someone can help me..
    my doubts are:
    1) whats the existing keystore?. can i use it for generating CSR?
    2) what shld i do when i want to create a keystore of my name.. any extension is needed?... where shld i place it...how shld i edit the server.xml? i tried using the admin tool and my server.xml got correpted.. showed lifecycle exception while starting tomcat.
    3) i got a mail from verisign at the bottom they had something like the content in my CSR file. but they have given some installation instructions above that..and many links each of that pointed to 3 different such certificates..and i got confused.. which one to choose.
    when i followed the tomcat ssl intruction and copied the thing which i saw at the bottom of my mail i was able to view the page using https. and asked for certificate installation
    can some one pls direct me correctly

    Update on the situation. I quickly realised that my code was not threading ... doh!
    public class Test implements Runnable{
            public static void main(String[]args) throws Exception {
                    while(true) {
                            Test test = new Test();
                            // Create and start the thread
                            Thread thread = new Thread(test);
                            thread.start();
            public void run() {
                    Math.random();
    }Running this on the alpha box I got 177% of CPU being used ... more like it IMHO. However the debian box still suffered from the same problem. I know that this problem now looks like it lies outside of this forum's scope but does anyone have any experience of debian & multi-processor boxes WRT java?
    Any help at all will be appreciated.
    Andy Yates

  • Communication problem between NetBeans and Tomcat

    hi!
    i got a quite mysterious problem. here is what happens:
    - i start NetBeans 5.5.1 (the first time)
    - i want to debug my JSF-Project, the Debugger starts
    - After a few seconds the debugger waits for tomcat (it sais: "Waiting for Tomcat...") and tomcat starts
    - Again after a few seconds the tomcat-debugger-output sais "Tomcat startet in 3333 ms".
    okay.
    when i enter http://localhost:8084/ in my browser i get the tomcat homepage, so the server has definitely started! But nothing happens in NetBeans and nothing happens with my project....
    In the lower-right corner i see this blue working-bar that sais "deploying project" but nothing happens. The Project-Debugger-Output still sais "Waiting for Tomcat..." but nothing happens...
    And after something around 3 minutes (i guess it's a timeout) i get the error "Starting of Tomcat failed." But is HAS started, i can login to the Administration-Area in my browser!
    so i guess there is a communication problem between netbeans an tomcat. Netbeans waits for a message from tomcat but tomcat doesn't send it..or netbeans doesn't understand it.
    But the story goes on:
    When i press the debug-button a second time it takes only a few seconds till i get the message: "Tomcat server port 8084 already in use". OF COURSE! Because Tomcat has already startet and can't be stoped by NetBeans.
    i'm trying to solve this problem for 4 days now, so i would be very happy if anyone has an idea where to start/continue the search...
    thanks,
    flo.
    some system-info:
    - windows vista business 32-bit
    - no firewall is running
    - AntiVir Personal Edition IS running
    - Yahoo Widgets Engine IS running
    - no other software is running
    and finally the tomcat-log:
    Using CATALINA_BASE: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base
    Using CATALINA_HOME: C:\Program Files\NetBeans\enterprise3\apache-tomcat-5.5.17
    Using CATALINA_TMPDIR: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\temp
    Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_12
    Listening for transport dt_shmem at address: tomcat_shared_memory_id
    21.09.2007 18:27:50 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\cvsnt;
    21.09.2007 18:27:50 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:50 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1862 ms
    21.09.2007 18:27:50 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    21.09.2007 18:27:50 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    21.09.2007 18:27:50 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    21.09.2007 18:27:53 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:54 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    21.09.2007 18:27:54 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    21.09.2007 18:27:54 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    21.09.2007 18:27:54 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3626 ms

    As i wrote before, the same problem occured for me. I have found a solution which is : Go to tools menu and then select options . In the proxy info, select No Proxy.
    I hope this help you

Maybe you are looking for

  • Unable to invoke webservice from plsql.

    Hi i am unable to invoke the web service i am getting the following error when i run the following coe can any one help out its great help thanks you error-> Invoke_Ws : When Others -- ORA-29532: Java call terminated by uncaught Java exception: javax

  • Can a RVL200 connect to BEEVPN with this config?

    Hi all, Hope someone can help me get clear on this. I'm in doubt whether I should buy a RVL200. I'm no expert in VPN or routers. I would like to know whether or not I can use a RVL200 to establish an Ipsec tunnel to BEEVPN-service (beevpn.com). They

  • What's the point in buying a new MacBook?

    Hi all, Recently I went with my iBook G4 to the Apple store to troubleshoot a small problem, but they were unable to help me as after only 7 years, the machine was rendered obsolete and they didn't feel obliged to help. My iBook recently died and I f

  • Monitor off

    The notebook HP 630 (A6F38EA#ABZ) off the monitor after 1 minute, I changed the settings on both the bios that has windows 7, but without success. Regards

  • My user information has been corrupted and I cannot open Microsoft Office

    After the latest Office 2011 for Mac update, I have not been able to start Word, Excel, or Powerpoint.  Outlook for some reason is ok.  After going back and forth with Microsoft, I have discovered that I can open these programs if I have created a ne