How to display Image as Error instead of Error Message from Resource Bundle
hi,
I want to display images as error instead of error message from Application Properties in struts1.1
Ex:
I want to prompt a user to type password length min. of 6 char. If failed, need to show simple image as error rather
"Length should be min. 6".
reagrds
parthiban.
BalusC wrote:
RahulSharna wrote:
in the respective resource bundle modify the value by something was below
error.password.length=<img src="/images/password-Length.gif" alt="Password Length Issue" align="center"/>
OK, it apparently allows HTML in error messages.Yes struts allows it :)
Similar Messages
-
How to display images on my internal isight?
Hi,
I just bought the new iMac 2 gig dual. Running on 10.5.2.
I wanted to know how to display images on my screen during a video conference chat without resorting to holding up a print out to the camera? I need something where I can switch from video mode to image mode and show a single image at a time if I need to. All that while still talking of coarse. If it isn't possible with my iSight software, can you point me to other software I can download and still use my built in cam?
I hope I was clear enough in asking this.
Thanks
LibanWelcome to Apple Discussions, Liban
iChat can do what you want, but I do not know of any web-based video chat site that can.
Look for Help or Support information on the site you are using or ask the Webmaster if his site has the capability to do what you want.
EZ Jim
PowerBook 1.67 GHz w/Mac OS X (10.4.11) G5 DP 1.8 w/Mac OS X (10.5.2) External iSight -
Hi all,
How to display image from the database table in the adobe form by using web dynpro abap?
I want to display image in the adobe interactive form by using web dynpro abap.
Please help me.
Regards,
sriniHi Srini,
If you go through the article you might have seen the following piece of code
*** Send the values back to the node
lo_el_z_if_test_cv->set_static_attributes(
EXPORTING
static_attributes = ls_z_if_test_cv ).
" here ls_z_if_test_cv has the image in XSTRING format which has beeen retrived using METHOD get_bds_graphic_as_bmp of CLASS cl_ssf_xsf_utilities
" In your case you need to just use the select query n fetch it from your table; ( provided your image is store in XSTRING format )
How is your image stored in your database table ?
Regards,
Radhika. -
How to display images and information
how to display images and information(e.g. like questions) on a jsp page that stored in a database
Look As far as i can see....
Utlimately every file could be expressed as a bytes buffer.
so say if you have a bean called Choice Bean which is expressed as
public class ChoiceBean{
private String choiceid;
private String choicedesc;
private byte image[];
public void setChoiceId(String choiceid){
this.choiceid = choiceid;
public String getChoiceId(){
return this.choiceid;
public void setChoiceDesc(String choicedesc){
this.choicedesc = choicedesc;
public String getChoiceDesc(){
return this.choicedesc;
public void setImage(byte image[]){
this.image = image;
public byte[] getImage(){
return this.image;
}QuestionList.java:
===============
public class QuestionList{
private List<ChoiceBean> choicelist;
/*Other member variable declarations*/
public List<ChoiceBean> getChoiceList(){
/*Custom code where you may build the list by querying the DA layer*/
return this.choicelist;
public int search(String choiceid){
int index = -1;
for(int i =0 ; i < this.choicelist.size() ; i++){
ChoiceBean cb = this.choicelist.get(i);
if(cb.getChoiceId().equals(choiceid)){
index = i;
break;
return index;
/* Other member method declarations */
}and you are retreving List<ChoiceBean> from DB using your query & have created a session attribute / <jsp:useBean> named ChoiceList
NOTE: sometimes your application server can go out of bounds as you are consuming a lot of memory by creating an arraylist object.
use the following methodology to display images & choices
sample.jsp:
=========
<jsp:useBean id="QuestionList" class="com.qpa.dao.QuestionList" scope="session"/>
<TABLE>
<%
/* QuestionList.getChoiceList() is a method which fetches data from the DB & returns it in form of List<ChoiceBean> */
List<ChoiceBean> choicelist = QuestionList.getChoiceList();
for(int i =0 ; i < choicelist.size() ; i++){
%>
<TR>
<TD><%!=choicelist.get(i).getChoiceId()%></TD>
<!-- calling servlet which renders an images in JPG format based upon given choiceid(unique field) -->
<TD><IMAGE src="ImageServlet?choiceid=<%!=choicelist.get(i).getChoiceId()%>"/> </TD>
<TD><%!=choicelist.get(i).getChoiceDesc()%></TD>
</TR>
<%
%>
</TABLE>
<%
session.remove("QuestionList");
%>
NOTE: usage of JSTL or any other custom built tag-libraries makes life more simpler in the following case
ImageServlet.java:
===============
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
byte buffer[] = null;
HttpSession session = request.getSession(false);
/*getting the QuestionList from the session*/
QuestionList ql = null;
String choiceid = new String("");
try{
choiceid = request.getParameter("choiceid");
/*getting the QuestionList from the session*/
ql = (QuestionList) session.getAttribute("QuestionList");
} catch(Exception exp){
if(choiceid.equals("") == false && ql != null ){
List<ChoiceBean> clist = QuestionList.getChoiceList();
assuming that you have created a serach method which searches the entire choice list and would give you
the index of that object which is being refered by unique choiceid and returns -1 if not found
int index = QuestionList.search(choiceid);
if(index != -1){
ChoiceBean cb = clist.get(index);
buffer = cb.getImage();
if(buffer != null){
// assuming that we have stored images in JPEG format only
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new ByteArrayInputStream(buffer));
BufferedImage image =decoder.decodeAsBufferedImage();
response.setContentType("image/jpeg");
// Send back image
ServletOutputStream sos = response.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
encoder.encode(image);
} else {
response.setContentType("text/html");
response.getWriter().println("<b>Image data not found</b>");
}However,i still feel there are few loopholes with this approach where Application Server can eat up a lot of heap space which may result in outofmemorybound exception.
Hope this might help :)
REGARDS,
RaHuL -
How to read bytes(image) from a server ?how to display image after read byt
How to read bytes(image) from a server ?how to display image after reading bytes?
i have tried coding tis , but i couldnt get the image to be display:
BufferedInputStream in1=new BufferedInputStream(kkSocket.getInputStream());
int length1;
byte [] data=new byte[1048576];
if((length1=in1.read(data))!=-1){
System.out.println("???");
}System.out.println("length "+length1);
Integer inter=new Integer(length1);
byte d=inter.byteValue();didn't I tell you about using javax.imageio.ImageIO.read(InputStream) in another thread?
-
How to use JOptionPane in jsp, instead of javascript message alert box?
HI,
How to use JOptionPane in jsp,
instead of javascript "message alert box"?
I hate javascript,
I'd like to only use java in jsp. don't use javascript.
javascript is client side,
jsp is server side. i know that.
how to... instead of javascript box?
how to use ... message box in webpage?
don't use applet,,,, don't use javascript,,,
hm...zzzZzz
I hate javascript..T.T
<SCRIPT language=JavaScript>
alert("hate javascript");
</SCRIPT>
===>>>>
In this way,,
JOptionPane.showOptionDialog(null,"I love java")
I'd like to only use jsp and java and html...in webpage.
don't use javascript....
Why? don't sun provide message box in jsp, instead of javascrip box?
Why?
Edited by: seong-ki on Nov 4, 2007 8:38 PMDrugs are bad, m'kay?
-
How can i know who get my photos and messages from my icloud???
How can i know who get my photos and messages from my icloud???
Nobody, except the persons who have your username and password or with whom you share photos streams would be able to see anything from you.
-
How can i know who get my photos and messages from my icloud???
The following website gives you an overview on how your iCloud data is encrypted: https://support.apple.com/kb/HT4865 So as long as you don not share your Apple ID with someone else, everything should be fine.
-
Dynamic Error Message from a Bundle Showed in a rich:fileUpload
Hello.
There is a way to show a dynamic error message from a bundle (i.e, There is a problem in the word {0} in line {1}.) in a rich:fileUpload after the Managed Bean method in fileUploadListener="#{MyManagedBean.myMethod}" attribute was performed? That's because the error message parameters are discovered only after the MyManagedBean.myMethod execution.
As far I know, I'm able only to show a static message with transferErrorLabel="#{myBundle.myErrorMessage}" attribute.
Here is my rich:fileUpload component code:
<rich:fileUpload id="upload"
fileUploadListener="#{PlanilhaManagedBean.importar}"
maxFilesQuantity="100"
immediateUpload="true" listHeight="130" acceptedTypes="xls"
addControlLabel="#{bundle.geralProcurarArquivo}"
ontyperejected="alert('#{bundle.geralExtensaoInvalida}')"
cancelEntryControlLabel="#{bundle.geralCancelar}"
clearAllControlLabel="#{bundle.geralLimparTudo}"
clearControlLabel="#{bundle.geralLimpar}"
doneLabel="#{bundle.geralArquivoTransferidoComSucesso}"
progressLabel="#{bundle.geralTransferindoArquivo}"
stopControlLabel="#{bundle.geralParar}"
stopEntryControlLabel="#{bundle.geralParar}"
transferErrorLabel="#{bundle.geralErroNaTransferenciaDoArquivo}" /> Any idea?
Thanks in advance.Hi, BalusC. Thanks for your reply.
I already tried that. I put a navigation-rule in faces-config.xml to the same page of the rich:fileUpload, but the rich:fileUpload component doesn't starts a get or a post request. So the navigation-rule is ignored and the page wasn't rendered again.
I also tried to put the <a4j:support ...> in the rich:fileUpload to re-render the <h:messages ...> component, but didn't work too. The <h:messages ...> wasn't re-render.
Thanks in advance.
Edited by: reolca on May 10, 2009 5:40 AM -
[ERROR] could not find source for resource bundle modules.
We are in the process of upgrading our flex application from SDK3.6 to SDK4.5.0.17899.
Flexmojos version used for compilation is 3.9.
The flex library project is complied with SDK4.5.0 version but BUILD is not getting SUCESS from maven.
The following is the reason is showing and unable to find out the root cause.
[ERROR] could not find source for resource bundle modules.
Can you please help me out.
Thanks,Copying
/Software/FB\ Eclipse\ Plugin/Adobe\ Flex\ Builder\ 3\ Plug-in/sdks/2.0.1/frameworks/locale/en_US/charts_rb.swc into
the 3.5 SDK directory
/usr/local/lib/flex_sdk/3.5.0/frameworks/locale/en_US
solves the problem.
Not sure why as the charts_rb.swc comes from Flex 2.0 -
Error: could not find source for resource bundle charts
I am trying to upgrade from Flex SDk 3.4 to 3.5.
I have copied the Data Visualisation SWCs under libs, locale and rlsls folders as suggested by adobe.
I get the following error when building the application
flex-library:
[java] Loading configuration file /usr/local/lib/flex_sdk/3.5.0/frameworks/flex-config.xml
[java] Error: could not find source for resource bundle charts.
[java]
What am I missing? Any help is highly appreciated.
ThanksCopying
/Software/FB\ Eclipse\ Plugin/Adobe\ Flex\ Builder\ 3\ Plug-in/sdks/2.0.1/frameworks/locale/en_US/charts_rb.swc into
the 3.5 SDK directory
/usr/local/lib/flex_sdk/3.5.0/frameworks/locale/en_US
solves the problem.
Not sure why as the charts_rb.swc comes from Flex 2.0 -
How do you transfer pictures,video's and text messages from iphone 4 to the new model
How do you transfer pictures,video's and text messages from iphone 4 to the new model?
http://support.apple.com/kb/ht2109
-
How can we set page title from resource bundle
Hi friends ,
how can we set page title from resource bundle,
<%--
Document : MARC008Music
Created on : Aug 4, 2008, 6:27:06 PM
Author : root
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>All Transaction Log Details </title>
</head>
<body>
<f:view>
<f:loadBundle basename="#{utility.resourceBundle}" var="rb"/>
<f:loadBundle basename="#{utility.messageBundle}" var="mb"/>
<h:form>
</h:form>
</f:view>
</body>
</html>i want set title( All Transaction Log Details ) from resource bundle.My problem is solved , Thanking you Sir.
Thanks & Regards,
Edukondalu Avula -
How do I see who my child is receiving messages from in imessage?
How do I see who my child is receiving messages from in imessage? I used to be able to monitor it from in Verizon messages.
Use his/her Apple ID for iMessage on your phone...you'll actually receive the messages in real time.
-
Hey:
Hi everyone.
would like to know how I can save a years worth of text messages from my iphone 4s to my computer.
(I have Verizon Wireless as a carrier), I have tried the app store but it is okay for one messgae but not for hundreds.
Can you help me.
Thank you in advance. Happy Thanks Giving.There is no Apple provided way to save text messages to a computer.
The iPhone backup done via iTunes or iCloud, will backup the messages but they are not accessible on the computer.
A google search may reveal options to saving the messages to the computer.
Maybe you are looking for
-
How to use flex SDK library in flash
Halo. I would like to use BitmapAsset class inside CS3 or CS5. I know that the class is somewhere inside flexSDK library (I use version 4.1). So is it possible to use flexSDK for "flash purposes" ? Regards
-
Hello, I know how to change text padding for different dpi with @media tag in css file. I konw how to choose image with MultiDPIBitmapSource Layout properties like gap, padding... are not styles, not bitmapSource How can I simply choose layout visual
-
Upgraded to iOS 6, now no iCloud tile. How do I get it back?
The subject line says is all. Yesterday I upgraded to iOS 6, as commanded, and now I have no iCloud tile. Everything seems correct in settings.
-
HTTP POST and open external result
Hi Now I'm working through payment system. I created APEX process like this: DECLARE post_str VARCHAR2 (4000) := 'p1=A&p2=B'; req UTL_HTTP.req; resp UTL_HTTP.resp; v_buffer VARCHAR2 (1024); BEGIN req := UTL_HTTP.begin_request (url => 'http://www.some
-
White Borders Appearing (Captivate 6)
I am receiving feedback from testers that white borders are appearing in the project window. This usually happens when navigating to a page, and then clicking a button that leads to another screen. Upon arriving at this new screen, a white border wil