Web application and web.xml

i have a web application consisting of 1 servlet and 5 jsps.
the start point would be index.jsp
i use firmwide login page. after login, i want the browser to display index.jsp page.
In web.xml, i have defined -
<welcome-file-list>          <welcome-file>/jsp/index.jsp</welcome-file>     </welcome-file-list>       <servlet>        <servlet-name>UtilitiesServlet</servlet-name>        <servlet-class>com.gs.fw.sox404.utilities.UtilitiesServlet</servlet-class>             <init-param>             <param-name>util-log4j-init-file</param-name>             <param-value>/WEB-INF/classes/util_log4j.properties</param-value>          </init-param>        <load-on-startup>1</load-on-startup>    </servlet>     <servlet-mapping>        <servlet-name>UtilitiesServlet</servlet-name>        <url-pattern>/UtilitiesServlet</url-pattern>    </servlet-mapping>if i define it as just index.jsp in the welcome file list, after successful login, it displays the dir structure of the web app.
if i define it as jsp/index.jsp, then in some of the pages, it tries to find the servlet inside jsp folder.
What would be the best way to get around this?

Well, yes, it's not able to find it because you've not understood the mechanism of how it works clearly. You have to put your welcome file under every directory you want it to be used from. Like I said, it's not a path, it's a filename. So if the container sees that your request URL is for a directory, it'll look for the welcome files from the welcome file list, one by one, in the order of declaration. Whichever one it finds first, it'll serve that. If it doesn't find any, then it'll either give a 404 or a directory listing depending on the server and it's settings.
So your problem is that you've put your index.jsp in your JSP folder but expect it to be served for all URLs. That won't happen, you'll have to put one file named index.jsp into every directory. The reasoning is pretty simple, what if you want different behaviour for each folder?
This should fix your problem :)
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
----------------------------------------------------------------

Similar Messages

  • Web Application and Serialization

    Hi, i have a problem with a web application that is running on an Application server (BEA WebLogic 7.0). I have only the war file of the web application and i must know if in this war there is a class that is not serializable.
    How can i find it ? Is there a tool that can help me to find not serializable classes ?
    Thanks.
    claudiozx2006

    One way to do that is to decompile Java classes with Java decompiler and see which one doesn't implement Serializable interface. Here is a link to a good decompiler: http://www.kpdus.com/jad.html

  • Web application and desktop application?

    Hi everyone,
    I am new to this platform.I have a basic doubts that whats the difference between developing application in flex as a web application and desktop application from programming point of view?Can we use same code in both cases?
    Please guide me....
    Thanks

    Hi and welcome,
    The main difference between a web application and a desktop application is that web applications do not have access and can't manipulate your local system ( you can't open a window that displays all your local files, you can't delete, rename, edit local files and so on ). Obviously, this is just one difference, there are many more ( the best would be if you google for "web aplication vs desktop application" because the same rules apply for 99% if not all the platforms you can find out there ).
    Desktop applications can have full control of your local system ( obviously, we have to take in consideration the platform we are using because since AIR is quite new in the desktop application field it is also more limited than other languages that have been used successfully to create desktop applications for years and year; like ce C# or C++ and so on ).
    Another important difference is that desktop applications usually need to be installed in order to function where on the other hand, web applications can run in the browser without you having to install the aplication you are about to view on your computer ( in some cases, like of the Flash and Flex platforms, you only require a "special player" that can display the content you are trying to access... for Flash and Flex applications you need the Flash Player installed for your browser ).
    So, before jumping into a project/platform you need to know your target. If you goal is to offer a fast, easy to access and no install required application to your users then you'll usually go with a web application. If your application needs to work with local files, maybe local databases, or it needs more control over the user's PC and so on, then you'll most likely go with a desktop application.
    With kind regards,
    Barna Biro

  • Web application and site collection not accessibe

    I have created a web application and a site collection. But when I tried to access the site by browser on the server the page cannot be displayed or the server cannot be found. What should I configure? Please say by detailed steps.

    I created a host header extranet.xxx.xx and alternate access mapping is ok. But still I'm not able to access the site by http://server name:port no. It gives The web page cannot be found or this web page can't be displayed.
    Now when I try with Firefox with http://server name:port no, it gives
    "Bad request - Invalid hostname
    HTTP Error 400. The hostname is invalid."
    More: if I go to Alternate Access Mappings > Add Internal URL:s > Save is grayed out.
    You have two options,
    Option 1 : Accessing the web application without any host header name and  with the port no you have created.  (ex: (http://server1:5500 )
    Option 2. Accessing it with the host header name (ex:http://mywebapp.contoso.com)  you have created for which you need to create a DNS and set an AAM accordingly in the corresponding zone.
    For the option no 1. you need to have a host header in IIS which would be created by default while you create a web application and it should be like this unless you did nit change it. http (Type)---blank host name--All Unassigned in the IP section---and
    the port no in which you have created.
    PS : If you have one more IP address in the server, its good to set the same IP address which is set for server for the name resolution to happen properly.
    If you have n't specified the hostheader while creating the web application, then you need to add it manually with the existing one which is there for option no 1. It should be added as below. http---Mywebapp.contoso.com--IP address in which you have created
    the DNS and Port 80.
    If AAM save is grayed out, check it from some other browser. Also Hostname invalid clearly implies that there is some problem with the name resolution. Check whether you could ping the webapplication from the server where you are trying to access it.
    Veeramani.S

  • Web application and Scanner

    Web application (ADF-application) and Scanner (device that optically scans images, printed text)
    how to implement a scan from a web application and the ability to preview the scanned document (in the ADF-application) before uploading to the server.

    Oracle has a product, which I worked on, for imaging. It may or may not be what you need.
    http://www.oracle.com/technetwork/middleware/webcenter/content/index-090652.html

  • I want to remove the COnlineBank, OnlineBank and csample applications from my application and web server.

    How can I safely do this on Solaris? I've tried "iasdeploy removeapp" and "iasdeploy removemodule" with no luck. I want to clear all of this demo stuff out to make both the web and app server look more production like.
    Thanks
    Eric

    Eric,
    these applications are applogics which are not controlled by the
    iasdeploy tool. Unfortunately, there is no tool available to remove
    these applications for you. What you can do is to manually remove all
    their entries, but be careful if you do that. If you remove the wrong
    keys you might break your ias installation, so be warned and make sure
    you backup the whole ias registry before attempting to remove anything.
    Eric Coleman wrote:
    >
    I want to remove the COnlineBank, OnlineBank and csample applications
    from my application and web server.
    How can I safely do this on Solaris? I've tried "iasdeploy removeapp"
    and "iasdeploy removemodule" with no luck. I want to clear all of
    this demo stuff out to make both the web and app server look more
    production like.
    Thanks
    Eric
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!--
    Han-Dat Luc ([email protected])
    Senior Consultant
    SUN Professional Services (iPlanet)
    o .
    o .
    O _ ____ _ _
    (_) _ \| | __ _ _ __ ___| |_ TM
    | | |_) | |/ _` | '_ \ / _ \ __|
    | | __/| | (_| | | | | __/ |_
    |_|_| |_|\__,_|_| |_|\___|\__|
    e-commerce solutions
    Sun Microsystems Australia Pty Ltd

  • Can anyone help me know the difference b/w application and web server?

    i tried reading about application and web servers. it appears to me to be the same. please do help me to differentiate. Thanks :-)

    An application server hosts business logic components for an application. A web server is an application which accepts HTTP requests.
    An application server may come packaged with a web server.
    A web server is a very simple process. It's HTTP daemon process that listens for incoming requests over HTTP protocol on a specified port usually, 80. For simple, static web pages the web server has the built in logic to serve them but for a complex operation(say read from database and display some records), it routes the URL to a component like the servlet engine....
    An application server is a much broader term. For example the servlet may need to invoke certain business logic components like beans or activex dlls. The server that hosts these components is the application server.
    Hope you are clear now.

  • Requires a microsoft sharepoint foundation-compatible application and web browser

    SharePoint 2010 version 14.0.7102.5000.
    Clients are Windows 7 SP1, Browser is IE 10.0.9200.17296
    Problem is the well known famous message 'requires a microsoft sharepoint foundation-compatible application and web browser' when the user chooses the button New Document.
    Why this behaviour for this user is different then all the threads and blogs I read about this message is because of the  following: I am logged on using my Windows account on my computer (VDI so I have the same computer as the user experiencing the
    message) and don't have this problem. When the concerning user uses my logged on computer under my account and only logs in with his credentials within SharePoint (sign in as Different User) then the problem occures. I performed the same actions on the same
    library as the concerning user.
    So ruled out are:
    - Browser version
    - Office version
    - windows User Profile
    - x86 vs x64
    - MS Foundation Support installation
    - add on SharePoint OpenDocuments Class
    Please help me out.

    Do you have different versions of Office or SharePoint Designer or any Office product installed? 
    You can try repairing office installation in that particular user machine and see what happens.
    Thanks.
    Sorry to say but software versions can be ruled out as I mentioned the user have the same problem when using
    my logged on account in Windows on my computer. Only in the browser the user is logging in with his credentials. I don't have this problem when using this Document Library.

  • Move and redeploy application- and web-servers for Planing?

    Hi, all!
    Have Hyperion Planing ability to move application- and web-servers from unix-machine to another win-machine and after redeploy existing unix-installed planing on it?

    They are actually for for 2 different things. The Sun WAS is for enterprise applications, EJBs and the like.
    Tomcat is for simpler Servlet/JSP hosting.
    The Sun WAS actually uses the Tomcat server as its Servlet/JSP engine then adds EJBs on top.

  • Closing an application and web browser at same time at runtime

    Does anyone have any ideas of code that addresses that problem of closes the web browser at runtime when the application closes?
    I've been converted about 140+ forms and 300+ reports to 10g from 6i client/server and I've got all the forms converted but now that I've got it up on a website at runtime, I'm documenting all these application issues that I just haven't had time to research.
    It sounded like I do write some Java Beans, based on some threads I've read. But I didn't fully understand.
    Any help is appreciated.
    Regards,
    Chris

    Ok, I was able to do it when I hard-coded to the http://servername:port in the web.show_document. My question is: I have a windows and Linux (Development and Test server). All 3 are different servers. How can I make it to where I don't have to hard-code the server name. I've put the html page in the ORACLE_HOME/forms/java folder. The application and web browser closes just fine when I hard-code the server name in the web.show_document command. Is there a way I can get around this where I don't have to hard-code the name, but still access it from the same path on all 3 servers?
    web.show_document(http://servername:port/forms/java/closewebbrowser.htm, -self)

  • There is an inconsistency between the authentication mode of target web application and the source web application after migrating to claims

    I've had my farm upgraded from SP2010 to SP2013 for over 6 months now and all is well, however, I was refreshing my staging environment from production and I noticed that one of the databases still shows these errors when I run test-spcontentdatabase:
    Category             : Configuration
    Error             : False
    UpgradeBlocking : False
    Message           : The [SharePoint Web App] web application is configured with claims authentication mode however the content database you are trying to attach is intended to be used against
    a windows classic authentication mode.
    Remedy              : There is an inconsistency between the authentication mode of target web application and the source web application. Ensure that the authentication mode setting in upgraded web application is the
    same as what you had in previous SharePoint 2010 web application. Refer to the link "http://go.microsoft.com/fwlink/?LinkId=236865" for more information.
    This doesn't make sense considering I converted the production web application to claims during the upgrade and then verified all sites were working with claims logins. I also verified that existing AD user identities were converted to claims by checking out
    the database tables. Yet test-spcontentdatabase still thinks there is a mismatch here.
    My farm is SP1 and no further CUs. The point of this particular refresh is so I can update to the November CUs in my test farm. Anyone else see this? Seems like it's a bug/safe to ignore because my stuff is working.
    Thanks,
    Aaron

    See:
    http://thesharepointfarm.com/2014/11/test-spcontentdatabase-classic-to-claims-conversion/
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to connect to external web service and convert XML to a table

    Hi experts,
      I need to connect to external/non-SAP web service and convert XML in that site to a SAP table?
    Is there a function call(SE37) to do this? Is it a must for me to install AS JAVA or PI and configure enterprise service? Please provide a link for me to retrieve relevant infomation, thx.

    No, you don't need PI or the Java stack for this.  You can create an ABAP proxy using the WSDL file for the web service and call the web service using the proxy class in an ABAP program.  You can transform the XML response to internal tables/structures/variables using a transformation template that you create.

  • Can i deploy web application with WEB-INF as war and leave others as it is

    i'm asked to deploy my web application with WEB-INF in a war and leave all the others as it is, but i'm getting error that "resource not found"
    what shld i do?
    this is the command i used to create war
    jar cvf WEB-INF.war *.*
    i entered this command from command prompt from the directory
    c:/tomcat/webapps/myapplication/WEB-INF/>jar cvf WEB-INF.war *.*
    please help!!!!!

    can u please elaborate...because i need to speak about that to the manager who is asking me to do so. he will not listen to me until i explain with true reasons.

  • Registering Web Applications and accessing common files

    If I create 3 web applications and have a seperate folder for common jsps
              that the jsps in these 3 web apps include, how can I access the jsps and js
              in this common folder? The JSP compiler was able to compile. The folders I
              created are all under the applications directory, including the common
              folder. I use the inclide file directive with ../common/scripts.js and the
              compiler could not recognize the location.
              Thanks!
              Kenny
              

              If you application folder like:
              application/
              webApp1/
              webApp2/
              webApp3/
              common/
              You may try /common/scripts.js
              "Kenny Kon" <[email protected]> wrote:
              >If I create 3 web applications and have a seperate folder for common
              >jsps
              >that the jsps in these 3 web apps include, how can I access the jsps
              >and js
              >in this common folder? The JSP compiler was able to compile. The folders
              >I
              >created are all under the applications directory, including the common
              >folder. I use the inclide file directive with ../common/scripts.js and
              >the
              >compiler could not recognize the location.
              >
              >Thanks!
              >
              >Kenny
              >
              >
              

  • Intention of JSF (web applications or web sites?)

    Hi,
    I want to write a web application that has a similar look and feel to todays desktop applications. Thus I don't need a typical web site look (title on the top, navigation bar etc.) but a more desktop look (a menu bar on the top, a status bar on the bottom etc.)
    Although I like JSF I am not sure, if this framework is the best for this job. Thus I wanted to ask, if you can tell me the intention of JSF:
    Is it to build web sites or is it also to build web applications without the typical web site look and feel? With JSF both is possible of course. And with the adequat JavaScript library on the client side it looks very nice (e.g. ExtJS).
    But was this one of the intentions of JSF? Or was it primarily to build usual web sites with a page flow etc.? And maybe another framework is better for what I am going to do?
    I only don't want to use a JSF for something it has not been made for.
    Greetings
    Mike

    wpafbuser1 wrote:
    I don't see what the point is in making a distinction between web sites and web apps. Are you trying highlight the difference between say Apache vs. JBoss?I'm not sure what you mean by "the difference between say Apache vs. JBoss" but here's what I meant. When I think a web site, I think of a site where the interaction tends to be more reading, clicking from page to the next, etc., like, for example a news site. With a web app, I tend to think of statefulness, business processes, etc, like an online accounting system, content management system, etc. The distinction is probably pretty academic, though...
    Well you need to decide if you're making a simple web site that serves static content or i fyou're making an application with a GUI. There's a big difference.Exactly.
    For a desktop-like application, I say web browsers in general are a bad choice. I'd use Web Start if possible and write a GUI. In any case, Hehe. That's a completely different (though very valid argument(
    AJAX is the last thing I'd use (now you're writing HTML, XML, AJAX, Java, etc..). Echo2 provides 1 single API rather than hacking several. Flex, while I haven't used much, seems to also provide a much cleaner solution. Fair enough, and that's not an uncommon opinion. I'm probably somewhere in the middle, but, for what I've been asked to do since the web 2.0 hype started, Ajax has been sufficient. I'm not Echo2 expert, but isn't that just an HTML/JS interface with a Java backend with Ajaxy operations? For really, really complex and dynamic UIs Flex (or JavaFX :) might be more appropriate.
    Again, I haven't used JSF so I can't say much about it. But I see lots of projects all the time and JSF seems to be slow for adoption so far. Just my personal experience.Hmm. I've used it for about three years now, fwiw, and really, really like it. Which probably isn't worth much. I will admit, though, that JSF isn't always the right tool (thus the discussion here). As far as adoption goes, it seems to be growing much faster than the other frameworks out there, but I may have tinted glasses... ;)

Maybe you are looking for

  • Report displayed in PDF format

    Can somebody point me in the right direction, I am producing a report from a table that uses the standard portal report creation capabilities and is displayed when selecting the link on the portal page. What I would like to do is when the report is d

  • After update to Firefox 8, the pause function on videos no longer works

    I updated both my desktop and laptop to Firefox 8. The laptop is a Toshiba and it's OS is Win 7 with Kapersky AV. The laptop has no problems. When using Firefox on the desktop, which is a clone, with Win XP as the OS, and Norton AV, all up to date, t

  • Soap Adapter (What info needs to be provided to the Third Party Developer)

    I have the following scenario Third Party --> Soap Adapter --> XI --> IdocAdapter --> R3 My specific question is, what information do I need to provide to the Third Party team in order for them to successfully send a message to XI. (Note that I am us

  • Applications not showing in privacy settings mountain lion

    I have found that since updating to Mountain, no apps are showing in the Privacy>Contacts settings sheet of the Security preferences and hence apps like Cobook and Alfred are unable to access contacts. Uninstalling and reinstalling the apps has not r

  • Frieght charges include for particular customer and also include in invoice

    Hi, How to include frieght charges for the particular customers towards freight charges recovered from them. Credit into Freight Charges received (GL account No: 310010 ). Frieght amount should shown in invoice also. How to do that above issue. Pleas