How do I define my web application path in Tomcat6

Hi friends,
Can anybody tell me how to define and where to define my web-application path in tomcat 6 server?
I absolutely don't want to change any files inside tomcat6\conf\ folder (like its server.xml or context.xml)
My problem comes in the following scenario:
i) My Webapplication path is c:\tomcat6\webapps\test-servletii) I have one html form file registration.html in c:\tomcat6\webapps\test-servlet\registration.htmliii) I have a form processing servlet in path c:\tomcat6\webapps\test-servlet\WEB-INF\classes\pkg_register\Process_Registration.classiv) web.xml file inside WEB-INF\ has contents
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
   version="2.5">    
<servlet>
     <servlet-name>Process_Registration</servlet-name>
     <servlet-class>pkg_register.Process_Registration</servlet-class>     
</servlet>
<servlet-mapping>
     <servlet-name>Process_Registration</servlet-name>
     <url-pattern>/Process_Registration</url-pattern>
</servlet-mapping>
</web-app>PROBLEM : In html <form action="/test-servlet/Process_Registration"> works fine.
But every time I don't want to give my web application folder name in URLs( not in web.xml or in form action, it should be default relative path).
I want to give just, <form action="/Process_Registration"> in registration.html file's form action.
Any help is appreciated.
Thanks.
---Sujoy

Thanks...
It solved the problem by putting <form action="Process_Registration"> instead of <form action="/Process_Registration">When I was using <form action="/Process_Registration"> it was directly taking me to
http://localhost:8888/Process_Registration .
But, now when i use <form action="Process_Registration"> it takes me to
http://localhost:8888/test-servlet/Process_Registration which IS CORRECT.
But, still i don't know why the <form action="/Process_Registration"> was taking me out of my current webapplication path. It should have given me ERROR.
--Sujoy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How do you get the web application path from the servlet?

    I have created a web application which is installed in
    /webapps/myApplication
    /webapps/myApplication/data/users.xml
    /webapps/myApplication/WEB-INF/classes/myServlet
    How can you get the path to the "users.xml" file from the "myServlet" file?
    The code below doen's seem to return the xml file. anybody knows why?
    public class myServlet extends HttpServlet {
    public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException
    File myXmlFile = new File("/data/users.xml");

    Try this..
    String FileName = getServletContext().getRealPath("\\data\\users.xml");
    File myXmlFile = new File(FileName);
    hope this helps..

  • How to redeploy Calculation Manager Web Application Server

    Hi All,
    I am installing a patch(13925741) for Calculation Manager, i stuck at the following point:
    6. Perform the standard Calculation Manager Web application server deployment task using Hyperion Enterprise Performance Management System Configurator (EPM System Configurator). See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions.
    I don't know how to redeploy Calculation Manager Web Application Server, plz help me in deploying this.
    The readme for the patch can be found at:
    https://updates.oracle.com/Orion/Services/download?type=readme&aru=15356919#_Toc330987031

    909062 wrote:
    Hi All,
    I am installing a patch(13925741) for Calculation Manager, i stuck at the following point:
    6. Perform the standard Calculation Manager Web application server deployment task using Hyperion Enterprise Performance Management System Configurator (EPM System Configurator). See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions.
    I don't know how to redeploy Calculation Manager Web Application Server, plz help me in deploying this.
    The readme for the patch can be found at:
    https://updates.oracle.com/Orion/Services/download?type=readme&aru=15356919#_Toc330987031
    Hi,
    Did you actually try to look at the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions as suggested ?
    To redeploy a component, run the configurator that can be found in the start menu under Foundation Services. Then select "modify an existing instance". Then for Calculation manager, check the box "Deploy to application server".
    Thanks,
    JM

  • How can I get the web application's context root?

    I have a web application, which is defined in Tomcat's server.xml:
    <Context path="/cbes" docBase="e:\work\GM\code\CBESCurrency" debug="0"
    reloadable="true" crossContext="false"/>
    And I hava a servlet in this web application.
    How can I get the context root of the web application?
    in this example: reture should be "cbes" or "/cbes"
    how?
    thanks alot.

    getContextPath() in javax.servlet.http.HttpServletRequest

  • How to create our own web application on apache tomcat

    I am using Tomcat's default location to place my servlets.
    "E:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT"
    But day by day my classes are increasing. Now i am feeling to have my own location to place my servlets.
    Ex. "E:\myservlets"
    How to create and activate our own web application on apache tomcat except from tomcat's directory structure? Please guide me in this regard.
    Thanks in advance.

    hi,
    you can place your own application in any where
    then you to open under tomcat/conf/server.xml file
    add
    <Context path="/examples" docBase="e:/examples" debug="0"
             reloadable="true" ......./>

  • How do we define a Web ADI integrator and Associate it with a window?

    Hi,
    I'm on Oracle HRMS 12.1.3. I would want to export data into Excel from a form window (Navigation Path is: Leave Management > List Employees By Absence Type > Query).
    When I try to export data, it says: APP-PER-289792: Before you can run a mail merge or data extraction from this window, your system administrator must define a Web ADI Integrator and associate with the window ...
    I've tried looking around for articles on how to create Web ADI integrator s, but couldn't find one that explains how to associate the integrator with a given window. Any advise will be highly appreciated.
    Dula

    Hi Rajen and all,
    The sample tutorial you and Aj gave me seem for older version like 11i or 12.0. Can i still apply or follow it for 12.2?
    You also mentioned:
    My approach when I started was more like the "baby step" method ... started with something simple with these 2 responsibilities and a simple integrator and then continued by adding new features (like LOV, PopLists, Contents, playing with layouts, using FNDLOAD, etc....). It's  an interesting experience.
    Do you have the docs you follow to do the above process? What 2 responsibilities are you referring to? It is "Desktop Integration" & "Desktop Integration Manager"?
    I thought "Desktop Integration Manager" is the super-user and has all the "powers" needed for adi?
    What powers does "Desktop Integration Manager" have,  that "Desktop Integration" does not have? and vice-versa.
    Thanks a lot,

  • Defining a web application name

              Hi
              The syntax for accessing a given resource is given as below.
              http://hoststring/ContextPath/servletPath/pathInfo
              Context path is the name of the web application.
              My question is where do I define the name of the web application. Is it in web.xml
              or weblogic.xml.
              Also could you give me an example of the syntax.
              Next I wish to access a JSP page on the server, so do I omit the 'servletpath' and
              the 'pathInfo' part of the above string.
              I am using Weblogic 7.0.
              Thanks in advance for your help
              Best
              Naveen
              

    http://e-docs.bea.com/wls/docs70/webapp/index.html
              The context path is defined in application.xml in your ear file
              eg
              <display-name>myapp</display-name>
              <module>
              <web>
              <web-uri>myapp-web.war</web-uri>
              <context-root>myapp</context-root>
              </web>
              </module>
              So to access the "root" of your webapp you would use www.myserver.com/myapp
              The servlet path is defined in web.xml
              <servlet>
              <servlet-name>myservlet</servlet-name>
              <servlet-class>com.mycompany.MyServlet</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>myservlet</servlet-name>
              <url-pattern>/myservlet</url-pattern>
              </servlet-mapping>
              To call the servlet you would use www.myserver.com/myapp/myservlet
              "Naveen" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi
              >
              > The syntax for accessing a given resource is given as below.
              >
              > ---------------------------------------------------
              > http://hoststring/ContextPath/servletPath/pathInfo
              > -------------------------------------------------
              > Context path is the name of the web application.
              >
              > My question is where do I define the name of the web application. Is it in
              web.xml
              > or weblogic.xml.
              > Also could you give me an example of the syntax.
              >
              > Next I wish to access a JSP page on the server, so do I omit the
              'servletpath' and
              > the 'pathInfo' part of the above string.
              >
              > I am using Weblogic 7.0.
              >
              > Thanks in advance for your help
              > Best
              > Naveen
              >
              

  • How can I develop a web application using EJB design pattern?

    I have searched over the web and found quite a lot of tutorials on how to use the EJB design pattern.
    I know that there will be a home interface, EJB object interface and a SessionBean.
    But the tutorials often only cover a single class, this made me unable to get a complete picture of how EJB design pattern can be implemented into a whole system.
    I am now required to devleop an online shopping web application using EJB and JSP page.
    I think I will need to create a lot of classes: Member, ShoppingCart, Product...etc.
    What I want to ask is that, do I need to create a home interface, EJB object interface and a SessionBean for each of these classes?
    I really need some ideas on how to develop this system using EJB + JSP pages.
    Many thanks to you all.

    For every EJB that you want to create, you will need to code a home and remote interface and a bean class.
    You could start getting your ideas here
    http://www.theserverside.com/books/wiley/masteringEJB/
    http://www.coreservlets.com

  • How to run local host web application in win 7 64 bit with oracle database?

    Hi all,
    Hope doing well,
    sir i am running my local host web application with oracle database in win 7 32 bit. it's working fine.
    but when i am running the same thing in win 7 64 bit. it's showing login error.
    not going to home page even i checked with this published file open in visual studio it's working fine.
    how to run it correctly?
    thanks in advance.

    The number of times you have been asked to post sufficient details for your questions, we would expect you to have got the message by now... but clearly not.
    952646 wrote:
    but when i am running the same thing in win 7 64 bit. it's showing login error.What error? You haven't posted an error. There are millions of possible errors in computing and you're expecting people to guess which one.
    not going to home page even i checked with this published file open in visual studio it's working fine.
    how to run it correctly?No code, no database version, no details...... = NO HELP.
    When are you going to learn.

  • How to use images in Web application, which was written using mod_plsql?

    I need to insert some images in my Web Application. But I don't know how to insert it from BLOB. Please help me to solve this problem. Can you leave me some example.

    Regardles version, this could be a nice start:
    http://download.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CJAHDJDA

  • How to setup a backup web application in iis When primary application is down

    This is my Scenarios:
    Scenario 1:
    I have a web application(www.abc.com) hosted in IIS windows server 2008 R2. we use the the application over the intranet connected with LAN. we have the same application hosted in IIS in Different Name too.
    Primary : www.abc.com ,  Backup : www.abc1.com
    If the primary application is down for any reason the backup application should handle the request for the primary one.
    How to monitor the Primary application for unexpected DOWN and how to UP the backup automatically ones it detected the down of primary ?
    Scenario 2:
    This scenario is meant of Fail-safe server setup, I googled but can't get a clear brief idea.
    Note : web Application is used inside the organisation . can't accessed via internet
    Same as First Scenario But the the application hosted in two different servers at same location/Different location with different IP address 
    If the primary Server is down for any reason the backup Server should handle the request for the primary one.
    How to monitor the Primary Server for unexpected DOWN and how to UP the backup automatically ones it detected the down of primary ?
    Is there any free tools are available ?
    Kindly provide me solution for these Scenarios .

    Hi Rajakrishnan17
    1. Your question is more suited for Windows Server forum, not for Windows 7.
    2. What you try to achieve cannot be configured with out-of-the-box features in Windows 7.
    3. You may try to see if Network LoadBbalancing (NLB) feature in Windows Server 2008 and later fits your requirements.

  • How to publish a sharepoint web application to internet for external users.

    Hi
    how to publish a share point site to internet,
    In test server : we branded a publishing enabled site and uploaded content and want to publish for internet users
    we have a production sharepont server,
    1) how to configure alternate access mappings in default zone,internet zone when we create new web application in prod share point server.
    adil

    For internet publishing ifyou want or need change the authentication method you need to EXTEND the website and enable the CLAIM authentication so the user can login using a HTML form for username and password.
    SharePoint make a url parsing to identify the content
    to display so you need to explain all the server name used for contacting the WebApplication. You can use 5 different name for the same server
    (AAM Alternate Access Mapping).
    N.B. http and https are different name (AAM Alternate Access Mapping)Lorenzo
    LSo Lorenzo Soncini Trento TN - Italy

  • How to find out how many concurrent users using web application?

    Hi all,
    I have a web application deployed using 9iAS. I am trying to find out how to find out how many concurrent users are using this application at any one time. According to Oracle there is no way to see this information using the enterprise manager interface.
    Does anybody out there know how I can find out this information in real time? Failing that, are there any good analysis tools out there that display usage to the minute (all the tools I have found show usage by hour which is not sufficent for my needs).
    Any help would be much appreciated,
    Caroline

    I know I haven't heard of any software to do this, but this also sounds like a really hard problem to try and really analyze well.
    The trick is, you might "infer" how long a user is using an application based on when cookies are set and when they're set to expire. If that's a long time, though, that could count far more "concurrent" users than are actually there. A user could simply close the application at any time and stop using the application; you can't really detect that because the server isn't "told" when the user closes their browser or goes somewhere else.
    A good perl script might be able to read the Apache access log and tell you how many unique IPs asked for a given directory in which various applications are stored in any 5 minute span of time... that could be something like an indicator of "concurrent" users.
    If you don't know Perl, I'd suggest getting the O'Reilly & Associates book on Perl and learning it, because the more I think about this, the more this sounds like a textbook example for applying a Perl script.

  • How to upgrade the extended web application for FBA from MOSS 2007 to SharePoint 2010?

    Hi All,
    Currently my farm version is MOSS 2007 with SP3.
    I have a web application on port 80, and is based on windows authentication, and i extend it on the port 90, and the authentication is FBA with SqlServer.
    I know that SharePoint 2010 has a new claims based authentication, and in a single web application you can do both windows authentication and FBA.
    Now i want to know, when i migrate the MOSS 2007 port 80 and port 90, which method should i choose?
    1. in SharePoint 2010 farm, Create  a classic based web application on port 80, and extend it on port 90, enable FBA on port 90. It is the same as MOSS 2007.
    2. in SharePoint 2010 farm, Create a claims based web application, and enable both windows authentication and FBA.
    Thanks.

    FBA requires claims so you'll need to create a claims based web application. Whilst you might extend the site to give you a FBA portal the web application itself will have to be claims based.
    I would definitely be looking at using a database attach upgrade path in your case to give you the opportunity for testing as moving between authentication providers can be painful.

  • How to use quartz in web applications

    Hi people,
    Can anyone please help me out how i can use quartz scheduler in web applications ? I want to utilize quartz to update databases periodically and automatically. Please help me its urgent ...:(

    Hi
    I have a requirement to implement Quartz in a we application.Technologies using as JSF, spring, hibernate and server is JBOSS. Here i am unable to decide how to implement quartz using these technologies.
    What is the methodology i have to use to implement quartz along with these technologies.

Maybe you are looking for

  • Problem in installing developer on vista

    when i install developer 10g on my vista it checks my system requirement it tells me this: system must be: 5.0 , 5.1 , 5.2. actual 6.0 failed <<<< and before it the database enterprise installed perfectly i hope someone explain this to me

  • Site Priority Conflict Resolution

    I'm using Oracle9i version 9.2.0.1.0 running in Windows Server 2003 I am testing Materialized View Replication ( 1 Master site and multiple materialized view site) for my Advanced Replication setup. To resolve conflict I employ Site Priority Conflict

  • Help ? Nokia 5800 Xpress skips MP3 music file

    Phone has latest firmware. The music mp3 files (at 192kbps or above) were all ripped from CD, no DRM involved. I copy them onto the phone memory card (8gb).  I use drag-and-drop to do this on Windows Vista. When connecting the phone USB cable select

  • Mail automatically opens a new compose window after sending mail

    Just recently, my Mail program has started opening a new compose window after I send an email. It's accompanied by the "you did something wrong" tone that my computer makes if you (for instance) hit some incorrect combination of keys. I've tried to f

  • A little help about multiple monitors...

    I'll try to explain what I need help on in the simplest way possible. I connected my macbook pro to another LCD monitor I have at home. That way when I work on sites I can have one thing on my monitor and another thing on my Mac. My question is... I