To display an html page that contains frames, using servelt
Hi all
i am using a servlet which has to display a html page that contains frames.
I would like to know whether it is possible to display a frame using servlets.
If yes please tell me the how to do it?
Thanks,
Sudheer.
Thanks Seth.
I just tried that, but when I run it in preview mode (by simply hitting F12), it gives me an error because it can't find the file in the temporary preview folder it creates (ie:
C:\Users\Tom\AppData\Local\Temp\CP2840464090993Session\CPTrustFolder2840464091009\Captivat ePreviewLoader\
I'm hoping to find a place to put it so that it works when running F12 and when running in regular 'published' mode
I was thinking I could put it in the 'C:\Program Files\Adobe\Adobe Captivate 6 (32 Bit)\Templates\Publish' folder, but when I do that, it doesn't seem to gete copied to the .\CaptivatePreviewLoader folder when running F12
Similar Messages
-
Problem in downloading an html page that contains images
Hi,
This is surekha
I am facing a problem in downloading an html page that contains images
The file is downloading , but when I access the the downloaded file it displays X marks in the place where images r present....
How can i download a html file along the images it contains
Please help me ...........Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
http://forums.mozillazine.org/viewforum.php?f=25 <br />
You'll need to register and login to be able to post in that forum. -
Tabbed Panel using UpdateContent doesn't properly display spry .html page
Quick question. I have a tabbed panel widget with 12 tabs.
I'm using the UpdateContent snippet to pull in .html pages per tab.
when I have straight .html on the pages the content displays
without a problem.
What I need is for each tab to pull in an .html page that
contains a spry table that has an XML data set (think product page
with "next" and "prev" buttons to cycle through the content).
The .html page with the spry table works like a charm...on
it's own. however when I use it in conjunction with the tabbed
panel all I see is the bracketed code (i.e. {imgURL} {productName}
{SKU}) rather than [photo] large T-shirt SKU:1111.
A while ago I did an accordion that had dynamic content per
generated panel -- this utilized the Spry.Data.NestedXMLDataSet
function. A bit of a similar idea although I'm not sure if this
would also work with the tabbed panel.
Any suggestions would be helpful and I can drop the code if
that would also help. Thanks!well, what I have is:
index page with tabbed panel
|
V
click tab
|
V
content from first option .html page loads. this content has
a dataset repeating table.
The main page already had the SpryData.js and also
UpdateContent, as follows:
<div id="TabbedPanels1" class="VTabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('one','siracusa.html');">Siracusa
Micro Crepe</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('two','peony_georgette.html');">Peony
Printed Silk Georgette</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('three','wool_pucker.html');">Wool
Pucker</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('four','textured_dot.html');">Textured
Dot</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('five','textured_cotton.html');">Textured
Cotton</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('six','crane.html');">Crane
Printed Four Ply Silk</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('seven','tencel_jersey.html');">Tencel
Jersey</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('eight','circular_wool.html');">Circular
Stitch Wool</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('nine','silk_burnout.html');">Silk
Burnout</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('ten','organza.html');">Floral
Silk Organza</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('eleven','micro_crepe.html');">Micro
Crepe</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"
id="one">Siracusa</div>
<div class="TabbedPanelsContent" id="two">Peony
Printed</div>
<div class="TabbedPanelsContent" id="three">Wool
Pucker</div>
<div class="TabbedPanelsContent" id="four">Textured
Dot</div>
<div class="TabbedPanelsContent" id="five">Textured
Cotton</div>
<div class="TabbedPanelsContent" id="six">Crane
Printed Four Ply Silk</div>
<div class="TabbedPanelsContent" id="seven">Tencel
Jersey</div>
<div class="TabbedPanelsContent" id="eight">Circular
Stitch Wool</div>
<div class="TabbedPanelsContent" id="nine">Silk
Burnout</div>
<div class="TabbedPanelsContent" id="ten">Floral Silk
Organza</div>
<div class="TabbedPanelsContent" id="eleven">Micro
Crepe</div>
</div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new
Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
Let's say you clicked on the Siracusa tab. This would call up
siracusa.html, which has
<script src="SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="SpryAssets/SpryData.js"
type="text/javascript"></script>
<link href="../../ed_style.css" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
<!--
var fall08 = new Spry.Data.XMLDataSet("fall_collection.xml",
"collection/outfits", { filterFunc: MyPagingFunc });
fall08.setColumnType("photoURL", "image");
fall08.setColumnType("lrgphoto", "image");
var pageOffset = 0;
var pageSize = 1;
var pageStop = pageOffset + pageSize;
//var dsfall08 = new
Spry.Data.XMLDataSet("fall_collection.xml", "collection/outfits", {
filterFunc: MyPagingFunc });
function MyPagingFunc(ds, row, rowNumber)
if (rowNumber < pageOffset || rowNumber >= pageStop)
return null;
return row;
function UpdatePage(offset)
var numRows = fall08.getUnfilteredData().length;
if (offset > (numRows - pageSize))
offset = numRows - pageSize;
if (offset < 0)
offset = 0;
pageOffset = offset;
pageStop = offset + pageSize;
// Re-apply our non-destructive filter on dsStates1:
fall08.filter(MyPagingFunc);
-->
</script>
Sircusa Micro Crepe
<div spry:region="fall08">
<table>
<tr spry:repeatchildren="fall08">
<td colspan="5 "><img
src="imx/{photoURL}"/></td>
</tr>
<tr spry:repeatchildren="fall08">
<td><a href="imx/{lrgphoto}"
target="_blank">enlarge</a></td>
<td>{SKU1}</td>
<td>{SKU2}</td>
<td>{SKU3}</td>
<td>{name}</td>
<td>{desc}</td>
</tr>
</table>
<input type="button" value="Prev"
onclick="UpdatePage(pageOffset - pageSize);" />
<input type="button" value="Next"
onclick="UpdatePage(pageOffset + pageSize);" />
</div>
siracusa.html works more than fine. pulls in the photo, link,
SKU and info without any problem.
When you're on the base page with the tabbed panel the only
thing that comes up are the bracketed info, i.e. {SKU} {SKU1}
{SKU2}.
What I need help with is actually having the pulled in data
table (in the various tabbed panel content areas) actually then
populate the repeat regions rather than just showing the
code... -
Displaying an html page from a byte array
I'm trying to display an html page that i receive from a byte[ ] but the navigator asks me to download it instead of displaying it.
exactly a better option here would be display that HTML content using a dedicated servlet/jsp.
checkout below example code snippet hope that might help
public void doPost(request,response)throws ServletException,IOException{
//fetch HTML bytes.
Byte buffer[] = Delegate.getBufferData();
ByteArrayInputStream in = new ByteArrayInputStream(buffer);
int contentSize = in.available();
response.setContentType("text/html");
response.setContentLength(contentSize);
BufferedOutputStream out = null;
try{
out = new BufferedOutputStream(response.getOutputStream());
while( contentSize-- > 0 )
out.write(in.read());
out.flush();
}catch(Exception exp){
exp.printStackTrace();
throw new Exception(exp.getMessage());
}finally{
try{
if(out != null)
out.close();
if(in != null)
in.close();
}catch(Exception ep){
ep.printStackTrace();
throw new Exception(ep.getMessage());
}finally{
out = null;
in = null;
}and respectively call the servlet.
Hope this might help :)
REGARDS,
RaHuL -
Displaying clickable html page in a JFrame
Hello again programmers,
i'm wondering how can i display a clickable html page in a JFrame using any Panel (JEditorPane,.....) can you show me the way plz?
BernardMakes a pretty crappy browser, but its OK for help-type functions.
HtmlViewFrame.java
import java.net.URL;
import java.io.File;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
*Primitive HTML browser window based on a HtmlViewPane.
public class HtmlViewFrame extends JFrame
private HtmlViewPane pane;
private JFrame frame;
*Creates a frame based on a file.
public HtmlViewFrame(File file) throws Exception
this(file.toURL());
*Creates a frame based on a URL.
public HtmlViewFrame(URL url) throws Exception
frame = this;
getContentPane().setLayout(new BorderLayout());
JPanel but_panel = new JPanel();
but_panel.setLayout(new FlowLayout(FlowLayout.LEFT));
JButton but_home = new JButton("home");
but_home.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
try
pane.home();
catch(Exception e)
JOptionPane.showMessageDialog(frame, "Error: " + e);
but_panel.add(but_home);
JButton but_back = new JButton("back");
but_back.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
try
pane.back();
catch(Exception e)
JOptionPane.showMessageDialog(frame, "Error: " + e);
but_panel.add(but_back);
getContentPane().add(but_panel, BorderLayout.NORTH);
pane = new HtmlViewPane(url);
JScrollPane jsp = new JScrollPane(pane);
getContentPane().add(jsp, BorderLayout.CENTER);
getContentPane().add(pane.getActionField(), BorderLayout.SOUTH);
*HTML viewer application.
*Uses java.lang.System.exit(int), so method should not be called from within a Java application.
*@param args String array; provide a URL or file path as args[0]
public static void main(String[] args)
if(args.length==0)
System.out.println("must provide File path or URL as argument");
System.exit(1);
Exception err = null;
try
File file = null;
try
file = new File(args[0]);
if(!file.exists()) file = null;
catch(Exception ex)
file = null;
err = ex;
URL url = null;
try
url = new URL(args[0]);
catch(Exception ex)
url = null;
err = ex;
HtmlViewFrame frame = null;
if(file!=null) frame = new HtmlViewFrame(file);
else if(url!=null) frame = new HtmlViewFrame(url);
else throw err;
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(600,400);
frame.show();
catch(Exception e)
err = e;
if(err!=null) System.out.println("ERROR: " + err);
HtmlViewPane.java
import java.net.*;
import java.io.*;
import java.util.Vector;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.html.*;
*A HTML panel based on JEditorPane.
*Suitable for rendering primitive HTML files such as help documentation.
public class HtmlViewPane extends JEditorPane
/**The maximum number of elements the object can hold in its history.*/
public static int MAX_HISTORY_SIZE = 100;
private Vector history = new Vector();
private URL home;
private JTextField lab_lastact = new JTextField("loaded document");
*Creates a panel based on a file.
public HtmlViewPane(File file) throws Exception
this(file.toURL());
*Creates a panel based on a URL.
public HtmlViewPane(URL url) throws Exception
home = url;
setEditable(false);
addHyperlinkListener(new HtmlViewPaneListener(this));
setPage(url);
lab_lastact.setEditable(false);
void addToHistory(HyperlinkEvent e)
lab_lastact.setText("ACTION: go here: " + e.getURL().toExternalForm());
if(history.size()>=MAX_HISTORY_SIZE) history.removeElementAt(0);
history.add(e);
*Causes the pane to move back to the last item in the history.
public void back() throws Exception
if(history.size()==0)
lab_lastact.setText("ACTION: exhausted history list (max size=" + MAX_HISTORY_SIZE + ")");
return;
HyperlinkEvent e = (HyperlinkEvent) history.lastElement();
history.removeElement(e);
processEvent(e, false);
lab_lastact.setText("ACTION: back to here: " + e.getURL().toExternalForm());
*Returns a JTextField that reports hyperlink, back and home actions to the user.
public JTextField getActionField()
return lab_lastact;
*Causes the browser pane to return to the initial page.
public void home() throws Exception
setPage(home);
lab_lastact.setText("ACTION: home to here: " + home.toExternalForm());
void processEvent(HyperlinkEvent e, boolean addtohistory)
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
if (e instanceof HTMLFrameHyperlinkEvent)
HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent) e;
HTMLDocument doc = (HTMLDocument) getDocument();
doc.processHTMLFrameHyperlinkEvent(evt);
else
try
setPage(e.getURL());
if(addtohistory) addToHistory(e);
catch (Throwable t)
t.printStackTrace();
class HtmlViewPaneListener implements HyperlinkListener
private HtmlViewPane pane;
HtmlViewPaneListener(HtmlViewPane pane)
this.pane = pane;
public void hyperlinkUpdate(HyperlinkEvent e)
pane.processEvent(e, true);
} -
I need to set the position of components on a page that contains a MenuBar,
I need to set the position of components on a page that contains a MenuBar, but MenuBar does not provide a getPreferred size method.
How can I get the MenuBar's size in AWT?
Thanks.A menubar is not a general component that is added to a frame like any another. It is the specific responsibility of the setMenuBar/setJMenuBar methods to deal with this.
-
I want to display a HTML file that is stored locally on my machine.
Hello,
I am having a problem with my paths (I believe). I have created a JEditorPane that reads in a HTLM page. If the page is form the web it works fine:
page_jep.setPage("http://www.google.com");However I want to display a HTML file that is stored locally on my machine.
I have tried the following but cant get it to find the stored page:
page_jep.setPage("file:///index.htm");
java.io.FileNotFoundException: \index.htm (The system cannot find the file specified)I have tried putting the index file in both the root directory ( C ) and also the same place as where the class files are.
Any help will be gratefully received,
Harold ClementsNope, I have tried it:
page_jep.setPage("file://c:\\index.htm");Gives me:
java.net.UnknownHostException: c -
Create page that contains buttons
I need to create page that contains many buttons each one is used for opening a specific page.
Can anybody help me to give the steps?Hi,
I think you need help for HTML DB.
- Go and create page (could be HTML)
- Then add region (form region)
- Create buttons. Every button has ability to redirect to Page in this Application or URL. Just choose any page in the application.
- On each step you can hit help to learn details.
- There is a function “Create Multiple Buttons”
Konstantin
[email protected] -
How to display static HTML pages in Oracle Forms 6i
I want to display static HTML page in oracle Forms ? Can any body help please ? Its very urgent. Many thanks in advance.
Suresh,
there exist a Java Bean in teh Forms 6i demos that shows a static HTMl example. Note that the HTML that could be shown is somewhat basic, but it will give you an impression how it can work. The demos are at otn.oracle.com/products/forms --> samples --> 6i demos
Frank -
How to display the HTML pages in RRC/RQM dashboard using OpenSocial gadget
Hi,
I have a requirement as below:
1. I have couple of HTML pages which are hosted in the sharepoint site and I would like to display the HTML pages
2. I would like to have an OpenSocial gadget in the RRC/RQM dashboard that will display the HTML pages which are hosted in my sharepoint site.
Could you please suggest the best approach to create an OpenSocial gadget in the IBM's RRC/RQM dashboard whcih will display html contents of another URL ?
Thanks.
Knowledge is power.Hi Manoj,
As I understand, you would like to display SharePoint page in another platform.
Since the you are involving third party platform, you might still need to contact their support engineer about how to render other pages.
From SharePoint side, by default, SharePoint won't let end user to display site page to other platform, you could add "<WebPartPages:AllowFraming runat="server"/>" in master page or single page layout. So that SharePoint ASP.Net
page could be displayed on other platform.
Here I'm talking about ASP.Net page, since HTML page in SharePoint cannot be displayed in browser as I tested, it will be downloaded directly. So I'd suggest you use ASP.Net page as workaround.
https://social.msdn.microsoft.com/Forums/office/en-US/c8755a6b-f33a-43ed-97d9-8f03c336aa1d/how-to-display-sharepoint-url-in-iframe-in-aspnet-page?forum=sharepointdevelopment
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
i have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code? thank you!
i inherited the website. It’s for a non-profit and is not very
sophisticated, and neither am I in webdesign. It currently has multiple
pages that are identical except for that body section, so whenever i change
the navigation (in the sidebar) I have to update every html page. I want
to have one basic page, and just call in the different body content based
on the link the user selects from the nav bar. How can i do that using a
script? i am using Dreamweaver.
~ in love and light ~
Jeannie
On Sat, Feb 7, 2015 at 4:07 AM, Ben Pleysier <[email protected]> -
How to open an HTML page that is part of my project using Captivate 6
I'm looking to create an HTML page that will use some javascript to extract information from Captivate and then render it to the browser window as a report.
I see how you can Open a URL webpage from Captivate (by putting in an explicit address ie www.abc.com or http://www.abc.com/myReport.html)
but I'm curious what address I can use if the html file is in the SAME folder at the index.html that launches the captivate project (or perhaps one folder down).. I'm wanting to do this so it works whether I've published the project to a webserver or not.
I was thinking I could use a relative reference (ie something like .\myReport.html), but I haven't had any luck thus farThanks Seth.
I just tried that, but when I run it in preview mode (by simply hitting F12), it gives me an error because it can't find the file in the temporary preview folder it creates (ie:
C:\Users\Tom\AppData\Local\Temp\CP2840464090993Session\CPTrustFolder2840464091009\Captivat ePreviewLoader\
I'm hoping to find a place to put it so that it works when running F12 and when running in regular 'published' mode
I was thinking I could put it in the 'C:\Program Files\Adobe\Adobe Captivate 6 (32 Bit)\Templates\Publish' folder, but when I do that, it doesn't seem to gete copied to the .\CaptivatePreviewLoader folder when running F12 -
How can I display the HTML page from servlet which is called by an applet
How can I display the HTML page from servlet which is called by an
applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
I am calling my struts action class from the applet. I want to show the response in the same browser.
Code samples will be appreciated.hi
I got one way for this .
call a javascript in showDocument() to submit the form -
How do You set -noverify in an HTML page that calls an applet
I have an applet which runs fine from inside JBuilder when I specify a
-noverify switch in the debugger. (java -noverify myapplet.class)
Without this switch, I get a verification exception.
So I need to specify the -noverify switch from inside a webpage so that when the client runs it, he does not get the same exception.
The question is how do you pass -noverify to JVM from an HTML page that uses <applet> tag and javascript?
ThanksOdd, because I work on an applet that gets built with 1.4. We have 30,000+ clients who use it every day, and I'm sure we don't tell them about setting -noverify switches in their plug-in control panel, and we don't (cuz we can't) set it in the applet (object/embed, actually) tag.
Of course, I suppose it could be a backwards compatibility issue going from compiling in newer version than it's run in. -
I am about to view an encrypted page that contains some unencrypted information and there is an Ok button should I click on the Ok button.
Have you tried the following?
I'm assuming there is nothing written on the second page.
Scroll down to the second page and write something.
Highlight everything on that page Usually this will show in blue including the invisibles.
Make sure you attempt to highlight everything by selecting the whole page.
Press Backspace/delete until all of that page is clear.
Continue until your cursor lands on your first page.
By then the offending second blank page should have gone.
I tried this procedure a few minutes ago and it worked. (Pages 5.5.2)
Regards,
Tallberg
Maybe you are looking for
-
Loading data one page at a time
I have 200 records to load in a java server page. I felt loading all these records will affect performance. So I wanted to load 15 records on each pass. However, on the second pass I obtained a nullpointerException(ResultSet -JDBC). Any suggestion on
-
Setting up .mac addresses in iWeb sites
My .mac site (www.chaibabyusa.com) has been setup and published on iWeb '08 in .Mac. I would like to have email addresses setup ([email protected]) so that an email could be forwarded to an external site (@gail.com, for example). Thank you in advance
-
Measuring with both channels of virtual bench simultaneously in labview, error 375903
Hi, I am trying to perform two measurements simultanously using both channels of the Virtual Bench's analog input. I have selected MSO channel 1 and 2 for the measurements yet I am getting error 375903 returned evewry time saying the resource request
-
Problème Image Noir / Black Screen
Bonsoir, j'essaye la version d'essai de photoshop CC, j'ai plus l'utiliser deux, trois fois, mais là, quand j'ouvre une image, celle-ci devient noir alors que la miniature affiche bien la photo normale. J'ai déjà essayé d'aller dans Edition / Préfére
-
"UNCAUGHT_EXCEPTION" "CX_SDB_ORA_PROGRAM_ERROR
Hi All, I am getting dump "UNCAUGHT_EXCEPTION" "CX_SDB_ORA_PROGRAM_ERROR" while I load data to an ODS object. Can you please help me out. Regards Germán Lopez.