Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class servlet extends HttpServlet {
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- request.getRequestDispatcher("/test.jsp").forward(request,response);
- }
- }
- <%@ page language="java" contentType="text/html; charset=windows-1255" pageEncoding="windows-1255"%>
- <!DOCTYPE html>
- <html>
- <head>
- <script src="test.js"></script>
- </head>
- <body>
- <% String param = "foo";%>
- </body>
- </html>
- var param_js_context = '<%=param%>';
- alert(param_js_context);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement