| | |
javascript inserting between jsp
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
hi
i have a problem in running javascript code between jsp page..
lets below is my jsp body .
in the above code there is no problem in running javascipt .. it gives hi alert easily but.. for below
but if above i include any jsp forward page tag or sendRedirect function then this javascript does'nt run..
please help me
i m stuck with this problem..
thnx in advance
i have a problem in running javascript code between jsp page..
lets below is my jsp body .
jsp Syntax (Toggle Plain Text)
<body> <script language="javascript" > alert("hi"); </script> <h1>hello</hello> <% System.out.println("hello"); %> </body>
in the above code there is no problem in running javascipt .. it gives hi alert easily but.. for below
<body>
<script language="javascript" >
alert("hi");
</script>
<h1>hello</hello>
<% System.out.println("hello"); %>
<jsp:forward page="page1.jsp" />
</body>but if above i include any jsp forward page tag or sendRedirect function then this javascript does'nt run..
please help me
i m stuck with this problem..
thnx in advance
Last edited by peter_budo; Oct 22nd, 2009 at 1:02 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
0
#2 Oct 24th, 2009
Do not use forward action. As we know the action forward sends the dynamic content of html of the page1.jsp to web-browser.
Use include action.
Use include action.
JSP Syntax (Toggle Plain Text)
<body> <script language="javascript" > alert("hi"); </script> <h1>hello</hello> <% System.out.println("hello"); %> <jsp:include page="page1.jsp" /> </body>
Last edited by adatapost; Oct 24th, 2009 at 12:55 am.
![]() |
Similar Threads
- How to embed JavaScript code into JSP... (JSP)
- My JSP does not read the javascript (JSP)
- JSP sessions in javascript (JSP)
- How to pass value from jsp to javascript (JavaScript / DHTML / AJAX)
- javascript &JSP (JSP)
- javascript variable in jsp session (JSP)
- How to store javascript variable in jsp session (JSP)
Other Threads in the JSP Forum
- Previous Thread: JSP: search string for bad characters.
- Next Thread: java servlets help???
| Thread Tools | Search this Thread |
Tag cloud for javascript, jsp
.net adobereader ajax ajaxcode ajaxhelp apache array asp asp.net automatically box c# cakephp cart close codeinjection codes combobox debugger dependent development dom dropdownlist editor epilepsy explorer ext external file firefox flash focus form frames frameworks getselection glassfish google griefers gwt gxt hackers hiddenvalue highlightedword html iframe integer internet java javascript jquery jsf jsfile jsp logfiles masterpage math mvcmodel2 mysql netbeans network news oracle passing paypal php problem project redirect regex registrationform response runtime scale scriptlets scroll security select servlet session shopping size sql ssl synchronous tables textbox tomcat treeview tutorial unicode validation variables vulnerability w3c web window windowsxp wysiwyg zeroday







