jsp 1 « Include « JSP-Servlet Q&A





1. doubt in JSP:Include    stackoverflow.com

Hi All:
I have added a code which will include child jsp using jsp:include. The problem i am facing is that the code present in child code is not executing. Below ...

2. Enchanced jsp:include implementation    stackoverflow.com

One of the things that has always bothered me about <jsp:include..> is that it's not possible to pass non-String values into the included page as distinct inputs to the page. For ...

3. how to include activity indicator to existing code    stackoverflow.com

code..........function exceluser() { if(drop_list.eid.value=="") { alert("Enter Eid"); drop_list.eid.focus(); return false; } var eid=document.drop_list.eid.value; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); ...

4. jsp include is not working from subdirectories    stackoverflow.com

I am not able to include a jsp file from a subdirectory. I have to include a file from include subfolder to a file in the test folder. I tried this code

<%@ ...

5. JSP duplicate if included multiple time    stackoverflow.com

let say i have this global.jsp that include a database configuration and connection. I know this is not the best way to do this, and I didn't allow to use anything else ...

6.     bytes.com

I have a xyz.jsp page has a submit button This page is included in another jsp file by tag. when i click that button the whole main page get ...

7. Advice On Including Country Codes    coderanch.com

I am working on a JSP form that contains 5 drop down list boxes. Two of these contain country codes, which are of course very long.This page takes a very long time to load as a result and I was wondering if anyone had suggestions on how I might make it load faster. The form option selections that I have mentioned ...

8. Including serverpage which on other port !!!    coderanch.com

Hi, I have a problem calling a serverpage from other server. The JSP Code : File name : jsp1.jsp : The above JSP file "jsp1.jsp" is in Weblogic Commerce Server and is called with address : "http://content:7501/jsp1.jsp" If I am replacing the above link in the "jsp1.jsp" with the one in the same port as the "jsp1.jsp", it ...

9. JSP include    coderanch.com

Hello evry one Iam having a problem ..that when I insert a record using a jsp form Iam generating a uniwue number using oracle sequence... after submitting i have to show him that u r unique no is this ..so I am taking user to a jsp which is selecting from the database Unique no associated with his data.. Iam using ...





11. jsp:include in a for loop    coderanch.com

i am trying the following code : <% for(int i=0;i <% } %> Here i want to know that will the above code run successfully. What I want the jsp to do is run through the array of file names and include them in the response page. If this code cannot do the trick than ...

12. Newbie wrestles with scope and includes    coderanch.com

the problem that I can't seem to solve at the moment is passing a variable to includes that are dynamically compiled at runtime. the main file is index.jsp the example include is 03.jsp (one in a series of about 50 includes, all identified by number and all having the same template as this one). the problem I'm having is at lines ...

13. jsp include    coderanch.com

14. JSP include    coderanch.com

Hi: I've a jsp file (india.jsp) which displays the SVG content perfectly with svg browser plugin installed. Now when I'm trying to include this jsp (india.jsp) from another jsp which displays simple html (test.jsp) then the included jsp is not working. Could u pls. explain me the reason. The code for both of the jsp's are given. Regards Reeti Saha test.jsp ...

15. @ include .....    coderanch.com

16. INCLUDE (Any one know how to do it ???)    coderanch.com

OK I'll quit being smart. The includes for a JSP page are limited to their context which means the WebApp you are in. However, nothing prevents you from writing a component which makes a URLConnection to the other server, reads in the results, does any intermediate processing you may need and writes the results out to your response object. The process ...





17. should I use "#include" or "jsp:include" ?    coderanch.com

I need to include a header file in my jsp file. I want to make sure that this header file's content can be changed at any time and my jsp page should automatically load the up-to-date version without need to do anything (like restart server, remove .class file, etc). Should <#include file = ""> or suit this ...

18. Logical includes    coderanch.com

Hi, Im not sure this will work or not, but u can try it. In the m.jsp, u can put an if condition to check which file is it being called in by and the accordingly disable the link in m.jsp. u can use request.getRequestURI() to get the whole path of the file called and request.getContextPath() to get the folder where ...

19. JSP include    coderanch.com

20. jsp:include not working on iP6    coderanch.com

Hi, I have a JSP page(page1.jsp) that uses the jsp:include tag to include another JSP page(page2.jsp) in its body. The problem I am facing is that when I access page1.jsp without initializing page2.jsp first, the JSP engine throws an error saying include call failed. Here's the corresponding entry in error log :- [26/Sep/2002:04:25:16] warning (12699): RequestDispatcher: include call failed [26/Sep/2002:04:25:16] failure ...

21. jsp include    coderanch.com

22. jsp:include    coderanch.com

23. Java code in jsp:include    coderanch.com

Hi, I'm having a problem putting scriptlets into an include file. The file and the page that icludes it load fine when it's just HTML, but as soon as I add a scriptlet anywhere, the page loads up to the point of the jsp:include tag and stops. It doesn't even load the included file up to the point of the scriptlet. ...

24. Calling include() within a JSP    coderanch.com

That's exactly what does. But there's no reason that you should not be able to call the include method within a scriptlet (but why do that when the tag exists to do it for you?) What part of using is giving you problems? hth, bear [ January 18, 2003: Message edited by: Bear Bibeault ]

25. JSP Includes    coderanch.com

I have a JSP 1 which includes JSP 2 using the following tags <%@include file="file2.jsp" %> There are some local variables in JSP1 which i am trying to access after the jsp 2 inclusion but getting different values when multiple users login Please can someone throw light on why this is happening ? I think you will have to show us ...

26. What is the differences between 2 includes of JSP?    coderanch.com

To throw some extra light. Both Static (<%@ include file="filePath"%> ) and dynamic include are there for code reusability. Static Include includes pages at translation time and dynamic Include includes pages at run time. Dynamic Include is lot more flexible than the Static at some extra performance cost, as the pages are included at runtime. For example when you are ...

27. jsp:include    coderanch.com

28. Please help: jsp include    coderanch.com

29. jsp:include not working    coderanch.com

30. Small doubt with include    coderanch.com

31. jsp include    coderanch.com


Sun Certified Programmer for Java 2 Platform (SCJP)
Sun Certified Developer for Java 2 Platform (SCJD)
Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)
Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)
Sun Certified Enterprise Architect for J2EE (SCEA)
IBM Certified Enterprise Developer, WebSphere Studio V5.0

32. changes in included jsp does not get displyed.    coderanch.com

There are 2 methods to include a page in your jsp 1 - Using @include directive <%@include page="/somepage.jsp"%> This is basically a compile time inclusion 2- Using jsp include tag This is run time inclusion I think u are using the 1st one thats why you are facing problem try to include using 2nd method. It will solve your ...

33. JSP:INCLUDE Issue    coderanch.com

Hello, I am calling main.jsp from a html page. This main.jsp consists of few include files e.g. as below: ************************************************************* html content ... <%@ file="x.jsp" %> html content ... <%@ file="y.jsp" %> html content ... html content ... <%@ file="z.jsp" %> html content ... ************************************************************* Where the problem is occuring due to ...

34. jsp include    coderanch.com

This is something that should be simple but it just won't work for some reason. All I get is a blank page. This is the whole document. The page I'm trying to include does exist. It just won't display it. ...

35. including a stand-alone class    coderanch.com

36. include differences    coderanch.com

38. @include v/s jsp:include    coderanch.com

Jeanne is correct. The advantage to using the page directive is that the import only get's done at compile time (think of it as pasting the two source files together before compiling). Since it's only done once, it's more efficient for lightweight imports. One of the down sides is that everything always gets imported, even it it's not used. Example: <% ...

40. jsp:includes    coderanch.com

41. How do I access a value in an include from a parent jsp    coderanch.com

I had to go digging, but I knew this sounded familiar, turns out I've done this sort of thing before. I had a "header.jsp" that was included at the top of each of my JSPs, and it required that two variables of type String, named "category" and "action" had been declared in the calling page. It worked for me, and being ...

42. jsp:include    coderanch.com

43. javascript include issue    coderanch.com

44. setting focus to included element    coderanch.com

45. JSP include    coderanch.com

46. including jsp of other application    coderanch.com

47. include Vs jsp include    coderanch.com

48. JSP include    coderanch.com

49. Jsp include    coderanch.com

50. jsp:include not working    coderanch.com

52. jsp: include not working...    coderanch.com

Hi I have the following jsp files... 1. cpanel.jsp 2. adminmenubar.jsp 3. usermenubar.jsp 3. failed.jsp I have a bean stored in a session scoped variable called userLoginFormBean. now from the cpanel.jsp, I try to include adminmenubar.jsp or usermenubar.jsp

the above workes... now inside adminmenubar.jsp, I have the following ...

53. Include Jsp in Jsp    coderanch.com

54. include duplicate issue    coderanch.com

General question about how <@include ... %> and work. if say for example I had a header defined as

TEXT

and then in my main page [@inclue or jsp:include]

some body text here

won't that duplicate the html? since, in the case of @include its akin to a C MACRO or a straight up copy-and-paste? is ...

55. A way around include's being position-sensative?    coderanch.com

Is there anyway around <@include or jsp:include's position sensativity? I want to change the content dynamically based on what a user clicks on the page and would like to encapsulate the new content in jspf files. so basically there's a big javascript if/else block run when the user does something, contained up in the area. but @include and jsp:include just ...

56. Getting include to work    coderanch.com

I am hoping to get an include to work for my internal web site. I am going to place the html that is common to all pages in a header and footer, which is included on all web pages. I am making them jsp so that I can enable them (with todays date for example). However, I am having trouble getting ...

57. How refer to classes in included JSP?    coderanch.com

58. what are the total ways to include?    coderanch.com

60. Strange behaviour of jsp:include    coderanch.com

61. Allow Only include    coderanch.com

62. Construcing a JSP via JSP:include    coderanch.com

63. %@ include and Javascript    coderanch.com

64. jsp:include    coderanch.com

i have included a jsp using jsp:include. and i have added a image in the including file. In the script of including file i am submitting the form of the included jsp's. this is my idea, not yet tried, can i do it this way. Any solutions to my problem please. I have image in the including jsp and when i ...

65. jsp:include    coderanch.com

66. jsp:include    coderanch.com

68. jsp:include inside c:forEach    coderanch.com

I removed the bolding from your post -- it was giving me a headache and made the post hard to read. I'd advise against the overuse of bold in future posts. You might try specifying flush on the include, but why are you doing an include for just an image? And, I'd suggest exploring the use of tag files in place ...

69. using jsp:include    coderanch.com

70. JSP Include    coderanch.com

71. jsp:include and %@ include    coderanch.com

73. Include in jsps    coderanch.com

Hello all In my project I have to include an SSI in a jsp. To complicate things, the name of the SSI has to be dynamically choosen instead of being hard coded or fixed ones. Can any one suggest a way for this. (ie) the existing code is <%@ include file= "../../xyz.ssi"%> instead of that i want it to be dynamically ...

74. Where to include Serclet class in Jsp?    coderanch.com

75. How to use the include() command in JSP    coderanch.com

76. JSP Include    coderanch.com

Hello friends, There are two ways to 'include' a page in jSP, i.e: a) <%@ include file="top.jsp" %> b) Can someone guide me the actual difference between the two.(I understand it is to do with the Scripting variables). I would really appreciate an answer with some example . Thanks, Milan

77. jsp:include???    coderanch.com

78. jsp:include---please help    coderanch.com

I have been beating my chest trying to fix this in vain. Please help! Here is my problem. In my jsp file, I have a jsp (under webdev\jsp) include: Here "Counter" is a servlet which will output a number. But the above jsp:include doesn't seem to output anything, not even an error message. I tried to use ...

80. jsp includes and WAS    coderanch.com

81. can I do loop inside jsp:include    coderanch.com

Hello. I have file2.jsp can accepts parameters from file1.jsp But, the problem is param2's values have more than 1 values. The first idea I can think it to make the loop. But, can I do the loop inside the ? How can I approach this? Thanks in advance. --file1.jsp , ...

82. including jsps from another web app    coderanch.com

83. How to include word doc in jsp    coderanch.com

84. difference between SSI and JSP include    coderanch.com

86. JSP INCLUDE    coderanch.com

Thanks for your response. The html files display files fine when I open them using eg javascript window.open(...), it's just when they are viewed via jsp include that I have the problem. The html files are generated by MS Word so the embedded image is specified like " ". I was just wondering if there is any way to ...

87. including jsp within jsp    coderanch.com

89. jsp:include    coderanch.com

90. jsp:include and @include    coderanch.com

91. Time interval for ..?    coderanch.com

92. Include code in JSP    coderanch.com

93.  Namespace    coderanch.com

95. What is the impact of changing the @include to in our j2ee application    coderanch.com

Hi, Yes you read it right. If your page not contains any dynamic content then it is better to use <%@ include file="copyleft.html" %> include directive. But if your include page contains dynamic data then better to use Standard action basically use to include the page response at run time so it takes time to compile .... ...

96. Jsp:include is not working    coderanch.com

97. jsp:include    coderanch.com

Hello, I want to include an servlet in an JSP. The JSP code is <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> Dashboard Report

and my servlet code is : public class MyImageLoad extends javax.servlet.http.HttpServlet implements SingleThreadModel{ static final long ...

98. <%@ include - not including everything    coderanch.com

99. Is it possible to pass an object into a JSP using ?    coderanch.com

I have three JSPs - HardwareAsset, SoftwareAsset, ServiceAgreement. Each JSP needs a section displaying the name and contact details of the author. So I have created another JSP - authorDetails - and I use this in each of the three main JSPs by using . The name and contact details of the author is stored in a bean called User. How ...

100. JSP Documents: how do you include java.util?    coderanch.com

Hey thanks for your reply, well the thing is this is what we are learning in a course at university so that's why am trying to figure it out. I took a simple jsp: <%@ page import="java.util.*,java.text.*" %> .... and I am trying to convert it to a jsp document.Is there a way to do that? I ...