Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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.
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic