tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Freyr Stefansson <ste...@decode.is>
Subject RE: What's this with session in JSP?
Date Mon, 24 Apr 2000 22:38:01 GMT
oh.. silly me!

Sorry... I'm not even gonna tell you what I did!

Nevermind... problem solved and I feel even more stupid!



-----Original Message-----
From: Stefan Freyr Stefansson [mailto:stebbi@decode.is]
Sent: 24. april 2000 22:35
To: tomcat-user@jakarta.apache.org
Subject: What's this with session in JSP?


Why can't I use the putValue method in session?  I've looked through all the
documentation from JavaSoft and I can't see that it has been deprecated...
but everytime I try to call session.putValue(String, Object) in my JSP page
I get a compiler error on it telling me that it's been deprecated!

I'm using JDK 1.2.2

Here's the error message:

Error: 500
Location: /komodo/doLogin.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for
JSPwork\localhost_8080%2Fkomodo\_0002fdoLogin_0002ejspdoLogin_jsp_12.java:88
: Statement not reached.
                	session.putValue("UserName", sUserName);
                	^
Note: work\localhost_8080%2Fkomodo\_0002fdoLogin_0002ejspdoLogin_jsp_12.java
uses or overrides a deprecated API.  Recompile with "-deprecation" for
details.
1 error, 1 warning

	at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
Code)
	at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:412)
	at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:147)
	at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:159)
	at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:259)
	at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled
Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
	at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:146)
	at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334
)
	at java.lang.Thread.run(Thread.java:479)




And here's the code that does all this (doLogin.jsp):

<%
	String sUserName = request.getParameter("LoginName");
	String sPassword = request.getParameter("Password");
	UILogin uiLogin = new UILogin();

	if(sUserName != null || sPassword != null)
	{
		uiLogin.setUserName(sUserName);
		uiLogin.setPassword(sPassword);
	}

	UIHandler uhUIHandler = new UIHandler();
	int iAccessType = uhUIHandler.login(uiLogin, System.currentTimeMillis());

	session.putValue("UserName", sUserName);
	session.putValue("AccessType", new Integer(iAccessType));
	...
%>


I'm stuck here... I'm new to JSP but I've been told (by the little
documentation that I've found on this) that it should work!  I've even tried
to put in a <% @page session="true" %> but nothing works!

I hope this isn't totally out of the topic for this mailing list, but I
realize that this isn't exactly a Tomcat matter.  Speaking of which... does
anybody know about a mailing list or a news group talking about JSP
stuff.... you know... where I could actually put silly questions like this
on without having to be ashamed of myself ;o)

Thanx,
Stefan


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message