Creating HTML in servelet using binary HttpServletResponse.setContentType
I have a servlet creating dynamic gif images. It works great. Now I need to add some HTML down at the bottom. I currently have setContentType at "image/gif". How do I get the text/html to appear after the image? Currently the text output is ignored. I realize there are other methods to solve this issue, but I'm hoping for something that won't require a total overhaul of the servlets (though I recognize I may have no other choice).
Thanks in advance!
You can return an image, or you can return HTML. You can't change your mind halfway through. I don't think HTML supports embedded images, although I could be wrong about that. If you want to send a page that contains HTML plus your dynamic image, I think you need to send a page of HTML with a regular <IMG> tag whose SRC attribute refers to the original servlet, the one that sends the image only with content type image/gif. (So you have two servlets; one is your original GIF-maker, the other produces a small page that refers to the first.)
Similar Messages
-
How to use ora:processXSLT to create HTML with BR tags included?
I am using a .xsl to create HTML for use as part of a notification process. The issue is that if in the .xsl I include the
tag, when the transform engine runs to make the HTML it creates <br> tags with out the maching </br> tags. (in doing some reading this seems to be a feature of most XSLT engines) But the result is invalid XML, so when I attempt to assign the output to a variable the process faults and I get the following error:
XPath expression failed to execute.
Error while processing xpath expression, the expression is "ora:processXSLT("XML_PURCHASE_ORDER_to_HTML.xsl", bpws:getVariableData("inputVariable", "payload", "/ns1:XML_PURCHASE_ORDER"))", the reason is The XML data is invalid.
The XML data is invalid; the reason is "Error on line 100 of document : The element type "br" must be terminated by the matching end-tag "
". Nested exception: The element type "br" must be terminated by the matching end-tag "
Message was edited by:
mlutze
Message was edited by:
mlutze
Message was edited by:
mlutzeYou can probably set the output format in the stylesheet, like:
<xsl:output method="txt" indent="no" omit-xml-declaration="yes" />
if you really don't want to use xhtml. The result might have to be wraped in a cdata block in the bpel flow?
cheers
/Stig -
Can I use Photoshop Elements 13 to create HTML file?
Can I use Photoshop Elements 13 to create HTML file?
See Barbara's answer in your duplicated post: How can I save a Photoshop Elements 12 file as HTML?
No difference with PSE13. -
Using MUSE to create HTML email
I'd like to use MUSE to create HTML email. This requires embedding (or adding inline) the CSS file(s). Any suggestions as to how to accomplish this??
Hello Ben,
It is not possible to add inline styles/CSS within Muse. I would suggest you here to Export your webpages to HTML by clicking on File>Export to HTML and then make the changes manually in the HTML code using some HTML editor.
Hope this helps.
Regards,
Sachin -
Question:-
I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time or other portal and it does not work in iChat. Why Not ?
Answer:-
For a Name to work in iChat it has to be an Valid AIM screen Name.
Only Apple IDs from the @mac.com ending names registered here and the Mobileme (@Me.com ending) names are Valid with the AIM service as well as being Apple IDs
(I am still working on info about registering with iCloud at the moment but if this does give you an @Me.com email it may well be a valid AIM name as well)
NOTES:-
The @mac.com page works by linking an external (Non Apple) email with a @mac.com name.
This External Email cannot be one linked to an Existing Apple ID (you have to use a second email or register at AIM )
The options at AIM are to use your existing email or create new name and link the existing only for Password recovery
MobileMe (@me.com ending names) were valid Emails addresses, Apple IDs AND a Valid AIM Screen Name
@mac.com names look like emails but are only Apple IDs and iChat/AIM Valid Screen Names.
The AIM registration page seems to be pushing you to register [email protected] This is relatively new and I have not followed through the pages to find out if it a valid AIM email (Previously you could register a name without an @whatever.com suffix)
8:16 PM Friday; June 10, 2011
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb( 10.6.7)
Mac OS X (10.6.7),
"Limit the Logs to the Bits above Binary Images." No, SeriouslyQuestion:-
So I have my current [email protected] email in iChat as I thought as I had linked that to an Apple ID it was a Valid iChat Name. It keeps coming up with a UserName or Password Invalid message. What do I do next ?
Answer:-
Open iChat
Go to the Menu under the iChat name in the Menu Bar and then Preferences and then Accounts in the new window.
Commonly written as iChat > Preferences > Accounts as directions/actions to take.
If it displays with a Yellow running name in the list you have a choice.
Either register it at AIM (I would use a different password to the ISP Login) and then change the password only in iChat (It may take you to confirm any Confirmation email from AIM first) in iChat > Preferences > Accounts
Or you register a new Name at AIM (Or at @mac.com) and enter that (details below)
If you have a Blue Globe name (@mac.com) that will not Login the chances are that it the password that is the issue.
Apple lets you create longer passwords than can be used with the AIM Servers.
Change the Password at iForgot to no more than 16 characters.
Then change the password in iChat as details above.
Adding a new Account/Screen Name in iChat (that is valid with the AIM servers)
Open iChat if not launched.
Go to iChat Menu > Preferences > Accounts
Click the Add ( + ) Button at the bottom of the list.
Choose in the top item drop down either @Mac.com or AIM depending on what you registered
Add the name (with @mac.com the software will add the @mac.com bit)
Add in the password. (If you don't add it now iChat will ask you each time you open it)
Click Done.
The Buddy List should open (New Window)
The Accounts part of the Preferences should now have the new name and you should be looking at the details.
You can add something in the Description line which will then title the Buddy List (Useful when you have two or more names) and make it show up as that in the iChat Menu > Accounts and the Window Menu of iChat when logged in.
You can then highlight any other Account/Screen Name you don't want to use and use the Minus ( - ) Button to delete it.
8:39 PM Friday; June 10, 2011
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb( 10.6.7)
Mac OS X (10.6.7),
"Limit the Logs to the Bits above Binary Images." No, Seriously -
Create crystal report file using JAVA
Can someone tell me how to a Create crystal report file using JAVA Programming
I want a very simple examplePlease help me. It's urgent.[http://catb.org/~esr/faqs/smart-questions.html#urgent]
Be back in an hour or two... -
Creating a new document using XQuery
Hello everyone,
I wondered if there was a way to create a new document using XQuery. What I am trying to do is to run a query on XML file and try to print the results in HTML for viewing purpose.
The HTML is spitted out on DOS prompt. Instead I wanted to write that HTML to a file on disk. Is this possible with the XQuery tools provided by Oracle?
Thanks in advance for all the help
KFolks,
Kinda answering to my question. Just send the DOS output to some file. Pretty Simple huh!
Thankyou anyways
K -
How to create a simple app using the MVC approach?
Hello gurus i'm trying to learn the SAPUI5 and i'm trying to create a simple app using the MVC i created the app and trying to add a lable to the view but there is nothing appear when i run it the code for the HTML page
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->
<script>
sap.ui.localResources("mytestapp");
var view = sap.ui.view({id:"idshell1", viewName:"mytestapp.shell", type:sap.ui.core.mvc.ViewType.JS});
view.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
the code for the view
sap.ui.jsview("mytestapp.shell", {
/** Specifies the Controller belonging to this View.
* In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
* @memberOf mytestapp.shell
getControllerName : function() {
return "mytestapp.shell";
/** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
* Since the Controller is given to this method, its event handlers can be attached right away.
* @memberOf mytestapp.shell
createContent : function(oController) {
var oLabel = new sap.ui.commons.Label("l1");
oLabel.setText("Test label");
oLabel.placeAt("content");
i dont know what is wrong or if i should use a container to display my controls
any help will be appreciated
thanks in advanceHi,
Instead of oLabel.placeAt("content"); use return oLabel;
so it will as below,
createContent : function(oController) {
var oLabel = new sap.ui.commons.Label("l1");
oLabel.setText("Test label");
return oLable;
Regards,
Chandra -
Once I create a html5 animation using the 'Toolkit for CreateJS' in flash, how do I then insert it into a webpage via Dreamweaver:
This has been sending me round in circles for over a week - can anyone let me know how I do this or can they point me in the direction of a tutorial? Thank you in advance - d;-)There are some tutorials on Adobe site:
<http://www.adobe.com/devnet/createjs/articles/getting-started.html>
<http://tv.adobe.com/watch/adc-presents/toolkit-for-createjs-part-1-designing-game-assets/>
<http://tv.adobe.com/watch/adc-presents/toolkit-for-createjs-part-2-adding-game-interactivi ty/>
The parts 1 and 2 are videos about 10 minutes each while the first link is a detailed article that you can print and practice on your machine.
Hope this helps. -
Problem with converting html to pdf using LiveCycle ES Java API
I am using this code to convert html to pdf.
* 1. adobe-generatepdf-client.jar
* 2. adobe-livecycle-client.jar
* 3. adobe-usermanager-client.jar
* 4. adobe-utilities.jar
* 5. wlclient.jar
import java.io.File;
import java.util.Properties;
import com.adobe.idp.Document;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
import com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient;
import com.adobe.livecycle.generatepdf.client.HtmlToPdfResult;
public class ConvertHTML {
public static void main(String[] args)
try{
//Set connection properties required to invoke LiveCycle ES
Properties connectionProps = new Properties();
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "t3://localhost:7001");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,Service ClientFactoryProperties.DSC_EJB_PROTOCOL);
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebLogic");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
//Create a ServiceClientFactory instance
ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);
//Create a GeneratePdfServiceClient object
GeneratePdfServiceClient pdfGenClient = new GeneratePdfServiceClient(factory);
//Get an HTML document to convert to a PDF document a
String inputFileName = "http://www.adobe.com";
//String inputFileName = "C:\\Documents and Settings\\venkat\\Desktop\\Adobe.htm";
String securitySettings = "No Security";
String fileTypeSettings = "Standard";
System.out.println("one");
//Convert HTML content to a PDF document
HtmlToPdfResult result = pdfGenClient.htmlToPDF2(inputFileName, fileTypeSettings, securitySettings, null, null);
System.out.println("two");
//Get the newly created document
Document createdDocument = result.getCreatedDocument();
//Save the PDF document as a PDF file
createdDocument.copyToFile(new File("C:\\test.pdf"));
catch (Exception e) {
System.out.println("Error OCCURRED: " + e.getMessage());
e.printStackTrace();
I can able to compile this class but while running i am getting error like below.
Error OCCURRED: Internal error.
ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java
:160)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat
cher.java:57)
at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.htmlToPDF2(GeneratePdfSer
viceClient.java:666)
at ConvertHTML.main(ConvertHTML.java:84)
Caused by: java.rmi.RemoteException: Remote EJBObject lookup failed for 'ejb/Invocation'; nested exc
eption is:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No
at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.
java:101)
at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java
:130)
... 4 more
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(Unknown Source)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.writeLock(Unknown Source)
at com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendFragment(Unknown Source)
at com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendMessage(Unknown Source)
at com.sun.corba.se.impl.encoding.CDROutputObject.finishSendingMessage(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.finishSendingRequest(Unknown Sour
ce)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete1(Unkno
wn Source)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknow
n Source)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
at weblogic.corba.j2ee.naming.Utils.narrowContext(Utils.java:126)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFact
oryImpl.java:94)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFact
oryImpl.java:31)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initJndiContext(EjbMessageDispat
cher.java:213)
at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.getJndiContext(EjbMessageDispatc
her.java:226)
at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.
java:87)
... 5 more
can u plz give me some way to do the convertion.Yes Sir.....Thanks for ur suggestion.....
But i didn't find exact solution..well..yes i found some but not exactly there were not in the way i required...I jus need to convert HTML to PDF using iText API for java.....I already used some classes in that like HTMLParser.....etc..
So Any thing else...Any one...Sure can help me in this................ -
Create HTML in Document Maintenance (SE61)
Hi there,
I am having difficulty trying to create URL link in my document using SE61. If i type "http://.....", it will display as hypertext url link in my document. But if i have a long url, the hypertext will not be correctly displayed, as the text will be broken up.
Anyone knows how to create a url link or create HTML tags using SE61 (Document Maintenance)? Thx
ZulHi Mohamed,
I think your question is not ITS related and the chances to get an answer in this forum are not high.
I don't know the answer to your question and would suggest that you consult the BC-Documentation in Knowledge Warehouse. If you want I can move this thread to another forum.
Best regards,
Henning -
How to create a inputstream without using the file operation
Hi friends
In my application, I have to create a Streamsource object using the below constructor:
public StreamSource(InputStream inputStream)
Construct a StreamSource from a byte stream. Normally, a stream should be used rather than a reader, so the XML parser can resolve character encoding specified by the XML declaration.
If this constructor is used to process a stylesheet, normally setSystemId should also be called, so that relative URI references can be resolved.
Parameters:
inputStream - A valid InputStream reference to an XML stream.*[http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/stream/StreamSource.html#StreamSource(java.io.InputStream) |http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/stream/StreamSource.html#StreamSource(java.io.InputStream) ]*
But for creating the inputstream, i am creating a tempory file, ie I am using fileinputstream.
import java.io.File;
import java.io.FileInputStream;
import java.io.StringReader;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
public class SourceConvertor
private static Source convertStaxToStream(Source request)
// here the argument to this method is StaxSource and the return type is StreamSource
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = null;
File fp = null;
FileInputStream fInp = null;
try
transformer = factory.newTransformer();
fp = new File("tempFile.txt");
transformer.transform(request, new StreamResult(fp));
fInp = new FileInputStream(fp);
} catch (Exception e)
e.printStackTrace();
return new StreamSource(fInp);
public static void main(String args[])
try
String message ="<author><name>Rai</name><book>GodOfSmallThings</book></author>";
Source original = new StreamSource(new StringReader(message));
Source converted = convertStaxToStream(original);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
transformer.transform(converted, new StreamResult(System.out));
catch (Exception e)
// TODO Auto-generated catch block
e.printStackTrace();
This is not at all a good aproach because evey time it is creating a new file.
So can anyone suggest a better aproach or idea or a simple code snippet so that i can create the inputstream without creating a temporary file.
Thanks in advance:
*[http://www.javamilestone.blogspot.com/ |http://www.javamilestone.blogspot.com/ ] *Err, a StreamSource is a Source. Check the Javadoc. You can pass it directly to the transform.
-
How to create a floating layout using adf
Hi ,
I am using Jdeveloper 11g to develop an application.
I am coming across problems when i am trying to build the look and feel.
Basically i want to develop as per the following link.
http://webfusion.kcmo.org/coldfusionapps/ActionCenterRequest/getstatus.cfm
I have been able to create the layout using adf layouts and components(af:panelStechlayout, af:panelgrouplayout), but the problem i am facing is that i want the entire page to scroll and have a floating layout.
But in my case, the panels are scrolling, so when i resize the browser or change the resolution, everything appears to be broken in parts.
Besides to recreate the above layout i have to include everything under the "center" facet, hence using templates is creating issues.
following is the code i am using(just the structure code), this looks preety simple but i am not able to figure this one out.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document title="findcase" id="d1">
<af:form id="f1">
<af:panelStretchLayout startWidth="100px" endWidth="100px" id="psl2">
<f:facet name="center">
<af:panelStretchLayout endWidth="63px" id="psl1" topHeight="120px" bottomHeight="50px"
inlineStyle="font: 100% Arial, Helvetica, sans-serif;background: #2A3644;font-size: 13px;margin: 0;padding: 0;text-align: center;color: #000000;"
startWidth="44px">
<f:facet name="center">
<!-- Header -->
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl3">
<af:image source="http://cfdev.kcmo.org/coldfusionapps/templates/images/kcmo_banner.jpg"
shortDesc="header" id="i1"
inlineStyle="width:960px; height:77.0px;"/>
<af:panelGroupLayout id="pgl2" inlineStyle="height:33.0px;">
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/home.jpg"
shortDesc="menu1" id="i2"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/services.jpg"
shortDesc="menu2" id="i3"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/residents.jpg"
shortDesc="menu3" id="i4"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/business.jpg"
shortDesc="menu4" id="i5"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/visitors2.jpg"
shortDesc="menu5" id="i6"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/officials2.jpg"
shortDesc="menu6" id="i7"/>
<!--af:panelGroupLayout id="pgl4"-->
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/kcmo_banner_slice.jpg"
shortDesc="searcharea" id="i8"
inlineStyle="background-repeat:repeat; width:355px; height:35.0px;"/>
<!--/af:panelGroupLayout-->
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/kcmo_banner_lower.jpg"
shortDesc="banner" id="i9"
inlineStyle="width:960px; height:7.0px;"/>
</af:panelGroupLayout>
<!-- starting the center section -->
<af:panelStretchLayout id="psl3" inlineStyle="width:960px; margin:auto; background-color:White;"
startWidth="232px">
<f:facet name="center">
<!-- your page content goes here -->
<af:outputText value="outputText1" id="ot3"/>
</f:facet>
<!-- side navigation panel -->
<f:facet name="start">
<af:panelGroupLayout id="pgl1" inlineStyle="float:left; margin:5px; width:236.0px;background-color:#edf0f5;text-align: center;">
<af:goLink text="City Government" id="gl1"
destination="http://www.kcmo.org/CKCMO/Depts/CityManagersOffice/InternshipsandfellowshipswiththeCity/KansasCityGovernment/index.htm"
inlineStyle="font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#395F76; font-weight:bold;"/>
<br/>
<af:goLink text="Codes and Ordinances" id="gl2"
destination="http://cityclerk.kcmo.org/liveweb/common/"
targetFrame="_blank"/>
</af:panelGroupLayout>
</f:facet>
<f:facet name="end"/>
</af:panelStretchLayout>
</af:panelGroupLayout>
</f:facet>
<f:facet name="end">
<af:outputText value="" id="ot2"/>
</f:facet>
<f:facet name="start">
<af:outputText value="" id="ot1"/>
</f:facet>
</af:panelStretchLayout>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>Any help will be highly appreciated.
Thanks in advance
AshTry creating a layout that uses a panelGroup scroll as the top container and use panelBorders inside it.
Something like this:
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:panelGroupLayout layout="scroll" id="pgl1">
<af:panelBorderLayout id="pbl1">
<f:facet name="start"/>
<f:facet name="bottom"/>
<f:facet name="end"/>
<f:facet name="top">
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl3">
<af:image source="http://cfdev.kcmo.org/coldfusionapps/templates/images/kcmo_banner.jpg"
shortDesc="header" id="i1"
inlineStyle="width:960px; height:77.0px;"/>
<af:panelGroupLayout id="pgl2" inlineStyle="height:33.0px;">
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/home.jpg"
shortDesc="menu1" id="i2"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/services.jpg"
shortDesc="menu2" id="i3"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/residents.jpg"
shortDesc="menu3" id="i4"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/business.jpg"
shortDesc="menu4" id="i5"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/visitors2.jpg"
shortDesc="menu5" id="i6"/>
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/officials2.jpg"
shortDesc="menu6" id="i7"/>
<!--af:panelGroupLayout id="pgl4"-->
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/kcmo_banner_slice.jpg"
shortDesc="searcharea" id="i8"
inlineStyle="background-repeat:repeat; width:355px; height:35.0px;"/>
<!--/af:panelGroupLayout-->
<af:image source="http://webfusion.kcmo.org/coldfusionapps/templates/images/kcmo_banner_lower.jpg"
shortDesc="banner" id="i9"
inlineStyle="width:960px; height:7.0px;"/>
</af:panelGroupLayout>
</af:panelGroupLayout>
</f:facet>
<af:panelBorderLayout id="pbl2">
<f:facet name="start">
<af:panelGroupLayout id="pgl4" layout="scroll">
<af:commandLink text="menu1" id="cl1"/>
<af:commandLink text="menu2" id="cl2"/>
</af:panelGroupLayout>
</f:facet>
<f:facet name="bottom"/>
<f:facet name="end"/>
<f:facet name="top"/>
<af:panelFormLayout id="pfl1">
<f:facet name="footer"/>
<af:inputText label="Label 2" id="it2"/>
<af:inputText label="Label 1" id="it1"/>
</af:panelFormLayout>
</af:panelBorderLayout>
</af:panelBorderLayout>
</af:panelGroupLayout>
</af:form>
</af:document>
</f:view>
</jsp:root> -
Is it possible to create a PDF file using Java
Is there any API/class there exists in java
Can any one help me
Hope some intelligent peoples are there to help me
make a reply to me at
[email protected]There's:
http://www.lowagie.com/iText/
If you're working with xml, maybe this one:
http://xml.apache.org/fop/index.html
regards. -
Create HTML file that can display unicode (japanese) characters
Hi,
Product: Java Web Application
Operating system: Windows NT/2000 server, Linux, FreeBSD
Web Server: IIS, Apache etc
Application server: Tomcat 3.2.4, JRun, WebLogic etc
Database server: MySQL 3.23.49, MS-SQL, Oracle etc
Java Architecture: JSP (presentation) + Java Bean (Business logic)
Language: English, Japanese, chinese, italian, arabic etc
Through our java application we need to create HTML files that have to display unicode text. Our present works well with English and most of the european character set. But when we tried to create HTML files that will display unidoce text, say japanese, only ???? is getting displayed. Following is the code we have used. The out on the browser displays the japanese characters correctly. But the created file displays only ??? in place of japanese chars. Can anybody tell how can we do it?
<%
String s = request.getParameter( "txt1" );
out.println("Orignial Text " + s);
//for html output
String f_str_content="";
f_str_content = f_str_content +"<HTML><HEAD>";
f_str_content = f_str_content +"<META content=\"text/html; charset=utf-8\" http-equiv=Content-Type></HEAD>";
f_str_content = f_str_content +"<BODY> ";
f_str_content = f_str_content +s;
f_str_content = f_str_content +"</BODY></HTML>";
f_str_content = new String(f_str_content.getBytes("8859_9"),"Shift_JIS");
out.println("file = " + f_str_content);
byte f_arr_c_buffer1[] = new byte[f_str_content.length()];
f_str_content.getBytes(0,f_str_content.length(),f_arr_c_buffer1,0);
f_arr_c_buffer1 = f_str_content.getBytes();
FileOutputStream l_obj_fout; //file object
//file object for html file
File l_obj_f5 = new File("jap127.html");
if(l_obj_f5.exists()) //for dir check
l_obj_f5.delete();
l_obj_f5.createNewFile();
l_obj_fout = new FileOutputStream(l_obj_f5); //file output stream for writing
for(int i = 0;i<f_arr_c_buffer1.length;i++ ) //for writing
l_obj_fout.write(f_arr_c_buffer1);
l_obj_fout.close();
%>
thanx.Try changing the charset attribute within the META tag from 'utf-8' to 'SHIFT_JIS' or 'utf-16'. One of those two ought to do the trick for you.
Hope that helps,
Martin Hughes
Maybe you are looking for
-
Error in product registration process, what can I do?
Hi, after purchasing a Mac pro in a third party reatil store (Germany), I tried to register the product on my support page. But after entering the serial number, all i got was the message "Leider scheint das Kaufdatum für die eingegebene Seriennummer
-
I can face errors in state property. how can i resolve this errors in flex 4.6?
<?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="118" height="118"> <s:layout> <s:BasicLayout/> </s:layout> <s:states
-
Kernel module pointer for modctl structures
Hi, Can anybody tell me where is the kernel module pointer that is pointing at the modctl structure? How can I use the module pointer? Thanks.
-
I am trying to find out how to submit a video podcast to the Apple Itunes site and have it offered for sale. I have searched the Apple site but cannot find this info anywhere. It only appears to offer the facility to make available 'free'podcasts, bu
-
What I have noticed is that all of the songs left in my Itunes Library were download a year+ ago, so I was thinking that somehow I restored iTunes to a previous date or something like that. I have no idea honestly. Anybody with useful information, PL