472,789 Members | 1,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

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 5395
Check the log file, you might find the cause of the problem there.

na****@parkerglobal.com (N.K.) wrote in message news:<2d**************************@posting.google. 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
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...
1
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...
3
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...
1
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)...
0
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...
1
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...
0
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
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...
11
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...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.