This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

how can i include a JSP in an HTML page?

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a index.html page. i cannot change its extension from .html to .jsp i need an application to run in background and this application is launched by this JSP. i want this JSP content to be a part of each page in my web application. hence i want to place it in a frame in index.html. how can i do it?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could create a mapping in your web.xml file that points the URL "/index.html" to either a servlet or to your JSP page.
 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but this will not solve the problem because when i will change the page from index.html to consequent pages, the JSP will not exist anymore. i want to include the JSP in a frame in an HTML page.is it possible?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use an iframe in each page.
 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am sorry, but this will also not solve the problem. i dont want that application JSP to reload with every page. it needs to be loaded only once throughout the session of the user.

i can not create a index.jsp with two frames. as i have said in the other thread of mine : HTML Frames and JSP! (https://coderanch.com/t/287429/JSP/java/HTML-Frames-JSP)

these are two interdependent problems. please give me solution. i am stuck up.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If index.html is a frame set, just create one frame for your JSP and another for main content window.

I'm not sure I understand what the question is.
Are you just asking how to build frames in a browser?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all you're looking for is help with Frames and setting the "target" attribute, this thread would be better off in the HTML/Javascript forum.
I'm sure the moderator will move it there soon.

Can you post the code to your page with the frameset element?
 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:
If index.html is a frame set, just create one frame for your JSP and another for main content window.

I'm not sure I understand what the question is.
Are you just asking how to build frames in a browser?



yes, this is just exact the solution, it just did not strike me. thanks a million.
 
Hot dog! An advertiser loves us THIS much:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!