Simple (not for me!) package problem.

I was hoping someone could help me with this one! I guess its pretty simple, but this is the first time Ive tried to make a package.
I have an app like so:
theApp\testPiece.jsp
theApp\WEB-INF\classes\sql\
     piece1.java
     piece2.java
Both piece1 and piece2 have "package sql;" at the top.
piece2.java references piece1.java. I can compile piece1.java no worries. However, If I have piece2 in theApp\WEB-INF\classes\ directory it compiles, if I have it in the sql directory it says "cannot resolve symbol".
piece2.java has "package sql" at the top, so shouldnt it be able to see piece1? How come it only sees it if its in the parent directory?!
Also if I have it in the parent directory, I can not reference it as sql.piece2... Is it a class path thing? if so, what should the javac statement look like? Ive been searching this forum for hours, and I keep finding variations on my question, but I am really stuck! Please Help!!!
Thanks,
nmoog

Hello nmoog,
I've only been using JavaBeans and packages for about a year, but saying that 2 years ago before I started university programming was a foreign concept altogether.
I do not mean to be condescending, but I doubt you'll find much with respect to packaging and compiling on the Sun site. Perhaps if you look at the Java tools documentation in your SDK distribution. Thats what I use to read to figure out compiling and package instructions:
C:\j2sdk1.4.1_02\docs\tooldocs\tools.html
or
http://java.sun.com/j2se/1.4.1/docs/tooldocs/tools.html
if you don't have the documentation on your hard drive.
In particular read the parts about javac.
Reading it myself, I realise you have to specify packages like a normal path name when compiling - you will understand when you read it.
It is trivial, but at the same time it is a major hinderence to your progress. Once you get past it, I reckon you'll pick up the pace of programming quite quickly. Don't overlook the tutorials, they are the best source of information for learning - while these forums along with Ask.com and Google are the best means of problem solving.
What web-container are you using? I am currently using Resin, but I may switch to Tomcat at some point in the future. Read the documentation for the web-container you are using. They have their diffences, but they use WAR web-archives and these all have the same structure:
Lets say your web application is called project. Arrange it like so:
project - contains html and jsp files
project/WEB-INF - contains java (source) files, i think
project/WEB-INF/classes - will contain class files
project/META-INF - contains the archive manifest
Treat JavaBeans like you would any other java or class file - they are nothing special. Run the following instructions on the command-line:
C:\project\WEB-INF>javac -d classes <list of all your java files>
C:\>jar cvf project.war -C project .
Now simply place project.war in the webapps folder of your web-container, and start your web-server.
Assuming you haven't changed anything in you resin.conf or web.xml file browse to
http://localhost:8080/project
and your index page should be retrieved automatically as if you browsed to
http://localhost:8080/project/index.jsp
I don't know if this is more or less than you wanted to know, but I hope it has been of some use.
I'm watching so hola if you wanna ask anything else
Darren B
e-mail: [email protected]

Similar Messages

  • OSS Notes for Swedish Langauge problem

    Good day everyone,
      I'd like to ask anyone of you if you know an OSS Note that could fix a swedish log-in. Everytime I log-in using Swedish (SV) language, the texts in QE51N are all displayed in German. Such texts includes the title bar, field texts, and Menu Bar to name a few. If you know any OSS Note that could fix this, please let me know. Thank you so much.
    -Chris-

    Hi Eric,
      I have been searching for two weeks now and I can't find any. I was just wondering if someone knows anything about this so I wont be opening an OSS Note that has already been answered. But I like your suggestion to open an OSS Call myself since theres probably no existing Note for my issue. thanks Eric.
    -Christian-

  • Can you please help me with this simple (not for me:) issue

    Why this doesnt work?
    public void spl ()
         String a=("moon.sun");
    String [] f=a.split(".");
    System.out.println(f[0]);
    }

    The second expression to split() is a regular expression. A period in a regular expression matches all characters, and you're wanting it to just match a period.
    To match just the period for your split, you'll need to escape it:String[] f = a.split("\\.");

  • DTR for custom package in EP6

    Hi,
       We are currently on EP5 using a custom developed MSS package with PDK. We are going to migrate to EP6 and install standard mss package 60.1.5 and use only selected standard functionality useful for us
    We are also planning to to use DTR for version control.
       1. I would like to know whether is there any standard way or guidelines suggested by SAP.
       2. Anybody have done such kind of implementation and would like to share their views.
       3. Is it a good idea to move all custom developed components in to DTR and leave the standard components as such or move all custom  and standard components in to DTR.
    Regards,
    Arun

    Hi,
    1. I would like to know whether is there any standard way or guidelines suggested by SAP.
    >> as per my understanding SAP has comeup with NWDI (DTR, CBS and CMS) inview to have a single repository which can be used for complete Code and Component Management. Feature included
    1. DTR - Code Version in a Team Environment
    2. CBS - Component Build Service to enable Component Build taking all dependencies into consideration.
    3. CMS - Movement of Component from Dev to Test and then to Prd environment.
    2. Anybody have done such kind of implementation and would like to share their views.
    >> we use NWDI for webdynpro components and not for MSS package components. so i really cant pour my opinion on that.
    3. Is it a good idea to move all custom developed components in to DTR and leave the standard components as such or move all custom and standard components in to DTR.
    >> in my opinion it is best to have NWDI as it will always stay ins sync with the SP releases. but again we will have additional migration of NWDI which is un-avoidable.
    Hope that helps.
    Regards,
    S.Divakar

  • I want simple example of UTL_FILE package

    I want simple example of UTL_FILE package , and please I want this example be complete as possible as you can ( i mean - as I understand - we suppose make Create Directory statement at beginning and so on ... ) .
    even if you know any links for simple examples for UTL_FILE package .... I will be so grateful to post it .

    Maybe something like this?
    http://www.oracle-base.com/articles/9i/GeneratingCSVFi
    les.phpthanks Jens Petersen .... it's good one.

  • LMS3.1 psu problem - Consistency check failed for base package ...AG

    Hello,
    We've got a package updater problem with a LMS3.1 installation.
    1. After trying to update RME Device packages from GUI we got a message that LibCommon-v2.3.2 is needed
    2. We tried to update LibCommon from CLI using psucli.bat, see below
    3. We found a discussion in this forum, simular to this problem with the hint to reinstall the RME, what we did but with no improvement
    4. We deinstalled, reboot, did a new installation of LMS3.1. But the problem still exists, with same message. We need the PSU, because most of our devices will be managed after device package update only.
    Updating of each package brings warnings with pseudo package names, as ImageAG, MemoryAG and not with hints to real missing packages:
    C:\lms\bin>psucli -p rme -install -src C:\install\lm31-updates\ LibCommon
    WARNING: LibCommon(2.3.2):Consistency check failed for base package ImageAG
    see also the psu.log containing all tryes of package updates
    The problem goes a little bit in this direction, but with a new reinstallation as well:
    https://supportforums.cisco.com/message/669047#669047
    What can we do?
    thx for hints, Steffen

    When you install LMS on Windows, there are some recommended steps to take to ensure the installation is a problem free as possible:
    Set the per-user and global TEMP and TMP environment variables to short values (e.g. C:\WINDOWS\TEMP)
    Disable all anti-virus software
    Disable Windows Data Execution Protection (DEP)
    Login to the server as a local Adminitrator
    Install from original, locally attached media
    NEVER abort the installation after the installer says not to
    Based on the symptoms described here, I'm guessing at least the first item was not done.  TAC has a procedure to recover a bad RME package repository, but if the base installation is problematic, doing so would be moot.  If you suspect the installation isn't 100% (beyond the package repository), uninstall, then follow the above steps to reinstall.
    If you think the problem is just with the RME package repository, contact TAC, and they can provide you a good, up-to-date repository to jump start things for you.

  • In my Iphone 5, Nothing on my App Store is working its displaying blank (Except for Genius section). I've tried to uninstall and install itunes and all its component but still it doen't fix. Not sure if its problem with apple servers. Someone help please!

    In my Iphone 5, Nothing on my App Store is working,  its displaying blank (Except for Genius section). I've tried to uninstall and install itunes and all its component in my desktop but still it doesn't fix the app store issue. Not sure if its problem with apple servers. Someone help please!

    settigns>itunes and app store to make sure you are signed in.. If  you are, you will see your account name..... anyhow, click your account name, sign out and sign back in
    also go to to settings>general>reset and reset network settings... if that doesnt work settings>general>reset and reset all settings!
    one of those shall work. The last step would be to restore your device (apple.com/support) HT1414

  • I have always heard that Macs are less likely to get infected with a virus.  My computer has been running much slower since I installed Maverick.  Just not sure what the problem might be.  Is there a way for me to run a diagnosis?

    I have always heard that Macs are less likely to get infected with a virus.  My computer has been running much slower since I installed Maverick.  Just not sure what the problem might be.  Is there a way for me to run a diagnosis?

    Some have found relief just by reinstalling, but it is more than likely incompatible third-party applications that slow it down.
    You will have to investigate to see what it is.
    Open Activity Monitor and see if anything is using a lot of CPU% or Memory. If they are, check to see if there is an update for them.
    Another place to look is the Console. See if anything is logging repeating messages with throttling and/or respawn in the All Messages list.
    Sometimes it is not that easy to root out the problems, but if you have anything that purported to clean, protect, optimize, maintain, or flush your system, then that is likely the cause.

  • I was trying to use the Matlabscripting VI, but it says it is for instructional purpose and not for research and the system is getting stuck.When I used it two days back it worked.Could U plz tell me what the problem is??

    I have Labview 7.0 and Matlab 6.5 installed on all the computers at my School. When I tried to use the Matllab Scripting Window for the first time, it worked, but after two days when I was trying to run the program, there was a meesage saying that the License is for instructional Purpose only and not for Research or commercial use and the Labview is getting totally stuck. I need the Matlab Scripting VI for my Project,could anyone suggest what I shd do or is there any other method by which I could do that.

    Hello Medha,
    Thank you for contacting National Instruments.
    From the information you have provided, I am not sure what is causing your problem. Make sure that you do not have an evaluation license for LabVIEW.
    What, if anything, was changed in your VI before it stopped working? Will it run without the Matlab script?
    If you continue having trouble getting your VI to work, please respond with more information. If you like, you can post your VI (along with any necessary sub-VIs) and I will take a look at it.
    Have a great day,
    Sean C.
    Applications Engineer
    National Instruments

  • SFTP/FTP Proxy Problems - Works for DMZ but not for Internet Hosts?!

    Hi together,
    we have a strange problem with our TMG Proxy, some infrastructure informations first
    So we have the Client LAN with the IP range 192.168.11.x which is routeable to Server LAN 192.168.3.x but not to DMZ LAN 192.168.200.x.. The TMG is a 2 Node Array, 192.168.200.5 is the DMZ VIP. TMG DMZ IP Adress (192.168.200.5) and physical Adresses have
    an NAT relation to one Public IP. HTTPS Inspection is active. We dont use (and dont want to) the TMG Client component.
    When i use WinSCP, Putty or Filezilla and connect to a DMZ LAN Host (192.168.200.x) with "HTTP Proxy" (192.168.3.108:8080) everything is fine, it works like expected...
    When i connect to an Internet Host it fails regardless which protocol i use - ftp, sftp or ssh. The error i get is
    "The token supplied to the function is invalid."
    An example for a failed SFTP Connection
    Filezilla
    Status: Connecting to system.internet.de...
    Trace: Going to execute "C:\Program Files (x86)\FileZilla FTP Client\fzsftp.exe"
    Response: fzSftp started
    Trace: CSftpControlSocket::ConnectParseResponse(fzSftp started)
    Trace: CSftpControlSocket::SendNextCommand()
    Trace: CSftpControlSocket::ConnectSend()
    Command: proxy 1 "tmg.local" 8080 "domain\user" "***********"
    Trace: CSftpControlSocket::ConnectParseResponse()
    Trace: CSftpControlSocket::SendNextCommand()
    Trace: CSftpControlSocket::ConnectSend()
    Command: open "[email protected]" 22
    Trace: Looking up host "system.internet.de"
    Trace: Connecting to 192.168.3.108 port 8080
    Trace: Proxy error: 502 Proxy Error ( Das Token, das der Funktion übergeben wurde, ist ungültig.  )
    Error: Proxy error: 502 Proxy Error ( Das Token, das der Funktion übergeben wurde, ist ungültig.  )
    Trace: CControlSocket::DoClose(64)
    Trace: CSftpControlSocket::ResetOperation(66)
    Trace: CControlSocket::ResetOperation(66)
    Error: Could not connect to server
    Trace: CFileZillaEnginePrivate::ResetOperation(66)
    TMG protocol throws this
    Protokolltyp: Webproxy (Forward)
    Status: 0x80090308 
    Regel: Webzugriff FTP Test
    Quelle: Intern (192.168.11.31:44673)
    Ziel: Extern (78.46.182.171:22)
    Anforderung: system.internet.de:22
    Filterinformationen: Req ID: 106f1cb7; Compression: client=No, server=No, compress rate=0% decompress rate=0%
    Protokoll: https-inspect
    Benutzer: domain\user
    Hope you can explain me what we doin wrong or how to find out whats the problem. I didn`t find many informations about "0x80090308" or "The token supplied to the function is invalid.". Disabling HTTPS Inspection for the Source 192.168.11.31
    doesnt change anything...
    Connection to an DMZ Host looks like this:
    Filezilla
    Status: Connecting to system.dmz...
    Trace: Going to execute "C:\Program Files (x86)\FileZilla FTP Client\fzsftp.exe"
    Response: fzSftp started
    Trace: CSftpControlSocket::ConnectParseResponse(fzSftp started)
    Trace: CSftpControlSocket::SendNextCommand()
    Trace: CSftpControlSocket::ConnectSend()
    Command: proxy 1 "tmg.local" 8080 "domain\user" "***********"
    Trace: CSftpControlSocket::ConnectParseResponse()
    Trace: CSftpControlSocket::SendNextCommand()
    Trace: CSftpControlSocket::ConnectSend()
    Command: open "[email protected]" 22
    Trace: Looking up host "system.dmz"
    Trace: Connecting to 192.168.3.108 port 8080
    Trace: Server version: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
    Trace: Using SSH protocol version 2
    Trace: We claim version: SSH-2.0-PuTTY_Local:_Mar_28_2014_10:34:48
    Trace: Doing Diffie-Hellman group exchange
    Trace: Doing Diffie-Hellman key exchange with hash SHA-256
    Trace: Host key fingerprint is:
    TMG Protocol
    Protokolltyp: Webproxy (Forward)
    Status: 0 Der Vorgang wurde erfolgreich beendet. 
    Regel: Webzugriff FTP Test
    Quelle: Intern (192.168.11.31:48818)
    Ziel: Umkreis 2 (192.168.200.205:22)
    Anforderung: system.dmz:22
    Filterinformationen: Req ID: 10727dce; Compression: client=No, server=No, compress rate=0% decompress rate=0%
    Protokoll: SSL-tunnel
    Benutzer: domain\user
    Thanks in advance.
    Regards
    Matthias

    Hi Keith,
    ok i found out the problem is https inspection is enabled....
    - when i disable https inspection for source, same problem
    - when i disable https inspection for destination, problem solved
    the root cause why this worked is we had https inspection disabled for dmz destinations.
    there is no direct route relation between the lan and dmz.
    why is source exception not working in this?

  • My outlook will not open yet all other microsoft packages will.  When I click on the icon, the 'o' logo will come up for a split second but will not open the package - need to receive emails asap!

    My outlook will not open yet all other microsoft packages will.  When I click on the icon, the 'o' logo will come up for a split second but will not open the package - need to receive emails asap!

    You're very welcome!
    I meant holding the "option" (or "alt") key on your keyboard as you click the Outlook icon on the Dock, and continuing to hold it until you see the Microsoft Database Utility come up. Alternatively, you can open the utility by navigating to Applications/Microsoft Office 2011/Office and then double-clicking the Microsoft Database Utility app.
    When you rebuild your database using that program, a backup copy of your original database (containing your account info, contacts, mail, calendars, etc) will be created. As a security precaution, you should also ensure you have a backup of your database (which you can find by going to Documents/Microsoft User Data/Office 2011 Identities/ and copying the contents of that folder onto an external drive).

  • Simple report for lock users not actives in last 30 days ?

    Hi, we need code in SE38 simple report for lock all users not actives in last 30 days.
    This sample is good but need check : user its inactive in last 30 days.
    http://www.sap-basis-abap.com/abap019.htm
    Thank you.

    You do not need a report to do this. The instance parameter
    login/password_max_idle_productive
    will do this for you.
    Cheers
    Graham Robbo

  • Very simple Q !! but not for me..

    hello,
    i know its a very simple Q for some people but i m not getting any solution to it...
    the prob is that when i call ActionEvent by pressing two or more buttons the button that has produced the event is checked by using getActionCommand() but how can i check for two or more TextFields or TextAreas calling same ActionListener there is no getActionCommand() for TF n TA... i tried giving names to these components by using setName() n checking the components name in actionPerformed() but thats not working...
    plz help me out... atleast this wud clear my basics....

    Perhaps your use of setName() was not correct - it seems like it should work.
    Another alternative is to provide the ability for your ActionListener to compare the object that is the source of the event to the TextFields.
    Or, use a separate ActionListener.

  • I have a downloaded font file for a school problem on a flash drive and I do not know how to install it into my photoshop application. Need to be walked through this as I am an older user who does not understand any of this stuff.

    I have a downloaded font file for a school problem on a flash drive and I do not know how to install it into my photoshop application. Need to be walked through this as I am an older user who does not understand any of this stuff.

    Fonts are handled by your operating system and installed through the respective System Control panel (Windows) or Fontbook (Mac). On Windows simply type "Fonts" in the search bar in the start menu and when you open the panel/ folder use File --> Add Font. On Mac the procedures are similar, you just need to find the Fontbook app in Applications:Utilities.
    Mylenium

  • Ipad 3 charger problem im using the original charger and it say is not apropiet for device.this problem star today. :/

    ipad 3 charger problem im using the original charger and it say is not apropiet for device.this problem star today. :/

    Take it to an Apple Store for evaluation and possible replacement.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

Maybe you are looking for

  • How do I make a media placeholder in numbers for iPad/iCloud

    How do I make a media placeholder in numbers for the iPad/iCloud also can I format the placeholder reduce the pixels of the imported image.

  • Two Copies Of Final Cut Pro

    Can I install two copies of final cut pro? For editing the old project files, without converting them to FCP6

  • Web Service session manager not found.

    I'm trying to understand how to use the HTTP utilities, and I'm having trouble just creating a session.  I get a Web Service session manager not found error.  I've read where the client has to support cookies.  My eventual client will be a labview VI

  • Parent members not being updated when running AGG

    I have a scenario where eventhough the bottom level members change the parent members are not being updated when we run an agg For example if the bottom level member was 150 and we run the aggregate the numbers are fine. If the bottom level member wa

  • Add restrictions to copy/cut/paste in Excel when a worksheet is protected

    Office Version:  Office 2007; Operating System:Windows 7;  Program:Excel I need to be able to select via a macro or some other way the restrictions listed below on copy/cut/paste.  The worksheet will be protected.  The goal is to allow a user to have