How to deploy a JSP with jsp:plugin with applet type?

Hi,
I am a new comer for JSP and when to try to a simple JSP with plugin for applet. Following is part of my JSP script:
<jsp:plugin type="applet" code="DigitalClock" align="center" height="25" width="300"
>
     <jsp:params>
          <jsp:param name="language" value="<%=request.getLocale().getLanguage()%>" />
          <jsp:param name="country" value="<%=request.getLocale().getCountry()%>" />
          <jsp:param name="bgcolor" value="FFFFFF" />
          <jsp:param name="fgcolor" value="CC0066" />
     </jsp:params>
          <jsp:fallback>
          <p>Unable to start plugin.</p>
     </jsp:fallback>
</jsp:plugin>
===========
And Java plugin tell me that can't find DigitalClock class. I want to ask how to deply this JSP using deploytool.
Thanks,
Wise

Hi
It should be in such a way,
The Jsp:param is similar to PARAM used in Applet.
<jsp:plugin type="applet"
code="MyApplet.class"
width="475" height="350"
<jsp:params>
<jsp:param name = "PARAM1" value="VALUE1" />
</jsp:params>
</jsp:plugin>
jsp:fallback Element
It provides alternate text to browsers that do not Support OBJECT or EMBED. You can use this element in the same way as you provide alternate text in your applet.
<jsp:fallback>
<b> Error: This example requires java </b>
</jsp:fallback>
</jsp:plugin>
I hope this will help you.
Thanks
Bakrudeen
Technical Support Engineer
Sun MicroSystems Inc, India

Similar Messages

  • How to deploy cairngorm application with FTP support?

    Hi,
    I have a cairngorm application, it works fine in my local
    computer.
    But I need to upload it to a website in my web hosting
    company with FTP,
    but it doesn't work in the hosting server because I can not
    add the cairngorm.swc file to the application.
    Please give me a idea how to deploy the application with ftp
    software.
    Thanks a lot
    Mark

    Any opinions are welcome

  • How I tie the formula with conditions type?

    Hi,
    Than create the formula with tcode O3I7:
    1) how I tie the formula with conditions type?
    2) how I tie the conditions type with the formula with Calculation Schema?
    help me, please.
    thanks
    Edited by: celeste ziantoni on Feb 5, 2008 6:45 PM

    Hello,
    Pricing formula is created using transaction VOFM. It is tied to the condition types in Pricing Procedure definition in Alternate Calculation Type column. For Pricing procedure, the menu path is SPRO->Materials Management->Purchasing->Conditions->Define Price Determination Process->Define Calculation Schema.
    Thanks,
    Venu

  • How to deploy a jsp file?

    Hello,
    I am new to Java. I have been developing a small web application which contains three files HTML,SERVLET and a JSP. I don't have any problem with the html & Servlet, It runs well and I get the desired output.
    I use the JSP file for validation.
    But, How to run this JSP?
    i.e. I want to run this JSP page from Servlet while performing some validations.
    Plz let me know
    where should I put this JSP? (I am using Tomcat server)
    Is there any need to enter data into web.xml similar to Servlet?
    Is there any need to set some environmental variables etc etc...
    Hope a quick respone.
    Thank you.

    This is my servlet code........
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ServerConfig extends HttpServlet
    Connection con;
    Statement st;
    ResultSet rs;
    public void init(ServletConfig config) throws ServletException
         super.init(config);
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         con=DriverManager.getConnection("jdbc:odbc:ServerConfig"," "," ");
         st=con.createStatement();
         }catch(Exception se){System.out.println("problem with connection establishment");}
    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
         String s1,s2,s3,s4;
         res.setContentType("text/html");
         PrintWriter out = res.getWriter();
         int branches = Integer.parseInt(req.getParameter("txtBranches"));
         int users = Integer.parseInt(req.getParameter("txtUsers"));
         int accounts = Integer.parseInt(req.getParameter("txtAccounts"));
         int transactions = Integer.parseInt(req.getParameter("txtTransactions"));
         out.println("<HTML>");
         out.println("<HEAD><TITLE>Server Configuraion</TITLE></HEAD>");
         out.println("<BODY>");
         out.println("<B>Best Server Configuraion</B><HR>");
         out.println("<FORM>");
         out.println("Branches: " + branches);
         out.println("<BR>");
         out.println("Users: "+ users);
         out.println("<BR>");
         out.println("Accounts: "+ accounts);
         out.println("<BR>");
         out.println("Transactions: "+ transactions);
         out.println("<HR>");
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         System.out.println("DriverLoaded");
         Connection con=DriverManager.getConnection("jdbc:odbc:ServerConfig"," "," ");
         System.out.println("Connected");
         Statement st=con.createStatement();
         ResultSet rs=st.executeQuery("select DatabaseConfig,ApplicationConfig,WebConfig,BranchConfig from Configuration                     where Branches="+ branches +" and Transactions="+ transactions +" and                                         Accounts="+ accounts +" and Users="+ users +";");
         rs.next();
         s1 = rs.getString(1);
         s2 = rs.getString(2);
         s3 = rs.getString(3);
         s4 = rs.getString(4);
         if (s1.length()==0)||(s2.length()==0)||(s3.length()==0)
    //Plz let me know how should I call JSP?????
    out.println("Database Server:<BR>    <textarea rows=5 cols=30>"+s1+"</textarea><BR>");
         out.println("Application Server:<BR>    <textarea rows=5 cols=30>"+s2+"</textarea><BR>");
         out.println("Branch Server:<BR>    <textarea rows=5 cols=30>"+s3+"</textarea><BR>");
         out.println("Web Server:<BR>    <textarea rows=5 cols=30>"+s4+"</textarea><BR>");
         out.println("</FORM>");
         out.println("</BODY>");
         out.println("</HTML>");
         con.close();
         }catch(Exception ex){System.out.println(ex);ex.printStackTrace();}
    };

  • How to deploy Oracle10g jsp report in Apache

    while i am deploying Oracle jsp report in Apache through webapplication it is showing this exception...
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to read TLD "META-INF/taglib.tld" from JAR file "file:/E:/Softwares/rajivudyogasri/build/web/WEB-INF/lib/reports_tld.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: oracle.reports.jsp.ReportTagExtraInfo
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         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)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    org.apache.jasper.JasperException: Unable to read TLD "META-INF/taglib.tld" from JAR file "file:/E:/Softwares/rajivudyogasri/build/web/WEB-INF/lib/reports_tld.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: oracle.reports.jsp.ReportTagExtraInfo
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:179)
         org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:181)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
         org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         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)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
    Apache Tomcat/5.5.27
    Thanks inadvance

    Hi,
    you can refer to this link: How to deploy jsp in R12 environment?
    Rgds,

  • How to deploy report jsp on portal

    Pls tell me how to deploy a report made in 9iDS as JSP on portal.
    Thanx.
    Anant Kulkarni.

    Thanx a lot Nishanth
    Yes my report is a .jsp file.
    Can u pls specify the exact steps I should follow coz I have never used portal before. I have tried creating portal page but it didn't prompted me for JSP as a type while choosing source. One more thing - IS IT NECCESSARY TO HAVE 9IDS INSTALL ON THE M/C WHERE Application Server is running. ??????
    Pls help. Pls take out some time for me.
    Thanx.

  • How to deploy a JSP Client

    I tried to deploy EmployeeClientJSP.jsp and faced this error
    java.lang.NullPointerException: domain was null
         com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIConnection com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIServer.addNode(java.net.InetAddress, int, java.lang.String, java.lang.String, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIContext, boolean, java.lang.String, boolean)
         com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIConnection com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIServer.getConnection(java.net.InetAddress, int, java.lang.String, java.lang.String, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIContext, boolean, java.lang.String, boolean)
         javax.naming.Context com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIInitialContextFactory.getInitialContext(java.util.Hashtable)
         javax.naming.Context javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable)
         javax.naming.Context javax.naming.InitialContext.getDefaultInitCtx()
         void javax.naming.InitialContext.init(java.util.Hashtable)
         void javax.naming.InitialContext.<init>(java.util.Hashtable)
         void EmployeeClientJSP.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         [EmployeeClientJSP.jsp]
         void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
         boolean com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run()

    I tried to deploy EmployeeClientJSP.jsp and faced this error
    java.lang.NullPointerException: domain was null
         com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIConnection com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIServer.addNode(java.net.InetAddress, int, java.lang.String, java.lang.String, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIContext, boolean, java.lang.String, boolean)
         com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIConnection com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIServer.getConnection(java.net.InetAddress, int, java.lang.String, java.lang.String, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIContext, boolean, java.lang.String, boolean)
         javax.naming.Context com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.rmi.RMIInitialContextFactory.getInitialContext(java.util.Hashtable)
         javax.naming.Context javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable)
         javax.naming.Context javax.naming.InitialContext.getDefaultInitCtx()
         void javax.naming.InitialContext.init(java.util.Hashtable)
         void javax.naming.InitialContext.<init>(java.util.Hashtable)
         void EmployeeClientJSP.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         [EmployeeClientJSP.jsp]
         void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
         boolean com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run()

  • How to deploy a jsp app as portlet in portal?

    i'm a new bee to this portal & portlet stuff.
    so, pls let me know if my questions doesn't make sense.
    i have a jsp app sitting in jdeveloper 9.0.3
    can i deploy this jsp app as portlet and see it from
    my portal?
    srini

    Hi Benjamin.
    Can u explain more detail about the deployment..
    I also use JDev and want to do like you do (that is deploy to 9iAS using JDev.
    I tried to create new connection via Remote DCM..
    but it gave me error.
    I also read & tried the article that u suggested..
    but still failed..
    So, my questions are:
    1)In step one, where in EM should i install Oc4jDcmServlet.ear? in OC4J_Portal(the same place i deploy jpdk)?
    "Install the DCM Servlet, Oc4jDcmServlet.ear, to a running Oracle Enterprise Manager instance. This servlet is required to run in the same OC4J instance (same JVM) as the Enterprise Manager servlet. The DCM Servlet is located in:
    <jdev_install>/dcm/lib/Oc4jDcmServlet.ear "
    2)I download JDev into my drive C.
    and i did found /dcm/lib/Oc4jDcmServlet.ear
    I not sure what to type..and where should i run the command..
    In the article,it run from c:\winnt\system32\cmd.exe.
    But when i ty to run it, it gave me error
    "Exception in thread "main" java.util.zip.ZipException: The system cannot find th
    e path specified
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)"
    should i run the command in the server?Where?
    What command should i type?
    Java -jar ${ORACLE_HOME}/j2ee/home/admin.jar ormi://${EM_OC4J_HOST}:${EM_OC4J_PORT} ${IAS_ADMIN_USER} ${IAS_ADMIN_PASS} -deploy -file Oc4jDcmServlet.ear -deploymentName Oc4jDcmServlet "
    Thanks..

  • How to call a .jsp file from Applet

    Could any one guide me how to call a .jsp file from a Applet using action Event.
    Thanks

    http://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post

  • How to deploy an app with servlet and background processing

    i have a servlet with background processing. it has to run 24 hours a day.
    but i have problem with shutdown (after 1-2 hours without user action). [9iAS 9.0.3.0, windows 2000]
    i created for application seperate OC4J (in the EM) and i deployed it there. first time as war file, later as ear file (because there is possible to re-deploy only ear file).
    but it seems that the servlets are not designated to run as a uninterruptible task.
    the question is: how to deploy such (servlet + uninterruptible background processing) application in the 9iAS?
    a) everything in the OC4J (then how to disable shutdown?)
    b) servlet in the OC4J. where (and how) to install the rest of application?
    b1) servlet in the OC4J + rmi/soap/... + standalone server?
    what is the standard in the oracle world :) ?
    thanks

    Better to post your topic in the iPad in the Enterprise community.
    This is the, "Using Mac App Store" forum and for the most part for troubleshooting the App Store.

  • How to Deploy J2ME applications with data in RMS?

    Hello everyone,
    I am designing a J2ME application, a simple "Who wants to be a millionaire game". It stores questions and answers from a rms datastore. I want to to how can I deploy this application with questions and answers in the recordstore. Each time I run the emulator, the data stored previously gets deleted. Is it possible to attach the rms recordstore along with the .jar or .jad files? If so how can I do it. Please help.
    Thank you all in advance.

    Thank you Sypress.. When I install it the code works fine. But I wanted to include data with the application. I think I found a way way. I added the data in a text file and while starting the application I inserted data from the file into the recordstore.

  • How to deploy LifeCycle Designer with SCCM

    The company I work for has purchased Adobe LiveCycle Designer version 11.  I'm trying to find out what parameters can be sent to the MSI file via Setup.exe.  I'm mainly looking at how to pass the license key to the MSI so I can deploy this software with SCCM. 

    Hi,
    As Gerry said, please test the command line to uninstall Office 365 without user interaction before using SCCM.
    If this command line cannot work, you could get better support from Office forum.
    http://social.technet.microsoft.com/Forums/office/en-US/home?forum=officeitpro
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to deploy Office 2010 with different OCT settings ?

    Let say my company has 2 departments.
    One department needs all the Office features, while another department needs only Excel and Word.
    Can I place 2 different OCT msp files inside the Updates folder, and install the Office for different department by using the specific OCT msp files ?
    Also, need 2 different config.xml file too (inside folder ProPlus.WW)

    Hi,
    We can use
    Microsoft Exchange Server Deployment Assistant to generates a custom step-by-step checklist that will help you deploy different versions of Exchange Server for different types of scenarios.
    More details about Understanding Hybrid Deployments with Exchange 2010, for your reference:
    https://technet.microsoft.com/en-us/library/hh563847(v=exchg.141).aspx
    Thanks
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Allen Wang
    TechNet Community Support

  • How to deploy an applicatin with jdeveloper

    hello every boy,
    someone can help me, i want to deploy an application with jdevloper9i uing the oc4j server,
    i already tryed to deploy this application with tomcat5, but it's generating errors, wish i didn't understood, so i want to deploy it with he jdeveloper server to see if it ca work and check if the problem is with connection to the database ( i use for the database :SqlServer)
    thank you fr helping me

    Use the below OTN tutorial Link for 'Deploying a Web Application to Oracle Application Server 10g' : http://www.oracle.com/technology/obe/obe1013jdev/deployment/deployment.htm

  • How to Read a Message with Content Type multipart/alternative

    Hi ,
    I need to write a POP3 Client to read email message ..but some times the messages comes with content type multipart/alternative
    how to parse it and read only one of the content :
    for example :
    This is a multi-part message in MIME format.
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: 7bit
    Assignment to workgroup Name 1 : L2 SD Service Delivery Apps Spt
    Open CI Search Code : HPSD
    Description : tesat
    General Information :
    Is the workgroup owner Aware of the addition to Workgroup : Yes
    Workgroup to be added :
    L2 SD Service Delivery Apps Spt
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <br><P>Assignment to workgroup Name 1 : L2 SD Service Delivery Apps =
    Spt</P>
    <P>Open CI Search Code : HPSD</P>
    <P>Description : tesat</P>
    <P>General Information :</P>
    <P>Is the workgroup owner Aware of the addition to Workgroup : Yes</P>
    <P>Workgroup to be added :</P>
    <P>L2 SD Service Delivery Apps Spt</P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    ------=_NextPart_000_12C25_01C6B64F.09226B00--
    The Same message is in text as well as HTML so not sure how to read it .
    currently my program is as follows
    for (int i = 0; i < found.length; i++) {
    Message m = found;
    // Get some headers
    Date date = m.getSentDate();
    Address [] from = m.getFrom();
    String subj = m.getSubject();
    String mimeType = m.getContentType();
    System.out.println(date + "\t" + from[0] + "\t" +
    subj + "\t" + mimeType);
    Object o = m.getContent();
    if (o instanceof String) {
    System.out.println("**This is a String Message**");
    System.out.println((String)o);
    } else if (o instanceof Multipart) {
    System.out.print("**This is a Multipart Message. ");
    Multipart mp = (Multipart)o;
    int count3 = mp.getCount();
    System.out.println("It has " + count3 +
    " BodyParts in it**");
    for (int j = 0; j < count3; j++) {
    // Part are numbered starting at 0
    BodyPart b = mp.getBodyPart(j);
    String mimeType2 = b.getContentType();
    System.out.println( "BodyPart " + (j + 1) +
    " is of MimeType " + mimeType);
    Object o2 = b.getContent();
    if (o2 instanceof String) {
    System.out.println("**This is a String BodyPart**");
    System.out.println((String)o2);
    } else if (o2 instanceof Multipart) {
    System.out.print(
    "**This BodyPart is a nested Multipart. ");
    Multipart mp2 = (Multipart)o2;
    int count2 = mp2.getCount();
    System.out.println("It has " + count2 +
    "further BodyParts in it**");
    } else if (o2 instanceof InputStream) {
    System.out.println(
    "**This is an InputStream BodyPart**");
    } //End of for
    } else if (o instanceof InputStream) {
    System.out.println("***********************************This is an InputStream message**");
    InputStream is = (InputStream)o;
    /* if(m.getContentType().equalsIgnoreCase("multipart/alternative")) {
    MimeMultipart mp = new MimeMultipart();
    // Assumes character content (not binary images)
    } else {*/
    BufferedReader reader
    =new BufferedReader(new InputStreamReader(is));
    String thisLine=reader.readLine();
    while (thisLine!=null) {
    System.out.println(thisLine);
    thisLine=reader.readLine();
    So when the Content TYpe is multipart/alternative it goes into InputStream message .
    any help and ideas to handel such situations ?
    Thanks
    San
    Message was edited by:
    sanrosh_95

    Try reposting that with tags (replace the {'s with ['s).
    Long story short, I think the FAQ and examples would go a long way towards explaining this, but you basically can check the content type, or check if the content contains parts, and parse each part separately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for