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 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.
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: 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...
|
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...
|
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...
|
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...
|
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
...
|
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...
|
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...
|
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=()=>{
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
| | |