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
Post a Comment