Results 1 to 2 of 2
  1. #1
    playwin2 is offline Member
    Join Date
    Aug 2008
    Posts
    58
    Rep Power
    0

    Default [SOLVED] JSTL equiv of this scriplet?

    Hello,
    I'm trying to convert following scriplet to JSTL
    Java Code:
    <%@ page import="org.apache.tomcat.util.buf.Base64" %>
    <%
    	String pass = request.getHeader("authorization");
    	pass = pass.substring(6);
    	pass = Base64.base64Decode(pass);
    	pass = pass.substring(pass.indexOf(":") + 1);
    %>
    	<h3>Info using Scriplet</h3>
    	You are : <b><%=request.getRemoteUser()%></b><br>
    	Password : <b><%=pass%></b><br>
    So far I did following :
    Java Code:
    	<h3>Info using JSTL</h3>
    	You are : <b>${pageContext.request.remoteUser}</b><br>
    	Password : <b>???</b><br>
    I'm stuck on the last two line... that is how should I call Base64.base64Decode(pass); in JSTL.....

    thanks for any help...

    Q#2. btw is it right that if one using BASIC AUTH then there is no way to log off user except closing the browser window?

  2. #2
    playwin2 is offline Member
    Join Date
    Aug 2008
    Posts
    58
    Rep Power
    0

    Default

    Hello,
    It seems I need to use custom action to call base64Decode functions in EL. :)
    Solved, thanks.

Similar Threads

  1. jstl tag <if>
    By subha in forum Advanced Java
    Replies: 1
    Last Post: 04-02-2009, 09:07 PM
  2. JSTL problem
    By mihir66 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-05-2009, 02:28 PM
  3. problem with scriplet code in jsp
    By rakesh_n_mehta in forum Advanced Java
    Replies: 1
    Last Post: 02-10-2009, 01:03 PM
  4. jstl in jsp
    By nagaprasanna in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-18-2008, 08:18 AM
  5. scriplet in javascript function in jsp page
    By Renjini in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 05-21-2008, 01:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •