Click to See Complete Forum and Search --> : probably really basic and stupid question


yardleybates
01-13-2004, 03:02 PM
I am familar with asp pages using VBScript within the <% %> delimiters.

I have to work on a jsp page and I can't really tell what is being used between the <% %> delimiters. The normal javascript client side stuff works as I would completely expect.

My primary question is how do I write to the browser page from this script area. I see reference to response.setHeader see example below

response.setHeader( "Content-Type", "text/html");
response.setHeader( "Pragma", "no-cache" );
response.setHeader( "Cache-Control", "no-cache" );
response.setHeader( "Expires", "0" );

but response.write generates an error ....

Any help would be greatly appreciated.

Khalid Ali
01-13-2004, 05:03 PM
what is the error that you get using response.write()

yardleybates
01-14-2004, 09:05 AM
Compilation of 'C:\Interchange\WebAppServer\wlserver6.1\config\Interchange\classes\jsp_servlet\__texttalkstart.java ' failed:
--------------------------------------------------------------------------------
C:\Interchange\WebAppServer\wlserver6.1\config\Interchange\classes\jsp_servlet\__texttalkstart.java: 125: cannot resolve symbol
probably occurred due to an error in /TextTalkStart.jsp line 61:
response.write("testing");


--------------------------------------------------------------------------------
Full compiler error(s):
C:\Interchange\WebAppServer\wlserver6.1\config\Interchange\classes\jsp_servlet\__texttalkstart.java: 125: cannot resolve symbol
symbol : method write (java.lang.String)
location: interface javax.servlet.http.HttpServletResponse
response.write("testing"); //[ /TextTalkStart.jsp; Line: 61]
^
1 error

yardleybates
01-14-2004, 10:29 AM
What I really need to do is retrieve the value from a session variable and display the contents as options in a dropdown.