Https with midp and servlets

Hi Everyone,
I've written an application in MIDP which connects to a servlet and the servlet returns some information using a HTTP connection. Now I want to build in some sort of security and heard that it is possible to use HTTPS. Does anyone know some links where there is a tutorial or explanation on how to use HTTPS (both in MIDP as in J2EE)?
Thanks in advance,
Martijn

it doesn't exist in MIDP for PalmOS yet. apparently it's due some time in "the next couple of months" (read sometime in 2010).
As for the other midp implementations, who knows.
generic embedded encryption is available from bouncycastle.org
-mcclain

Similar Messages

  • Help with jsp and servlets(litterature)

    I'm planning on converting a asp website to jsp and I need to figure out the following:
    1: servlet that gives out connection objects from a pool and manages "lost" connections to a mysql db
    2: a bean that has getConnection and closeConnection that is used on every jsp page.
    3: servlet/bean that can check size/dimesions/filetype on a remote url image
    4: Figure out what users are logged in at every given moment. result: x users are on, these are user1, user2, user3. automatic removal when session runs out. probably need a servlet for this.
    I got these books:
    deitel java how to program 3rd edition
    deitel advanced java 2 platform how to program
    The last book has a servlet and jsp section ut I suspect that java has evolved since then so thats why I'm asking if you have any other suggestions that offer more than 2 chapters. Its really basic the stuff i have :)
    Its been 3 years since I've touched java so i hope you guys can recomend jsp/servlet books that can answer these questions for me and help me get started with this project?
    Thanks :)

    1. apache dbcp commons library.
    http://jakarta.apache.org/commons/dbcp/
    2. tomcat DataSource, which already has the dbpc logic incorporated into it.
    http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
    3. no idea, google may help
    4. HttpSessionBindingListener. This allows you to monitor when a bean (such as a User bean) is added to the session and when it is removed from the session. This way you can track yourself which users are online.
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionBindingListener.html

  • Problem with JSP and servlet in Tomcat

    hello all,
    I have made a simple hello world in Eclipse and Tomcat, it works well on my localhost, but now that I try to run it on the server in our lab I got this exception:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Implementing class
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.IncompatibleClassChangeError: Implementing class
         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:1815)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:869)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1322)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:127)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         java.lang.Class.getDeclaredConstructors0(Native Method)
         java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
         java.lang.Class.getConstructor0(Class.java:2640)
         java.lang.Class.newInstance0(Class.java:321)
         java.lang.Class.newInstance(Class.java:303)
         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:148)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I have transfered the web.xml file and lib and classes folder in a WEB-INF folder and also all the JSP files. I can see he JSP file, but the 'hello worl' does not work and gives this exception!
    Does any one have any idea what could be the problem?
    thanks a lot
    Mitra

    seems the web Server code previously loaded a class only when it was used rather than when it was referenced,
    ask your question in the tomcat-user mailing ! !!!

  • HTTPS with APEX and Orace XE

    I looked into it and I cant really get a clear image on how this works and if it is possible with my current situation.
    What do I want?
    I want make HTTPS calls from my pl/sql like:
    UTL_HTTP.SET_WALLET('location', 'pw');
    req := utl_http.begin_request('https:.....');
    What is my situation:
    I just installed XE and Apex 4 on it, as far I know I have no apache or an other webserver running.
    I know you need to set wallets and that the wallet manager is not available in XE due licence reasons but is it totally impossible to use https?
    (honestly never did any HTTPS calls with any serverside script/code, and not an experience Oracle user either)
    Cant I just manually drag a certificate or wallet inside a folder or something?
    Or if I want to use HTTPS in XE I need to use 3rd party software and how?
    P.S. It is for secure calls to the facebook API
    Greets

    I'm not familiar with that construct but did you try this and not have it work?
    In general if you tell the browser to use https to connect to some ssl service it
    does it without you specifying a cert to use... unless you were using certs to identify
    yourself instead of ids and passwords. Most of the cert action is on the part of the
    web service that is providing an https: service which would be facebook in this case.
    So I'd say try it first if you haven't. I would imagine an id and password would have to be in
    the mix however?

  • New Bie - Starting with JSP and Servlets

    Hello fellow members,
    It's my pleasure to be a part of such a wonderful forum. Today, I am here to learn JSP, Servlets, and related tech/frameworks.
    I'd be thankful to any member who can guide me in the right direction.
    I have good working knowledge of Core java.
    I have a licensed copy of weblogic 9.2, though I have no idea how it works :).
    Looking forward for some good pointers to start with. If anyone can hand hold me and tell me exercises I should do every day, there is nothing like that. I can dedicate in excess of 6 hrs daily to learn these new technologies.
    Thanks in advance,

    Sonia_31 wrote:
    I planned to start with tomcat. Tomcat is a good choice.
    I am using my cousins laptop which already has BEA weblogic 9.2 installed. He used to work as software engineer. So I thought it was better start with weblogic, than going for something else.Apparently his company is using Weblogic.
    As I am serious about the whole thing weblogic is a better option. You have application servers and application servers. When I say that Weblogic is commonly only used in "real" production environments, I do not mean that "real" production environments only use Weblogic. You can use any self-respected application server to your taste. Either freeware or payware. That you're using a payware one to start with just made my eyebrows raise.
    Looking for some info to get started. I have downloaded the pdf you have mentioned and started studying. I'll post my questions soon.Good luck.

  • Best websites with JSP and Servlets

    I would like to see some examples of the best well-known websites realised with jsp & servlets.(if it's possible some awarded ones)
    thx

    This forum is using JSPs. I can see post.jsp in the URL as I type this. Famous enough?
    I believe eBay is 100% J2EE:
    http://www.theserverside.com/home/thread.jsp?thread_id=8906
    MOD

  • Delete data dynamically with JSP and servlet (Very Urgent)

    Hi,
    I am new with servlets and JSP. On my jsp page I am populating customer names in a drop box from database and I have 3 buttons ADD, DELETE and EDIT.
    Now when I press DELETE buttong I am calling delete function which is writen in Javascript on my jsp file only,now I want to pass these selcted values ehich I have stored in an array to be pass to servlet,so I can write Delete query for it and delete.
    Could anyone help with sample code>
    Here what I am trying to say:
    <HTML>
    <HEAD>
    <script language="JavaScript" type="text/javascript">
    <!--
    function remove()
    var u = confirm("Are you sure you want to Delete Selected names?")
    if (u==true)
         var selectedArray = new Array();
         var selObj = document.getElementById('CUSTOMER_NAME');
         var i;
         var count = 0;
         for (i=0; i<selObj.options.length; i++) {
         if (selObj.options.selected) {
         selectedArray[count] = selObj.options[i].value;
         count++;
         alert("names to be deleted are:"+selectedArray);
         // selectedArray has the selected items stored
         alert("Items Deleted!")
    else
    alert("No data were deleted!!You pressed Cancel!")
    //-->
    </script>
    </HEAD>
    <BODY>
    //calling servlet on action tag of form
    <FORM METHOD= 'POST' ACTION='Remove_Customer'>
    <form ><INPUT TYPE='submit' NAME='DELETE' VALUE='DELETE' onclick="remove()"></TD></form>
    <form><INPUT TYPE='submit' NAME='MODIFY' VALUE='MODIFY' onclick="modification()" ></TD></form>
    </BODY>
    </HTML>
    PLEASE HELPME,it's very urgent.
    Since the selected Array is in javascrip language , I don't know how can I pass that to servlet.
    request.getParameter is not working,since it's an array
    Many thanks in Advance.

    Hey,
    I am having problem deleting multiple values.
    If I just select one value,it deletes it
    But for multiple values the code is not working right.
    If there 2 values selcted then the last value gets deleted,if there are more than 2 values selected none values delete.
    Could plese check the code,and let meknow what mistake am I doing?
    Please help
    String delName="";
    int pos = tStr.indexOf(",");
    System.out.println(pos);
         if (pos != -1)
                   delName = tStr.substring(0, tStr.indexOf(","));
              tStr = tStr.substring(tStr.indexOf(",") + 1 );
                   System.out.println("DElName:"+delName);
                   System.out.println("tStr::"+tStr);                              
                        delName = tStr;
                        delete_Customer(delName);
    Thanks
    ASH

  • Problems with EJB and Servlet

    I'm doing a simple servlet that invokes an EJB taht returns an ArrayList with a values.
    My problem is that I do trace of my execution an this woks well in the EJB but when my remothe method do the return the app finish and never return to servlet that invoked it. I don't know 'cause this happend.
    I'm using WASD 5.0.1 as my Web y EJB container.
    Help would be appreciate

    What does that ArrayList contain?
    Could you post the code please.

  • Probem with applet and servlets

    subject "not able to invoke applet from servlets"
    i have attached files also..
    Respected sir,
    I am thomas from prateek techologies ,referred by madam Pratibha.
    Actually i have to plot point marks on a image(it is a Banglore map) in an applet(Uploadimg3.java).so, for doing so, iam getting values from database in my servlet file named Mapuser_sev.java
    which is in the directory
    WEB-INF/classes.
    now after fetching the values ,i am not able invoke the Applet (Uploadimg3.java)which is in the directory
    WEB-INF/classes/mapuser.
    i have used the api ,response.sendredirect("/prakash/jspfiles/displaymap1.jsp");-->up to here it's ok..
    I have used the plugin tag as follows:-
    displaymap1.jsp
    <html>
    <body>
    <jsp:plugin type="applet" code="Uploadimg3.class" codebase="WEB-INF/classes/mapuser" width="400" height="400">
    </jsp:plugin>
    </body>
    </html>
    if the plugin tag is wrong then please send me the correct coding for "jsp: plugin" with explaination.
    this is my directory hierarchy..
    jspfiles-->directory(folder)
    Prakash/jspfiles/displaymap1.jsp ----->this file has the plugin tags as mentioned above..
    Prakash is my context..
    WEB-INF/
    classes/Mapuser_serv.class -----> this is a servlet file
    mapuser/
    Uploadimg3.java -----> this is a Applet file
    Uploadimg3.class
    Mapuser1.java ---> i used this file to fetchdata from db ,please forget this file ..
    Mapuser1.class
    with regards,
    Thomas..

    It might be the restrictions java has about opening files in a web browser. I don' t know if it's allowed or not..

  • Help with JSP and Servlets

    Hi,
    How would I create an editable JSP form from JDBC?
    I know how to retrieve the data from JDBC, but I'm still trying to figure out how to take that table data and format it into a tabluar format that user can make changes to it.
    Thanks,
    Tom
    Message was edited by:
    bztom_33
    Message was edited by:
    bztom_33

    CreateConnection();
    logger.info("Database connection opened in Testimonials");
    String queryText = "LOCK TABLE testimonials WRITE,posting_table WRITE";
    int numOfRows = st.executeUpdate(queryText);
    rs = st.executeQuery(SELECT_QUERY_FROM_TESTIMONIALS);
    logger.info("Query executed postingVeiw");
    String queryText1 = "UNLOCK TABLES";
    int numOfRow = st.executeUpdate(queryText1);
    while(rs.next())
    ClientData client = new ClientData();
    client.setName(rs.getString("name"));
    client.setTestimonial(rs.getString("testimonial"));
    client.setCompany(rs.getString("company"));
    clientList.add(client);
    RequestDispatcher disp = null;
    req.setAttribute("clientlist", clientList);
    String error1 = req.getParameter("");
    disp = req.getRequestDispatcher("testimonial.jsp");
    disp.forward(req,res);
    And call this arraylist from the jsp page
    Cheers
    Varun Rathore

  • Help with JSP and logic:iterate

    I have some queries hope someone can help me.
    I have a jsp page call request.jsp:
    ====================================
    <%@ page import="java.util.*" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html>
    <body>
       <%@ page import="RequestData" %>
       <jsp:useBean id="RD" class="RequestData" />
       <%Iterator data = (Iterator)request.getAttribute("Data");%>
       <logic:iterate id="element" name="RD" collection="<%=data%>">
          <jsp:getProperty name="RD" property="requestID" />
          <%=element%><br>
       </logic:iterate>
    </body>
    </html>
    And I have the RequestData.java file:
    ======================================
    private int requestID = 1234;
    public int getRequestID() { return requestID; }
    The jsp page display:
    ======================
    0 RequestData@590510
    0 RequestData@5b6d00
    0 RequestData@514f7f
    0 RequestData@3a5a9c
    0 RequestData@12d7ae
    0 RequestData@e1666
    Seems like the requestID is not returned. Does anybody know this?
    I have done the exact one using JSP and servlets, trying to learn using JSP and custom tags. The one with JSP and servlet looks like:
    ============================================
    <%@ page import="RequestData" %>
    <%Iterator data = (Iterator)request.getAttribute("Data");
    while (data.hasNext()) {
       RequestData RD = (RequestData)data.next();
       out.println(RD.getRequestID() );
    }%>

    Oh think I got it...
    but one thing I'm not sure is...
    If I use "<jsp:useBean id="RD" class="RequestData" />", do I still need "<%@ page import="RequestData" %>"?
    I tried without and it gives me error...

  • Need some help with Slow Downs in Java3D and Servlets

    Hi,
    I realize that there is a separate forum for Java 3D, but I posted there, and did not get any response. This is kinda the crux of my program, so I would like to invite anybody on this forum with knowledge of Java 3D and servlets to give it a stab. Between this post and that one, there are TWENTY duke dollars up for grabs.
    Thanks.
    http://forum.java.sun.com/thread.jspa?threadID=603198

    Let me have an educated guess.
    You calculated the time elapsed before sending in a server request - and at that point you have you updated timeLastStateChange yet, which means by the time of the next calculation of time elapsed this apparent delay is not counted in, hence the slow down in animation rate.
    Hope this helps~
    Alex Lam S.L.

  • Problems with Safari and Firefox (HTTP?)

    Problems with Safari and Firefox (HTTP?)
    On a laptop G4, 10.5.8 and Safari 5.02 I experience the following:
    On the account of my oldest daughter everything works fine, i.e. wireless internet works and no problems with mail or safari.
    On the same laptop, on the account of my other daughter, the wireless is OK, she can mail etc. But safari nor firefox works. It says: can’t find server (whatever site) and in the activity window it looks if safari tries to open files (in the safari preferences-folder) in stead of http. Same applies to Firefox, so maybe it has more to do with HTTP in general?
    What goes wrong? What to do? I tried the following on the host terminal (tips from Apple)
    defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false
    and
    defaults delete com.apple.safari WebKitDNSPrefetchingEnabled
    but that did not help,
    Nanne

    I'm still wondering why it happens now at this moment in time...
    PC does seem to be a bit odd & inconsistent, the few times I've tested with it, at least so far as we content filtering goes; and if I remember rightly, you're not the first to report previously ok settings suddenly preventing some or all internet until pc is switched off altogether.
    It may work when re-enabled

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • Scripting with FTP and HTTP

    Hi All,
    To help us with future planning, we would like to get a feel for how many developers are using the FTP and HTTP objects that are available with scripting in CS3 (through webaccesslib). If you are using them could you send me a quick email describing how you use the component? My email address is [email protected]
    Thanks in advance.
    Alan Morris
    Dev Tech Engineer
    Adobe Systems

    Yeah, this is so aggrevating!
    Adobe builds all of these cool ideas, then doesnt test them.
    The HTTPConnection object does not do POST at all. I have tried nearly every possibility. The documentation is either way off or the object just does not work. I can see the post in raw form and the POST variables are not coming across.
    After working on this for a few hours i thought to myself, hey maybe i should just create a flash pane instead and load the files into it, then have the flash object upload. Well i ran into a big fat wall there too! As it is with patchpanel and bridge, these technologies only accept swf objects. This whole concept of using SWF and crossscripting has a huge flaw. The SWF file's security format does not allow for local file access for doing simple things like upload. If i can't synchronize file data to web based clouds, then i cant do much worth talking about.
    I love these products and their possibilities but i have to have the ability to communicate with the world. HTTP is the way!
    Also a side note, FTP is an insecure/inflexible solution and looks like a lot more time was spent on this aspect of the scriptable product.
    PLEASE HELP ADOBE!!!!!

Maybe you are looking for

  • Error on Travel and Expense

    Folks, I am getting this error when I am trying to create new expense report   My Travel Profile   500   Internal Server Error   SAP NetWeaver Application Server 7.00/Java AS 7.00 Failed to process request. Please contact your system administrator. [

  • Is there any way to recover files lost from restarting my Mac?

    I had Garage Band and Pages documents open, and all of a sudden an opaque grey screen slid down over the screen and it asked me to restart the computer by holding down the power button. I did that because it wouldn't let me do anything else, and when

  • SQL Developer  3.2.09 fetch rows limit

    Hi, I have a problem. When I perform a query on some table that returns a lot of rows I can get only number of rows that set in fetch size in Preferences->database->Advanced. It just stops and doesn't allow to scroll any more. There was no such kind

  • My ipod is formatted to windows, I now have a mac...

    Hi, my ipod is formatted to Windows, but I now have a mac. Is there a way to change it, and what difference does it make? Any help would be appreciated x

  • To change the directory for oracle

    hi to all I have installed oracle 8.05 in E:\ directory but now i want to reinstall oracle Enterprise edition in C:\ directory The operating system is Windows NT 4.0 I need help in order to uninstall oracle & install it into new directory,because whe