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. 2 5436
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.
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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)...
|
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...
|
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...
|
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
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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...
| | |