Home > Cannot Resolve > Cannot Resolve Symbol For Session.setattribute

Cannot Resolve Symbol For Session.setattribute

Date Mon, 02 Jun 2008 06:28:17 GMT posting a stacktrace would be helpful. raj guntupalli Greenhorn Posts: 27 posted 13 years ago Hi, I am getting the problem at compile time.All other servlets are working fine but I have only problem with this program.I But in welcom.jsp file is giving error. My login screen works perfectly then it calls this screen to check everything, but instead this screen is displayed, and I do not want it display. his comment is here

I love java but she hates me... :'( Rob Spoor Sheriff Posts: 20718 68 I like... I just want to get this part working first. I took the object session out of the top of my code and added this line where I had the initial request.getSession under the else statement. How does std::string work? https://coderanch.com/t/355756/Servlets/java/HttpSession-setAttribute

import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.http.HttpSession; import java.util.*; import java.io.*; public class HttpSession1 extends HttpServlet { public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { HttpSession session=req.getSession(true); List listOfItems=(List)session.getAttribute("listofitems"); if(listOfItems==null) { listOfItems=new facebook google twitter rss Free Web Developer Tools Advanced Search  Forum Programming Languages Java Help method undefined for type string Thread: method undefined for type string Share This Thread  Mark.

Why did the best potions master have greasy hair? Is it deployed in a servlet container? make sure you don't have your CAPS LOCK key on.

User name:

You have declared the 'session' variable as an Object reference type.

But there's no restriction of having Session with the "S" capitalized. so since I can't go back and split them now, I'll go ahead and give this one to Nick. 0 LVL 15 Overall: Level 15 Java 10 Message Expert Comment All rights reserved Powered by JForum 2.3.6, © 2014 JForum Team http://stackoverflow.com/questions/4618794/intellj-idea-cannot-resolve-symbol-and-cannot-resolve-method Thanks Faq Reply With Quote May 17th, 2005,01:07 PM #2 Yawmark View Profile View Forum Posts Visit Homepage  Feelin' Groovy Devshed Supreme Being (6500+ posts)     

int count = 0; session.setAttribute("counter", new Integer(count)); Shouldn't Session be capitalized too? How to reset the WiFi configuration in Raspbian more hot questions question feed lang-java about us tour help blog chat data legal privacy policy work here advertising info mobile contact us Subscribe to our monthly newsletter for tech news and trends Membership How it Works Gigs Live Careers Plans and Pricing For Business Become an Expert Resource Center About Us Who We This article covers our test design approach and then goes through a simple test case example, how … Quality Assurance Java Java EE Experts Exchange Troubleshooting Video by: Michael Viewers learn

Faq Reply With Quote May 17th, 2005,02:18 PM #12 Yawmark View Profile View Forum Posts Visit Homepage  Feelin' Groovy Devshed Supreme Being (6500+ posts)       a) What web container are you using, and in particular which version? You can use it in your own servlets if you like. Not the answer you're looking for?

getValue() & putValue() have been deprecated & you should now use getAttribute() & setAttribute()...if your using the newest API, if not use the first two. http://sauvblog.com/cannot-resolve/cannot-resolve-symbol-class.html Now I just need to figure out how to get it to work instead of having the browser show the code... I have everything configured for jsp's, and they will display correctly. Join Now For immediate help use Live now!

Bosun (SCJP, SCWCD) So much trouble in the world -- Bob Marley Nelo Angelo Ranch Hand Posts: 44 I like... esession is a ordinary folder in webapps.Thanx hi dear the problem is with your LIST & not SESSION...just check out the docs for list on java.util.List MB [ January 09, 2003: Please check. weblink WHAT I GET: html page gets user input, java page is called and displays all its code on the screen and that is where it stops Faq Reply With Quote May

Yawmark class Sig{public static void main(String...args){\u0066or(int
+(~'"'&'#'))+('<'>>('\\'/'.')/\u002Array.const(~1)\*\u002F)));}} Faq Reply With Quote May 17th, 2005,02:24 PM #13 No Profile Picture ejmelious View Profile View Forum Posts Join them; it only takes a minute: Sign up IntellJ IDEA “cannot resolve symbol” and “cannot resolve method” up vote 29 down vote favorite 4 What are common causes for IntelliJ Faq Reply With Quote May 17th, 2005,02:27 PM #14 Yawmark View Profile View Forum Posts Visit Homepage  Feelin' Groovy Devshed Supreme Being (6500+ posts)      

You should have defined that session somewhere.

PHP Code: HttpSessionsess=request.getSession();
Yawmark class Sig{public static void main(String...args){\u0066or(int
One typically shouldn't just cut and paste examples into code without understanding the concept of what's going on. raj guntupalli Greenhorn Posts: 27 posted 13 years ago C:\Program Files\Apache Tomcat 4.0\webapps\esession\HttpSession1.java:13: cannot resolve symbol symbol : method getAttribute (java.lang.String) location: interface javax.servlet.http.HttpSession List listOfItems=(List)session.getAttribute("listofitems"); ^ C:\Program Files\Apache Tomcat 4.0\webapps\esession\HttpSession1.java:17: Define Error Message: Line Numbers: Type of Error: Break Down… Java Web Languages/Standards-Other Programming Languages-Other Simple User Input in Java Video by: Salmaan Viewers will learn one way to get user

The bad news is that they do what you tell them to do." -- Ted Nelson Bosun Bello Ranch Hand Posts: 1511 posted 4 years ago Line 2 should be up vote 16 down vote favorite 5 I am able to set session attribute in scriptlet but when I am trying to set session attribute inside java class it shows error HttpSession session = request.getSession(); // for servlet.In JSP, you can use it directly. check over here In welcome.jsp I am creating session attribute and in same page we redirect to second.jsp.

Coding is as much about debugging your code as it is about writing it.