code_junkie

Is it possible to get calling page name inside a jsp 2.0 custom tag?

Nov 12th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <form action="${pageContext.request.requestURI}">
  2.  
  3. <form action="<%=request.requestURI%>">
  4.  
  5. <form action="<%=pageContext.request.requestURI%>">
  6.  
  7. public class YourTag extends TagSupport {
  8. public int doStartTag() throws JspException {
  9. HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
  10. String pathInfo = req.getPathInfo();
  11.  
  12. <form action="<%= pageContext.getRequest().getRequestURI() %>">
Add Comment
Please, Sign In to add comment