GeeCON Prague 2014*
The moose likes JSP and the fly likes Problem running jsp on Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Problem running jsp on Oracle" Watch "Problem running jsp on Oracle" New topic
Author

Problem running jsp on Oracle

Alex Grig
Ranch Hand

Joined: Oct 19, 2001
Posts: 38
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).]


Alex J.Grig
Shubhrajit Chatterjee
Ranch Hand

Joined: Aug 23, 2001
Posts: 356
It seems that your server does not follow servlet 2.2 spec
------------------
Shubhrajit


Shubhrajit
NEEL
Greenhorn

Joined: Jan 09, 2002
Posts: 3
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.


My softwares dont have bugs, they just develop random features
Alex Grig
Ranch Hand

Joined: Oct 19, 2001
Posts: 38
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.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
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.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
 
subject: Problem running jsp on Oracle