Jump to content
We've recently updated our Privacy Statement, available here ×

this line give me error InputStream forms = getSer


mfa

Recommended Posts

sir i import all rlated class

 

 

import com.sun.rave.web.ui.appbase.AbstractPageBean;

import com.sun.rave.web.ui.component.Body;

import com.sun.rave.web.ui.component.Form;

import com.sun.rave.web.ui.component.Head;

import com.sun.rave.web.ui.component.Html;

import com.sun.rave.web.ui.component.Link;

import com.sun.rave.web.ui.component.Page;

import javax.faces.FacesException;

import com.sun.rave.web.ui.component.Button;

 

import java.util.*;

import javax.servlet.*;

import javax.servlet.http.*;

import java.io.*;

import javax.imageio.*;

import java.awt.image.*;

import java.awt.*;

 

 

 

use this code in button press event

 

public String button1_action() {

 

InputStream forms = getServletContext().getResourceAsStream("/mfa.jasper");

 

return null;

}

 

 

 

 

but sir this line give me error

 

i need send jasperviewer to client by streem

sir how i use streem

 

please send me code how i send jasperviewer to client through streem

 

 

thank

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

hi master

thank you for your reply

 

sir can you send me any jsp sample code

how i use inputstream in jsp button when i press button then pass data to client by inputstream

 

 

please send me code

 

thank's

 

aamir

Link to comment
Share on other sites

Hi,

 

I understand your application is a web app (while you're using getServletContext() method), isn't it? Sending you "the code" in this situation means a large variety of coding possibilities, and a lot of related files where "the code" should be written.

The best thing you can do is to download the jasperreports-1.3.4-project (zip, or tar.gz) from the download site.

After you extract files from this archive, you will find under the /demo/samples directory the webapp sample. Try to compile, run and study this sample by yourself, and I'm sure you will find a lot of answers here.

 

hth,

sanda

 

PS: in order to run the sample, use the ant war task, and get the war. Then you just place the jasper-webapp.war file in the Tomcat's webapps directory.

Post edited by: shertage, at: 2007/07/18 10:43

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...