Deploy app under directory other than webapps

I am having the following problem. I am deploying my application under a different directory than the usual <tomcat home>/webapps. My context is set to point there fine. (BTW, the directory is under a different drive on my server). When I run the application, I can go to my start page fine. When I hit one of my jsp pages, I get an error that the pages cannot find the classes I imported to use in them. One more thing, I am using STRUTS 1.1.x and I have the jsps set up as forwards. Also, I have the JSPs under the WEB-INF directory so the only way to get to them is through a forward from code on the server. Every time I hit one of the JSPs they think they need to look for the classes under the WEB-INF directory? Did anyone have the same problem? Any ideas?
Your help is appreciated. If I find the solution on my own, I will post it here as well in case someone else needs it.

All of your classes need to be under
{web app directory}/WEB-INF/classes
or if they are in a jar file
{web app directory}/WEB-INF/lib

Similar Messages

  • Tomcat won't compile jsps if they are in any directory other than root

    I'm running a new instance of Tomcat, and can't get a simple jsp file to compile, if it's in any directory other than the root.
    The jsp is:
    <%@ page import="test.Simple" %>
    <%@ page contentType="text/html" language="java" %>
    <html>
    <body><%=Simple.makeText()%>
    </body>
    </html>
    and the Simple class is:
    package test;
    import java.util.Random;
    public class Simple {
    public static String makeText() {
    return String.valueOf(new Random().nextInt());
    When I place the jsp in the root directory, it works fine.
    When I place the jsp in any subfolder (eg: /debug/1b.jsp), I get the following error:
    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 compile class for JSP
    Generated servlet error:
    Only a type can be imported. test.Simple resolves to a package
    An error occurred at line: 14 in the jsp file: /1b.jsp
    Generated servlet error:
    Simple cannot be resolved
         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)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. test.Simple resolves to a package
    An error occurred at line: 14 in the jsp file: /1b.jsp
    Generated servlet error:
    Simple cannot be resolved
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         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)
    Here's the server info:
    Server version: Apache Tomcat/5.5.25
    Server built: Sep 24 2007 11:31:18
    Server number: 5.5.25.0
    OS Name: Linux
    OS Version: 2.6.20.20-071008a
    Architecture: amd64
    JVM Version: 1.5.0_10-b03
    JVM Vendor: Sun Microsystems Inc.
    Using fedora core 6.
    I looked into the Tomcat work directory, and it looked as if the jsp was successfully converted to a java file. I'm not sure where to look, as all the settings are defaults.
    Any help is greatly appreciated. Thanks

    :D :D :D...
    My friend it'd be great idea if you can find google tutorial on TOMCAT/web application basics
    anyways coming back to your problem
    whenever,an application is deployed on tomcat a new folder is being created at the following location %CATILINA_HOME%/webapp/ with respect to application name.
    Therefore try to maintain an architecture like the one below if you programmin any web application.
    %CATILINA_HOME%/webapp/<applicationName>/(place all your .jsp files)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/META_INF/(Place your mainfest files & context specific configuration files)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/WEB_INF/ (Genrally used to save secured files which cannot be access directly and always make sure you prepare a web.xml file associated to the application)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/WEB_INF/lib (place where all your .jar file libraries are being placed)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/WEB_INF/classes (place where all your .class,resource files are being placed as the pacakage structure you have choosed in)
    If this doesnot work even if you ensuring everything's right.Reading through tutorials & speding time on finding resources by yourself would be a great idea.
    I hope there are no hard issue on this. :)
    REGARDS,
    RaHuL

  • Using a different directory other than /config/domain_name/applications

    Is it possible to configure WLS6.1 to use a directory other than "/config/domain_name/applications"
    as its default application directory.

    Does anyone know if this was fixed, or is it still a problem. Do we really need
    to run our applications from within the bea install/config/domain directory?
    thanks
    Joel
    "Michael Frank" <[email protected]> wrote:
    Ryan, we have been working with the kinds of application setups that
    you
    seem to describe. All through WebLogic 5.1, I have insisted on keeping
    my
    application server directory outside of the BEA WebLogic installation
    directory.
    With 6.1, I have had some success running with the root directory different
    from the home directory. Here is a sample startup sequence, which sets
    the
    startup root to be other than the WebLogic home directory:
    Change to directory: c:\EJC61\wlroot
    WL_HOME: c:\bea\wlserver6.1
    java -Dbea.home=c:\bea -Dweblogic.RootDirectory=c:\EJC61\wlroot
    -Dweblogic.Name=appserver -Djava.security.manager
    -Djava.security.policy==c:\bea\wlserver6.1\lib\weblogic.policy
    -classpath c:\bea\wlserver6.1\lib\weblogic.jar weblogic.Server
    Unfortunately, I recently discovered a problem involving EJB transactions
    that could only be resolved when I moved my domain directory back under
    the
    WL_HOME directory. Basically, I couldn't use transaction=required in
    any
    but the standard directory setup. I have already sent word of this to
    BEA,
    but for the time being, I would suggest that you follow the standard
    setup
    until BEA verifies that they support and have tested alternate directory
    setups.
    "Ryan Planinshek" <[email protected]> wrote in message
    news:[email protected]...
    We have scripts that set up various directory structures on a virtualdrive(based
    on DEV/DEVTEST/PROD etc.) on the fly and I don't want to touch anythingin
    the
    Weblogic home.
    Basically I am just wondering if this "/config/domain_name/applications"directory
    is defined within an XML or some other properties file somewhere...
    "Charlie Crook" <[email protected]> wrote:
    Why would it matter?
    "Ryan Planinshek" <[email protected]> wrote in message
    news:[email protected]...
    Is it possible to configure WLS6.1 to use a directory other than"/config/domain_name/applications"
    as its default application directory.

  • Running a java program in a directory other than the current directory

    How do I run a java program that's located in a directory other than the current directory?
    There is a file Test.java in /dir1/subdir1. If my current directory is anywhere other than that directory, say /dir2/subdir2, I can compile Test.java by using:
    javac -classpath /dir1/subdir1 /dir1/subdir1/Test.java
    But when I try to run it with:
    java -classpath /dir1/subdir1 /dir1/subdir1/Test
    I get a java.lang.NoClassDefFoundError: \dir1\subdir1\Test
    Any thoughts?

    You need to specify just the name of the class you want to run. So java -classpath /dir1/subdir1 Test

  • How to install adobe X or XI in a directory other than default.

    Please,
    I need install Adobe reader in a diferent directory of default.
    How to install adobe X or XI in a directory other than default.
    best Regards.

    What OS? Why are you trying to install i a different directory. No matter what directory you install in, quite a bit must be installed on the boot drive. If you are running out of hard drive space, it is time to get a new hard drive.

  • Jdev Extension Jar put in a directory other than "JDEV_HOME/jdev/extensions

    I'm creating new rules for auditing using the Jdeveloper 10.1.3 extension API and enabling using extension framework. Once I created the rule, I placed the 'jar' file in "JDEV_HOME/jdev/extensions/" directory as per the guidelines. It is executing perfectly. But I want to place the jar in my home directory. is it possible?
    I mean I place the jar file in my home directory and I will provide classpath in 'extension.xml' file, which is a part of jar file. How can I achieve it?
    The 'jar' file contains
    a) extension.xml
    b) 2 java files
    c) one text file.
    Here extension.xml mention the link of a rule to the audit framework. I used the
    A part of extension.xml file which adds my rule to the framework.
    <hooks>
    <jdeveloper-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
    <addins>
    <addin>oracle.test.launcher</addin>
    </addins>
    </jdeveloper-hook>
    </hooks>
    I heard that we can do this in different types:
    a) In <hooks> tag, we can include the <libraries> tag which mentions the classpath tag and value.
    But no where I found the <libraries> tag in google search.
    b) In "JDEV_HOME/jdev/extensions/" directory we place a jar file which only contains the 'extension.xml' file and we can specify the class path of the jar file, which contains the remaining three files. is it possible? If so pls. show me the pointers to do this.
    Could you pls. suggest me.
    Thanks in Advance
    Regards
    Madhu

    Hi,
    You can install extension jars in your jdevhome extensions directory in addition to the standard OH/jdev/extensions. On platforms other than Windows, this is ~/jdevhome/extensions by default. On Windows and other platforms, the location of the jdevhome directory can be controlled using the environment variable JDEV_USER_DIR.
    Adding an extension jar to one of those two locations is usually sufficient to add it to the classpath of JDeveloper. If you have additional non-extension jars you want to add to JDeveloper's classpath, you can do so using the <classpaths> element in extension manifest. This contains <classpath> elements which are relative paths to jars from the location of the extension jar. For example, say you have
    ~/jdevhome/extensions/my.extension.10.1.3.jar
    and you want to include
    ~/jdevhome/someotherjar.jar
    You would use something like this:
    <extension ...>
      <classpaths>
        <classpath>../someotherjar.jar</classpath>
      </classpaths>
    </extension>Thanks,
    Brian

  • Rsync - download to directory other than the sync directory

    I want to rsync from server/dir to local/dir. local/dir is an outdated sync of server/dir. I would like to perform a sync but actually download the necessary files for the sync to a different directory than local/dir.
    Basically: compare server/dir and local/dir, download the necessary updates to local/some-other-dir.
    It doesn't seem as if rsync has this functionality built in, but it's possible I'm missing something.
    How could I do this?

    My question is more complex than a standard backup procedure, I don't see anything about my question in the wiki.
    Basically, I compare A to B but actually perform the backup to location C.

  • Using BI Apps with applications other than Oracle, Peoplesoft and ....

    Hi all,
    I'm new in BI Applications. We have developed our applications with oracle tools and technologies. Is there any possibility to use Oracle BI Apps with our own database and applications?
    Regards,
    Iman

    I'll try to explain the "Universal Adapter."
    So Oracle BI Applications contains the presentation catolog (prebuilt reports and dashboards), the .rpd (prebuilt business logic), and the Informatica Repository (the ETL process).
    The warehouse model stays fairly consistent regardless of the platform. The "ETL Process" runs through SDE (source depent extract), SIL (source independent), and PLP (post load) mappings.
    By utilizing the "Universal Adapter/Container" you are still able to utilize the standard .rpd and presentation catalog.
    Essentially the Universal Adapter is in place to allow a user to develop discover the data needed by the "SDE" mappings, while still utilizing the rest of the functionality provided with BI Applications. This can be an overwhelming task, and I do suggest you do fairly comprehensive analysis before you attempt to utilize Oracle BI Applications with the Universal Container.
    Depending on the magnitude and scope of your deployment, you might be better off developing the ETL process on your own. However, there are instances where the universal adapter can be incredibly usefull.
    HTH,
    Austin

  • Getting WebLogic 5.1 sp4 to point @ a directory other than "myserver"

    I am in the process of changing our middle tier over from Dynamo to
    WebLogic. I can't find in any of the online docs where to get WebLogic to
    point at another directory besides "myserver".
    Where is this at?
    ---Jason

    well placing 10 taglib definitions in each web.xml is imho a bad idea. as there's no real way to exclude all but certain JARs from a WAR using maven (the ideal solution i'd prefer), the solution i had to choose was to set maven-dependency-plugin up the way it would extract the TLDs from certain JARs and place it anywhere under WEB-INF of the WAR when it's assembled. the cons is that TLDs are duplicated, but on the other hand the configuration for that is minimal (which also seems important to me).

  • PHD from directory other than /Users

    Hi All,
    I have gotten PHD to work with my Leopard Server 10.5.6, but only if the directory is located in /Users.
    When I try to create an account with Workgroup Manager on another volume (say, my large RAID which is where I really want it, /raid/phd ), there is always an error saying that the network home is unavailable, contact system admin, or something to that tune. I shut off all the Guest login stuff on /Users and turned it on for /raid/phd and I can log in to the account as if it were a standard file share.
    I have tried making aliases back to /Users (both ln -s and Option-Drag) but it does not work.
    Unfortunately I can not simply install the OS over on the raid device and be done with it--it would be a lot of work.
    Does anyone have a solution?

    Hi
    +Does anyone have a solution?+
    Yes. Possibly? Without knowing too much about your environment you could:
    Unshare the Users folder. Navigate to the desired folder on the RAID. Set it to share. Configure it to automount for home directories. Now launch WorkGroup Manager. Select a User and under the Homes tab you should see the path for the newly created sharepoint You'll probably see the path for the previous one as well. Ignore this and simply select the new one. Click Create Home Now and click Save.
    Verify the folder has been created by navigating to the parent folder. If you populate the LDAP node with desired users and provided the correct path is defined in the Advanced tab you can issue:
    sudo createhomefolder -a
    from the command line. This will create home folders for all your users. Or you could simply the use the GUI a user at a time or select them all and click create home now followed by save. You should be able to see the folders being created by having the parent folder open.
    Have you enabled ACLs for the RAID? If not issue:
    sudo fsaclctl -p /Volumes/raid -d enable
    Make sure you restart the Server afterwards.
    Tony

  • HP Pavilion slimline s3400t. DVD/CD will not offer a directory other than e:

    The help menu states that I can select other directories, but when I click on the link, the only directory that is offered is my e:\ drive.  Is there a fix for this?  I am running Windows Vista for Business upgrade 2.  Device manager describes my DVD as:
    HL-DT-ST DVD-RAM GH10L ATA.
    Thank you.

    Ah....I see. You are just looking to play the files you copied to your hard drive. You don't really want to change the drive letter. Changing the drive letter would not help you play the files on your hard drive. It would just confuse your computer about where to find your hard drive
    What kind of file(s) did you copy to your hard drive? Was it a DVD movie? Was it some personal files (like Microsoft Office documents or pictures)?
    What DVD software are you trying to use to open the files?
    Have you tried navigating to the files you copied and opening them by double-clicking on them?
    The more we understand about what you are trying to do, or what is happening, the better we can help.
    ...an HP employee just trying to help where I can, but not speaking on behalf of HP.

  • Make firefox use a directory other than ~/.mozilla

    I want to use several firefox versions and 'flavors' (plugin sets) simultaneously. Is there an environment variable or a command line option that tells firefox which directory to use for its data? If there's not any, where can I find it in the source?

    The profiles are what firefox uses for its data. There are command line options, also methods of creating profiles that do not display in the profile manager, as mentioned in the last article I linked to.
    *See also: https://developer.mozilla.org/en/Command_Line_Options
    Certainly I can work with multiple instances of firefox on a Windows machine.

  • Prob. with doc registered under application other than SHIPPING EXECUTION

    Hi,
    We have a custom Pick Pack Slip report which we have registered under Custom Application.
    While Creating Document Set, if the document is registered under Custom Applicaiton, the document is not getting generated. (Concurrent program itself is not getting executed for this document) but if the document is registered under SHIPPING EXECUTION applicaiton, its getting executed.
    I have created one Document Set and while doing PICK RELEASE, I am using this document set. Initially I have attached only one document which belongs to custom application and ran pick release but it didnt submit any document. Then I added one more document which belogns to Shipping execution and submitted pick release one more time. This time it has executed program for the one belongs to shipping execution but not the custom one.
    If I register the same custom report to Shipping Execution, then its working fine !!! But I dont think this is the right approach to register all custom reprots to Oracle Shipping application.
    Please suggest !!!

    Yes..It won't work..I too tried it..
    Please open a TAR and work with oracle..
    Let's see what they are upto..

  • Best app. for scanning other than "image capture"

    Yesterday I purchased a mbp (10.7.1) and my old scanning program (Photo Studio) that came with my CanoScanLIDE 600 F, is no longer compatible. I don't care for "image capture" is there an alternative (preferably free) that would work?  Thanks for any reccomendations.

    VueScan is considered by many to be the gold standard.  But I personally don't like it for my own scanner (Epson Perfection 1260).  YMMV, of course.  It is free to download and try out, but anything you scan with it will be watermarked.  If you like it you will have to register it ($40 IIRC) to fully unlock it. 

  • Can anyone give me a list of app hosting companies other than the expensive adobe?

    Adobe has priced itself out of my budget and I am looking for other hosting companies that take the DPS built file.
    Best regards,
    James

    Well, if I were the designer of the error code, I think I could probably give an idea of what kinds of circumstances might cause this error to occur, regardless of the application.
    However, if it helps, here is the problem. I have an ATE program that performs thermal cycling for a UUT using VISA calls to a GPIB controller which communication with 3 different instruments. The test itself runs fine for long periods of time, and then I start to see this error occur. However, the program appears to continue to run after I press 'OK' from the pop-up dialog ackowledging that the error has occurred. There appears to be no evidence of a memory leak that could possibly be contributing to the problem, or at least none that I have detected, and the error description itself is very vague. So basically what I am looking for is a better understanding of what MIGHT be causing this type of error. I would not expect a specific cause for my particular application, because as Bob was so kind to point out, I hadn't offered much information in my original post. What I was really looking for was a better understanding of the error itself, from a 30kft point of view.
    Thanks Bob_Schor for pointing out the deficiencies of my original question, it's posts like yours that make this discussion board a wonderful place to have a professional discussion. 

Maybe you are looking for

  • E6-00: what's wrong with Belle refresh (and other ...

    I've been following this forum and have always been up-to-date with E6-00 firmware. I've been almost happy with Belle and was expecting hardly the Belle refresh version for the Music player upgrade. What I got was - ? I don't know. Just the new versi

  • Running Oracle 10g Express without Web connection.

    Hello Oracle Users/Friends I previously used Oracle 8i on an older machine running Windows 98. No web connections required to run database. Have just installed Oracle 10g Express Edition on newer machine running XP Pro. Suddenly Web connections requi

  • Query regarding entity_type in eam_work_orders_v table

    Hi All, This is regarding the Enterprise Asset Module in Oracle. I have the following 2 queries - select * from eam_work_orders_v where wip_entity_name = 'XYZ' and select * from wip_entities where wip_entity_name = 'XYZ' The first query does not retu

  • Average value of a material

    Hi All, I am writing a query where I have to calculate the average price of each material. Example, Material M1 can have many vendors, say,V1 and V2 I have to calculate for M1 = (Price * Qnty)for V1 + (Price* Qnty)for V2...../Total Quantity for (V1V2

  • RABAX_STATE type of error while accessing SEM-BPS layout

    Hi I was trying to access SEM-BPS layout from CRM web UI. But i got following error: CRM: Function Module "UPX_KPI_API_SET_PROP_TIMELINE" not found The termination type was: RABAX_STATE Can anyone please tell me how to resolve this problem? Thanks, S