473,804 Members | 3,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Deploying JSP/Servlets to Tomcat, page unavailable.... .

Hi,
I'm using Tomcat 7.2 and I'm trying to deploy an aplication that uses
JSP and servlets. I'm actually trying to duplicate a production
server but can't get it right.
In the directory /whatever/java/tomcat4/webapps I have two other
directories called ROOT and test. Under both ROOT and test there is a
WEB-INF directory where web.xml file resides. Also, both ROOT and
test have login.jsp files.
When I type the URL localhost:8080/login.jsp it takes me to the
login.jsp that is located in ROOT. That I think is fine. But when I
type the URL localhost:8080/test/login.jsp I get a message that it's
unavailable. I'm also supposed to go to localhost:8080/test/ and see a
web page with all the contents of the directory, but instead I get the
unavailable message. What's wrong here? Going through the Tomcat
book I figured I have to change tomcat4/conf/server.conf file and
specify /test dir there. The problem is that when I look at the
production server, I'm trying to duplicate, and even at another
development server where the app works I see no changes done to
server.conf and if there are any they are commented out. So there
must be some other file? Or my setup is incorrect in some other way?
I checked the permissions and they seem fine, files are owned by
tomcat4, where else should I look? I'm sure it's some little thing I
overlooked, but I can't find it.
Please, let me know what you think.
Thanks in advance.
N.K.
Jul 17 '05 #1
2 5468
Check the log file, you might find the cause of the problem there.

na****@parkergl obal.com (N.K.) wrote in message news:<2d******* *************** ****@posting.go ogle.com>...
Hi,
I'm using Tomcat 7.2 and I'm trying to deploy an aplication that uses
JSP and servlets. I'm actually trying to duplicate a production
server but can't get it right.
In the directory /whatever/java/tomcat4/webapps I have two other
directories called ROOT and test. Under both ROOT and test there is a
WEB-INF directory where web.xml file resides. Also, both ROOT and
test have login.jsp files.
When I type the URL localhost:8080/login.jsp it takes me to the
login.jsp that is located in ROOT. That I think is fine. But when I
type the URL localhost:8080/test/login.jsp I get a message that it's
unavailable. I'm also supposed to go to localhost:8080/test/ and see a
web page with all the contents of the directory, but instead I get the
unavailable message. What's wrong here? Going through the Tomcat
book I figured I have to change tomcat4/conf/server.conf file and
specify /test dir there. The problem is that when I look at the
production server, I'm trying to duplicate, and even at another
development server where the app works I see no changes done to
server.conf and if there are any they are commented out. So there
must be some other file? Or my setup is incorrect in some other way?
I checked the permissions and they seem fine, files are owned by
tomcat4, where else should I look? I'm sure it's some little thing I
overlooked, but I can't find it.
Please, let me know what you think.
Thanks in advance.
N.K.

Jul 17 '05 #2
Hello,

If your web apps are following the Sun Servlet specification (which,
by the way is a good read), there should be a web.xml file in the
WEB-INF directory of your web app. This file controls how your servlet
is addressed by Tomcat. I imagine you need something like:

....
<servlet>
<servlet-name>MyWebApp</servlet-name>
<servlet-class>MyWebApp</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>MyWebApp</servlet-name>
<url-pattern>/MyWebApp</url-pattern>
</servlet-mapping>
....

Depending on your app's needs you may need some more complicated
magic, but I think this will get you going for simpler servlets and
jsp's. Sorry, I can't provide more info, but I am somewhat new to
servlets and have been going through a lot of problems similar to
this. I do recommend checking out the specifications for servlets and
JSPs.

Regards and good luck,
Jay Bromley
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
754
by: Subhodini Fernandes | last post by:
A very basic question about Tomcat 3.3.1 configuration - We have an application setup on Tomcat. Daily the service needs to be taken down for backup purpose for 1 hour and we need Tomcat to display a page which says that the system is unavailable as it is being backed up. Can someone please tell me how to achieve this ? Thanks, Subho.
1
1420
by: samadams_2006 | last post by:
I hear a lot about Servlets running in Web Containers in the Java arena. I believe that the Web Container in question is the Web Server, like Apache Tomcat, or IIS in the .NET arena, but what about the Servlets? Is the counterpart to the Servlet in the Java arena a .NET "Web Form" written in Visual Basic?
3
1964
by: Bit Byte | last post by:
I have written a custom servlet engine (and "wrapper" servlets) for some legacy code (C/C++) that I have. The servlets contain the bulk of my 1st 2 layers in a 3 tier architecture - i.e. data layer and business logic layer respectively. Is it technically possible to use my servlets for the first two layers and then use ASP.Net for the presentation layer (i.e. using webforms etc)? The obvious "bridge" would be SOAP, but I want a more...
1
5524
by: Kedar Kachare | last post by:
How to use Log4j to create log files using file appender in a Servlet? Also, how to make that Servlet read the log4j.properties file? I have tried following: My web.xml( I use Eclipse europa) <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"...
0
1995
by: ank99 | last post by:
hello...i m trying to run servlets(using GET) from wml page..... using apache tomcat 5.5 server and WinWap for Windows(version 3.2.1.28.)....its working fine as far as just to display wml form page... but when i enter the data within wml page(i.e. compname) then address within browser gets to http://localhost:8080/servlets-examples/servlet/portsam?compname=abc-b39ea2eee69 as per required but it says it could not get required URL(HTTP Error...
1
2784
by: ank99 | last post by:
hello...i m trying to run servlets(using GET) from wml page..... web server : apache tomcat 5.5 server WAP Browser: WinWap for Windows(version 3.2.1.28.).... its working fine as far as just to display wml form page... but when i enter the data within wml page(i.e. compname) then address within browser gets to http://localhost:8080/servlets-examples/servlet/portsam?compname=abc-b39ea2eee68 as per required but it says it could not get...
0
890
by: Marco Bizzarri | last post by:
On Wed, Sep 3, 2008 at 11:06 AM, jorma kala <jjkk73@gmail.comwrote: localhost is not resolved to 127.0.0.1 on your machine. Try changing it to http://127.0.0.1:8080 Regards Marco
1
2425
by: davidr69 | last post by:
I am completely new to servlets. I have an extensive programming background (C, C++, assembler, PHP, python, javascript, others) and I am trying to get into servlet programming. I have done several jsp's and small java apps, and I have code that works both as a java app and as a jsp: class foobar { int x = 0; public void foobar() { } } public class mytest { public static void main(String args) { ...
11
7130
by: mjahabarsadiq | last post by:
Hi I have created a web application. I am using ant to build the war and deploy in tomcat. The war file is deployed under "TOMCATE_HOME/work/standalone/localhost/onlineres.war". I have my source files in "D:\Sadiq\Projects\Onlineres". The folder structure is as follows. 1) D:\Sadiq\Projects\Onlineres: This folder is having the context.xml, web.xml, build.xml and build.properties files.
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.