Applet:how to display a html-page generated by servlet?
hi everybody,
I have an applet which posts data do a servlet and receives a response from the servlet (html-code). can anybody please tell me if there is a possibility to display this received html-page?
(I HAVE to use a post-request to the servler due to a lot of data to send...)
all my applet-servlet-communication is within a session with a jsessionid.
does anybody have a hint for me?
thanks a lot in advance,
frank
One possibility is to have the servlet create a new .html file on the server and output the HTML code to that file. Then the servlet can pass the name of the file back to the applet, and the applet can useshowDocument(new URL(yourUrlHere), "_blank"); to display the page.
Just a thought. Good luck!
- Sheepy
Similar Messages
-
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 -
How to display a HTML Page in Webdynpro (without IFrame)?
Hi everyone,
maybe this one is really simple. I have a RFC returning the URL to a HTML-Page in the backend. Which of the standard UI-Elements should I use to display that page in my Webdynpro?
My first guess was to use the IFrame. However, according to different sources this element is deprecated and buggy. So I'm hesitating.
Are there any other possibilities? Or is it ok to use IFrame nevertheless?
Many thanks,
Xiaopeng
Message was edited by: Xiaopeng Tanhi Ashutosh,
I took a look at the help document. It states that "_self" is no longer supported. And I should use exit plugs instead and specify the URL there.
But even that won't serve the purpose. I have other UI-elements (fields, tables) on the same screen where I want the page being embedded next to them as co-component. Using _SELF and clicking on the link would would remove all other components. -
How to display a HTML page using ABAP program.
Hi all,
I know that this is easy and possible too but I haven't worked on this kind yet. I need to display a screen/ABAP program like TCODE PPMDT, where an HTML page is to be displayed and on the click of the HTML links provided, I need to navigate to someother transaction codes.
Cheers,
SamHi,
See this sample code
REPORT ZTESTHTML .
DATA: ok_code LIKE sy-ucomm,
myurl(132).
data: custom_container type ref to cl_gui_custom_container,
myhtml type ref to CL_GUI_HTML_VIEWER,
repid like sy-repid.
DATA events TYPE cntl_simple_events.
DATA wa_events TYPE cntl_simple_event.
CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
CLASS-METHODS NC_Handler
FOR EVENT NAVIGATE_COMPLETE OF CL_GUI_HTML_VIEWER
IMPORTING URL.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD NC_Handler.
myurl = URL.
ENDMETHOD.
ENDCLASS.
start-of-selection.
set screen 100.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'BACK'.
CALL METHOD myhtml->go_back
EXCEPTIONS cntl_error = 1.
if sy-subrc ne 0.
endif.
WHEN 'FORW'.
CALL METHOD myhtml->go_forward
EXCEPTIONS cntl_error = 1.
if sy-subrc ne 0.
endif.
WHEN 'STOP'.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'REFR'.
CALL METHOD myhtml->SHOW_URL
EXPORTING
URL = myurl
IN_PLACE = 'X'
FRAME = ''
EXCEPTIONS
CNTL_ERROR = 1
CNHT_ERROR_NOT_ALLOWED = 2
CNHT_ERROR_PARAMETER = 3
DP_ERROR_GENERAL = 4.
WHEN 'OTHERS'.
CALL METHOD CL_GUI_CFW=>DISPATCH.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MENU'.
if myhtml is initial.
CREATE OBJECT custom_container
EXPORTING
CONTAINER_NAME = 'CONTAINER1'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
CREATE OBJECT myhtml
EXPORTING
PARENT = custom_container
EXCEPTIONS
CNTL_ERROR = 1
CNTL_INSTALL_ERROR = 2
DP_INSTALL_ERROR = 3
DP_ERROR = 4.
wa_events-eventid = CL_GUI_HTML_VIEWER=>M_ID_NAVIGATE_COMPLETE .
wa_events-appl_event = 'X'.
APPEND wa_events TO events.
CALL METHOD myhtml->set_registered_events( events = events ).
SET HANDLER lcl_event_receiver=>NC_Handler FOR myhtml.
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS cntl_system_error = 1
cntl_error = 2.
endif.
ENDMODULE. " STATUS_0100 OUTPUT
Svetlin -
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 to extract image from oracle database and display at html page
Could you help me how to make the image to display. i manage to extract the data but the data is in Blob so i need to convert it so make it display at html page.
Thanks for ur reply Mr.Rajasekhar
I tried as u said,
i tried without converting to sql date ,but still i din't get any results
java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
java.util.Date fromDate=dateFormat.parse(startDate);
java.util.Date tillDate=dateFormat.parse(endDate);
String query1="select MTName,Date,MTLineCount from linecountdetails where mtname='"+MTName+"' and Date >='"+fromDate+"' and Date <='"+tillDate+"' " ;
System.out.println(query1);
//From main method
databaseConnection("prasu","1/12/2005","31/12/2005");I got the output as
---------- java ----------
select MTName,Date,MTLineCount from linecountdetails where mtname='prasu' and Date >='Thu Dec 01 00:00:00 GMT+05:30 2005' and Date <='Sat Dec 31 00:00:00 GMT+05:30 2005'
java.lang.NullPointerException
null
null
java.lang.NullPointerException
Output completed (4 sec consumed) - Normal TerminationThanks
Prasanna.B -
How to show an html page using JEditorPane in applet.
I have never use jeditorpane with applet so i dont know how to show a html page.if you have some code or any example then please posted that.Thanks
public class MyApplet extends JApplet{
private JTextPane textPane = null;
public void init(){
HTMLEditorKit editorKit = new HTMLEditorKit();
HTMLDocument htmlDoc = (HTMLDocument)editorKit.createDefaultDocument();
textPane = new JTextPane();
textPane.setEditable(false);
textPane.setEditorKit(editorKit);
textPane.setContentType("text/html");
textPane.setDocument(htmlDoc);
Container c = getContentPane();
c.add(new JScrollPane(textPane), BorderLayout.CENTER);
c.add(buttonPanel, BorderLayout.SOUTH);
c.add(Box.createVerticalStrut(5), BorderLayout.NORTH);
c.add(Box.createHorizontalStrut(5), BorderLayout.EAST);
c.add(Box.createHorizontalStrut(5), BorderLayout.WEST);
public void setHtml(String html){
// you should check the textpane's document to detrmine if there
// is already text in there..if so, then clear the textpane text and then
// set the new html...Note: JTextPane only show basic Html ..
// not like a full blown browser
textPane.setTextt(html);
textPane.setCaretPosition(0);
} -
How to get the HTML page size displayed in JEditorPane
Hi All,
I'm using a JEditorPane object in order to view/display an HTML page. The nature fo my program is that it does not know the size of the page in advance, but only on runtime. I'd like to get the size of the HTML page in order to determine the frame size according to the size of the HTML page.
Is there a way to get the size of the HTML page from the JEditorPane?
Thanks.after displaying the page in your editor pane you can get the diamension for the page by calling
JComponent class method getSize();
actually your question is not so clear
use the JScroll pane then you don't need to worry about the size of the page. -
Referencing a "locally installed" Java applet from a server-based HTML page
How does one reference a "locally installed" Java applet from a server-based HTML page (i.e. via the applet, object, or embed tags)? I have seen references in documentation that this is possible, but I have not seen any examples. I have tried a few things, but nothing seems to be working.
Some background...
I'm working on a web site that aggregates Internet video. For many users, I would like the site to work "without" requiring Java to be installed (or any prompts, etc.). This version of the site allows users to stream videos directly over the Internet and does not require any sort of access to the local system.
However, in addition, I have a download manager that can be installed on the local system. Currently, it's a Windows-based "service" that is always running in the background, downloading files, etc. (with plans to later support other OSes).
My dilemma is trying to communicate between my web site running in the local browser (executing JavaScript code) and the download manager. I call this component the "gateway". I need the gateway to be able to do the following:
1) Pass user credentials from the web browser UI to the download manager (so it can communicate with my servers).
2) Check the status of downloaded videos
3) Launch a local media player (such as Windows Media, QuickTime, etc.) (or perhaps tell the download manager to launch the media player).
Under Windows XP, I have an ActiveX control that can do these things. It communicates with the download manager via reading/writing to a shared XML configuration file.
Unfortunately, under Vista and IE7 Protected Mode, ActiveX controls have become very restricted and my gateway no longer works. As such, I am looking at using Java for the gateway (also giving me the additional benefits of supporting additional browsers and OSes).
From my understanding, I believe I can created a "face-less" Java applet, whose methods can be called from JavaScript. Ideally, I'm thinking I could install the applet onto the local system at the same time the download manager is installed. This would give the applet the security permissions it needs to communicate with the download manager.
Thanks for any help and suggestions!Hi,
Put the .jar file and the .class file in the path mentioned in one of the aliases in the plsql.conf file like /images or create
a seperate directory and create an alias like /applets "path" in the plsql.conf file.
<html>
<body>
<applet code=com.chartapplet.chart.BarChartApplet
codebase=/applets/
archive=/applets/chart.jar width=300 height=200>
<param name=background value="white">
</body>
</html>
Hope this helps.
Thanks,
Sharmila -
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 -
ADF how to display a processing page when executing large queries
ADF how to display a processing page when executing large queries
The ADF application that I have written currently has the following structure:
DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.Hi Steve,
After a few attempts - yes I have a hit a few snags.
I'll send you a copy of the example application that I am working on but this is what I have done so far.
I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
DataPage --> DataAction (refresh Collection) -->DataPage
I have then added this code to the (refreshCollectionAction) DataAction
protected void invokeCustomMethod(DataActionContext ctx)
super.invokeCustomMethod(ctx);
HttpSession session = ctx.getHttpServletRequest().getSession();
Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
if (nominalSearch == null)
synchronized(this)
//create new instance of the thread
nominalSearch = new ns(ctx);
} //end of sychronized wrapper
session.setAttribute("nominalSearch", nominalSearch);
session.setAttribute("action", "nominalSearch");
nominalSearch.start();
System.err.println("started thread calling loading page");
ctx.setActionForward("loading.jsp");
else
if (nominalSearch.isAlive())
System.err.println("trying to call loading page");
ctx.setActionForward("loading.jsp");
else
System.err.println("trying to call results page");
ctx.setActionForward("success");
Created another class called ns.java:
package view;
import oracle.adf.controller.struts.actions.DataActionContext;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.model.generic.DCRowSetIteratorImpl;
public class ns extends Thread
private DataActionContext ctx;
public ns(DataActionContext ctx)
this.ctx = ctx;
public void run()
System.err.println("START");
DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
//b.executeQuery();
System.err.println("END");
and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
package view;
import javax.servlet.http.HttpSession;
import oracle.adf.controller.struts.actions.DataForwardAction;
import oracle.adf.controller.struts.actions.DataActionContext;
public class ProcessingAction extends DataForwardAction
protected void invokeCustomMethod(DataActionContext actionContext)
// TODO: Override this oracle.adf.controller.struts.actions.DataAction method
super.invokeCustomMethod(actionContext);
HttpSession session = actionContext.getHttpServletRequest().getSession();
String action = (String)session.getAttribute("action");
if (action.equalsIgnoreCase("nominalSearch"))
actionContext.setActionForward("refreshCollection.do");
I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
Thanks in advance for your help
David. -
Display external html page in (Collapsible Panel widget)
i everybody
is there a way to display external html page in (Collapsible Panel widget)
All the example a seen is with raw text in it
is the panel can display different object instead of simple text
At least a internal designed html page
ThanksThanks... surely a easy one for you
But its a great tool and its exatly what i want
even my js button works trough it
Thanks again -
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 -
Display external html page in a view
Hi,
following Problem,
I have a Viewcontainer with 2 columns ans one row. In the left cell I display a tree. OnSelect Event I'd like to display a html page in the right cell.
Example:
Searchengine
-> Google
-> Yahoo
-> ...
On Klick at google in the treeview I'd like to show http://www.google.de in tghe right cell - this means the tree should still display.
Is this possible - and has anyone an idea to do this?
thanks in advance
GregorHi
We strongly donot recommend usage of Iframe, because its support is depcrecated and will not be available for future versions.
For a short duration or for current version, use can Iframe only for static html links. Try using link to URl and display the htmls in external windows.
Check out this link
http://help.sap.com/saphelp_erp2005/helpdata/en/e9/7652a84fada444bd11ca73670ce7dc/frameset.htm
My advice is to change your functionality accordingly
If you have any specific requirements do let us know
Thanks
sathyanarayanan
Maybe you are looking for
-
How can I tell if my iPhone has been hacked?
First off, I have an iPhone 5s with the most recent software. Today, out of the blue, my phone started showing the cellular provider as 'Maritime' instead of AT&T. I Googled around and saw some sort of joint venture thing that AT&T has with providing
-
Will IOS version C2600 run on all 2600 variants
Is it possible to run C2600xxxxxxxxxxxxxxxxx.bin on any type of 2600 router provided there is enough space in flash to hold the image and there is enough DRAM to run it? That is to say is it possible for me to run a version of IOS I am running withou
-
Hi, Can I setup yum with the official Oracle Enterprise Linux repositories? If yes, what repo lines do i have to add to my yum.conf file? Regards Joao
-
Access problem in web application
Hi, I have one problem with bea weblogic server 7.0 i need to have access to a jsp in the WEB-INF repository and by default, weblogic doesn't give this access. What can i do? thx
-
CloudControl 12c: ORA-27370: job slave failed to launch a job of type EXEC
Hello , when trying to execute a scheduler program/scheduler job in CloudControl 12c I'm getting the error: ORA-27370: job slave failed to launch a job of type EXECUTABLE ORA-27300: OS system dependent operation:accessing extjob wrapper failed with s