What is u r declaration in web.xml file.
If you give any alias name then you have to use that in u r URL.
http://localhost:8080/app/anyaliasname.
Parthi
On 10/3/05, Andrew Pierce [EMAIL PROTECTED] wrote:
Hello. I realize this is about the stupidest question I could ask but,
I've scoured the
I have some demo apps on http://simple.souther.us that you can run.
They're all war files so all you have to do is download to your webapps
directory.
SimpleServlet.war is your basic Hello, World app in a servlet.
On Mon, 2005-10-03 at 21:49, Andrew Pierce wrote:
Hello. I realize this is
Hello. I realize this is about the stupidest question I could ask but,
I've scoured the web, etc. and cannot get an easy example of making
servlets actually work with Tomcat.
I have written a few Hello World servlets and gotten them to work with
Resin but I cannot get even the most simple
OK. This was a bit of a simple one. Found my answer with the help of a
couple of folks on IRC.
Please disregard.
Andrew Pierce wrote:
Hello. I realize this is about the stupidest question I could ask but,
I've scoured the web, etc. and cannot get an easy example of making
servlets actually
On 5/6/05, Joe Hertz [EMAIL PROTECTED] wrote:
In Windows that's what it means too, but this isn't Windows or Linux...it's
a JVM.
Since it wasn't obvious from the code (MessageResources used in pathnames),
let me put it another way.
The code tries to create a directory /images/userid.
If you want to get the absolute path of the application
directory use ServletContext.getRealPath(/); and pass this
to the file creating code.
Yes, I could, but this again didn't explain the behavior which turned out to
be:
Try to create \images in a servlet running under Windows
If you want to get the absolute path of the application
directory use ServletContext.getRealPath(/); and pass this
to the file creating code.
Yes, I could, but this again didn't explain the behavior which turned out to
be:
Try to create \images in a servlet running under Windows
On 5/6/05, Joe Hertz [EMAIL PROTECTED] wrote:
I have a Struts Servlet that executes the code snippet below to create a
directory.
Under Windows, this works great, the directory showing up under
C:\TOMCAT4\WEBAPPS\
Under Suze Linux, it doesn't get created, and it's not a permission
In Windows that's what it means too, but this isn't Windows or Linux...it's
a JVM.
Since it wasn't obvious from the code (MessageResources used in pathnames),
let me put it another way.
The code tries to create a directory /images/userid.
The Servlet is apparently limited in the filepath it
I have a Struts Servlet that executes the code snippet below to create a
directory.
Under Windows, this works great, the directory showing up under
C:\TOMCAT4\WEBAPPS\
Under Suze Linux, it doesn't get created, and it's not a permission problem.
At least not under the webapps directory. The
: servlet question
Attached is the servlet, can you see any problems here? It compiles fine.
David Short wrote:
Are you running this through apache redirected to tomcat or straight
from
tomcat?
Try loading the servlet at tomcat startup to see if the servlet is
recognized.
i.e
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:
servlet
servlet-namelogin/servlet-name
servlet-classorg.volume4.authentication.login/servlet-class
/servlet
servlet-mapping
servlet-namelogin/servlet-name
url-pattern*.login/url-pattern
/servlet-mapping
in apache wasn't right.
However, if you're not using apache, I don't know what to say. The syntax
looks correct.
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:05 PM
To: Tomcat Users List
Subject: re: servlet question
Hey all!
I have
: servlet question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:
servlet
servlet-namelogin/servlet-name
servlet-classorg.volume4.authentication.login/servlet-class
/servlet
servlet-mapping
servlet-namelogin/servlet-name
url-pattern*.login/url-pattern
and discovered that my pattern in apache wasn't right.
However, if you're not using apache, I don't know what to say. The syntax
looks correct.
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:05 PM
To: Tomcat Users List
Subject: re: servlet
14, 2004 1:05 PM
To: Tomcat Users List
Subject: re: servlet question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:
servlet
servlet-namelogin/servlet-name
servlet-classorg.volume4.authentication.login/servlet-class
/servlet
servlet-mapping
servlet
Does the servlet load at startup?
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:19 PM
To: Tomcat Users List
Subject: Re: servlet question
Directly on Tomcat
David Short wrote:
Are you running this through apache redirected
Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:22 PM
To: Tomcat Users List
Subject: Re: servlet question
Attached is the servlet, can you see any problems here? It compiles fine.
David Short wrote:
Are you running this through apache redirected to tomcat or straight from
\localhost\context.xml file (tomcat 5).
Which version of tomcat are you running and on what os?
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:22 PM
To: Tomcat Users List
Subject: Re: servlet question
Attached is the servlet, can you see any
running and on what os?
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:22 PM
To: Tomcat Users List
Subject: Re: servlet question
Attached is the servlet, can you see any problems here? It compiles fine.
David Short wrote:
Are you running
Is your context path set up correctly in your servlet.xml or
tomcat\conf\catalina\localhost\context.xml file for this webapp?
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:30 PM
To: Tomcat Users List
Subject: Re: servlet question
I
\localhost\context.xml file (tomcat 5).
Which version of tomcat are you running and on what os?
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:22 PM
To: Tomcat Users List
Subject: Re: servlet question
Attached is the servlet, can you see
Neethling [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 1:45 PM
To: Tomcat Users List
Subject: Re: servlet question
In 'tomcat\conf\catalina\localhost\' there is no context.xml file but
there is a manageit.xml file, which is the webapp in question.
server.xml does not contain any
?
Regards.
José Ernesto Echeverría
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: Sábado, 14 de Agosto de 2004 02:22 p.m.
To: Tomcat Users List
Subject: [tomcat] Re: servlet question
Attached is the servlet, can you see any problems here? It compiles fine.
David
I have a very simple question, to which neither I nor my wife can find the
answer.
My servlet is in the WEB-INF/classes directory of my application directory.
For some reason, I can't get this simple construction--it's in all the JSP
books--to work:
us what you wanted to know and detailed your situation enough.
-Original Message-
From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 4:29 PM
To: [EMAIL PROTECTED]
Subject: Easy /servlet question
I have a very simple question, to which neither I nor my wife
as of 2.3. Mapping it is recommended.
Regards,
Paul
-Original Message-
From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 4:29 PM
To: [EMAIL PROTECTED]
Subject: Easy /servlet question
I have a very simple question, to which neither I nor my wife can find
Thanks, Paul. Problem (mystery) solved.
- Original Message -
From: Lee, Paul NYC [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 4:51 PM
Subject: RE: Easy /servlet question
Tomcat 3.x allowed access to servlets under a common mapping
) is not available.
if frame2.jsp makes the frame1.jsp submit to
http://localhost:8008/testJSP;, it works.
Look for further instruction.
Thanks.
-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 3:49 PM
To: Tomcat Users List
Subject: Re: A Servlet question
I use Apache 2.4.9, Tomcat 4.1.9.
In a JSP, there there are three frames in a frameset. the script of each
frame is JSP.
Can a JSP in one frame submit to a Servlet? I did a test and failed. Please
confirm or teach me how to do.
Thanks
AFAIK, submiting from a frame is the same as a single page. What was the
error msg you've got?
Probably, it has some problem in the servlet mapping... did you try to
load the jsp alone in the browser and submit it? if it doens't work, it
doens't has to do with the frames at all.
Emerson
Daxin
mapping?
Thanks.
-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 3:19 PM
To: Tomcat Users List
Subject: Re: A Servlet question
AFAIK, submiting from a frame is the same as a single page. What was the
error msg you've got?
Probably, it has
the servlet
name.
Could you please give the example for the servlet name mapping?
Thanks.
-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 3:19 PM
To: Tomcat Users List
Subject: Re: A Servlet question
AFAIK, submiting from a frame is the same as a single
;, it works.
Look for further instruction.
Thanks.
-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 3:49 PM
To: Tomcat Users List
Subject: Re: A Servlet question
servlet
servlet-namepartServlet/servlet-name
servlet
It works for me. To be able to answer you, it would be good to have
error messages to build the answer on. this is the only thing that
comes to mind. You have to have the full class name (with package name)
to be able to call it, as :
The Tomcat FAQ has a cautionary note about the invoker servlet:
http://jakarta.apache.org/tomcat/faq/misc.html#evil
call http://localhost:8080/web_app_context/servlet/servlet_name
That *should* work, assuming servlet_name is the fully qualified name of
the servlet you are trying to invoke.
I don't understand the invoker servlet. I understand that you have to
uncomment it from the default web.xml file (did that). BUT, If I create a
servlet and put it web_app_context/WEB-INF/classes, then
call http://localhost:8080/web_app_context/servlet/servlet_name WHY does
that not work?? I simply
Your servlets need to be in a package.
Then you can call it like...
http://localhost:8080/web_app_context/servlet/package_name/servlet_name
that
On Thursday 04 March 2004 07:13 pm, you wrote:
I don't understand the invoker servlet. I understand that you have to
uncomment it from the default
Hi !
I have an application scope servlet and it works fine, but I would like to
run it all the time as soon as tomcat starts, not just after the first use,
is this possible ?
Mikael
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
-on-startup1/load-on-startup
/servlet
Antony Paul
- Original Message -
From: Mikael Aronsson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, December 19, 2003 5:41 PM
Subject: Stupid servlet question...
Hi !
I have an application scope servlet and it works fine
Add that to your servlet node in web.xml
load-on-startup1/load-on-startup
On Friday 19 December 2003 07:11 am, you wrote:
Hi !
I have an application scope servlet and it works fine, but I would like to
run it all the time as soon as tomcat starts, not just after the first use,
is this
, thanks for mirroring sourceforge ;)
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Mikael Aronsson [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 7:11 AM
To: Tomcat Users List
Subject: Stupid servlet question...
Hi !
I have an application scope servlet
, September 21, 2003 8:48 AM
To: Tomcat Users List
Subject: Re: servlet question
In order to compile servlets with javac, you will need to include all
of
the
jar files found in ...common/lib in your classpath. Tomcat will
include
them automatically when it starts up for running the servlets but you
It seems you miss J2EE.
After installation (from www.java.sun.com/j2ee)
you should find j2ee.jar (under $J2EE_HOME/lib/) which contain javax.servlet.*
Hope it helps.
On Saturday 20 September 2003 17:45, water autumn wrote:
hello:
My environment is follow:
JDK :
Bruno Costacurta wrote:
It seems you miss J2EE.
After installation (from www.java.sun.com/j2ee)
you should find j2ee.jar (under $J2EE_HOME/lib/) which contain javax.servlet.*
Hope it helps.
Maybe. But, there should also be a servlet.jar in
%TOMCATHOME%/common/lib directory. At least I have
Indeed.
There is a servlet-api.jar under $TOMCAT_HOME/common/lib/
My Tomcat version is 5.0.0
On Sunday 21 September 2003 11:42, BAO RuiXian wrote:
Bruno Costacurta wrote:
It seems you miss J2EE.
After installation (from www.java.sun.com/j2ee)
you should find j2ee.jar (under
In order to compile servlets with javac, you will need to include all of the
jar files found in ...common/lib in your classpath. Tomcat will include
them automatically when it starts up for running the servlets but you will
need to do set up your environment manually in order to compile with
hello:
My environment is follow:
JDK : j2sdk_1.4.2_01
Web Server : TOMCAT 5.0.0
When i devloped servlet program, such as test.java, while i typed this
line :
import javax.servlet.*;, javac tell me the error:
F:\JAVA\upload\AccUpload.java:8: package
Hello,
I have a slightly off topic question.
I have a servlet returns a file to a client. It works for both MSIE and
Mozilla but for Mozilla it adds, '.jsp' to the end of the filename.
I set my headers:
response.setContentType(application/octet-stream);
Hi,
I try to forward a HTTP request from my servlet. I am using the following code.
RequestDispatcher rd =
getServletContext().getRequestDispatcher(direct);
rd.forward(request, response);
I have no problem with code, but I have one issue is how can I change the request
for what you want to change the request method.
I usally call doGet from doPost, so i do everything in the get method
Paul Hsu wrote:
Hi,
I try to forward a HTTP request from my servlet. I am using the following code.
RequestDispatcher rd =
try doGet() instead of doPost().
good luck.
-Mensagem original-
De: Paul Hsu [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 27 de maio de 2003 19:27
Para: [EMAIL PROTECTED]
Assunto: servlet question
Hi,
I try to forward a HTTP request from my servlet. I am using the following
code
to servlet2 by using GET. How can I switch from POST to GET in
servlet1.
thanks
- Original Message -
From: Jose Euclides da Silva Junior - DATAPREVRJ
[EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:26 PM
Subject: RES: servlet question
try doGet() instead
Just a wild guess, how about servlet 1 doPost() call its own doGet() and
redirect in the doGet body???
-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:41 PM
To: Tomcat Users List
Subject: Re: servlet question
Thank you for the help. I think you
-
From: Paul Hsu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:26 PM
Subject: servlet question
Hi,
I try to forward a HTTP request from my servlet. I am using the following
code.
RequestDispatcher rd =
getServletContext().getRequestDispatcher(direct
: Tuesday, May 27, 2003 3:45 PM
Subject: Re: servlet question
if your dispatched request is getting problems because of non compatible
types of GET/Post methods at collaborating servlets then at the receiving
end add a dummy method of (Get or Post), whichever is missing, and forward
: servlet question
Just a wild guess, how about servlet 1 doPost() call its own doGet() and
redirect in the doGet body???
-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:41 PM
To: Tomcat Users List
Subject: Re: servlet question
Thank you for the help
: servlet question
My code is doing this way already, but it does not work.You think the method
will change if I forward the POST request inside doGet().
- Original Message -
From: Tam, Michael [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:44 PM
Michael,
If I forward to a servlet, yes I can process the request in second servlet.
- Original Message -
From: Tam, Michael [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 4:13 PM
Subject: RE: servlet question
I am not possitive. I am
I wonder would this solve your problem??
-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 4:32 PM
To: Tomcat Users List
Subject: Re: servlet question
Michael,
If I forward to a servlet, yes I can process the request in second servlet
On Tuesday 27 May 2003 06:26 pm, Paul Hsu wrote:
Hi,
I try to forward a HTTP request from my servlet. I am using the following
code.
RequestDispatcher rd =
getServletContext().getRequestDispatcher(direct);
rd.forward(request, response);
I have no problem with code,
to GET
in
servlet1.
thanks
- Original Message -
From: Jose Euclides da Silva Junior - DATAPREVRJ
[EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:26 PM
Subject: RES: servlet question
try doGet() instead of doPost().
good luck
I've been racking my brain for days trying to figure out WHY I cannot
get this servlet to work. Hopefully someone has an idea. Im running
tomcat 4.1 on IIS . From what I've been reading and the directions I'm
following from a WROX book is that you dont need the web.xml file if
your inside webapps
Wileynet:
I've been racking my brain for days trying to figure out WHY I cannot
get this servlet to work. Hopefully someone has an idea. Im running
tomcat 4.1 on IIS . From what I've been reading and the directions I'm
following from a WROX book is that you dont need the web.xml file if
your
This is what I have in my conf/web.xml regarding what you said.
servlet
servlet-nameinvoker/servlet-name
servlet-classorg.apache.catalina.servlets.InvokerServlet/servlet-clas
s
- init-param
param-namedebug/param-name
param-value0/param-value
/init-param
'
Subject: RE: Beginner Servlet Question
This is what I have in my conf/web.xml regarding what you said.
servlet
servlet-nameinvoker/servlet-name
servlet-classorg.apache.catalina.servlets.InvokerServlet/servlet-clas
s
- init-param
param-namedebug/param-name
param-value0/param-value
/init
Hi,
I have to write a servlet which will be a base servlet
for all servlets in my applications.
I have a class called GetConnection which gets the
connection from servletcontext depending upon some
parameters in the session, so i have go send
servletcontext, and session to this class.
now the
Kulkarni [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:57 PM
To: Tomcat Users List
Subject: one servlet question
Hi,
I have to write a servlet which will be a base servlet
for all servlets in my applications.
I have a class called GetConnection which gets the
connection from
Is there a way to use the request object or anything else to get the real
path to a folder that the servlet resides in? I want it to return a string
like...
/usr/local/apache/vhosts/myhost.com/httpdocs
Have been looking with no luck and know that someone on this list can tell
me if this is
Try this,
File myFile = new File(yourServletName);
String myPath = theFile.getAbsolutPath();
Hong
Brandon Cruz wrote:
Is there a way to use the request object or anything else to get the real
path to a folder that the servlet resides in? I want it to return a string
like...
Exactly, but that method seems to be deprecated.
-Original Message-
From: DONNIE HALE [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 3:26 PM
To: [EMAIL PROTECTED]
Subject: Re: Quick Servlet Question
You mean like: HttpServletRequest.getRealPath(/);
Donnie
[EMAIL
try javax.servlet.ServletContext.getRealPath(/)
Carsten
-Original Message-
From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 4:32 PM
To: Tomcat Users List
Subject: RE: Quick Servlet Question
Exactly, but that method seems to be deprecated
: Re: Quick Servlet Question
You mean like: HttpServletRequest.getRealPath(/);
Donnie
[EMAIL PROTECTED] 11/29/01 04:06PM
Is there a way to use the request object or anything else to get the real
path to a folder that the servlet resides in? I want it to return a string
like
- Original Message -
From: Brandon Cruz [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, November 29, 2001 4:06 PM
Subject: Quick Servlet Question
Is there a way to use the request object or anything else to get the real
path to a folder that the servlet
How many instances of a given servlet class will be loaded by Tomcat.
Just 1 or can many instances be loaded? What determines this?
Thanks,
Keith
ive found the ResourceBundle class to be easier to use than an istream
approach for getting properties.
matt
- Original Message -
From: Bo Xu [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, November 29, 2001 5:28 PM
Subject: Re: Quick Servlet Question
- Original Message -
From: Hawkins, Keith (Keith) [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]
Sent: Thursday, November 29, 2001 5:54 PM
Subject: Basic servlet question
How many instances of a given servlet class will be loaded by Tomcat.
Just 1 or can many instances be loaded
Hi,
Is it easy with Tomcat to specify that I want a single servlet to serve
EVERY request for a URI?
I.e. what happens if I have a DefaultServlet which acts as a router for
requests, and I have a few other servlets which serve their own requests,
can I ensure that all requests not meant for
not for other
requests which r coming to tomcat.
hth,
Shuklix
-Original Message-
From: Andy Nuss [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 5:37 AM
To: '[EMAIL PROTECTED]'
Subject: default servlet question
Hi,
Is it easy with Tomcat to specify that I want a single servlet
Hi,
When a client make a request to a server and a servlet get call,
the servlet then create an instance for that client.
My question is, how many clients can a servlet handle.
Thanks,
Kathy.
_
Get your FREE download of MSN
On Fri, 23 Mar 2001, c cw288 wrote:
Hi,
When a client make a request to a server and a servlet get call,
the servlet then create an instance for that client.
That is not what really happens. Instead, a single instance of your
servlet is called multiple times simultaneously, on multiple
I am currently running iTools on MacOSX with the iTools version of Tomcat.
When I place a .jsp file in /webapps/ROOT and place my bean classes in
/webapps/ROOT/WEB-INF/classes, I can run the jsp from //localhost/.jsp.
Works great, however, I cannot figure out how to call a servlet via URL
Title: Stupid servlet question of the day
This is really a rather embarrasing question to ask.
I have a webapp that has two directories of JSPs
(think of it as a regular user set of JSPs and an
administrator set)
\forums --- This is the context root
\forums\admin --- This is a second
83 matches
Mail list logo