JSP convert string to object -


as title said, want execute following code

<%   string res = "response.senderror ( httpservletresponse.sc_unauthorized,\"you don't have enough privileges\" );"; %> <%=res%> 

so when execute code need http 401 unauthorized error.

since in string format following string in browser instead of http 401 unauthorized error

response.senderror ( httpservletresponse.sc_unauthorized,"you don't have enough privileges" );

so how can convert string object can http 401 unauthorized error.

just use:

<% response.senderror(...); %> 

the <% ... %> delimiters execute code directly.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -