Rendering A JPEG image with a custom tag

Hi All,
I have dilema. I'm trying to rendering a jpeg in IE/FireFox with a custom tag that I developed. I'm able to access the bean and invoke the getter method to return the InputStream property. But what gets rendered is the byte code not the image. I've tried just about anything I could think off. If any body has an answer I would difinitely appreciate it.
Thanks,
Tony
Below is the jsp, tld, bean and tag.
********************************* image.jsp ****************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="/WEB-INF/custom-chtml.tld" prefix="chtml" %>
<html>
<head>
<title>HTML Page</title>
</head>
<body bgcolor="#FFFFFF">
<chtml:img name="photo" property="file"/>
</body>
</html>
********************************* custom-chtml.tld **********************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>chtml</shortname>
<tag>
<name>img</name>
<tagclass>com.struts.taglib.CustomImgTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
**************************** MemberPhotoBean.java ******************************
import java.io.InputStream;
* @author tony
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
public class MemberPhotoValue {
     private String memberId;
     private int fileSize;
     private InputStream file;
     public MemberPhotoValue() {
     public MemberPhotoValue(String memberId, InputStream file) {
          this.memberId = memberId;
          this.file = file;
     public MemberPhotoValue(String memberId,int fileSize,InputStream file) {
          this.memberId = memberId;
          this.fileSize = fileSize;
          this.file = file;          
     public String getMemberId(){
          return memberId;
     public void setMemberId(String memberId) {
          this.memberId = memberId;
     public int getFileSize() {
          return fileSize;
     public void setFileSize(int fileSize) {
          this.fileSize = fileSize;
     public InputStream getFile(){
          return file;
     public void setFile(InputStream file) {
          this.file = file;
*************************** CustomTagHandler.java ********************************
import java.io.*;
import javax.imageio.ImageIO;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import java.awt.image.*;
import java.awt.*;
import javax.swing.ImageIcon;
import com.sun.image.codec.jpeg.*;
* JSP Tag Handler class
* @jsp.tag name = "CustomImg"
* display-name = "Name for CustomImg"
* description = "Description for CustomImg"
* body-content = "empty"
public class CustomImgTag implements Tag {
     private PageContext pageContext;
     private Tag parent;
     private String property;
     private String name;
     private Class bean;
     public int doStartTag() throws JspException {
          return SKIP_BODY;
     public int doEndTag() throws JspException {
     try {
     ServletResponse response = pageContext.getResponse();
     // read in the image from the bean
     InputStream stream = (InputStream) invokeBeanMethod();
     BufferedImage image = ImageIO.read(stream);          Image inImage = new ImageIcon(image).getImage();
     Graphics2D g = image.createGraphics();
     g.drawImage(inImage,null,null);               
     OutputStream out = response.getOutputStream();
// JPEG-encode the image
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(image);               
     out.close();     
} catch (IOException io) {
          throw new JspException(io.getMessage());
     return EVAL_PAGE;
     public void release(){}
private InputStream invokeBeanMethod() throws JspException {
     try {
     Object bean = null;
     if (null != pageContext.getAttribute(name)) {
     bean = (Object) pageContext.getAttributename);
     else if (null != pageContext.getSession().getAttribute(name)) {
     bean = (Object) pageContext.getSession().getAttribute(name);
     else if (null != pageContext.getRequest().getAttribute(name)) {
     bean = (Object) pageContext.getRequest().getAttribute(name);
     else {
     throw new JspException("Bean : "+name+" is not found in any pe.");
     Class[] parameters = null;
     Object[] obj = null;               
     Method method = bean.getClass().getMethod("getFile",parameters);
     return (InputStream) method.invoke(bean,obj);
     } catch (NoSuchMethodException ne) {
     throw new JspException("No getter method "+property+" for bean : "+bean);
     } catch (IllegalAccessException ie) {
     throw new JspException(ie.getMessage());
     } catch (InvocationTargetException ie) {
     throw new JspException(ie.toString());
     public void setPageContext(PageContext pageContext) {
          this.pageContext = pageContext;
     public void setParent(Tag parent) {
          this.parent = parent;
     public Tag getParent() {
          return parent;
     public void setProperty(String property) {
          this.property = property;
     public void setName(String name) {
          this.name = name;
**************************************************************************************

If you have access to an image editing tool such as photoshop, I would advice you import the image into Phototshop and save it in a different format e.g, GIF format and re-import it into Final Cut Express HD. This could solve your rendering problem if all you need is to use a Still image.
Ayemenre

Similar Messages

  • How to set color space to JPEG image with Java advance Imaging

    How to set color space to JPEG image with Java advance Imaging.
    is there any API in JAI which support to set color space.

    I'm definately no guru, but this is how you can change it.
    CTRL + ALT + Click on the part of the component that you want to change. This brings up the Hidden Dom Inspector, background of component will be surrounded with a red outline (Make sure the red outline is surrounding the part of the tabset you want to change), Now you go to properties sheet and click the ellipses next to rules property this will pop up a dialog you look in this list (At the top) to see the default style classes that are affecting the rendering of the component outlined in red. (You will be able to select different sections of a single component) then you just rewrite the style class that you want to change in your Stylesheet (You will not find the styleclass that you want to change because it is a part of your theme .jar but as long as you name it exactly the same and place in your stylesheet it will override the theme .jar style classes) it's actually very easy -- you were right should be a piece of cake for a guru. Don't have the link handy but you can check out Winston's Blog on changing Table Formatting to get this information...It is EXTREMELY useful if you want your apps to have a custom look and not default that comes with Creator Themes.
    Hope this helps you out God knows others have helped me alot!
    Jason

  • Find images with parent keyword tag only?

    I don't know how to describe this problem succinctly, so I don't know how to search for it in the knowledgebase or forums. Can anybody help?
    I want a keyword hierarchy with "US" as parent keyword of 50 states name keywords. I have many images with state keywords, but I also have some images that are tagged only with "US" but no state tag, as they are not specific to a state.
    How do I *easily* find only the images tagged "US" but with no state tags? Clicking on "US" in the keyword panel shows me all images tagged with "US" and all with state tags, but I just want the ones tagged "US".
    I can use "Find" to find "US" images NOT CONTAINING "AL AK AR AS AZ..." by enumerating all 50 states, but that's a terribly awkward way filter out images tagged with state names. I can't see a button or filter that shows only the images with a parent tag but without child tags
    Any ideas?
    Thanks ahead of time,
    Dave

    John, this seemed like a great idea.  I tried it, and it seemed to work.  There was an immediate problem because when there are lots of keywords it means a lot of scrolling and it can be hard to locate rail among rain rate rails etc. because the font is so small.  A second problem was that you are forced to mouse scroll - cant page down or up or use home or end. That can be a lot of scrolling. a third problem is that it seems you have to reselect flat view each time.
    a more serious problem is that it seems to have stopped working.  I'm not quite sure what i did but i have a keyword verb with 5 items and about 1125 child keywords (such as to sing to run etc.) for 1125 photos   i click on the verb arrow in the keywords so i bring up 1125 pictures of verbs.  now i go to metadata switch to flat view.  i can now see "verb" as a keyword in the metadata panel, but when i click on it, nothing happens - I still have 1125 selected photos.  Furthermore i cannot click on any other keyword in the metadata panel - that is nothing happens when i click.  if I return it to hierarchical view it is fine.  then Lightroom 4 64-bit stopped working.  when i restarted the program it was still in flat view and i was now able to click on the metadata panel and see appropriate collections.  then it stopped working again after i clicked on the keyword panel (but did not actually select anything).  in total i have about 3000 keywords and about 100000 photos on local and network drives.  it looks to me like flat view has some serious problems, but perhaps its something i am doing.... 
    i also have to say that even if it worked perfectly, i still might prefer other solutions because scrolling up and down for 3000 keywords can be tedious - its difficult to prevent overshooting and undershooting the mark.  if the keyword and metadata panels could be undocked that would probably be a big help.

  • JPEG image with interlacing / progression

    Why is bug 4675817
    http://developer.java.sun.com/developer/bugParade/bugs/4675817.html
    closed?
    I'm using J2SDK1.4.2 and with JWS my application just quits when trying to display a JPEG image with interlacing / progression.

    This is an infuriating bug; I couldn't believe how much time I wasted before I found the bugreports � by which time I was ready to hang, draw & quarter the guilty party (or the nearest sun employee).
    The bug seemed closed against a similar bugreport, and this in turn has been closed against Tiger � which is 1.5 the next upcoming major release; which will probably happen next year now.
    - Richard

  • How to call a method repeatedly with JSP custom tag?

    This senerio is very similar to the usage of StringBuffer.
    I have a problem which can be solved easily with scriptlets:
    <% NameValuePair nvp = new NameValuePair(request.getQueryString()); %>
    <a href="foo.html?<%=nvp.add(name1", "value1").add("name2", "value2").toString();%">">Foo</a>
    <a href="bar.html?<%=new NameValuePair(request.getQueryString()).add("x", 1).add("y", 2).toString()%>">Bar</a>
    But I cannot use scriplets because it's turned off. I can only use jsp custom tag / jstl. How would I implement this functionality with a custom tag? How would the JSP code look like? Our container supports JSP 2.0.
    Thanks.</a>

    hi,
    you can do within 2 step-
    1) use <%@page import="your_java_class"%>
    2)use scriptlet code <%...%> and write coding in this tag.
    means create instance of your java class .
    <% your_java_class obj1=new your_java_class();
         obj1.method_of_your_java_class();
    %>or
    3) you can make javabean to use method of java class.[Best option]
    Thanx
    Ranvijay

  • Help with the custom tag

    Hi
    i want to make a custom tag encapsulating certain functionalities of existing tags in one tag namely tomahawk dataPanel and html facets.
    Where can I get the source for html jsf tags so that I can look into it and modify.
    Thanks

    Originally posted by: mbuc.edp-progetti.it
    Would you like to know a fine workaround?
    If you have in your jsps a reference to the tld like this:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    make a C:\WEB-INF\ directory on your PC and copy in there your tlds
    (C:\WEB-INF\struts-html.tld). The same for linux: /WEB-INF/struts-html.tld.
    So you do not have to change anything in web.xml nor in the jsp pages!
    Bye,
    Marco.
    "marco" <[email protected]> ha scritto nel messaggio
    news:cfhrgj$bcj$[email protected]..
    > Davis,
    > thanks for the reply. I followed your suggestion and now I am able to see
    > the code assist working.
    > I am currently using the lomboz editor, but one thing that is missing in
    > lomboz and is present in the structured editor (and in Intellij Idea) is
    the
    > ability to see where a tag is opened and closed, also for html tags.
    Perhaps
    > to someone this should seem not so important, but for me it is very
    usefull!
    >
    > As a first impression, I can only make a lot compliments to both
    > contributions (ObjectWeb and IBM).
    >
    > Bye,
    > Marco.
    >
    >
    > "David Williams" <[email protected]> ha scritto nel messaggio
    > news:[email protected]..
    > >
    > > No, you're not missing anything. Its just with that version of code the
    > > "tld resolver" (that knows where to look for TLD's) is not correct. I
    > > haven't tried it with struts, but with a minor test I tried,
    > > I just made a copy of the TLD to put in the same folder as the JSP file.
    > > Then the editor (and content asssit), can find it and all should be ok.
    Of
    > > course, I'm not suggesting this for a long term solution, but just to
    see
    > > if it allows you to get a little further in evaluating overall.
    >
    >

  • Database access with JSP custom tags

    i have created one file in which i am making the connection with mysql data base with con.mysql.jdbc.Driver.and usking J connector and that i'm doing with custom tag.this is the error which i'm getting in tomcat.
    and the tag handler class and TLD file and jsp file is below
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax.servlet.jsp.JspException: null
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:841)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:778)
    org.apache.jsp.DbTry_jsp._jspService(org.apache.jsp.DbTry_jsp:72)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
    Try.Connect.<init>(Connect.java:26)
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    java.lang.reflect.Constructor.newInstance(Unknown Source)
    java.lang.Class.newInstance0(Unknown Source)
    java.lang.Class.newInstance(Unknown Source)
    org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:116)
    org.apache.jsp.DbTry_jsp._jspx_meth_db_connect_0(org.apache.jsp.DbTry_jsp:84)
    org.apache.jsp.DbTry_jsp._jspService(org.apache.jsp.DbTry_jsp:62)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.4 logs.
    Apache Tomcat/5.5.4
    Tag handler class
    package Try;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.JspWriter;
    import javax.servlet.jsp.PageContext;
    import javax.servlet.jsp.tagext.TagSupport;
    import java.sql.*;
    public class Connect extends TagSupport {
    private String driver = "com.mysql.jdbc.Driver";
    private String dbtype = "mysql";
    private String host = "localhost";
    private String username = "root";
    private String password = "203131";
    private String database = "compose";
    private String scope = "page";
    private String id = "";
    JspWriter out = pageContext.getOut();
    public void setDriver(String str) {
    driver = str;
    public void setDbtype(String str) {
    dbtype = str;
    public void setHost(String str) {
    host = str;
    public void setUsername(String str) {
    username = str;
    public void setPassword(String str) {
    password = str;
    public void setDatabase(String str) {
    database = str;
    public void setScope(String str) {
    scope = str;
    public void setId(String str) {
    id = str;
    public int doStartTag() throws JspException {
    try {
    Class.forName("com.mysql.jdbc.Driver");
    String url= "jdbc:" + dbtype + "://" + host + "/" + database;
    Connection connection = DriverManager.getConnection(url,username,password);
    out.println("right ;;one");
    catch (SQLException e1) {
    System.out.println("Error in HeadingTagv: " + e1);
    catch (Exception e) {
    System.out.println("Error in HeadingTag: " + e);
    return SKIP_BODY;
    TLD is lib.tld
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>db</short-name>
    <display-name>Database Tags</display-name>
    <description>
    A set of tags for working with SQL database access
    </description>
    <tag>
    <name>connect</name>
    <tag-class>Try.Connect</tag-class>
    <body-content>empty</body-content>
    <description>
    </description>
    <attribute>
    <name>driver</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    </description>
    </attribute>
    <attribute>
    <name>dbtype</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    </description>
    </attribute>
    <attribute>
    <name>host</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    Host name of the computer where database is located.
    Default is "localhost".
    </description>
    </attribute>
    <attribute>
    <name>username</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    Username for logging onto the database.
    Default is "root".
    </description>
    </attribute>
    <attribute>
    <name>password</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    Password for logging onto the database.
    Default is the empty string.
    </description>
    </attribute>
    <attribute>
    <name>database</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    The name of the database that will be used for
    the SQL commands. Default is no database specified.
    </description>
    </attribute>
    <attribute>
    <name>id</name>
    <required>false</required>
    <description>
    </description>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <description>
    </description>
    </attribute>
    </tag>
    </taglib>
    JSP file is
    <%@ taglib uri="/WEB-INF/lib.tld" prefix="db" %>
    <html>
    <body>
    <db:connect username="root" password="203131" database="compose" />
    </body>
    </html>

    Answered in your other post:
    http://forum.java.sun.com/thread.jspa?threadID=608780&tstart=0

  • Initial problem with JSP Custom Tag devolopment

    Hi ,
    I have encountered a problem with my JSP application which utilizes a simple custom tag.
    First I created followinng directories.
    1. %TOMCAT_HOME%\webapps\testTags
    2. %TOMCAT_HOME%\webapps\testTags\META-INF
    3. %TOMCAT_HOME%\webapps\testTags\WEB-INF
    4. %TOMCAT_HOME%\webapps\testTags\WEB-INF\tlds
    5. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes
    6. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com
    7. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com\tek271
    8. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com\tek271\testTags
    I created the essential four files, that is named as follows.
    1.TagError.java
    2.web.xml
    3.testTld.tld
    4.testJsp.jsp
    Then i put the files under these directories as given below
    testJsp.jsp under %TOMCAT_HOME%\webapps\testTags.
    web.xml under %TOMCAT_HOME%\webapps\testTags\WEB-INF
    TagError.java under %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes
    TagError.class under %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com\tek271\testTags
    testTld.tld %TOMCAT_HOME%\webapps\testTags\WEB-INF\tlds
    Here is the content inside the files.
    1.TagError.java
    package com.tek271.testTags;
    import java.io.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class TagError extends TagSupport {
    private String mColor = "red";
    public void setColor(String aColor) {
    mColor = aColor;
    } // setColor
    public int doStartTag() throws JspException {
    try {
    JspWriter out = pageContext.getOut();
    out.print("<font color=\"");
    out.print(mColor);
    out.print("\"><b>Error: ");
    } catch (IOException ex) {
    throw new JspTagException(ex.getMessage());
    return EVAL_BODY_INCLUDE; // other return: SKIP_BODY
    } // doStartTag()
    public int doEndTag() throws JspException {
    try {
    JspWriter out = pageContext.getOut();
    out.println("</b></font><br>");
    } catch (IOException ex) {
    throw new JspTagException(ex.getMessage());
    return EVAL_PAGE; // other return: SKIP_PAGE
    } // doEndTag()
    } // TagError
    2.web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
    <taglib>
    <taglib-uri>/testTaglib</taglib-uri>
    <taglib-location>/WEB-INF/tlds/testTld.tld</taglib-location>
    </taglib>
    </web-app>
    3.testTld.tld
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>testTld</shortname>
    <info>Testing jsp tags</info>
    <tag>
    <name>tagError</name>
    <tagclass>com.tek271.testTags.TagError</tagclass>
    <bodycontent>JSP</bodycontent> <!-- Also: empty, tagdependent -->
    <info>Show a string as an error message</info>
    <attribute>
    <name>color</name>
    <required>false</required>
    </attribute>
    </tag>
    </taglib>
    4.testJsp.jsp
    <%@ taglib uri="/testTaglib" prefix="test" %>
    <html>
    <head>
    <title>Testing Tag Library</title>
    </head>
    <body>
    <test:tagError>Invalid user name</test:tagError>
    <test:tagError color="blue">Invalid Password</test:tagError>
    </body>
    </html>
    but i am getting the following error.
    Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: File "/testTaglib" not found
    at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:214)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:174)
    at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspParseEventListener.java:1162)
    at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:758)
    at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:121)
    at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
    at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
    at java.lang.Thread.run(Thread.java:536)
    why is it like this ?please give me a solution.
    Thanking in advance.
    From
    Vinod A.

    Dear patreck ,
    It does not work.
    I have replaced the line
    <%@ taglib uri="/testTaglib" prefix="test" %>
    with
    <%@ taglib uri="WEB-INF/tlds/testTaglib" prefix="test" %>
    but now it shows the error ,
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: File "/testTags/WEB-INF/tlds/testTaglib" not found
    any more suggestion ?
    From Vinod A.

  • Rotating JPEG images with feh [SOLVED]

    A funny thing happened to me using feh today.
    It seems it can't rotate JPEG images 90 degrees (neither clockwise, nor counterclockwise). Whenever I try (with different files), feh dies with the following error message:
    Bogus virtual array access
    It can do it if it's 180 degrees. It can also rotate PNG images 90 and 180 degrees without any problem.
    Did someone else experience this? Is the new libjpeg to blame? Should I open a bug report?
    Last edited by megadriver (2010-03-05 06:56:25)

    I'm not sure feh is actively developed/maintained any more, but you could email the author* - I'm sure he'd fix something like this. If indeed it is a bug (of course). Can't check myself, yet - will do later.
    Meantime check imagemagick (and the convert command), if you need an alternative.
    * though I'd be happy if I was wrong.

  • Rendering a jpeg image in Final Cut Express

    I have a jpeg image which shows up correctly in the captured bin of Final Cut Express once it is imported, but it will not render properly. The background is black in the viewer, and the image(jpeg) in the center of the screen is a bright green square.
    Im able to add motion to the image, but it does not show up in the viewer as the image, it is only a green square.
    Can this be fixed in FCE?
    The original file is from an email, probably from a pc, does this cause compatibitity issues?

    If you have access to an image editing tool such as photoshop, I would advice you import the image into Phototshop and save it in a different format e.g, GIF format and re-import it into Final Cut Express HD. This could solve your rendering problem if all you need is to use a Still image.
    Ayemenre

  • How to show JPEG-images with Forms?

    I am able to display .bmp-images in Forms, but according to the documentation it must be possible to display JPEG-images as well. How do I do that?
    null

    Procedure is the same as you call bmp. but you have to write 'JPEG' in place of format where you write bmp. and file_name.JPG where you write file_name.bmp.
    That may help.
    Mustafa

  • Can't see jpeg images with RAW

    Hi All,
    I'm using a Canon 5d11 with setting for RAW + jpeg combo. When I import to Aperture, all I can se is the RAW CR2 image. I tried a search etc. but no luck. Am I missing something or setting to view both or are they someplace else in separate folders?
    Thanks for any help.
    John

    Under Images menu there is a "Create Version from Master JPG". They are combined in one thumbnail but if you use the menu item on all the selected thumbnails you will get the JPG.

  • How to store jpeg images with IMAQ PCI-1409 without vision or labview

    I have acquired an IMAQ PCI-1409 card and have it working just fine. However the card is being primarily used to aquire images for display purposes only. The only options with MAX are .tiff, .bmp and .png
    It would be nice to be able to store images as .jpeg which would be easier to share with other people.
    Is this possible or do I have to compress the images using another software?

    Hello,
    Thank you for contacting National Instruments.
    Unfortunately, as you mentioned, the only save options available in MAX are TIFF, BMP, and PNG. In order to save the image as a JPEG, you will need to use another software program. Microsoft Paint will allow you to save/convert any of these types to JPEG format. Other programs (Adobe Photoshop for example) allow you to customize the compression used, but Microsoft Paint does not.
    Best Regards,
    Jesse D.
    Applications Engineer
    National Instruments

  • Problem with a custom tag using Jasper Report

    Hi everybody, I'm deprived of hope,
    I wrote this code for a custom taglib to convert a .jasper file into a .pdf file:
    package com.tag;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.engine.export.*;
    import net.sf.jasperreports.engine.util.*;
    import net.sf.jasperreports.view.*;
    import java.sql.*;
    import org.apache.commons.logging.*;
    import java.io.*;
    import java.util.*;
    public class GeneratePDF extends TagSupport
    private String sourceFileName = "C:\\default.jasper";
    private String destinationFileName = "C:\\default.pdf";
    public void setSourceFileName(String sourceFileName)
    this.sourceFileName = sourceFileName;
    public void setDestinationFileName(String destinationFileName)
    this.destinationFileName = destinationFileName;
    public int doStartTag()
    return SKIP_BODY;
    public int doEndTag()
    try
    //Passaggio parametri da passare al jasper.
    Map parameters = new HashMap();
    parameters.put("param1", new Integer(1));
    //Preparazione del file da stampare (in questa fase si esegue la query e si inseriscono
    //i valori estratti dalla query)
    JasperPrint jasperPrint=JasperFillManager.fillReport(sourceFileName, parameters, getConnection());
    //Creazione del PDF
    JasperExportManager.exportReportToPdfFile(jasperPrint, destinationFileName);
    System.exit(0);
    catch(Exception e)
    { e.printStackTrace();}
    return EVAL_PAGE;
    /**Metodo per creare la connessione al DB*/
    private static Connection getConnection() throws ClassNotFoundException, SQLException {
    //Change these settings according to your local configuration
    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String connectString = "jdbc:odbc:gecoware";
    String user = "admin";
    String password = "password";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(connectString, user, password);
    return conn;
    No errors while compile but in execution I have this message:
    javax.servlet.ServletException: net/sf/jasperreports/engine/JasperFillManager
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:872)
    org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:114)
    org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:792)
    java.security.AccessController.doPrivileged(Native Method)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:790)
    org.apache.jsp.reportPDF_jsp._jspService(reportPDF_jsp.java:80)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    root cause
    java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JasperFillManager
    com.tag.GeneratePDF.doEndTag(GeneratePDF.java:49)
    org.apache.jsp.reportPDF_jsp._jspx_meth_JR_GeneratePDF_0(reportPDF_jsp.java:97)
    org.apache.jsp.reportPDF_jsp._jspService(reportPDF_jsp.java:68)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    Please HELP ME !!!!!!!!!
    Thank you in advance
    AleX

    Do you have the Jasper classes in /WEB-INF/lib?

  • Problems with parameterized custom tags - urgent

    Hi All,
    I am not able to retrieve my attribute values in Tag Support Class?
    it doesn't give any errors while compiling and also the tag works without those attributes. I am able to print some html using the same tag but not able to print the passed attribute values?
    any help is highly appreciated!
    Thank You.....:-)

    Thanks for the response!
    Infact I figured it out and made it working but still it's a question to me.
    Change I have made in my .tld file is making rtexprvalue to true - "<rtexprvalue>true</rtexprvalue>".
    As per documentation it should matter but bcoz of this setting to false I was not able to retrieve.
    Anyways Thanks again & Have a Good Day.....:-)

Maybe you are looking for