Le lun 01/03/2004 � 08:58, Tim Kelly a �crit : > There are missing parenthesis in the line: > > String user1=request.getUserPricipal.getName(); > > It should be > String user1=request.getUserPricipal().getName(); > > Thats why you get the cannot resolve symbol :) > > Tim > > > > amit varshney wrote: > > >it did not work. The following error message is displayed > > > > > >/usr/tomcat/webapps/intra/work/org/apache/jsp/accounts/jdbcmenu_jsp.java:61: cannot > >resolve symbol > >symbol: variable getUserPricipal > >location: interface javax.servlet.http.HttpServletRequest > >String user1=request.getUserPricipal.getName(); > > ^ > > > > > >............................................................................................. > > > >Quoting [EMAIL PROTECTED]: > > > > > > > >>I think you can get the user name by getting the Principal object from > >> > >>request and then getting the name from it like > >> > >>String userName = request.getUserPrincipal().getName(); > >> > >>-Shanmugam- > >> > >>amit varshney wrote: > >> > >> > >> > >>>I want to use tomcat user authentication in my application. for that i > >>> > >>> > >>am using JDBCRealm.I have set the security constraint in the web.xml. So > >>when a request for the restricted page comes a login page comes. > >> > >> > >>>But the problem is that it is submitting to the j_security_check and > >>> > >>> > >>the textboxes are named j_username and j_password respectivley.I want > >>session mangemant in my application. For that I need the login name of > >>the person on my each page. How can I pass the username from login page > >>to my page. is it possible to maintain session using tomcat user > >>authentication or should i go for my own authentication and session > >>management. > >> > >> > >>>Plz help me > >>>Thanks in advance > >>>Amit Varshney > >>> > >>>------------------------------------------------- > >>>Still single? Click here to find the perfect match. > >>> > >>> > >>> > >> > >> > >> > >>>http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?141 > >>> > >>> > >>> > >>> > >>> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > > > >------------------------------------------------- > >Still single? Click here to find the perfect match. > > > >http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?141 > > > > > > > > -- > Tim Kelly, Director of Development > Building Engines, Inc. > > Phone: 781-290-5300 > Cell: 508-561-0985 > > www.buildingengines.com > > 275 Wyman Street > Suite 11 > Waltham MA 02451 > > > >
Well, I think you also have a typo. It should be request.getUserPrincipal.getName(), not request.getUserPricipal.getName(). Notice the missing "n" in Principal. -- ======================================= Daniel Savard Consultation Informatique Daniel Savard 551, boul. Sir-Wilfrid-Laurier suite 105 Beloeil, (Qu�bec) Canada J3G 4J1 T�l: (450) 467-8014 Internet: [EMAIL PROTECTED] ======================================= --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
