How to get login username with pageContext?

2005-10-04 Thread 梁炳場
% pageContext.getRequest().??? List userRoleList = UserRoleService.getInstance().getUserRoleList(); % I fail to find getRemoteUser() in pageContext.getRequest after login with JDBCRealm. I'd like to pass it in as a parameter in getUserRoleList(). Thanks

RE: How to get login username with pageContext?

2005-10-04 Thread Raghupathy,Gurumoorthy
% String user = request.getRemoteUser(); % -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 04 October 2005 15:34 To: Tomcat Users List Subject: How to get login username with pageContext? % pageContext.getRequest().??? List

Re: How to get login username with pageContext?

2005-10-04 Thread 梁炳場
PROTECTED] Sent: 04 October 2005 15:34 To: Tomcat Users List Subject: How to get login username with pageContext? % pageContext.getRequest().??? List userRoleList = UserRoleService.getInstance().getUserRoleList(); % I fail to find getRemoteUser() in pageContext.getRequest

How to get process URL in different context?

2005-09-19 Thread Kyle
in the right directon as to what to read to find out how to get tomcat to let me do this please? -- Kind Regards Kyle - To unsubscribe, e-mail: [EMAIL

Re: How to get user name after login

2005-09-15 Thread Caroline Jen
I think it is getRemoteUser(); --- ±ç¬±³õ [EMAIL PROTECTED] wrote: After implementation of JDBCRealm, how to retrieve the username in Servlet after login? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: How to get user name after login

2005-09-15 Thread Sonja Löhr
It is: request.getUserPrincipal().getName(); To check for a special role, use: request.isUserInRole(rolename); Am Donnerstag, den 15.09.2005, 03:49 -0700 schrieb Caroline Jen: I think it is getRemoteUser(); --- ±ç¬±³õ [EMAIL PROTECTED] wrote: After implementation of JDBCRealm, how

How to get user name after login

2005-09-14 Thread 梁炳場
After implementation of JDBCRealm, how to retrieve the username in Servlet after login? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to get user name after login

2005-09-14 Thread Mark Thomas
梁炳場 wrote: After implementation of JDBCRealm, how to retrieve the username in Servlet after login? getRemoteUser() - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How to get an URL embedded filename suggestion to work in Tomcat as it does in Apache

2005-09-12 Thread Ron Cozad
This url is not working, but it works with Apache http server. http://my.company.com/cgi-bin/program1.cgi/filename.txt?parameter1=123 Next url does work with tomcat but of course the browser proposes program1.cgi as the name instead of filename.txt, as desired in the first url.

How to get name of Engine a servlet is running in?

2005-09-02 Thread Joe Reger, Jr.
I'm trying to gain access to the name of the Engine that a servlet is running in. In most cases this will be Catalina as configured in the /conf/server.xml file. But when another Engine is configured, say CatalinaTesting, I need to get that name instead. I've tried to navigate the methods and

RE: How to get name of Engine a servlet is running in?

2005-09-02 Thread Raghupathy,Gurumoorthy
-user@jakarta.apache.org Subject: How to get name of Engine a servlet is running in? I'm trying to gain access to the name of the Engine that a servlet is running in. In most cases this will be Catalina as configured in the /conf/server.xml file. But when another Engine is configured, say

Re: how to get the original requestURI after jsp:forward()

2005-07-25 Thread Martin Bromley
I've needed to do this in the past: I created a filter that set the set the requestURI in an attribute in the request. There may be a better way. Martin Marten Lehmann wrote: Hello, I have a forward to a jsp-file. This jsp-file needs to know which URI was requested in the initial request.

AW: how to get the original requestURI after jsp:forward()

2005-07-25 Thread Schwarz
Hello, I have a forward to a jsp-file. This jsp-file needs to know which URI was requested in the initial request. Currently, I can only see the requestURI of the forwarded jsp-file. Any ideas? set a session bean with the original uri.

RE: how to get the original requestURI after jsp:forward()

2005-07-25 Thread Caldarale, Charles R
From: Schwarz [mailto:[EMAIL PROTECTED] Subject: AW: how to get the original requestURI after jsp:forward() set a session bean with the original uri. I don't think you want to put a request-specific data item into the session - if there's more than one request being processed simultaneously

how to get the original requestURI after jsp:forward()

2005-07-24 Thread Marten Lehmann
Hello, I have a forward to a jsp-file. This jsp-file needs to know which URI was requested in the initial request. Currently, I can only see the requestURI of the forwarded jsp-file. Any ideas? Regards Marten - To

Re: how to get the original requestURI after jsp:forward()

2005-07-24 Thread Mark Thomas
You need to read SRV.8.4 of the servlet specification. Mark Marten Lehmann wrote: Hello, I have a forward to a jsp-file. This jsp-file needs to know which URI was requested in the initial request. Currently, I can only see the requestURI of the forwarded jsp-file. Any ideas? Regards

Re: how to get the original requestURI after jsp:forward()

2005-07-24 Thread Marten Lehmann
Hi, You need to read SRV.8.4 of the servlet specification. I read it now. However, it's stated there, that path-related-values should be overwritten by the container in all request-dispatcher occurences. This means: include and forward. But for an include, I can see the original

Re: How to get user's password from tomcat

2005-06-04 Thread Larry Meadors
The principle may contain it, but you would have to get it via reflection or cast it to it's original type to see it. Larry On 6/2/05, Jo [EMAIL PROTECTED] wrote: Hi all, Once Tomcat has authenticated a login, we can get the the authenticated user's name from the request's getRemoteUser()

Re: How to get user's password from tomcat

2005-06-04 Thread Digby
I'm not sure you're supposed to be able to get it. Also, what would you expect to get if the password was hashed? Can you not just read the password from the database / ldap source? Digby Larry Meadors wrote: The principle may contain it, but you would have to get it via reflection or cast

Re: How to get user's password from tomcat

2005-06-04 Thread Larry Meadors
Since we're talking tomcat, you can generally cast the principle to generic principle: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/realm/GenericPrincipal.html It has a getPassword() method. I do not know if that password gets hashed...it never was with

How to get user's password from tomcat

2005-06-02 Thread Jo
Hi all, Once Tomcat has authenticated a login, we can get the the authenticated user's name from the request's getRemoteUser() or getUserPrincipal() methods. Is there a way to get the user's password when the authentication type is form-based or single-sign-on ? Thanks a lot. Jo.-

[OT] : How to get a connection from Tomcat DBCP from a remote application?

2005-05-01 Thread appa rao
Hi, I am using Tomcat 5.5.7 and configured DBCP properly to work with Oracle 9i. Everything is working fine if I try to get the connection from the Pool from an application deployed in Tomcat. However if I try to get the connection from the Pool from an application which is not deployed in

Re: [OT] : How to get a connection from Tomcat DBCP from a remote application?

2005-05-01 Thread QM
On Sun, May 01, 2005 at 05:46:22PM -0700, appa rao wrote: : However if I try to get the connection from the Pool from an application which is not deployed in Tomcat (remote client), I am getting not bound exceptions. This makes sense. Keep in mind, JNDI is just a lookup/storage service for

how to get application real path

2005-03-30 Thread Pradeep Chauhan
Hi , How we can get real path of application in java. ? thanks and regards, Pradeep DISCLAIMER: This message, including any attachments contains confidential and privileged information for the sole use of the intended recipient(s), and is protected by law. If you are not the intended

Re: how to get application real path

2005-03-30 Thread Kanchan Deshpande
Chauhan [EMAIL PROTECTED] wrote: Hi , How we can get real path of application in java. ? thanks and regards, Pradeep DISCLAIMER: This message, including any attachments contains confidential and privileged information for the sole use of the intended recipient(s), and is protected

How to get know what version of TC is running behind Apache

2005-03-16 Thread Antony Paul
Hi all, Is it possible to know what version of Tomcat is running behind an Apache. The connector used is JK. -- rgds Antony Paul http://www.geocities.com/antonypaul24/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: How to get know what version of TC is running behind Apache

2005-03-16 Thread Fenderbosch, Eric
PROTECTED] Sent: Wednesday, March 16, 2005 4:47 AM To: Tomcat Users List Subject: How to get know what version of TC is running behind Apache Hi all, Is it possible to know what version of Tomcat is running behind an Apache. The connector used is JK. -- rgds Antony Paul http://www.geocities.com

Re: How to get know what version of TC is running behind Apache

2005-03-16 Thread Antony Paul
this extension: http://livehttpheaders.mozdev.org/ Then you can see all the http headers, including server, which will tell you which version of Tomcat. -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 4:47 AM To: Tomcat Users List Subject: How

RE: How to get know what version of TC is running behind Apache

2005-03-16 Thread Varley, Roger
Hi all, Is it possible to know what version of Tomcat is running behind an Apache. The connector used is JK. Try asking for a non-existant servlet in your web-app. The 404 page is issued by Tomcat and, I think, tells you the version. Regards Roger

Under Tomcat 5.5.7 how to get Username xxx successfully authenticated

2005-02-24 Thread Richard Mixon (qwest)
Under Tomcat 5.0.19 I had a logger statement in my application context that created a log file. This log file contained, among other things, a line each time a user successfully/unsuccessfully logged in, similar to: 2005-02-20 07:09:20 JDBCRealm[/stars]: Username xxx successfully authenticated

How to get english messages on a German Windows-XP?

2005-02-07 Thread Zsolt Koppany
Hi, This is probably a java and not a tc question, but I would like to know how to get English java error messages when I start tc on a German windows XP box. Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: How to get english messages on a German Windows-XP?

2005-02-07 Thread Mario Winterer
-Duser.variant=variant e.g.: -Duser.language=en -Duser.country=US Best regards, Tex Zsolt Koppany schrieb: Hi, This is probably a java and not a tc question, but I would like to know how to get English java error messages when I start tc on a German windows XP box. Zsolt

RE: How to get english messages on a German Windows-XP?

2005-02-07 Thread Zsolt Koppany
[mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 6:30 PM To: Tomcat Users List Subject: Re: How to get english messages on a German Windows-XP? I think Java uses the Locale from your operating system. So to switch to english, you should either: + switch the locale of your operating system

Re: How to get english messages on a German Windows-XP?

2005-02-07 Thread Mario Winterer
PM To: Tomcat Users List Subject: Re: How to get english messages on a German Windows-XP? I think Java uses the Locale from your operating system. So to switch to english, you should either: + switch the locale of your operating system + tell Java to use another locale via system.properties at tomcat

Re: How to get NT login within Tomcat ?

2005-01-21 Thread Jukka Uusisalo
VAN DER MARLIERE FREDERIC wrote: Hi all. Does anybody know if it is possible to get my NT login from Tomcat? I heard something about Windows Active Directory but I don't know anything about that. If you want authenticate against NT/Windows domain, check Tomcat JAASRealm

How to get NT login within Tomcat ?

2005-01-19 Thread VAN DER MARLIERE FREDERIC
Hi all. Does anybody know if it is possible to get my NT login from Tomcat? I heard something about Windows Active Directory but I don't know anything about that. Thanks in advance. Fred. Ce message et toutes les pieces jointes (ci-apres le

Vedr.: How to get NT login within Tomcat ?

2005-01-19 Thread Thomas Nybro Bolding
.: How to get NT login within Tomcat ? Hi all. Does anybody know if it is possible to get my NT login from Tomcat? I heard something about Windows Active Directory but I don't know anything about that. Thanks in advance. Fred. Ce message et

How to get a notfication if the user closes its browser?

2004-10-20 Thread Stephan Coboos
Hi, I need to send a very very big set of data within a servlet to the users browser. But if the users canceles the transmission or closes its browser I need to cancel writting the data to save resources. But if the user canceles the response during transmission I don't get a

RE: How to get a notfication if the user closes its browser?

2004-10-20 Thread Steve Kirk
To: [EMAIL PROTECTED] Subject: How to get a notfication if the user closes its browser? Hi, I need to send a very very big set of data within a servlet to the users browser. But if the users canceles the transmission or closes its browser I need to cancel writting the data to save

Re: How to get a notfication if the user closes its browser?

2004-10-20 Thread Tim Funk
An IOException should be thrown by write sometime after the socket is disconnected. (It may vary due to buffering) Tomcat doesn't log that IOException since it is so common but it can be caught if your decide to do so. -Tim Stephan Coboos wrote: Hi, I need to send a very very big set of data

RE: how to get relative URL to work with 5.5.2?

2004-10-18 Thread Shapira, Yoav
Hi, try just: img src=images/close.gif Yup, or ../images/, but not /images. For HTML references, / means the server root, not the root of your webapp, and is usually a wrong choice. Even when it works, you still limit portability by hard-coding your webapp to context path . Yoav On Sun,

how to get relative URL to work with 5.5.2?

2004-10-17 Thread andy davidson
Hi I have a simple sevlet that generates img. I can not get the images to load? I read the servlet essential tutorial at sun.com, but that did not help. To try to figure what was going on I turned on the dumper. Here is my file layout webapps/MyBookmarks/images/*.gif

Re: how to get relative URL to work with 5.5.2?

2004-10-17 Thread Ben Souther
try just: img src=images/close.gif On Sun, 2004-10-17 at 20:49, andy davidson wrote: Hi I have a simple sevlet that generates img. I can not get the images to load? I read the servlet essential tutorial at sun.com, but that did not help. To try to figure what was going on I turned on

How to get rid of 'null' in forms

2004-10-11 Thread Michael Truman
I am attempting to move a web application from Tomcat 4.0.6 to 5.0.27. But I am having a problem - in 5.0.27 when a JSP displays a form backed by a javabean the uninitialized properties of the bean are displayed as 'null' rather than as a blank string as was done in 4.0.6. I know some other

Re: How to get rid of 'null' in forms

2004-10-11 Thread Ben Souther
This is the expected behavior. See: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241 for more details. On Mon, 2004-10-11 at 11:40, Michael Truman wrote: I am attempting to move a web application from Tomcat 4.0.6 to 5.0.27. But I am having a problem - in 5.0.27 when a JSP displays

How to get a handle to tomcat Mbean Server?

2004-09-28 Thread Honnavalli, Jyothi
Hi All, I was just learning 'bt Mbeans. To begin with, I was learning to use and test the Mbeans that are already existing in tomcat so I get to know how Mbeans work. I have written my own Agent called UserManager to call the Mbeans to list users (Tomcat Admin functionality : based on classes

RE: How to get a handle to tomcat Mbean Server?

2004-09-28 Thread Robert Harper
() ) ); } } catch( Exception e ) { e.printStackTrace(); } } Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Honnavalli, Jyothi [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:30 PM To: 'Tomcat Users List' Subject: How to get a handle to tomcat Mbean

How to get ColdFusion Running

2004-09-23 Thread Keith Vaughn
ColdFusion installed on Netware 6.5 runing Apache with Tomcat4, however not functioning. Need to know how to set environment variable to get ColdFusion to run. Any help would be greatly appriciated. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

How to get tomcat 5.5.1 to re-start

2004-09-20 Thread Steve R. Burrus
Can anyone/anybody please tell me just how exactly I can go about getting Tomcat version 5.5.1 to re-start it's context???!! It doesn't seem to wanna do it thru the old method of editing the server.xml file with DefaultContext reloadable=true /!!

Re: How to get tomcat 5.5.1 to re-start

2004-09-20 Thread Fred Stluka
Check the archives for this list. Yoav Shapira and Remy Maucherat answered this question just the other day. Remy explained a bit and pointed us to: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html which explains more. --Fred

Re: how to get user login?

2004-08-31 Thread John Villar
The Active Directory is (Simplifying, off course) an LDAP directory. You could use a LDAP binding to get the user names from it. QM escribió: On Tue, Aug 31, 2004 at 10:37:58AM +0800, Aris Javier wrote: : when i use request.getRemoteUser(), it returns null value. : : what i want to do is get

how to get user login?

2004-08-30 Thread Aris Javier
Hello! Is there a way to get the user login of a client in windows using JSP/Servlet? I'm working on something, i want to get the user login of a client and verify it in Active Directory. Thanks in advance! aris

RE: how to get user login?

2004-08-30 Thread Keith Bottner
handle it? Or are you specifically looking for the ActiveDirectory hook to tie SingleSignOn into Tomcat? Sorry, I raised more questions. Keith -Original Message- From: Aris Javier [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 7:25 PM To: [EMAIL PROTECTED] Subject: how to get user

RE: how to get user login?

2004-08-30 Thread Aris Javier
:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 9:48 AM To: 'Tomcat Users List' Subject: RE: how to get user login? That is really an opened ended question. Are you talking about getting the username and password if you use SingleSignOn? If so then you would do request.getUserPrincipal() cast

Re: how to get user login?

2004-08-30 Thread QM
On Tue, Aug 31, 2004 at 10:37:58AM +0800, Aris Javier wrote: : when i use request.getRemoteUser(), it returns null value. : : what i want to do is get first the login username then verify it in : active directory if it exists... Does JNDIRealm work with AD? If so, you could setup your auth

How to get mod_jk2 to pass (environment?) variables

2004-08-18 Thread ohaya
Hi, My apologies for continuing to post similar messages, but I'm still not able to get my JSPs to retrieve any of the information from client certificates in my Apache+Tomcat+mod_jk2 server. I've been testing like crazy for 2-3 days now, and going nowhere fast. At this point, I'm getting more

Re: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Endre Stølsvik
On Thu, 12 Aug 2004, Jacob Kjome wrote: | To get the context path at init time, try this Thanks..! Good to see that others (log4j!!) have this problem! However, I have been thinking along these lines (the second idea presented) already, but it then again boils down to that you really

RE: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Shapira, Yoav
Hi, No, not all of us will be happy. And it's not simple. Yoav Shapira Millennium Research Informatics -Original Message- From: Endre Stølsvik [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 5:27 AM To: Tomcat Users List Subject: Re: SOLVED: How to get the context path

RE: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Shapira, Yoav
Millennium Research Informatics -Original Message- From: Endre Stølsvik [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 5:27 AM To: Tomcat Users List Subject: Re: SOLVED: How to get the context path for a web application? On Thu, 12 Aug 2004, Jacob Kjome wrote: | To get the context

RE: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Endre Stølsvik
On Fri, 13 Aug 2004, Shapira, Yoav wrote: | Hi, | And of course, since you can get the source for JSR154, there's nothing | preventing you from adding this method and running with a custom servlet | jar in your container. (It's at | http://cvs.apache.org/viewcvs.cgi/jakarta-servletapi-5/jsr154/,

Re: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Ben Souther
Per the servlet spec, a j2ee app isn't required to have an app path. The entire war file can be deployed remotely and run without ever being unpacked. In a case like that, there would be no path to the application. On Friday 13 August 2004 10:01 am, Endre Stølsvik wrote: But, why wouldn't all

RE: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Shapira, Yoav
Millennium Research Informatics -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 10:12 AM To: Tomcat Users List Subject: Re: SOLVED: How to get the context path for a web application? Per the servlet spec, a j2ee app isn't required to have an app

RE: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Mike Curwen
To: Tomcat Users List Subject: Re: SOLVED: How to get the context path for a web application? Per the servlet spec, a j2ee app isn't required to have an app path. The entire war file can be deployed remotely and run without ever being unpacked. In a case like that, there would be no path

Re: SOLVED: How to get the context path for a web application?

2004-08-13 Thread David Wall
contextPath = path.substring(0, path.lastIndexOf(/)); contextPath = contextPath.substring(contextPath.lastIndexOf(/) + 1); This looks like a reasonable hack, but isn't it true that the filesystem path and the context path don't have to match? For example, I can map to

Re: SOLVED: How to get the context path for a web application?

2004-08-13 Thread Jacob Kjome
Quoting David Wall [EMAIL PROTECTED]: contextPath = path.substring(0, path.lastIndexOf(/)); contextPath = contextPath.substring(contextPath.lastIndexOf(/) + 1); This looks like a reasonable hack, but isn't it true that the filesystem path and the context path don't have to

Re: SOLVED: How to get the context path for a web application?

2004-08-12 Thread Endre Stølsvik
On Wed, 11 Aug 2004, David Wall wrote: | The cause for some of these specs is the fact servlet containers aren't | required to run on file systems. For example, they may run entirely | inside a DBMS (and Oracle had such a container for a while), in which | case you must deploy in a packed

Re: SOLVED: How to get the context path for a web application?

2004-08-12 Thread Jacob Kjome
To get the context path at init time, try this from: http://cvs.apache.org/viewcvs.cgi/logging-log4j-sandbox/src/java/org/apache/log4j/servlet/InitShutdownController.java /** * Retrieves the context path of the web application from the servlet context. * * @param context the current

Re: SOLVED: How to get the context path for a web application?

2004-08-12 Thread Rajesh
hai use request.getContextPath() Rajesh Jacob Kjome wrote: To get the context path at init time, try this from: http://cvs.apache.org/viewcvs.cgi/logging-log4j-sandbox/src/java/org/apache/log4j/servlet/InitShutdownController.java /** * Retrieves the context path of the web application

RE: SOLVED: How to get the context path for a web application?

2004-08-12 Thread Mike Curwen
OHH!!. How could we be so stupid??? RTFT! (that last 'T' would be 'thread') -Original Message- From: Rajesh [mailto:[EMAIL PROTECTED] Sent: Thursday, August 12, 2004 8:47 AM To: Tomcat Users List Subject: Re: SOLVED: How to get the context path for a web application? hai

RE: SOLVED: How to get the context path for a web application?

2004-08-11 Thread Endre Stølsvik
On Tue, 10 Aug 2004, Shapira, Yoav wrote: | | Hi, | | Agreed, but my follow-up question was if there was such a call to be | done | using a ServletContext/ServletConfig object so that you can get the | context | path in initialization servlets, etc., before a request comes in. | | No, and an

RE: SOLVED: How to get the context path for a web application?

2004-08-11 Thread Shapira, Yoav
: How to get the context path for a web application? On Tue, 10 Aug 2004, Shapira, Yoav wrote: | | Hi, | | Agreed, but my follow-up question was if there was such a call to be | done | using a ServletContext/ServletConfig object so that you can get the | context | path in initialization servlets, etc

Re: SOLVED: How to get the context path for a web application?

2004-08-11 Thread David Wall
The cause for some of these specs is the fact servlet containers aren't required to run on file systems. For example, they may run entirely inside a DBMS (and Oracle had such a container for a while), in which case you must deploy in a packed WAR and the subset under a server's URL name space is

RE: How to get the context path for a web application?

2004-08-10 Thread Shapira, Yoav
: Monday, August 09, 2004 10:49 PM To: Tomcat Users List Subject: How to get the context path for a web application? I need to find a way to get the context path of the current web application. I would like to to it using the HttpSession, HttpServletRequest or response. I tried

Re: How to get the context path for a web application?

2004-08-10 Thread David Wall
request.getContextPath(); Is there a way to do it when not serving a web page? Like in a startup servlet that has a ServletConfig/Context, but doesn't have a request? This way, the context could be retrieved once and cached and used in situations unrelated to processing a specific HTTP

RE: How to get the context path for a web application?

2004-08-10 Thread Robert Harper
suggest you check the API docs for more information. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:07 AM To: Tomcat Users List Subject: Re: How to get the context path for a web application

Re: How to get the context path for a web application?

2004-08-10 Thread David Wall
A ServletConfig reference is passed in the call to the init() method of your servlet. From this you may use the getServletContext() method to get the context. One thing to remember is that this does not get called until the servlet is initialized and would be invalidated when it is destroyed.

SOLVED: How to get the context path for a web application?

2004-08-10 Thread Dov Rosenberg
Someone on the list suggested Request.getContextPath() and it works like a charm. Thanks to all. On 8/10/04 1:06 PM, David Wall [EMAIL PROTECTED] wrote: A ServletConfig reference is passed in the call to the init() method of your servlet. From this you may use the getServletContext() method

Re: SOLVED: How to get the context path for a web application?

2004-08-10 Thread David Wall
Someone on the list suggested Request.getContextPath() and it works like a charm. Thanks to all. Agreed, but my follow-up question was if there was such a call to be done using a ServletContext/ServletConfig object so that you can get the context path in initialization servlets, etc., before a

RE: SOLVED: How to get the context path for a web application?

2004-08-10 Thread Shapira, Yoav
Hi, Agreed, but my follow-up question was if there was such a call to be done using a ServletContext/ServletConfig object so that you can get the context path in initialization servlets, etc., before a request comes in. No, and an archive search would reveal past discussions around this issue

Re: SOLVED: How to get the context path for a web application?

2004-08-10 Thread David Wall
No, and an archive search would reveal past discussions around this issue (though none recently). Webapps are supposed to be independent of their server configuration including with regards to context path, and so the Servlet Spec actively discourages you from doing webapp initialization or

Re: SOLVED: How to get the context path for a web application?

2004-08-10 Thread Milt Epstein
On Tue, 10 Aug 2004, David Wall wrote: No, and an archive search would reveal past discussions around this issue (though none recently). Webapps are supposed to be independent of their server configuration including with regards to context path, and so the Servlet Spec actively

RE: SOLVED: How to get the context path for a web application?

2004-08-10 Thread Robert Harper
: Re: SOLVED: How to get the context path for a web application? Someone on the list suggested Request.getContextPath() and it works like a charm. Thanks to all. Agreed, but my follow-up question was if there was such a call to be done using a ServletContext/ServletConfig object so that you

RE: SOLVED: How to get the context path for a web application?

2004-08-10 Thread Shapira, Yoav
Hi, True and it's mostly not a big issue. However, is it possible for a ServletContext to reference one context path and the Request objects to have a different one? Most webapps only operate under a single context path (don't they?), so having it at initialization would be nice too. Oh

RE: SOLVED: How to get the context path for a web application?

2004-08-10 Thread Aris Javier
that's me! =) it's nice to be of service... welcome! aris -Original Message- From: Dov Rosenberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 11, 2004 1:23 AM To: Tomcat Users List Subject: SOLVED: How to get the context path for a web application? Someone on the list suggested

Re: SOLVED: How to get the context path for a web application?

2004-08-10 Thread Dov Rosenberg
: How to get the context path for a web application? Someone on the list suggested Request.getContextPath() and it works like a charm. Thanks to all. On 8/10/04 1:06 PM, David Wall [EMAIL PROTECTED] wrote: A ServletConfig reference is passed in the call to the init() method of your

How to get the context path for a web application?

2004-08-09 Thread Dov Rosenberg
I need to find a way to get the context path of the current web application. I would like to to it using the HttpSession, HttpServletRequest or response. I tried the ServletContext.getServletContextName but it returns null in Tomcat. Is there a cross container solution? -- Dov Rosenberg

RE: How to get the context path for a web application?

2004-08-09 Thread Keith Bottner
Have you tried ? request.getServletPath(); Keith -Original Message- From: Dov Rosenberg [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 9:49 PM To: Tomcat Users List Subject: How to get the context path for a web application? I need to find a way to get the context path

RE: How to get the context path for a web application?

2004-08-09 Thread Aris Javier
also, request.getContextPath(); aris -Original Message- From: Keith Bottner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:10 PM To: 'Tomcat Users List' Subject: RE: How to get the context path for a web application? Have you tried ? request.getServletPath(); Keith

How to get Roles in a Principal with JNDIRealm

2004-06-30 Thread Renato Primavera
Hello All, I'm using JNDIRealm to authenticate users and it's working well. In my java code, I need to retrieve roles associated with the authenticated user. Here is a sample of this code : Subject s =

RE: How to get Roles in a Principal with JNDIRealm

2004-06-30 Thread Robert Harper
It may be easier to use JMX and retrieve the role out of the user information from the user bean. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Renato Primavera [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 7:47 AM To: [EMAIL PROTECTED] Subject: How

RE: How to get the offending uri when handling a 404 error?

2004-06-03 Thread Shapira, Yoav
Hi, -Original Message- From: Ariel Valentin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 10:19 PM To: [EMAIL PROTECTED] Subject: RE: How to get the offending uri when handling a 404 error? I believe the ErrorData class only holds 500 errors. Where did you get

RE: How to get the offending uri when handling a 404 error?

2004-06-02 Thread Shapira, Yoav
Hi, Does your 404.jsp have the isErrorPage directive set to true? Yoav Shapira Millennium Research Informatics -Original Message- From: Joseph Shraibman [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 01, 2004 7:57 PM To: [EMAIL PROTECTED] Subject: How to get the offending uri when

RE: How to get the offending uri when handling a 404 error?

2004-06-02 Thread Mike Curwen
: Wednesday, June 02, 2004 7:50 AM To: Tomcat Users List Subject: RE: How to get the offending uri when handling a 404 error? Hi, Does your 404.jsp have the isErrorPage directive set to true? Yoav Shapira Millennium Research Informatics -Original Message- From: Joseph Shraibman

RE: How to get the offending uri when handling a 404 error?

2004-06-02 Thread Ariel Valentin
those bad requests. Hope that helps, Mr. Ariel S. Valentin mailto: [EMAIL PROTECTED] From: Mike Curwen [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: How to get the offending uri when handling a 404 error? Date: Wed, 2 Jun 2004

Re: ErrorPage.jsp - how to get the address of the offending page?

2004-06-01 Thread Dola Woolfe
Does the request attribute javax.servlet.error.request_uri suit your needs ? (from the servlet spec, SRV.9.9.1) Actually returns null. I'm using Tomcat 3; Could that be the reason? Here's my snippet: %@ page isErrorPage=true% %

RE: ErrorPage.jsp - how to get the address of the offending page?

2004-06-01 Thread Mike Curwen
So you'd need tomcat 4 and above for javax.servlet.error.request_uri -Original Message- From: Dola Woolfe [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 01, 2004 3:28 AM To: [EMAIL PROTECTED] Subject: Re: ErrorPage.jsp - how to get the address of the offending page? Does

RE: ErrorPage.jsp - how to get the address of the offending page?

2004-06-01 Thread Dola Woolfe
To: [EMAIL PROTECTED] Subject: Re: ErrorPage.jsp - how to get the address of the offending page? Does the request attribute javax.servlet.error.request_uri suit your needs ? (from the servlet spec, SRV.9.9.1) Actually returns null. I'm using Tomcat 3; Could

RE: ErrorPage.jsp - how to get the address of the offending page?

2004-06-01 Thread Frank Zammetti
, and I'm wondering if maybe it was in that version too. From: Dola Woolfe [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: ErrorPage.jsp - how to get the address of the offending page? Date: Tue, 1 Jun 2004 08:47:07 -0700 (PDT) So

How to get the offending uri when handling a 404 error?

2004-06-01 Thread Joseph Shraibman
(JspServlet.java:236) (this is with tomcat 5.0.24) So how can I get the url the the user tried to request? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

ErrorPage.jsp - how to get the address of the offending page?

2004-05-26 Thread Dola Woolfe
Hi, The subject pretty much contains the question. I would like the error page to send me an email with the URL of page that caused the exception. However, I can't figure out how to do it othe than by parsing the stack trace and somehow backing out the webpage.jsp that caused the error. Thanks!

  1   2   3   4   5   >