User defined packages in TOMCAT HELP PLEASE!!!!

Hello all,
I am have created a package (foo).
I then tried to import it into a jsp but TOMCAT say the package foo
doesn't exist. I have stored the class file for the foo package in the same root directory with the jsp file. I have I stored the class file in the wrong place.
<%@ page import="java.util.*,foo.*"%>
<%!
ResourceBundle bundle = null;
public void jspInit()
bundle = ResourceBundle.getBundle("forms");
%>
<jsp:useBean id="formHandler" class="foo.FormBean" scope="request">
<jsp:setProperty name="formHandler" property="*" />
</jsp:useBean>
<%
if (formHandler.validate())
%>
<jsp:forward page="<%=bundle.getString(\"process.success\")%>/">
<%
}else{
%>
<jsp:forward page="<%=bundle.getString(\"process.retry\")"%>/>
<%
%>
can anyone help PLEASE!!!!!!!!!!!!
Rohan

you should read the docs provided with tomcat showing where to put your classes!
WEB-INF/classes !

Similar Messages

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • How to make an applet load user-defined package?

    How to have an applet load user-defined package?
    I have packages in their own directories, and the applet compiles and links with them, by use of CLASSPATH env variable. But when it comes time to run, it ignores that and does not know where the classes (in the packages) are.
    If I don't use packages and put all code in one directory, runs fine. If I use an application, I can link with and load my packages.
    I know applets can't use things like CLASSPATH for security reasons, but still, they should be able to be compiled out of several packages, why do I have to put all code together??

    OK, for reference for future newbies, here's the answer:
    use CODEBASE attribute in your html file (if on Windows server, don't use drive letter but relative path to .html file, Unix style, and put all your .class files beneath that, for example, in your .html file
    <applet
    CODEBASE="..\class
    and then have package bar Bar.class file, in ..\class\bar

  • Creating User Defined Package Groups

    Hi everyone!
    I'm currently exploring/experimenting with strategies to stabilize parts of the Arch system on machines which I plan do update less frequently (I am aware of the risks and the potential difficulties associated with infrequent updates; that's why this is an experiment). It seems to me that Package Groups would be an asset which could be leveraged for a few different strategies. However, I cannot find any documentation on creating user defined package groups. Is there a way to do this? Any documentation anyone could point me to would be awesome. Thanks!

    You can compile the package yourself or change just the metadata. I think xyne had a tool for that, if only I could remember the name ...
    Edit: It's repkg https://bbs.archlinux.org/viewtopic.php?id=158970
    Edit 2: What do you need package groups for anyway? You should update the whole system rather than individual packages / groups of packages.
    Last edited by karol (2014-01-30 20:25:04)

  • Java User-defined packages problem!

    Hi everyone,
    I am new to java programming.I am trying to do a small program to see how the user-defined pckages work.I wrote 2 small programs one is Balance.java and TestBalance.java.
    The code for Balance.java is as follows..
    package MyPack;
    public class Balance{
            String name;
            double bal;
            public Balance(String n, double b){
                    name = n;
                    bal = b;
            public void show(){
                    if(bal < 0)
                         System.out.print("--->");
                      System.out.println(name + ": $" + bal);
          }The code for TestBalance.java is as follows..
    import MyPack.*;
    class TestBalance{
            public static void main(String args[]){
                    Balance test = new Balance("Leela",99.88);
                    test.show();
      }These r both in the same directory....I am able to compile Balance.java...but when I try to compile TestBalance.java I am getting the following errors
    TestBalance.java:1: package MyPack does not exist
    import MyPack.Balance;
                  ^
    TestBalance.java:5: cannot resolve symbol
    symbol  : class Balance
    location: class TestBalance
                    Balance test = new Balance("Leela",99.88);
                    ^
    TestBalance.java:5: cannot resolve symbol
    symbol  : class Balance
    location: class TestBalance
                    Balance test = new Balance("Leela",99.88);
                                       ^
    3 errorsI am using j2se1.4 version ....my path is set to bin folder..
    Could someone plz tell me what is the mistake...it would be very helpful for me if someone could plz tell me what the problem is...
    Thanx in advance.

    99% going to work
    i have noticed some of the few thing
    trying to help
    u told that ur both the classes r in same directory right
    ok
    now ur first class has this as first line
    package mypack;//till here its ok only "mypack" should be small case
    now put this same line also in the other class as firat line
    and remove that import statement since both r in same package so no
    need to import it ok
    here's the code
    package mypack;class TestBalance{        public static void main(String args[]){                Balance test = new Balance("Leela",99.88);                test.show();           } }
    now compile it this way
    create a folder call mypack and put this both the classes in that folder
    say its c:\mypack\ur classes
    now in dos prompt
    type this
    set classpath=%classpath%;C:\mypack \
    now u compile ur first class and then second
    Surely this going to work if not tell me the errors u r getting

  • User Defined Activity Process Flow Help

    Hello,
    I'm trying to create a process flow that will rename a file. I'm using the User Defined Activity, but I've ran into a couple problems. First some background info, Oracle 10G is the DB, and it's ran on a Unix system, the Oracle user account does have read/write access to the directories used.
    For the Activity Parameters I've set
    Command > I've tried everything here
    Parameter > Blank
    Script >
    filefullname=ip_xref.dat
    filename=${filefullname%.*}
    fileext=${filefullname##*.}
    DATE=`date +%Y%m%d`
    newfilename="${filename}_${DATE}.${fileext}"
    mv $filefullname $newfilename
    mv $newfilename backup/
    in the command section, I've tried every possible thing I can think of from : /usr/bin/ksh, /bin/ksh, ksh, /bin/bash, made a script outside owb with the same thing, and pointed it at that and still all I get is "/bin/bash: not found" or "/usr/bin/ksh: not found"
    Ideas/suggestions, I'm open to anything.
    As a side note I tried to do it with UTL_FILE, but I was informed by our DBA that it was disabled for security, so that's out.

    What type of execution is configured for user defined activity (this type is defined in file Runtime.properties on server side, available types for UDA - SCHEDULER or NATIVE_JAVA)?
    For SCHEDULER type ask your DBA about Uinux user used for executing external jobs (usually nobody user used with very limited rights - maybe this user doesn't have rights for executing any program/scripts).
    Regards,
    Oleg

  • How to use classes from different user defined Packages

    well i made 2 packages... one containing employee class and realted matter and other contaning bankaccounts and bank related work... now how can i use them in an another.. i know about the import statement but still couldn't make it work.... now suppose iam makin a obejct of employee class and passing in name and salary and all in the constructor... now i want that when i create the bankaccount class then the name of the employee should be passed to the bankaccount class so that it can assigen a account no. .. now how do i do this as when i create a object of employee class its made at runtime.. and if i create a object of bankaccount.. how wil it take that name as before goin to bank account i should already have a list of emplyees and then this list should be worked upon by the backaccount class to assign the accountno.s
    Hope my question was clear... would appriciate a explanation and guidance!!!

    Thank you so much ... i was able to solve the problem... i passed the object in the constructor of the accounts class and it all worked out the way i wanned... thank you so much... it wasn't that difficult but the idea was just not clicking...this place is wonderful... everyone rocks!!! and so greatful about all the help.. please keep up the good work and even i will try to contribute as much as possible!!

  • Importing entire user defined packages......

    When I try to import all the classes from a package using the * symbol
    (as in: import shapes.*;)
    I get the following error:
    bad class file.
    class file contains wrong class: shapes.RightTriangle
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    However if I import the classes individually,
    import shapes.RightTriangle;
    import shapes.Circle;
    import shapes.MyRectangle;
    etc......
    It works fine. I haven't a clue why this is happening, can anybody help me?

    The shapes package contains five .class files(no .java files):
    Circle.class
    RightTriangle.class
    MyRectangle.class
    Figure.class (abstract class for above base classes)
    DrawFigure.class (interace used for drawing the different)
    It is in the same directory as my main program .java and .class files.
    I currently import all these .class files individually as in
    import shapes.Figure;
    import shapes.DrawFigure;
    import shapes.Circle;
    import shapes.RightTriangle;
    import shapes.MyRectangle;
    The next few lines of code are:
    public class TestFigure1 extends Applet
    MyRectangle rect1;
    RightTriangle tri1;
    Circle circ1;
    public static void main(String argv[])
    This compiles and runs without any problems.
    However, I know it should be possible to import the entire shapes package in one go, so I replace the individual import statements with:
    import shapes.*;
    Now the compiler returns the error message I described above.
    Any ideas?
    P.S. How would I type the fully qualified path for the shapes directory?
    It is located at C:\myjava\Figures\shapes
    For example:
    import myjava.Figures.shapes.Circle;
    Is this statement correctly written?
    When I try

  • Importing user defined package in JDEV

    Hi,
    new to the JDEV9i tool. i have a project arranged in packages and am tryin to import this to the jdev9i. i successfully created the workspace and project and added all the packages. I can also view the package tree and package list but when i run my project the files in one directory import the files from the package structure.
    do i have to change Project properties?
    C:\jdev9i\jdev\mywork\Workspace1\Project1\websphinx\workbench\WebGraph.java
    Error(26,14): cannot access class graph.Graph; file graph\Graph.class not found

    It sounds like the Class path is not set up properly. You can configure this manually from the Project Settings dialog (Project > Project Settings). Alternatively, if you import all the packages from the top level, the path should be set for you automatically. For example, if you have your work in a directory structure like this:
    d:\mywork
    d:\mywork\toppackage
    Class1.java
    d:\mywork\toppackage\subpackage1
    Class2.java
    Class3.java
    d:\mywork\toppackage\subpackage2
    Class4.java
    Class5.java
    You can create a new project from existing source by creating a Workspace, then selecting File > New. In the Projects category there is an item called Project from Existing Source. Launch this wizard, and select the top level package from the directory listing (d:\mywork\toppackage in the example above). You then get the option to recurse through subdirectories, picking up all the classes along the way, and the paths will be set automatically. Note that you can use the Categories View button in the Navigator to view the files by package name.
    I hope this helps!
    -- Brian (JDev Team)
    Hi,
    new to the JDEV9i tool. i have a project arranged in packages and am tryin to import this to the jdev9i. i successfully created the workspace and project and added all the packages. I can also view the package tree and package list but when i run my project the files in one directory import the files from the package structure.
    do i have to change Project properties?
    C:\jdev9i\jdev\mywork\Workspace1\Project1\websphinx\workbench\WebGraph.java
    Error(26,14): cannot access class graph.Graph; file graph\Graph.class not found

  • New mac user..possible imac problem,help please!

    I've had my imac for about 3 weeks and in the last 4-5 days after waking up from sleep mode it has been lagging severly. At first it was for about 15 mins now its been going on for over 45. First of all, applications and anything I click on in them takes a very long time to open and sometimes several clicks. The rainbow ball curser seems to come up for much longer than usual. Then when I type, nothing shows and I have to click on the window to get what i typed to come up. I have plenty of room on my harddrive and 1 GB RAM that was factory installed. Being a new mac user, I really don't know what to do about it. Anyone know whats wrong or what to do?
    Thanks in advance.
    (sorry if there is bad typing in this post, dealing with the text lag right now)
    40GB ipod, imac G5 20 w/isight, Dell XPS   Mac OS X (10.4.3)  

    Hello Christine:
    If the logout/restart does not help, call Applecare. Rather than some of us trying to troubleshoot, the Applecare technicians will walk you through the problem identification process. Suffice to say, what you describe is definitely not normal.
    Barry

  • Mac user-issues downloading Creative Suite-help please

    I cant seem to get this thing to download and the FAQs are not very helpful...I guess what i really need to know is how the heck to download this? It tells me to find the DMG files but all a see are the files for windows....which brings me to my other question....did i pay for the windows version?? Please help me...I really dont understand much about technology.

    If you purchased the wrong version, you need to contact sales support. Nothing anyone here can do for you in that case. Everything else should be easy enough - you account --> my products --> click to download. If you are having otehr problems, you need to be more specific.
    Mylenium

  • How to make user defined packages visible in Web Applications

    Hello,
    I am not new to JSP and I develop a web based geographical information system. I use MapViewer Application Server (Oracle) as run time environment. I do not encounter any problems in running JSP files. However, I have my own package under WEB-INF/classes/tr/com/bizyaptik/cgs and
    when importing a Class in my JSP file, the web server says:
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\mapviewer1012_qs\mv1012qs\oc4j\j2ee\home\application-deployments\mapviewer\web\persistence\_pages\_cgsworkspace\_cgsproject\_public__html\_multiplesp.java
    Line # Error
    7
    package tr.com.bizyaptik.cgs.beans does not exist import tr.com.bizyaptik.cgs.beans.ContainerBean;
    10
    package tr.com.bizyaptik.cgs does not exist import tr.com.bizyaptik.cgs.PathManager;
    11
    package tr.com.bizyaptik.cgs.util does not exist import tr.com.bizyaptik.cgs.util.NetworkProperties;
    83
    [jsp src:line #:44]
    cannot resolve symbol symbol : class ContainerBean location: class cgsworkspace.cgsproject._public__html._multiplesp ContainerBean cb = new ContainerBean();
    83
    [jsp src:line #:44]
    cannot resolve symbol symbol : class ContainerBean location: class cgsworkspace.cgsproject._public__html._multiplesp ContainerBean cb = new ContainerBean();
    92
    [jsp src:line #:53]
    cannot resolve symbol symbol : class PathManager location: class cgsworkspace.cgsproject._public__html._multiplesp PathManager pm = new PathManager();
    92
    [jsp src:line #:53]
    cannot resolve symbol symbol : class PathManager location: class cgsworkspace.cgsproject._public__html._multiplesp PathManager pm = new PathManager();
    93
    [jsp src:line #:54]
    cannot resolve symbol symbol : class NetworkProperties location: class cgsworkspace.cgsproject._public__html._multiplesp NetworkProperties np = new NetworkProperties();
    93
    [jsp src:line #:54]
    cannot resolve symbol symbol : class NetworkProperties location: class cgsworkspace.cgsproject._public__html._multiplesp NetworkProperties np = new NetworkProperties();
    I use JDeveloper editor, worked hard to find the neccessary configuration but I failed. I also inserted ...... WEB-INF/classes into my classath but it didn't work.
    So, could anybody tell me the main concept of introducing packages and class files to a web server ?

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • Importing User defined package problem.

    Hi All,
    I have made to package, "forum" and "utility". DBhandler java file is in "utility" package and Forumhandler is in "forum" package.
    I want to import DBhandler classes from "utility" package into "forum" package for this i write
    "import utility.*" in forum package's Forumhandler java file. But it is giving error.
    The error is -
    forum/ForumHandler.java:13: cannot resolve symbol
    symbol : class DBHandler
    location: class forum.ForumHandler
    DBHandler dbhand = new DBHandler();

    forum/ForumHandler.java:13: cannot resolve symbol
    symbol : class DBHandler
    location: class forum.ForumHandler
    DBHandler dbhand = new DBHandler();
    Do you have your visibility right?
    The class DBHandler should be declared public.
    P.s. it's a bad practice to use wildcards for imports if you just want to import a few classes, use
    import my.company.product.utility.DBHandler;instead (or something similar).

  • Accessing user-defined package

    I have two packages 'A' and 'B' at same directory level.
    How can I access the methods/files in one package from another package.
    i.e., I want to access file_A.put() in (package 'A') from file_B (package 'B').
    Is it possible to do so?
    If yes, then how can I do this?

    Check Using Package Members section of the Learning the Java Language tutorial.

  • I keep being asked for my pop.mail password for my user address. Can you help please.

    I keep being asked for my pop.mail password and I do not know what is meant. Can you help. I cannot receive or send messages on thunderbird. You say you have sent a reset message to me but it has not come through. I am searching messages on my ipad. I am on the verge of abandoning Thunderbird and continuing to use my ipad and yahoo account. Thank you for your help in advance.

    Thunderbird has nothing to do with administering your email password and is not going to send you anything. I am not even sure where you requested that something be sent to you unless it is for the password to this forum which has nothing to do with your email.
    Your email provider would have a link to reset your password on their email help page.
    I would go to your providers web mail page and see if your username and password work thee. if they do then you might have incorrect server settings causing the password error.

Maybe you are looking for

  • Package javax.servlet does not exist - settings appear to be correct

    laugh as I write this post...it's hardly a "new topic."...but everything seems set just as it should be... Okay...I'm a seasoned programmer in every language but JAVA. Here's the issue...every time I try to use the Core Servlets book/website by Marty

  • How do I add tag words to my website in iweb

    I need to learn how to add tag words to my website (in iweb).

  • String replacement

    Hi, anyone knows how to replace a particular string in a file with another string? For example, in the file hello.tmp, I want to replace the word :Smile: with the string <img src="smile.gif"> I tried to use String.replace() but this is only for chara

  • Everything is extra large and off the screen

    I was in a iPhone app at 2x, closed the app and everything was so large the iPad was unusable. I rebooted it and the screen came up the same. Nothing I tried would restore the screen. Brought it to an Apple store and they never seen that and it must

  • FORTE on VMS

    Hi, We are using a VMS machine for our database server. For each client the Forte Node Manager process creates a server process. Does anyone know how to determine which of these client server processes belongs to which client? Thanks Nigel Morris To