Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public class servlet extends HttpServlet {
  2.  
  3. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  4.  
  5. request.getRequestDispatcher("/test.jsp").forward(request,response);
  6. }
  7. }
  8.  
  9. <%@ page language="java" contentType="text/html; charset=windows-1255" pageEncoding="windows-1255"%>
  10. <!DOCTYPE html>
  11. <html>
  12. <head>
  13. <script src="test.js"></script>
  14. </head>
  15. <body>
  16. <% String param = "foo";%>
  17. </body>
  18. </html>
  19.  
  20. var param_js_context = '<%=param%>';
  21. alert(param_js_context);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement