aspose file tools*
The moose likes Servlets and the fly likes servletContext. setAttribute( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servletContext. setAttribute("", hashMap ) - Not compiling" Watch "servletContext. setAttribute("", hashMap ) - Not compiling" New topic
Author

servletContext. setAttribute("", hashMap ) - Not compiling

Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
Dear Folks
I am facing problem that the above method is not available in servlet under JBuilder 3 version.
I have included in Version Java1.3.2 and servlet.jar of Tomcat 4.0 in Jbuilder's liberary but it is still not getting response and not compiling it.
Please note that i am calling servletContext.setAttribute("", hashMap )in init() method of a servlet.
Even though when i compile with orion1.5.x it works fine and compiles successfully.
What the problem can be there, is there a version problem or something else.
Please respond to the above. thanks.
Best regards
Rashid Ali
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
Jbuilder is probably using an older version of the servlet API. setAttribute is available since version 2.2. It replaced the older method called putValue().


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
Thanks for your message Bosun.
You are right. JBuilder3 was using the JSDK old version when i deleted it and as already servlet.jar was in its liberary, it started to compile.
But now as i have deleted this JSDK old liberary and using servlet.jar, it is not running its own ServletServer.java file and not running its own server.
Any suggestion so that i can work with JBuilder's own server.
There might be a solution that i should to download a JSDK new version and put it in its liberary, will this work. Please suggest.
Kind regards
Rashid Ali
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servletContext. setAttribute("", hashMap ) - Not compiling
 
Similar Threads
Error 404
Servlet class file
Warning : Compiling code with JDK1.6
2 Synchronization blocks with same object
getServletContext() error