Httpservlet   and javax sourcepath

ok what is the story with setting class paths I am using Jbuilder to write servlets but it keeps saying that httpSaervlet is not found in the class. Even when I open httpServlet beside it.I was just seeting the source path to where the javax file was it this right

You have to Add a library in the Project--->Project Properties--->Required Libraries(TAB)and then click on add button, a window will be displayed choose Servlet from there and click on OK buttons

Similar Messages

  • Org and javax packages

    hello,
    where should I look for documentation on org and javax packages?
    I mean, if I see a function from the java package, I can google it and find out which are it's constructors, methods, what it implements or extends etc.
    But if I see for instance import org.jdesktop.application.ResourceMap where can I find out anything about this one? Just try to google it, nothing useful comes up. Or try FrameView, which is quite important- the same problem.
    Are this packages documented somewhere, like java package is?

    Javax packages are standard Java eXtensions (y'see?) and the docs tend to be in the standard Sun documentation. As for "org", you need to look a bit further. For instance if you're talking about packages starting with org.apache, that points you to apache.org. So for org.jdesktop, guess where you go? It's the recommended way to name your packages, from your domain name that way.

  • X509Certificate in java and javax - whats the difference?

    Hi,
    I wonder about the two same named classes X509Certificate in
    java.security.cert and javax.security.cert .
    Is there any difference?
    Olek

    The javadocs for javax.security.cert.X509Certificate say that it is deprecated and that you should use java.security.cert.X509Certificate instead.

  • Wanna download javax.mail.* and javax.mail.internet.*

    Hi all;
    i'm a beginner in JSP and want help in downloading api classes for javax.mail.* and javax.mail.internet.*...would any1 like to tell me the URL for it and also after downloading, wat sequence would i follow to make these files run properly with my code.
    would b waiting desperately for immediate response.
    Regards.

    Go to
    http://java.sun.com
    There are 5 drop List. Under the 2nd Drop List Search for JavaMail(TM) API 1.3. Now continue to download. U will download a file names javamail-1_3.zip. There are some jar files which u need to extract and add to ur classpath settings.
    Not use the following code to send a simple SMTP Mail.
    //Java specific imports
    import javax.activation.FileDataSource;
    import javax.activation.DataHandler;
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class SendMail
    Session session = null;
    public SendMail() throws Exception
    Properties props = new Properties();
    String strMailIPServer = "Your SMTP Server IP";
    props.put("mail.smtp.host", strMailIPServer);
    session = Session.getDefaultInstance(props, null);
    public void sendMail(String strToAddress, String strFromAddress, String strSubject, String strMessage) throws Exception
    try
    long intTimeForTenMinutes = 60;
         MimeMessage objMimeMsg = new MimeMessage(session);
    //Address objFromAddr = new InternetAddress(strFromAddress);
    javax.mail.internet.InternetAddress objFromAddr = new javax.mail.internet.InternetAddress (strFromAddress);
    Address[] objToAddr = InternetAddress.parse(strToAddress);
    objMimeMsg.setFrom(objFromAddr);
    objMimeMsg.setRecipients(Message.RecipientType.TO, objToAddr);
    objMimeMsg.setSubject(strSubject);
    objMimeMsg.setContent(strMessage, "text/html");
    Transport.send(objMimeMsg);
    catch (Exception mex)
    throw mex;
    All the Best!
    Thanks and regards,
    Pazhanikanthan. P

  • Where to find javax.xml.bind and javax.jdo

    One of my application require import javax.xml.bind and javax.jdo packages. I could not find them. Someone can help to let me know where to download them or they come with some other toll\packages?
    Thanks
    John

    Hi John ,
    I have the same problem: Getting the javax.jdo Packge . . . .(WHERE ?)
    if you found out ow already, please tell me at: [email protected]
    thanks,
    edan

  • Problems Compiling javax.servlet and javax.servlet.http

    When I try to compile a program that imports both javax.servlet and javax.servlet.http, the compiler keeps telling me that "package javax.servlet does not exist"... I have place the javax.servlet packages in the src.zip and in the src folder but i dont understand why the compiler isnt picking them up. Maybe I did something wrong ... could someone help please

    Try to compile vith the option "-classpath /your/path/to/servlet.jar"

  • Differ java.sql.* and javax.sql.*

    Dear Friends,
    What is differenece between java.sql.* and javax.sql.*?.
    Advance in thanks

    java.sql is the package you can use for all basic kinds of database access. If you are not developing a full scale enterprise application, java.sql package is all that you need.
    javax.sql is extension to the basic java.sql package. It includes classes that allow connection pooling and rowsets, among others.
    If you are just getting started with JDBC, you just need to get familiar with java.sql and leave the wonders of javax.sql until later.

  • Where to download JAI and javax.media libraries

    i want to download java advanced images and javax.media
    help please

    you didn't search quite hard!!!!! go on java.sun.com in the downloads section

  • Javax.crypto.* and javax.crypto.spec.* problem with MHP receiver

    Hello to everyone, I started to program in MHP 1.0.2 on a MHP receiver and now i'm practicing in encrypting and decrypting. I load from the smart card in the MHP receiver an X509Certificate object (I have it both in byte[] form, called certArray, and X509Certificate object, called "certificate"). What i'd like to do is to :
    1)calculate digest of the certificate (line 1 and 2 of the following code)
    2) encrypt the digest using the same algorithm of the certificate (see line 3 and 4)
    The problem is generated at line 3 : the receiver, probably, doesn't find the class of the algorithm of encrypting. It is important to notice that the instruments to encrypt/decrypt are included in javax.crypto and javax.crypto.spec packages.
    MessageDigest md = MessageDigest.getInstance("SHA");
    byte[] digest = md.digest(certArray);
    Cipher encrypt = Cipher.getInstance(certificate.getSigAlgName());
    encrypt.init(Cipher.ENCRYPT_MODE, certificate.getPublicKey());
    The error message, in the log file, is the following :
    [0#1:2] java.security.NoSuchAlgorithmException: SHA1withRSA not found
         [0#1:2]      at javax.crypto.Cipher.getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.encrypt()V(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.cardInserted(Lopencard/core/event/CardTerminalEvent;)V(Unknown Source)
         [0#1:2]      at opencard.core.event.EventGenerator.createEventsForPresentCards(Lopencard/core/event/CTListener;)V(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.register()V(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.startXlet()V(Unknown Source)
         [0#1:2]      at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
         [0#1:2]      at tv.osmosys.application.AppManager$XletApp.xletStart()Z(Unknown Source)
         [0#1:2]      at tv.osmosys.application.AppManager$XletApp.loop0(Ltv/osmosys/application/AppManager$XletAction;)V(Unknown Source)
         [0#1:2]      at tv.osmosys.application.AppManager$XletApp.run()V(Unknown Source)
         [0#1:2]      at java.lang.Thread.run()V(Unknown Source)
         [0#1:2]      at java.lang.Thread.startup(Z)V(Unknown Source)
    My question(s) is : how can I include javax.crypto and javax.crypto.spec in the Xlet application to upload it onto the MHP receiver?? Is it possibile to do so?
    Eventually, do other libraries exist to use encrypting algorithms, included in MHP? The version I use of MHP is 1.0.2. Thank you! Bye!

    Hello to everyone, I started to program in MHP 1.0.2 on a MHP receiver and now i'm practicing in encrypting and decrypting. I load from the smart card in the MHP receiver an X509Certificate object (I have it both in byte[] form, called certArray, and X509Certificate object, called "certificate"). What i'd like to do is to :
    1)calculate digest of the certificate (line 1 and 2 of the following code)
    2) encrypt the digest using the same algorithm of the certificate (see line 3 and 4)
    The problem is generated at line 3 : the receiver, probably, doesn't find the class of the algorithm of encrypting. It is important to notice that the instruments to encrypt/decrypt are included in javax.crypto and javax.crypto.spec packages.
    MessageDigest md = MessageDigest.getInstance("SHA");
    byte[] digest = md.digest(certArray);
    Cipher encrypt = Cipher.getInstance(certificate.getSigAlgName());
    encrypt.init(Cipher.ENCRYPT_MODE, certificate.getPublicKey());
    The error message, in the log file, is the following :
    [0#1:2] java.security.NoSuchAlgorithmException: SHA1withRSA not found
         [0#1:2]      at javax.crypto.Cipher.getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.encrypt()V(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.cardInserted(Lopencard/core/event/CardTerminalEvent;)V(Unknown Source)
         [0#1:2]      at opencard.core.event.EventGenerator.createEventsForPresentCards(Lopencard/core/event/CTListener;)V(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.register()V(Unknown Source)
         [0#1:2]      at it.csp.SecurelabXlet.startXlet()V(Unknown Source)
         [0#1:2]      at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
         [0#1:2]      at tv.osmosys.application.AppManager$XletApp.xletStart()Z(Unknown Source)
         [0#1:2]      at tv.osmosys.application.AppManager$XletApp.loop0(Ltv/osmosys/application/AppManager$XletAction;)V(Unknown Source)
         [0#1:2]      at tv.osmosys.application.AppManager$XletApp.run()V(Unknown Source)
         [0#1:2]      at java.lang.Thread.run()V(Unknown Source)
         [0#1:2]      at java.lang.Thread.startup(Z)V(Unknown Source)
    My question(s) is : how can I include javax.crypto and javax.crypto.spec in the Xlet application to upload it onto the MHP receiver?? Is it possibile to do so?
    Eventually, do other libraries exist to use encrypting algorithms, included in MHP? The version I use of MHP is 1.0.2. Thank you! Bye!

  • Design console and javax.naming.directory.basicattributes class

    Hi all,
    Is it possible to do the following in the design console?
    BasicAttributes basicattributes = new BasicAttributes(true);
    basicattributes.put(new BasicAttribute(contextName, "Weblink"));
    basicattributes.put(new BasicAttribute(contextCode, "Web001"));
    your help would be much appreciated..

    While Kodo cannot persist those elements out of the box, you can easily
    use the externalization framework to persist the data in a format your
    database and Kodo can understand.
    http://solarmetric.com/Software/Documentation/3.1.3/docs/ref_guide_meta_ext.html#externalizer
    ouhmmou wrote:
    Hello,
    I'd like to know if KODO implementation (or JDO spec) could manage java
    objects such as javax.naming.directory.BasicAttribute and
    javax.naming.directory.BasicAttributes !
    because I am using those classes in my application but without succes.
    thanks you for your help
    smail
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Package javax.servlet.* and javax.xml.rpc.*

    Which jar file(s) in Oracle WebLogic Server 10.3 contain these two packages: package javax.servlet.* and javax.xml.rpc.*? Where are they located? Thanks

    I don't have access to my WLS installation right now, but normally I use a class finder utility like this one to answer questions like this:
    http://www.inetfeedback.com/jarscan/

  • Visual J++ and javax

    Hi again,
    I am trying to use visual J++ for development but i couldnt manage to import javax pakage to microsoft envoirenment. It does not accept this pakages.
    Does somebody know where to save the jar files so that Visual J++ will be able import javax classes.
    Thanks
    C�

    i use j++ and javax
    i don't use the ms java package but the j2se from sun.
    then add the path (j2se and javax) to the package to the classpath variable of your os.
    and add the path (j2se and javax) also to the configuration of j++ under build/configuration.

  • : Weblogic and javax.mail

    Even I was facing the same problem(Provider rfc )as Jon has, solved it
    thanks to Phil.. set the mail.jar ahead of weblogic.jar.
    But now am getting a different error...
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
    [email protected]
    at javax.mail.Transport.send0(Transport.java:219)
    at javax.mail.Transport.send(Transport.java:81)
    at email.Email.send(Email.java:98)
    at jsp_servlet._email._jspService(_email.java:88)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :208)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:1127)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :1529)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Any thoughts!!
    Thanks!
    hariharan
    "Phil Magill" <[email protected]> wrote in message
    news:<[email protected]>...
    Download the JavaMail Api from sun and add the mail.jar file as the first
    entry on your classpath as these will be call before weblogics internal
    version. There are two files missing from Weblogic which resolve the
    providors.
    Cheers
    Phil
    "Dimitri Rakitine" <[email protected]> wrote in message
    news:[email protected]..
    Install service pack 6
    Jon Crater <[email protected]> wrote:
    I'm having problems sending JavaMail through Weblogic. When I call my
    JavaMail wrapper class from the command line, mail gets sent fine, butwhen
    I try to call them from a servlet in Weblogic, I get a MessagingException:
    "No provider for Address type rfc822"
    Any ideas?Dimitri

    Hi,
    Line: "550 5.7.1 Unable to relay for [email protected]"
    seems to be message from your SMTP server. Try different recipient or
    different SMTP server.
    t.Tero
    hari wrote:
    Even I was facing the same problem(Provider rfc )as Jon has, solved it
    thanks to Phil.. set the mail.jar ahead of weblogic.jar.
    But now am getting a different error...
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
    [email protected]
    at javax.mail.Transport.send0(Transport.java:219)
    at javax.mail.Transport.send(Transport.java:81)
    at email.Email.send(Email.java:98)
    at jsp_servlet._email._jspService(_email.java:88)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :208)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:1127)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :1529)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Any thoughts!!
    Thanks!
    hariharan
    "Phil Magill" <[email protected]> wrote in message
    news:<[email protected]>...
    Download the JavaMail Api from sun and add the mail.jar file as the first
    entry on your classpath as these will be call before weblogics internal
    version. There are two files missing from Weblogic which resolve the
    providors.
    Cheers
    Phil
    "Dimitri Rakitine" <[email protected]> wrote in message
    news:[email protected]...
    Install service pack 6
    Jon Crater <[email protected]> wrote:
    I'm having problems sending JavaMail through Weblogic. When I call my
    JavaMail wrapper class from the command line, mail gets sent fine, butwhen
    I try to call them from a servlet in Weblogic, I get a MessagingException:
    "No provider for Address type rfc822"
    Any ideas?Dimitri
    // Tero Soukko
    // iobox - A Terra Mobile Company
    // +358 50 5435259
    // [email protected], [email protected] (m-mail)
    // http://www.iobox.fi, We bring the Internet to your mobile.

  • SOAP and javax.mail.internet.ContentType

    Hi there,
    I have a problem with a very simple SOAP app:
    I get a saaj error "Unable to internalize message", which gets caused by a
    NoClassDefFoundError: javax/mail/internet/ContentTypeI have tried everything:
    1) Copied mail.jar to ./jre/lib/ext
    2) Added the directory containing mail.jar to the CLASSPATH, in Windoze and in Sun ONE Studio
    When I try to instantiate javax.mail.internet.ContentType in the same app, it works fine, i.e. the class can be found, but saaj doesn't see it for some strange reason.
    Any ideas?
    I am using the Web Services pack 1.3 and java version:
    java version "1.4.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
    Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)Thanks in advance
    Andi

    You also need to have the Java Activation Framework available (activation.jar).
    The NoClassDefFoundErr can me caused by a class being used by a class not being found.

  • InitialContext and javax.rmi.PortableRemoteObject

    I've been trying to locate a very annoying problem that I get when I try to bind remote objects in JNDI. I have now located the problem but I have no idea why this causes a problem or how to fix it. It seems that creating an InitialContext has different effects depending whether I create an instance of javax.rmi.PortableRemoteObject before.
    Here's what I am doing...
    1:Context ctx = new InitialContext(); //Create Initial context
    2://Instantiate remote object (extends PortableRemoteObject and stubs gen with rmic with -iiop flag)
    3:Hello hello = new HelloImpl();
    4:ctx.rebind("hello", hello); //Bind to JNDI
    5:System.out.println("Object bound!!!!!");
    This code works fine. The problem occurs when I try to instantiate the remote object before creating the InitialContext for the first time (I.e. I move line 3 to the top) I then get the following exception:
    2007-aug-13 09:32:26 com.sun.corba.ee.impl.util.Utility autoConnect
    VARNING: "IOP00511403: (INV_OBJREF) Class rmi.HelloImpl not exported, or else is actually a JRMP stub"
    org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1403 completed: No
    at com.sun.corba.ee.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:569)
    at com.sun.corba.ee.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:592)
    at com.sun.corba.ee.impl.util.Utility.autoConnect(Utility.java:147)
    at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:323)
    at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.write(DynamicMethodMarshallerImpl.java:256)
    at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.writeArguments(DynamicMethodMarshallerImpl.java:407)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:157)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
    at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.rebind(_SerialContextProvider_DynamicStub.java)
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:403)
    at javax.naming.InitialContext.rebind(Unknown Source)
    at parlayxws.usecases.ejb.px_spec_v2_1.RunEjb.main(RunEjb.java:43)
    Exception in thread "main" javax.naming.CommunicationException: java.rmi.NoSuchObjectException: CORBA INV_OBJREF 1398080891 No; nested exception is:
    org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1403 completed: No
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:405)
    at javax.naming.InitialContext.rebind(Unknown Source)
    at parlayxws.usecases.ejb.px_spec_v2_1.RunEjb.main(RunEjb.java:43)
    I assume the problem is in the javax.rmi.PortableRemoteObject's (HelloImpl's) constructor since that is the only code that's beeing executed. But how could that effect the instantiation of the InitialContext? I should also say that it seems that it is only the first time that an InitialContext is created that is critical. If I create on instance of it before instantiating the first PortableRemoteObject, all subsequently created instances of InitialContext succeed in binding remote (RMI-IIOP) objects.
    Can someone help me understand why this happens and how to avoid it? I don't want to have to create an InitialContext the first thing I do in the code. It seems the PortableRemoteObject constructor somehow changes the configuration in a way that makes the bindings fail... How? Why? Can I prevent it from happening?
    Any input appreciated!
    Kristofer

    my bean is running in my EJBServer, and I have it in the classpath of the RmiRegistry (which runs as part of my server). The RmiRegistry is an actual ".bat" file that starts an RMI Registry (I assume).
    The client is not a bean and is run like this:
    java com.titan.cabin.Client_1
    All it does is create a cabin and then read it back. It works, it not only gets the context, but also creates, persists and reads that cabin bean.
    Is it because java automatically finds all RmiRegistries running on the computer? This makes sense, but I read on java.sun.com that you need a stub class for your clients. And if it is true, then how does it get the context and remote/home interface of a bean on another server?

Maybe you are looking for