Re: Easy Servlet Question

2005-10-04 Thread Ben Souther
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 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 servlet to work with Tomcat.
> 
> I create the servlet code such as the one found here:
> 
> http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp
> 
> I compile the servlet and place the .class file in the 
> $CATALINA_HOME/webapps//WEB-INF/classes directory.
> 
> Then I modify the $CATALINA_HOME/webapps/app/WEB-INF/web.xml to include 
> the declarations for the servlet.
> 
> I stop and restart Tomcat and alas, all I get is 404 when I try to 
> access the servlet with a url like 
> http://localhost:8080//HelloServlet.
> 
> I know this has got to VERY simple. Thanks in advance.
> Andrew
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ben Souther
F.W. Davison & Co.

CONFIDENTIALITY NOTICE:

This e-mail message, and any accompanying documents, is for the sole use
of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure, distribution or
copying is prohibited.  If you are not the intended recipient, please
contact our office by email or by telephone at (508) 747-7261 and
immediately destroy all copies of the original message.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Easy Servlet Question

2005-10-04 Thread Partheeban Boopathy
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//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 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 servlet to work with Tomcat.
>
> I create the servlet code such as the one found here:
>
> http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp
>
> I compile the servlet and place the .class file in the
> $CATALINA_HOME/webapps//WEB-INF/classes directory.
>
> Then I modify the $CATALINA_HOME/webapps/app/WEB-INF/web.xml to include
> the declarations for the servlet.
>
> I stop and restart Tomcat and alas, all I get is 404 when I try to
> access the servlet with a url like
> http://localhost:8080//HelloServlet.
>
> I know this has got to VERY simple. Thanks in advance.
> Andrew
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Easy Servlet Question

2005-10-03 Thread Andrew Pierce
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 work with Tomcat.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Easy Servlet Question

2005-10-03 Thread Andrew Pierce
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 servlet to work with Tomcat.


I create the servlet code such as the one found here:

http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp

I compile the servlet and place the .class file in the 
$CATALINA_HOME/webapps//WEB-INF/classes directory.


Then I modify the $CATALINA_HOME/webapps/app/WEB-INF/web.xml to include 
the declarations for the servlet.


I stop and restart Tomcat and alas, all I get is 404 when I try to 
access the servlet with a url like 
http://localhost:8080//HelloServlet.


I know this has got to VERY simple. Thanks in advance.
Andrew

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Directory Creation in Servlet Question

2005-05-09 Thread Joe Hertz

> 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 Tomcat, it
becomes "C:\tomcat4\webapps\images".

Try to create "/images" in a servlet running under Suze and it becomes
"/images".

I would expect to have to be "/images" in Windows too, except it didn't work
that way. Okay, so Tomcat effects a chroot somehow. But I then expected it
to continue under Suze and was dissapointed.

I strongly suspect that what you describe will not work under Windows Tomcat
even though it should



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Directory Creation in Servlet Question

2005-05-09 Thread Joe Hertz

> 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 Tomcat, it
becomes "C:\tomcat4\webapps\images".

Try to create "/images" in a servlet running under Suze and it becomes
"/images".

I would expect to have to be "/images" in Windows too, except it didn't work
that way. Okay, so Tomcat effects a chroot somehow. But I then expected it
to continue under Suze and was dissapointed.

I strongly suspect that what you describe will not work under Windows Tomcat
even though it should



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directory Creation in Servlet Question

2005-05-09 Thread Anto Paul
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/.
> 
> The Servlet is apparently limited in the filepath it gets to work with. I'd
> expect that.
> 
> In Windows, Tomcat executes it and it goes to C:\tomcat4\images\
> 
> In my Suze install, Tomcat the analogous directory
> /opt/tomcat4/webapps/images
> 
> I didn't check to see if it's *different* because in the code it won't be.
> It's the same identifier working off of root. Windows Tomcat puts it under
> it's webapps tree. I'm expecting Suze to do the same.
> 
> I have a hard time imagining that Tomcat gets a different view of its root
> file system depending on which OS I runs on. It really ruins the concept of
> platform independence for this sort of thing.
> 
> -Joe
> 
> > you tried to debug it. You can check what is the path before
> > the directory is created. In Linux / means the root directory
> > and since the path name begins with File.separator(/), the
> > file is created with reference to /. For eg. if filePath is
> > /anto. Then if Tomcat have write permission to root directory
> > the directory will be created.
> >
> > --
> > rgds
> > Anto Paul
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

You should read the API spec of java.io.File.
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html

If you want to get the absolute path of the application directory
use ServletContext.getRealPath("/"); and pass this to the file
creating code.

-- 
rgds
Anto Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Directory Creation in Servlet Question

2005-05-06 Thread Joe Hertz
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/.

The Servlet is apparently limited in the filepath it gets to work with. I'd
expect that. 

In Windows, Tomcat executes it and it goes to C:\tomcat4\images\

In my Suze install, Tomcat the analogous directory
/opt/tomcat4/webapps/images

I didn't check to see if it's *different* because in the code it won't be.
It's the same identifier working off of root. Windows Tomcat puts it under
it's webapps tree. I'm expecting Suze to do the same.

I have a hard time imagining that Tomcat gets a different view of its root
file system depending on which OS I runs on. It really ruins the concept of
platform independence for this sort of thing.

-Joe

> you tried to debug it. You can check what is the path before 
> the directory is created. In Linux / means the root directory 
> and since the path name begins with File.separator(/), the 
> file is created with reference to /. For eg. if filePath is 
> /anto. Then if Tomcat have write permission to root directory 
> the directory will be created.
> 
> --
> rgds
> Anto Paul
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directory Creation in Servlet Question

2005-05-06 Thread Anto Paul
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 problem.
> At least not under the webapps directory. The Tomcat user can definitely
> create a directory there (I've su'd to him and done it).
> 
> What should I be looking at next?
> 
> >String filePath = File.separator + userId;
> >File dirs = new File(File.separator +
> rs.getMessage("imageFilePath") + filePath);
> >dirs = new File(File.separator + rs.getMessage("imageFilePath")  +
> filePath);
> >
> >if (!dirs.exists())
> >{
> >  dirs.mkdirs();
> >}
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

you tried to debug it. You can check what is the path before the
directory is created. In Linux / means the root directory and since
the path name begins with File.separator(/), the file is created with
reference to /. For eg. if filePath is /anto. Then if Tomcat have
write permission to root directory the directory will be created.

-- 
rgds
Anto Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Directory Creation in Servlet Question

2005-05-05 Thread Joe Hertz
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 Tomcat user can definitely
create a directory there (I've su'd to him and done it).

What should I be looking at next?


>String filePath = File.separator + userId;
>File dirs = new File(File.separator +
rs.getMessage("imageFilePath") + filePath);
>dirs = new File(File.separator + rs.getMessage("imageFilePath")  +
filePath);
> 
>if (!dirs.exists())
>{
>  dirs.mkdirs();
>}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2004-08-15 Thread Bill Barker
Well, you could try adding in your exception handling:
} catch(Exception e) {
   log("Problem",e);
   // For pre-production debugging only
   throw new ServletException("Problem",e);
}

The way you servlet is at the moment, if you do get an exception, then all
you will see is a blank page with nothing in the logs.

"Schalk Neethling" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Attached is my servlet and complete web.xml
>
> David Short wrote:
>
> >I don't think the servlet is the issue, since it's not even getting
> >executed.  Is your context path set up correctly in your servlet.xml or
> >tomcat\conf\catalina\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 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. 1
> >>
> >>last in the  tag set.
> >>
> >>I had the same issue 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 question
> >>
> >>
> >>Hey all!
> >>
> >>I have a servlet called login. I have it mapped in my web.xml as
follows:
> >>
> >>
> >>   login
> >>   org.volume4.authentication.login
> >>
> >>
> >>   login
> >>   *.login
> >>
> >>
> >>My WEB-INF structure is as follows
> >>
> >>WEB-INF/classes/org/volume4/authentication/login.class
> >>
> >>Does anyone have an idea as to why when I call login as process.login
> >>
> >>
> >>from a form it is not run? I have placed some System.out.println(); in
> >
> >
> >>there but, it seems that the servlet is not called at all. I basically
> >>just get a blank screen. When I look at the tomcat logs no errors are
> >>recorded here either.
> >>
> >>--
> >>Kind Regards
> >>Schalk Neethling
> >>Web Developer.Designer.Programmer.President
> >>Volume4.Development.Multimedia.Branding
> >>emotionalize.conceptualize.visualize.realize
> >>Tel: +27125468436
> >>Fax: +27125468436
> >>email:[EMAIL PROTECTED]
> >>web: www.volume4.co.za
> >>
> >>This message contains information that is considered to be sensitive or
> >>confidential and may not be forwarded or disclosed to any other party
> >>without the permission of the sender. If you received this message in
> >>
> >>
> >error,
> >
> >
> >>please notify me immediately so that I can correct and delete the
original
> >>email. Thank you.
> >>
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >>
> >
> >--
> >Kind Regards
> >Schalk Neethling
> >Web Developer.Designer.Programmer.President
> >Volume4.Development.Multimedia.Branding
> >emotionalize.conceptualize.visualize.realize
> >Tel: +27125468436
> >Fax: +27125468436
> >email:[EMAIL PROTECTED]
> >web: www.volume4.co.za
> >
> >This message contains information that is considered to be sensitive or
> >confidential and may not be forwarded or disclosed to any other party
> >without the permission of the sender. If you received this message in
error,
> >please notify me

Re: servlet question

2004-08-14 Thread Ernesto Echeverría
I've seen your code, and your configuration... Everything seems fine
(apparently) but then...

I guess the *.login means you want to be able to
call that from any address in the context, otherwise you might need to write
/*.login instead for the root of the application context.

What about making things simple first? Are you calling the servlet directly
from a browser or from another servlet? How are you invoking it? Are you
feeding the parameters with specific values? What about putting some
hardcoded text in the System.out.println commands so you can really see if
the servlet is being invoked? Do the servlet-examples of tomcat in your
installation work? Is this a particular servlet not working or the first
servlet in this particular application? What about forwarding to the
login_failed.jsp page also it you catch an exception out of the try-catch
block? 

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 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. 1
>
>last in the  tag set.
>
>I had the same issue 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 question
>
>
>Hey all!
>
>I have a servlet called login. I have it mapped in my web.xml as follows:
>
>
>login
>org.volume4.authentication.login
>
>
>login
>*.login
>
>
>My WEB-INF structure is as follows
>
>WEB-INF/classes/org/volume4/authentication/login.class
>
>Does anyone have an idea as to why when I call login as process.login 
>from a form it is not run? I have placed some System.out.println(); in 
>there but, it seems that the servlet is not called at all. I basically 
>just get a blank screen. When I look at the tomcat logs no errors are 
>recorded here either.
>
>--
>Kind Regards
>Schalk Neethling
>Web Developer.Designer.Programmer.President
>Volume4.Development.Multimedia.Branding
>emotionalize.conceptualize.visualize.realize
>Tel: +27125468436
>Fax: +27125468436
>email:[EMAIL PROTECTED]
>web: www.volume4.co.za
>
>This message contains information that is considered to be sensitive or 
>confidential and may not be forwarded or disclosed to any other party 
>without the permission of the sender. If you received this message in 
>error, please notify me immediately so that I can correct and delete 
>the original email. Thank you.
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet question

2004-08-14 Thread David Short
By context.xml I meant your 'context' in question, which in this case is
manageit.  So, the context of your manageit.xml should look something like
this:



  



Your URL is something like: localhost:8080\manageit\process.login - correct?

Did you try loading the servlet at tomcat startup?

-Original Message-
From: Schalk 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 of the other info regarding my other
webapps which are running fine so I do not think this is where the
problem lies.


David Short wrote:

>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 am running TC 5.0.25 on WindowsXP, my test environment. All other
>servlets are running fine on other webapps.
>
>David Short wrote:
>
>
>
>>I don't think the servlet is the issue, since it's not even getting
>>executed.  Is your context path set up correctly in your servlet.xml or
>>tomcat\conf\catalina\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 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. 1
>>>
>>>last in the  tag set.
>>>
>>>I had the same issue 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 question
>>>
>>>
>>>Hey all!
>>>
>>>I have a servlet called login. I have it mapped in my web.xml as follows:
>>>
>>>
>>>  login
>>>  org.volume4.authentication.login
>>>
>>>
>>>  login
>>>  *.login
>>>
>>>
>>>My WEB-INF structure is as follows
>>>
>>>WEB-INF/classes/org/volume4/authentication/login.class
>>>
>>>Does anyone have an idea as to why when I call login as process.login
>>>
>>>
>>>
>>>
>>>from a form it is not run? I have placed some System.out.println(); in
>>
>>
>>
>>
>>>there but, it seems that the servlet is not called at all. I basically
>>>just get a blank screen. When I look at the tomcat logs no errors are
>>>recorded here either.
>>>
>>>--
>>>Kind Regards
>>>Schalk Neethling
>>>Web Developer.Designer.Programmer.President
>>>Volume4.Development.Multimedia.Branding
>>>emotionalize.conceptualize.visualize.realize
>>>Tel: +27125468436
>>>Fax: +27125468436
>>>email:[EMAIL PROTECTED]
>>>web: www.volume4.co.za
>>>
>>>This message contains information that is considered to be sensitive or
>>>confidential and may not be forwarded or disclosed to any other party
>>>without the permission of the sender. If you received this message in
>>>
>>>
>>>
>>>
>>error,
>>
>>
>>
>>
>>>please notify me immediately so that I can correct and delete the
original
>>>email. Thank you.
>>>
>>>
>>>
>>>-
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>>-
>>>To unsubscribe, e-mai

Re: servlet question

2004-08-14 Thread Schalk Neethling
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 of the other info regarding my other 
webapps which are running fine so I do not think this is where the 
problem lies.

David Short wrote:
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 am running TC 5.0.25 on WindowsXP, my test environment. All other
servlets are running fine on other webapps.
David Short wrote:
 

I don't think the servlet is the issue, since it's not even getting
executed.  Is your context path set up correctly in your servlet.xml or
tomcat\conf\catalina\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 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. 1
last in the  tag set.
I had the same issue 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 question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:

 login
 org.volume4.authentication.login


 login
 *.login

My WEB-INF structure is as follows
WEB-INF/classes/org/volume4/authentication/login.class
Does anyone have an idea as to why when I call login as process.login
 

from a form it is not run? I have placed some System.out.println(); in

   

there but, it seems that the servlet is not called at all. I basically
just get a blank screen. When I look at the tomcat logs no errors are
recorded here either.
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in
 

error,
   

please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in
   

error,
 

please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

   

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volu

RE: servlet question

2004-08-14 Thread David Short
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 am running TC 5.0.25 on WindowsXP, my test environment. All other
servlets are running fine on other webapps.

David Short wrote:

>I don't think the servlet is the issue, since it's not even getting
>executed.  Is your context path set up correctly in your servlet.xml or
>tomcat\conf\catalina\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 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. 1
>>
>>last in the  tag set.
>>
>>I had the same issue 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 question
>>
>>
>>Hey all!
>>
>>I have a servlet called login. I have it mapped in my web.xml as follows:
>>
>>
>>   login
>>   org.volume4.authentication.login
>>
>>
>>   login
>>   *.login
>>
>>
>>My WEB-INF structure is as follows
>>
>>WEB-INF/classes/org/volume4/authentication/login.class
>>
>>Does anyone have an idea as to why when I call login as process.login
>>
>>
>>from a form it is not run? I have placed some System.out.println(); in
>
>
>>there but, it seems that the servlet is not called at all. I basically
>>just get a blank screen. When I look at the tomcat logs no errors are
>>recorded here either.
>>
>>--
>>Kind Regards
>>Schalk Neethling
>>Web Developer.Designer.Programmer.President
>>Volume4.Development.Multimedia.Branding
>>emotionalize.conceptualize.visualize.realize
>>Tel: +27125468436
>>Fax: +27125468436
>>email:[EMAIL PROTECTED]
>>web: www.volume4.co.za
>>
>>This message contains information that is considered to be sensitive or
>>confidential and may not be forwarded or disclosed to any other party
>>without the permission of the sender. If you received this message in
>>
>>
>error,
>
>
>>please notify me immediately so that I can correct and delete the original
>>email. Thank you.
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>
>--
>Kind Regards
>Schalk Neethling
>Web Developer.Designer.Programmer.President
>Volume4.Development.Multimedia.Branding
>emotionalize.conceptualize.visualize.realize
>Tel: +27125468436
>Fax: +27125468436
>email:[EMAIL PROTECTED]
>web: www.volume4.co.za
>
>This message contains information that is considered to be sensitive or
>confidential and may not be forwarded or disclosed to any other party
>without the permission of the sender. If you received this message in
error,
>please notify me immediately so that I can correct and delete the original
>email. Thank you.
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za

This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2004-08-14 Thread Schalk Neethling
Attached is my servlet and complete web.xml
David Short wrote:
I don't think the servlet is the issue, since it's not even getting
executed.  Is your context path set up correctly in your servlet.xml or
tomcat\conf\catalina\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 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. 1
last in the  tag set.
I had the same issue 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 question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:

  login
  org.volume4.authentication.login


  login
  *.login

My WEB-INF structure is as follows
WEB-INF/classes/org/volume4/authentication/login.class
Does anyone have an idea as to why when I call login as process.login
   

from a form it is not run? I have placed some System.out.println(); in
 

there but, it seems that the servlet is not called at all. I basically
just get a blank screen. When I look at the tomcat logs no errors are
recorded here either.
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in
   

error,
 

please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

   

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or confidential 
and may not be forwarded or disclosed to any other party without the permission of the 
sender. If you received this message in error, please notify me immediately so that I 
can correct and delete the original email. Thank you.
/*
 * login.java
 *
 * Created on January 18, 2004, 9:47 PM
 */

package org.volume4.authentication;

import java.io.*;
import java.util.*;
import java.net.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
 *
 * @author  Design_DEMON
 * @version
 */
public class login extends HttpServlet {
public String DRIVER, URL, USER, PASS, username, userid, password, user_role;
/** Initializes the servlet.
 */
public void init() throws ServletException {
ServletContext context = getServletContext();
DRIVER = context.getInitParameter("driver");
URL = context.getInitParameter("dburl");
USER = context.getInitParameter("dbuser");
PASS = context.getInitParameter("dbpass");
}
  

/** Processes requests for both HTTP GET and POST 
methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request, HttpServletResponse 
response)
throws ServletException, java.io.IOException {
response.setConte

Re: servlet question

2004-08-14 Thread Schalk Neethling
I am running TC 5.0.25 on WindowsXP, my test environment. All other 
servlets are running fine on other webapps.

David Short wrote:
I don't think the servlet is the issue, since it's not even getting
executed.  Is your context path set up correctly in your servlet.xml or
tomcat\conf\catalina\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 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. 1
last in the  tag set.
I had the same issue 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 question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:

  login
  org.volume4.authentication.login


  login
  *.login

My WEB-INF structure is as follows
WEB-INF/classes/org/volume4/authentication/login.class
Does anyone have an idea as to why when I call login as process.login
   

from a form it is not run? I have placed some System.out.println(); in
 

there but, it seems that the servlet is not called at all. I basically
just get a blank screen. When I look at the tomcat logs no errors are
recorded here either.
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in
   

error,
 

please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

   

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or confidential 
and may not be forwarded or disclosed to any other party without the permission of the 
sender. If you received this message in error, please notify me immediately so that I 
can correct and delete the original email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: servlet question

2004-08-14 Thread David Short
I don't think the servlet is the issue, since it's not even getting
executed.  Is your context path set up correctly in your servlet.xml or
tomcat\conf\catalina\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 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. 1
>
>last in the  tag set.
>
>I had the same issue 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 question
>
>
>Hey all!
>
>I have a servlet called login. I have it mapped in my web.xml as follows:
>
>
>login
>org.volume4.authentication.login
>
>
>login
>*.login
>
>
>My WEB-INF structure is as follows
>
>WEB-INF/classes/org/volume4/authentication/login.class
>
>Does anyone have an idea as to why when I call login as process.login
>from a form it is not run? I have placed some System.out.println(); in
>there but, it seems that the servlet is not called at all. I basically
>just get a blank screen. When I look at the tomcat logs no errors are
>recorded here either.
>
>--
>Kind Regards
>Schalk Neethling
>Web Developer.Designer.Programmer.President
>Volume4.Development.Multimedia.Branding
>emotionalize.conceptualize.visualize.realize
>Tel: +27125468436
>Fax: +27125468436
>email:[EMAIL PROTECTED]
>web: www.volume4.co.za
>
>This message contains information that is considered to be sensitive or
>confidential and may not be forwarded or disclosed to any other party
>without the permission of the sender. If you received this message in
error,
>please notify me immediately so that I can correct and delete the original
>email. Thank you.
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za

This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet question

2004-08-14 Thread David Short
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 to tomcat or straight from
>tomcat?
>
>Try loading the servlet at tomcat startup to see if the servlet is
>recognized.
>
>i.e. 1
>
>last in the  tag set.
>
>I had the same issue 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 question
>
>
>Hey all!
>
>I have a servlet called login. I have it mapped in my web.xml as follows:
>
>
>login
>org.volume4.authentication.login
>
>
>login
>*.login
>
>
>My WEB-INF structure is as follows
>
>WEB-INF/classes/org/volume4/authentication/login.class
>
>Does anyone have an idea as to why when I call login as process.login
>from a form it is not run? I have placed some System.out.println(); in
>there but, it seems that the servlet is not called at all. I basically
>just get a blank screen. When I look at the tomcat logs no errors are
>recorded here either.
>
>--
>Kind Regards
>Schalk Neethling
>Web Developer.Designer.Programmer.President
>Volume4.Development.Multimedia.Branding
>emotionalize.conceptualize.visualize.realize
>Tel: +27125468436
>Fax: +27125468436
>email:[EMAIL PROTECTED]
>web: www.volume4.co.za
>
>This message contains information that is considered to be sensitive or
>confidential and may not be forwarded or disclosed to any other party
>without the permission of the sender. If you received this message in
error,
>please notify me immediately so that I can correct and delete the original
>email. Thank you.
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za

This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2004-08-14 Thread Schalk Neethling
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. 1
last in the  tag set.
I had the same issue 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 question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:

   login
   org.volume4.authentication.login


   login
   *.login

My WEB-INF structure is as follows
WEB-INF/classes/org/volume4/authentication/login.class
Does anyone have an idea as to why when I call login as process.login
from a form it is not run? I have placed some System.out.println(); in
there but, it seems that the servlet is not called at all. I basically
just get a blank screen. When I look at the tomcat logs no errors are
recorded here either.
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or confidential 
and may not be forwarded or disclosed to any other party without the permission of the 
sender. If you received this message in error, please notify me immediately so that I 
can correct and delete the original email. Thank you.
/*
 * login.java
 *
 * Created on January 18, 2004, 9:47 PM
 */

package org.volume4.authentication;

import java.io.*;
import java.util.*;
import java.net.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
 *
 * @author  Design_DEMON
 * @version
 */
public class login extends HttpServlet {
public String DRIVER, URL, USER, PASS, username, userid, password, user_role;
/** Initializes the servlet.
 */
public void init() throws ServletException {
ServletContext context = getServletContext();
DRIVER = context.getInitParameter("driver");
URL = context.getInitParameter("dburl");
USER = context.getInitParameter("dbuser");
PASS = context.getInitParameter("dbpass");
}
  

/** Processes requests for both HTTP GET and POST 
methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request, HttpServletResponse 
response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
Connection con = null;

try {  
  username = request.getParameter("username");
  userid = request.getParameter("userid");
  password = request.getParameter("password");
  
  System.out.println(username);
  System.out.println(userid);
  System.out.println(password);
  
  Class.forName(DRIVER);
  con = DriverManager.getConnection(URL,USER,PASS);   
  PreparedStatement stmt = con.prepareStatement(
  "SELECT * from mi_users WHERE username= '" + username + "' " +
  "AND userid = '" + userid + "' " +
  "AND password= '" + password + "'");
  
  ResultSet rs = stmt.executeQuery();
  
  boolean foundUser = false;
  
  while(rs.next()) {
  foundUser = true;   
  
  HttpSession session = request.getSession(true);
  session.setMaxInactiveInterval(1800);
  session.setAttribut

Re: servlet question

2004-08-14 Thread Schalk Neethling
localhost:8080
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. 1
last in the  tag set.
I had the same issue 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 question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:

   login
   org.volume4.authentication.login


   login
   *.login

My WEB-INF structure is as follows
WEB-INF/classes/org/volume4/authentication/login.class
Does anyone have an idea as to why when I call login as process.login
from a form it is not run? I have placed some System.out.println(); in
there but, it seems that the servlet is not called at all. I basically
just get a blank screen. When I look at the tomcat logs no errors are
recorded here either.
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or confidential 
and may not be forwarded or disclosed to any other party without the permission of the 
sender. If you received this message in error, please notify me immediately so that I 
can correct and delete the original email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: servlet question

2004-08-14 Thread Schalk Neethling
Directly on Tomcat
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. 1
last in the  tag set.
I had the same issue 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 question
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:

   login
   org.volume4.authentication.login


   login
   *.login

My WEB-INF structure is as follows
WEB-INF/classes/org/volume4/authentication/login.class
Does anyone have an idea as to why when I call login as process.login
from a form it is not run? I have placed some System.out.println(); in
there but, it seems that the servlet is not called at all. I basically
just get a blank screen. When I look at the tomcat logs no errors are
recorded here either.
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or confidential 
and may not be forwarded or disclosed to any other party without the permission of the 
sender. If you received this message in error, please notify me immediately so that I 
can correct and delete the original email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: servlet question

2004-08-14 Thread David Short
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. 1

last in the  tag set.

I had the same issue 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 question


Hey all!

I have a servlet called login. I have it mapped in my web.xml as follows:


login
org.volume4.authentication.login


login
*.login


My WEB-INF structure is as follows

WEB-INF/classes/org/volume4/authentication/login.class

Does anyone have an idea as to why when I call login as process.login
from a form it is not run? I have placed some System.out.println(); in
there but, it seems that the servlet is not called at all. I basically
just get a blank screen. When I look at the tomcat logs no errors are
recorded here either.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za

This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



re: servlet question

2004-08-14 Thread Schalk Neethling
Hey all!
I have a servlet called login. I have it mapped in my web.xml as follows:

   login
   org.volume4.authentication.login


   login
   *.login

My WEB-INF structure is as follows
WEB-INF/classes/org/volume4/authentication/login.class
Does anyone have an idea as to why when I call login as process.login 
from a form it is not run? I have placed some System.out.println(); in 
there but, it seems that the servlet is not called at all. I basically 
just get a blank screen. When I look at the tomcat logs no errors are 
recorded here either.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
This message contains information that is considered to be sensitive or confidential 
and may not be forwarded or disclosed to any other party without the permission of the 
sender. If you received this message in error, please notify me immediately so that I 
can correct and delete the original email. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Easy /servlet question

2004-06-23 Thread e-Denton Subscriber
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 (/servlet/*)
by
> default.  In Tomcat 4.x the developers stopped this behavior by default.
> This was done by the invoker servlet.
>
> To enable this, under $CATALINA_HOME/conf, modify the web.xml file.
Search
> for "invoker" and you should find something like this:
>
> 
> 
>
> Just uncomment and it should work.  Note that "/servlet/" is no longer
part
> of the specification 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 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:
>
> http://127.0.0.1:8080/e-Denton/servlet/Upload_CnW
>
>
> I get this error:
>
> HTTP Status 404 - /e-Denton/servlet/Upload_CnW
> message /e-Denton/servlet/Upload_CnW
> description The requested resource (/e-Denton/servlet/Upload_CnW) is not
> available.
>
> I can get it to wotk with a sevlet mapping, but not without it.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Easy /servlet question

2004-06-23 Thread Lee, Paul NYC
Tomcat 3.x allowed access to servlets under a common mapping (/servlet/*) by
default.  In Tomcat 4.x the developers stopped this behavior by default.
This was done by the invoker servlet.  

To enable this, under $CATALINA_HOME/conf, modify the web.xml file.  Search
for "invoker" and you should find something like this:




Just uncomment and it should work.  Note that "/servlet/" is no longer part
of the specification 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 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:

http://127.0.0.1:8080/e-Denton/servlet/Upload_CnW


I get this error:

HTTP Status 404 - /e-Denton/servlet/Upload_CnW
message /e-Denton/servlet/Upload_CnW
description The requested resource (/e-Denton/servlet/Upload_CnW) is not
available.

I can get it to wotk with a sevlet mapping, but not without it.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Easy /servlet question

2004-06-23 Thread Jérôme Duval
You must specify your servlet in the web.xml file. This is how Tomcat knows
what to do when you ask it for Upload_CnW. This might be unnecessary to
mention, but you also have to compile your class before launching Tomcat.
Anything else would just be shots in the dark, since you haven't really told
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 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:

http://127.0.0.1:8080/e-Denton/servlet/Upload_CnW


I get this error:

HTTP Status 404 - /e-Denton/servlet/Upload_CnW message
/e-Denton/servlet/Upload_CnW description The requested resource
(/e-Denton/servlet/Upload_CnW) is not available.

I can get it to wotk with a sevlet mapping, but not without it.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Easy /servlet question

2004-06-23 Thread e-Denton Subscriber
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:

http://127.0.0.1:8080/e-Denton/servlet/Upload_CnW


I get this error:

HTTP Status 404 - /e-Denton/servlet/Upload_CnW
message /e-Denton/servlet/Upload_CnW
description The requested resource (/e-Denton/servlet/Upload_CnW) is not
available.

I can get it to wotk with a sevlet mapping, but not without it.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A Servlet question

2004-06-14 Thread Emerson Cargnin
Your classes must be inside ROOT/classes ...
is it a servlet or a JSP page...
Daxin Zuo wrote:
I thought this map may not work either.
in my web.xml I mapped the servlet as following:
servlet>
testJSP
texcel.testJSP.spiderClass
  
  
testJSP
   /testJSP
  
All me jsp of frames are in ROOT/texcel/testjsp/
when frame2.jsp makes the frame1.jsp submit to "testJSP". the error is: The
requested resource (/texcel/testjsp/testJSP) 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
  
 partServlet
 gov.tresc.sgip.PartServlet
   
   
 partServlet
 /servlet/partServlet/*
   
In this example, to access the servlet you could use
http://localhost:8080/sgip/servlet/partServlet
Daxin Zuo wrote:
You are right, after I send my last email to this list, I tested it with
full URL of the servlet. It worked well. So I need to tell Tomcat that it
is
a servlet.
The previous problem is that Tomcat add the relative path before 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 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 Zuo wrote:

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: A Servlet question

2004-06-11 Thread Daxin Zuo
I thought this map may not work either.
in my web.xml I mapped the servlet as following:
servlet>
testJSP
texcel.testJSP.spiderClass
  
  
testJSP
   /testJSP
  

All me jsp of frames are in ROOT/texcel/testjsp/
when frame2.jsp makes the frame1.jsp submit to "testJSP". the error is: The
requested resource (/texcel/testjsp/testJSP) 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


  
 partServlet
 gov.tresc.sgip.PartServlet
   


   
 partServlet
 /servlet/partServlet/*
   

In this example, to access the servlet you could use

http://localhost:8080/sgip/servlet/partServlet


Daxin Zuo wrote:
> You are right, after I send my last email to this list, I tested it with
> full URL of the servlet. It worked well. So I need to tell Tomcat that it
is
> a servlet.
> The previous problem is that Tomcat add the relative path before 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 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 Zuo wrote:
>
>>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
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> Emerson Cargnin
> Analista de Sistemas
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A Servlet question

2004-06-11 Thread Emerson Cargnin
 
partServlet
gov.tresc.sgip.PartServlet
  
  
partServlet
/servlet/partServlet/*
  
In this example, to access the servlet you could use
http://localhost:8080/sgip/servlet/partServlet
Daxin Zuo wrote:
You are right, after I send my last email to this list, I tested it with
full URL of the servlet. It worked well. So I need to tell Tomcat that it is
a servlet.
The previous problem is that Tomcat add the relative path before 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 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 Zuo wrote:
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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: A Servlet question

2004-06-11 Thread Daxin Zuo
You are right, after I send my last email to this list, I tested it with
full URL of the servlet. It worked well. So I need to tell Tomcat that it is
a servlet.
The previous problem is that Tomcat add the relative path before 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 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 Zuo wrote:
> 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
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A Servlet question

2004-06-11 Thread Emerson Cargnin
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 Zuo wrote:
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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


A Servlet question

2004-06-11 Thread Daxin Zuo
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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: invoker servlet question

2004-03-05 Thread Harry Mantheakis
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/

That *should* work, assuming  is the fully qualified name of
the servlet you are trying to invoke. (And assuming everything else is
correct, too.)

> I do not wish to change the web apps WEB.XML
> file just for testing.

Registering and mapping servlets in the deployment descriptor is correct
thing. A servlet is not much use if you do not at least register it - that
allows you to forward requests to it from other servlets. Mapping is
optional: it allows you to invoke the servlet with a URL, which is what a
browser does.

> Is there a simple way to test a servlet, where
> I can create a servlet, put it someplace and call
> it via a standard URL??

Register a servlet, and call it (say) "Test":


 
Test
 
 
 com.foo.bar.MyNewServlet
 
  

Then specify a convenient mapping:



Test


/test

 

That allows you to invoke MyNewServlet with just '/test' in the URL.

When you want to test another servlet, just replace the fully qualified name
'com.foo.bar.MyNewServlet' to that of the newer servlet.

Good luck..

Harry Mantheakis
London, UK



> 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/ WHY does
> that not work?? I simply want to test a servlet - I do not wish to change
> the web apps WEB.XML file just for testing. Is there a simple way to test a
> servlet, where I can create a servlet, put it someplace and call it via a
> standard URL??
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: invoker servlet question

2004-03-05 Thread Reynir Þór Hübner
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 :

http://localhost/webapp/servlet/com.john.mclain.servletTest

hope it helps
-reynir
John MccLain wrote:

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/ WHY does
that not work?? I simply want to test a servlet - I do not wish to change
the web apps WEB.XML file just for testing. Is there a simple way to test a
servlet, where I can create a servlet, put it someplace and call it via a
standard URL??
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: invoker servlet question

2004-03-04 Thread Ben Souther
Your servlets need to be in a package.
Then you can call it like...
http://localhost:8080/web_app_context/servlet//
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 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/ WHY does
> that not work?? I simply want to test a servlet - I do not wish to change
> the web apps WEB.XML file just for testing. Is there a simple way to test a
> servlet, where I can create a servlet, put it someplace and call it via a
> standard URL??
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



invoker servlet question

2004-03-04 Thread John MccLain
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/ WHY does
that not work?? I simply want to test a servlet - I do not wish to change
the web apps WEB.XML file just for testing. Is there a simple way to test a
servlet, where I can create a servlet, put it someplace and call it via a
standard URL??


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Stupid servlet question...

2003-12-19 Thread Shapira, Yoav

Howdy,
I'm not sure I understand your question, but there's no such thing as a
stupid question ;)  (Though a poorly-researched question is a different
matter altogether).

Others have shown how to get the server to initialize on server startup.
What do you mean by "run it all the time"?

BTW, 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 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]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Stupid servlet question...

2003-12-19 Thread Ben Souther
Add that to your servlet node in web.xml




1




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 possible ?
>
> Mikael
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Stupid servlet question...

2003-12-19 Thread Antony Paul
What is an application scope servlet ?.
You can ask the container to initialize a servlet at container start up by
setting the   parameter to 1 in web.xml. like this.

action
 org.apache.struts.action.ActionServlet
1


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, 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]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Stupid servlet question...

2003-12-19 Thread Mikael Aronsson
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]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet question

2003-09-22 Thread Shapira, Yoav

Howdy,
Whoa, what's going on with this thread? ;)

There's no j2ee.jar with tomcat, there can't and shouldn't be.  Don't
look for it.

You don't need all the classes in commons/lib to compile your servlets,
don't add them all to the classpath.  Add only the ones you need, which
is typically just the servlet-api classes.

Thank you for helping test out tomcat 5 -- please use the latest release
if you can: 5.0.12 will be out in the next couple of days as a beta.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Ben Souther [mailto:[EMAIL PROTECTED]
>Sent: Sunday, 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
will
>need to do set up your environment manually in order to compile with
javac.
>
>Remember, each jar file needs to be explicitly added to your classpath.
>Don't
>just add the directory that they are under.
>
>
>
>
>
>
>On Sunday 21 September 2003 06:26 am, you wrote:
>> 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 $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 it for my tomcat
>> > 4.18. And water autumn cannot find it in TOMCAT 5.0.0
>> >
>> > Best
>> >
>> > Bao
>> >
>> > > On Saturday 20 September 2003 17:45, water autumn wrote:
>> > >>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 javax.servlet.http does
not
>> > >> exist import javax.servlet.http.*;"
>> > >>
>> > >>why? can you tell me how i can resolve it?
>> > >>i can't find serlet.jar in directory"TOMCAT\common\lib"
>> > >>
>> > >>   water
autumn
>> >
>> >
-
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail:
[EMAIL PROTECTED]
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-09-21 Thread Ben Souther

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 javac.

Remember, each jar file needs to be explicitly added to your classpath. Don't 
just add the directory that they are under.






On Sunday 21 September 2003 06:26 am, you wrote:
> 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 $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 it for my tomcat
> > 4.18. And water autumn cannot find it in TOMCAT 5.0.0
> >
> > Best
> >
> > Bao
> >
> > > On Saturday 20 September 2003 17:45, water autumn wrote:
> > >>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 javax.servlet.http does not
> > >> exist import javax.servlet.http.*;"
> > >>
> > >>why? can you tell me how i can resolve it?
> > >>i can't find serlet.jar in directory"TOMCAT\common\lib"
> > >>
> > >>   water autumn
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-09-21 Thread Bruno Costacurta
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 $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 it for my tomcat
> 4.18. And water autumn cannot find it in TOMCAT 5.0.0
> 
> Best
> 
> Bao
> 
> > On Saturday 20 September 2003 17:45, water autumn wrote:
> > 
> >>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 javax.servlet.http does not exist
> >>import javax.servlet.http.*;"
> >>
> >>why? can you tell me how i can resolve it?
> >>i can't find serlet.jar in directory"TOMCAT\common\lib"
> >>
> >>   water autumn
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-09-21 Thread BAO RuiXian
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 it for my tomcat
4.18. And water autumn cannot find it in TOMCAT 5.0.0

Best

Bao

> On Saturday 20 September 2003 17:45, water autumn wrote:
> 
>>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 javax.servlet.http does not exist
>>import javax.servlet.http.*;"
>>
>>why? can you tell me how i can resolve it?
>>i can't find serlet.jar in directory"TOMCAT\common\lib"
>>
>>   water autumn



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-09-21 Thread Bruno Costacurta
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 :  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 javax.servlet.http does not exist
> import javax.servlet.http.*;"
> 
> why? can you tell me how i can resolve it?
> i can't find serlet.jar in directory"TOMCAT\common\lib"
> 
>water autumn
> 
> _
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



servlet question

2003-09-20 Thread water autumn
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 javax.servlet.http does not exist
import javax.servlet.http.*;"

why? can you tell me how i can resolve it?
i can't find serlet.jar in directory"TOMCAT\common\lib"
  water autumn

_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


OT: Download Servlet question

2003-07-31 Thread Atreya Basu
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");
response.setHeader("Content-Disposition","attachment;
filename="+fname);
response.setHeader("Cache-Control","no-cache");
response.setContentLength(available);

I am of course pre-compiling my JSP.  Any ideas anyone?

Thanks in advance.

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Bill Barker
You need to wrap the request with a wrapper that overrides the getMethod()
method.  Something like:
 class GetWrapper extends HttpServletRequestWrapper {
  public GetWrapper(HttpServletRequest request) {
 super(request);
 }
 public String getMethod() {
 return "GET";
 }
 }

 GetWrapper wrapper = new GetWrapper(request);
 RequestDispatcher rd =
 getServletContext().getRequestDispatcher(direct);
 rd.forward(wrapper, response);


"Paul Hsu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thank you for the help. I think you may misunderstand my question. My
> question is how can I forward the request to my next URL and change the
> method to 'GET' if the orignal request is using 'POST'.
> For example:
>
> test1.html call servlet1 by using "POST" method, but servlet1 need to
> forward 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 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.
>
> 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 method from "POST" to "GET" before I forward the original request.
>
> I would appreciate any help
>
> Paul
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Paul Yunusov
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, but I have one issue is how can I change the
> request method from "POST" to "GET" before I forward the original request.

You can't accomplish this using the RequestDispatcher facility. You will have 
to generate a new HTTP request within the servlet and send it to the desired 
destination.

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet question

2003-05-27 Thread Tam, Michael
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.


- 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 not familiar with flash but can you process your
post data in servlet 1 and form an url with parameters attached and then
redirect?

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:58 PM
To: Tomcat Users List
Subject: Re: 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
Subject: RE: 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. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward 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 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.

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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Paul Hsu
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 not familiar with flash but can you process your
post data in servlet 1 and form an url with parameters attached and then
redirect?

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:58 PM
To: Tomcat Users List
Subject: Re: 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
Subject: RE: 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. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward 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 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.

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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet question

2003-05-27 Thread Tam, Michael
I am not possitive.  I am not familiar with flash but can you process your
post data in servlet 1 and form an url with parameters attached and then
redirect?

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:58 PM
To: Tomcat Users List
Subject: Re: 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
Subject: RE: 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. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward 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 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.

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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Paul Hsu
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
Subject: RE: 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. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward 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 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.

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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Paul Hsu
Actually my servlet try to forward a 'POST' request to a Flash program, but
the Flash program cannot process 'POST', so I must forward the request to
Flash with 'GET' method. That is my issue.

- Original Message -
From: "Hassan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: 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
> the processing to the actual method. For example:
>
> protected void doGet(HttpServletRequest req, HttpServletResponse res)
>   throws IOException, ServletException
>  {
>   doPost(req, res);
>  }
>
> protected void doPost(HttpServletRequest req, HttpServletResponse res)
>   throws IOException, ServletException
> {
> with full implementation
> }
>
>
>
>
> - Original Message -----
> 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);
> rd.forward(request, response);
>
> I have no problem with code, but I have one issue is how can I change the
> request method from "POST" to "GET" before I forward the original request.
>
> I would appreciate any help
>
> Paul
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Hassan
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
the processing to the actual method. For example:

protected void doGet(HttpServletRequest req, HttpServletResponse res)
  throws IOException, ServletException
 {
  doPost(req, res);
 }

protected void doPost(HttpServletRequest req, HttpServletResponse res)
  throws IOException, ServletException
{
with full implementation
}




- Original Message -
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);
rd.forward(request, response);

I have no problem with code, but I have one issue is how can I change the
request method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet question

2003-05-27 Thread Tam, Michael
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 may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward 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 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.

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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Paul Hsu
Thank you for the help. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward 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 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.

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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RES: servlet question

2003-05-27 Thread Jose Euclides da Silva Junior - DATAPREVRJ
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.

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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet question

2003-05-27 Thread Emerson Cargnin
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 =
   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 method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul 
 

--
Emerson Cargnin
Analista de Sitemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


servlet question

2003-05-27 Thread Paul Hsu
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 
method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul 

RE: Beginner Servlet Question

2003-03-09 Thread jsp
That solved the problem. More reading about the change that was made in
version 4.1.12 and about the servlet invoker did the trick.
Thanks again.



-Original Message-
From: jsp [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 09, 2003 2:00 PM
To: 'Tomcat Users List'; 'Jens Skripczynski'
Subject: RE: Beginner Servlet Question

This is what I have in my conf/web.xml regarding what you said.

  invoker 
 
org.apache.catalina.servlets.InvokerServlet 
- 
  debug 
  0 
  
  2 
  

And this is what I see in the web.xml of the webapps/examples/web-inf
...


Servlet Mapped Filter
invoker


Path Mapped Filter
/servlet/*


Even if I cant figure out this concept and make it work with the
"Servlet"  mapping. It should still work if I use

http://localhost:8080/ch03/com.wrox.jsp.myapp.MyServlet with the file
structure of..

webapps/ch03/WEB-INF/classes/com/wrox/jsp/myapp/MyServlet.class

The servlets in the examples dir work great except my app that I'm
trying to create

Thanks for your help.


You have to make sure, that the invoker servlet is mapped to /server
like
-

invoker
/servlet/*

-
This section is commented out in the conf/web.xml.

So you either need to add this line to your server web.xml or your
application.


Wouldn't it be a good idea to activate this mapping by default
in further tomcat distributions ?



Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

Technology is a constand battle between manufacturers producing bigger
and
more idiot-proof systems and nature producing bigger and better idiots.
-- Slashdot signature


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Beginner Servlet Question

2003-03-09 Thread jsp
This is what I have in my conf/web.xml regarding what you said.

  invoker 
 
org.apache.catalina.servlets.InvokerServlet 
- 
  debug 
  0 
  
  2 
  

And this is what I see in the web.xml of the webapps/examples/web-inf
...


Servlet Mapped Filter
invoker


Path Mapped Filter
/servlet/*


Even if I cant figure out this concept and make it work with the
"Servlet"  mapping. It should still work if I use

http://localhost:8080/ch03/com.wrox.jsp.myapp.MyServlet with the file
structure of..

webapps/ch03/WEB-INF/classes/com/wrox/jsp/myapp/MyServlet.class

The servlets in the examples dir work great except my app that I'm
trying to create

Thanks for your help.


You have to make sure, that the invoker servlet is mapped to /server
like
-

invoker
/servlet/*

-
This section is commented out in the conf/web.xml.

So you either need to add this line to your server web.xml or your
application.


Wouldn't it be a good idea to activate this mapping by default
in further tomcat distributions ?



Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

Technology is a constand battle between manufacturers producing bigger
and
more idiot-proof systems and nature producing bigger and better idiots.
-- Slashdot signature


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Beginner Servlet Question

2003-03-09 Thread Jens Skripczynski
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 don’t need the web.xml file if
> your inside webapps for the browser to see it.

> Directory ch03 is inside the webapps dir. Underneath ch03 I have
> classes/com/wrox/jsp/ch03/myapp/MyServlet
> 
> Wrox tells me to type this into the browser.
> http://localhost:8080/ch03/servlet/com.wrox.jsp.ch03.myapp.MyServlet
You have to make sure, that the invoker servlet is mapped to /server like
-

invoker
/servlet/*

-
This section is commented out in the conf/web.xml.

So you either need to add this line to your server web.xml or your
application.


Wouldn't it be a good idea to activate this mapping by default
in further tomcat distributions ?



Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

Technology is a constand battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots.
-- Slashdot signature


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Beginner Servlet Question

2003-03-09 Thread 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 don’t need the web.xml file if
your inside webapps for the browser to see it.

Directory ch03 is inside the webapps dir. Underneath ch03 I have
classes/com/wrox/jsp/ch03/myapp/MyServlet

Wrox tells me to type this into the browser.
http://localhost:8080/ch03/servlet/com.wrox.jsp.ch03.myapp.MyServlet

I didn’t use the (servlet) because I don’t have  a directory servlet and
Im having a hard time figuring out why that needs to be there. 

I also try it with the (servlet) and nothing. 

I put an index page in the ch03 directory and It pulls that up fine. It
just will not find this servlet??? The class path is set , everything
works except for this.

This is the code for the servlet. Am I just set up wrong, Ive been
everywere I RTFM and Im stumped. It SHOULD WORK ! but it does
not.



package com.wrox.jsp.ch03.myapp;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javax.servlet.ServletException;

public class MyFirstServlet extends HttpServlet {

  public void doGet(HttpServletRequest request, 
HttpServletResponse response) throws
ServletException, 
IOException {
response.setContentType("text/plain");
log("doGet was just called");
PrintWriter out = response.getWriter();
out.println("This is my first Servlet");

  } 
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: one servlet question

2002-09-10 Thread Durham David Cntr 805CSS/SCBE

If this is in regards to DB Connection Pooling, there are other options available.  
Poolman can be found at sourceforge.com.  You are correct to be concerned about 
creating multiple instances of this GetConnection class.   You can correct this by 
making a call to a static method called getConnection().  Here's an example of reading 
in a properties file and retrieving pooled connections.


import java.sql.*;
import java.util.*;
import java.io.*;
import oracle.jdbc.pool.*;
import oracle.jdbc.driver.*;
import javax.sql.*;

/**
 *  Facilitates use of pooled oracle db connections.
 *  
 *  @author David Durham
 *
 */
public class OracleConnectionManager {

private static int stmtCacheSize = 100;
private static OracleConnectionPoolDataSource ocpds = null;
private static String connectString = null;
  private static String username = null;
  private static String password = null;

public OracleConnectionManager() {
createPool();
}

private void createPool() {
try {
Properties info = null;
info = new Properties();
InputStream in = 
getClass().getResourceAsStream("/db.properties");
info.load(in);
this.stmtCacheSize = 
Integer.parseInt(info.getProperty("stmtCacheSize"));
  ocpds = new OracleConnectionPoolDataSource();
ocpds.setDriverType(info.getProperty("driverType"));
ocpds.setServerName(info.getProperty("serverName"));
ocpds.setNetworkProtocol(info.getProperty("networkProtocol"));
ocpds.setDatabaseName(info.getProperty("databaseName"));

ocpds.setPortNumber(Integer.parseInt(info.getProperty("port")));
ocpds.setUser(info.getProperty("user"));
ocpds.setPassword(info.getProperty("password"));
} catch (Exception e) { 
System.err.print(e.getMessage());
}
}


/**
 *  gets a connection from the connection pool
 *  @return a connection from the connection pool
 */
public static java.sql.Connection getConnection() throws SQLException {
  if (ocpds == null) {
OracleConnectionManager ocm = new OracleConnectionManager();
}
PooledConnection pconn = null;
try {
pconn = ocpds.getPooledConnection();

((OraclePooledConnection)pconn).setStmtCacheSize(stmtCacheSize);
} catch ( Exception e ) { 
System.err.println("Connection attempt failed: " + 
e.getMessage());
}
return pconn.getConnection();
}
}




> -Original Message-
> From: Ashish 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 servletcontext depending upon some
> parameters in the session, so i have go send
> servletcontext, and session to this class.
> now the question is should i create the instance of
> this class in init method of the servlet or define a
> seperate method and create the instance of that class
> from doget or dopost method of the child servlet,(this
> servlet will extend the base servlet).
> i have this doubt because if i  create the instance of
> this getconnection class in init method, it will be in
> memory for the full life cycle of servlet(i.e. untill
> i stop the app server).
> so if i extend this base servlet for other 100 child
> servlets, then there will be 100 instance of
> getconnection for life cycle of servlet.
> so am i thinking in the right way???
> any suggestions
> Ashish
> 
> __
> Yahoo! - We Remember
> 9-11: A tribute to the more than 3,000 lives lost
> http://dir.remember.yahoo.com/tribute
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




one servlet question

2002-09-10 Thread Ashish Kulkarni

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 question is should i create the instance of
this class in init method of the servlet or define a
seperate method and create the instance of that class
from doget or dopost method of the child servlet,(this
servlet will extend the base servlet).
i have this doubt because if i  create the instance of
this getconnection class in init method, it will be in
memory for the full life cycle of servlet(i.e. untill
i stop the app server).
so if i extend this base servlet for other 100 child
servlets, then there will be 100 instance of
getconnection for life cycle of servlet.
so am i thinking in the right way???
any suggestions
Ashish

__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Basic servlet question

2001-11-29 Thread Bo Xu

- 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?  What determines this?

Thanks,
Keith
[...]


for any Servlet class, only 1 Class-object(of it) will be loaded 
into the ClassLoader of  webapp in witch that Servlet class is in.

for every "Servlet declaritaion", container  will make one(no pool) 
instance. 

no matter you define "Servlet declaritaion" in WEB-INF/web.xml
or not,  the "default" "Servlet declaritaion" will be always there. i.e.:
- if you define 0 "Servlet declaritaion", there will be 1 instance
- if you define m "Servlet declaritaion", there will be m+1 instance(s)

hope it is right//haha :-)
Bo
Nov.29, 2001



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Quick Servlet Question

2001-11-29 Thread Matt Egyhazy

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: "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 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 possible or not.
> >
> > Thanks!
> >
> > Brandon
> >[...]
>
>
>
> good email for you :-)
>
> for "getRealPath":
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg32185.html
>
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13816.html
>
>
> if your purpose for your getting "path" is only for getting resource:
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg28724.html
>
> Bo
> Nov.29, 2001
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Basic servlet question

2001-11-29 Thread Hawkins, Keith (Keith)


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







Re: Quick Servlet Question

2001-11-29 Thread Bo Xu

- 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 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 possible or not.
>
> Thanks!
>
> Brandon
>[...]



good email for you :-)

for "getRealPath":
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg32185.html

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13816.html


if your purpose for your getting "path" is only for getting resource:
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg28724.html

Bo
Nov.29, 2001



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Quick Servlet Question

2001-11-29 Thread Ryan Lubke

What about ServletContext.getRealPath()?


On Thu, 2001-11-29 at 16:31, Brandon Cruz wrote:
> 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 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...
> 
> /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 possible or not.
> 
> Thanks!
> 
> Brandon
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Quick Servlet Question

2001-11-29 Thread Carsten Lingemann

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.



-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 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...

/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 possible or not.

Thanks!

Brandon


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Quick Servlet Question

2001-11-29 Thread Brandon Cruz

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 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...

/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 possible or not.

Thanks!

Brandon


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Quick Servlet Question

2001-11-29 Thread Hong Jiang

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...
>
> /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 possible or not.
>
> Thanks!
>
> Brandon
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Quick Servlet Question

2001-11-29 Thread DONNIE HALE

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...

/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 possible or not.

Thanks!

Brandon


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Quick Servlet Question

2001-11-29 Thread Brandon Cruz

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 possible or not.

Thanks!

Brandon


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: default servlet question

2001-04-30 Thread Saurabh Shukla


yeah write a servlet and load it at startup as the first servlet to be
loaded.(for doing thing you need to add an entry in the web.xml). So if the
request is passed to tomcat from apache, it will be handled by your default
servlet.

I do not know if you can invoke a servlet for ONLY 1 URI 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 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 any servlet get routed first
to the DefaultServlet?

Does this work for *.jsp as well as *.html as well as *.pdf?

Thanks,
Andy




default servlet question

2001-04-30 Thread Andy Nuss

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 any servlet get routed first
to the DefaultServlet?

Does this work for *.jsp as well as *.html as well as *.pdf?

Thanks,
Andy




Re: Servlet question

2001-03-23 Thread Craig R. McClanahan



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 processing
threads.

> My question is, how many clients can a servlet handle.
> 

The maximum is determined by how many threads you configure in the
container's setup configuration, and is ultimately limited by how many
threads your JDK and operating system can support.

> Thanks,
> Kathy.

Craig McClanahan




Servlet question

2001-03-23 Thread c cw288

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 Explorer at http://explorer.msn.com




Newbie Servlet Question

2001-02-28 Thread Sean McTigue

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 that
is placed in the same classes folder. Sorry for the basic question. Thanks
in advance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Stupid servlet question of the day

2001-02-06 Thread Bolt, Dave
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 set of JSPs available
   only to administrators


I have a servlet that I have mapped to the url-pattern 
/postpaper. As shown below.



    WhitepaperUpload
    sample.WhitepaperUploadServlet




    WhitepaperUpload
    /postpaper



If I hit the servlet from any JSP in the directory on the context
root it works fine. If I try to hit the servlet from a JSP in the
admin subdirectory of the context, it does not find the servlet.


Typing the URL http://localhost:8080/forums/postpaper causes the
servlet to run (I see a message printed by the init and get callbacks)


So, if I am in a JSP that is in a subdirectory off of the context root
(in this case \forums\admin\somejsp.jsp) and I want to write a FORM
ACTION to hit this servlet's POST. Should I write


 ...  


I've tried the following


action="postpaper"
action="/postpaper"
action="./postpaper"
action="/forums/postpaper"
action="/forums/admin/postpaper"


and several other variations, to no avail. Any ideas?


Thanks



Dave Bolt
There is always plenty of bandwidth, just none for you.