This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Problem running jsp on Oracle  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone help me out.
When i run my application on Oracle8i/9i(under Linux) the ERROR message appear for
any jsp files that contain the following lines:
<% String path = "mypath"; %>
<% request.setAttribute("PATH", path); %>

----------------error message-----------------
Request URI:/testproject/www/index.jsp
Exception:
oracle.jsp.provider.JspCompileException:
Errors compiling:c:\oracle\ora81
\apache\apache\htdocs\_pages\_testproject\_www\_index.java
c:\oracle\ora81
\apache\apache\htdocs\_pages\_testproject\_www\_index.java:54:
Method setAttribute(java.lang.String, java.lang.String) not
found in interface javax.servlet.http.HttpServletRequest.
request.setAttribute("PATH", path);
^
1 error
------------------------------------------
All this files run on JRun*.*, JBoss,
Tomcat*.*, ... well.
Thank in advance.
------------------
Alex J.Grig
[This message has been edited by Alex Grig (edited December 16, 2001).]
 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that your server does not follow servlet 2.2 spec
------------------
Shubhrajit
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alex,
Your problem was that your trying to do the wrong thing.
It is session.setAttribute(String name,Object o);
and not request.setAttribute();
In fact request object does that have any setAttribute() method associated with it.
 
Alex Grig
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi NELL,
you'd better check it one time more.
setAttribute(string name, Object o) IS method of request.

Originally posted by NEEL:
It is session.setAttribute(String name,Object o);
and not request.setAttribute();
In fact request object does that have any setAttribute() method associated with it.

 
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
get/setAttribute() is available to both the request and the session. The servletContext inerface also has it's own get/setAttribute. Which one you use depends on what you are trying to accomplish.
 
What are your superhero powers? Go ahead and try them on this tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!