Suma K Gowda

Greenhorn
+ Follow
since Feb 03, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Suma K Gowda

Hi

I've received two jasper report from the client. One is running without any problem but the other one is throwing the exception below:

exception

javax.servlet.ServletException: E:\jakarta-tomcat-5.0.27\webapps\teacheval\WEB-INF\classes\preassessement_report.jasper
webeval3Struts.SchoolTeacherReportFormAction.perform(Unknown Source)
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

dori.jasper.engine.JRException: E:\jakarta-tomcat-5.0.27\webapps\teacheval\WEB-INF\classes\preassessement_report.jasper
dori.jasper.engine.util.JRLoader.loadObject(JRLoader.java:116)
dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:288)
dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:281)
webeval3Struts.SchoolTeacherReportFormAction.perform(Unknown Source)
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I'm using tomcat 5* and iReport to generate the XML file, and using Java API's to generate the jasper report from the xml file.

Please help>>>
20 years ago
Hi

I want to integrate crystal report using java. Plz gimme the URLs where I could find step by step tutorials abt crystal report and java reports.

Regards
20 years ago
Hi

I want to login and check out files n folders from the cvs repository..
Please help me to code for the same in java.

Regards
20 years ago
Hi

I'm connecting to a database and want to display all the available tables under that database. How can I do it?

I checked the whole java.sql api..but didn't find anything which actually displays the tables under a database..

Plz help
Hi
If you want to link to a different jsps, then
1) Have a seperate column in the database to store jsp page names. Then along with other records retrive the jsp name.
<a href=<%=getString("jspname")%>?yourquerystring>
or at the page scope declare a string to store the jsp name, if there isn't too many jsps for different links. have a switch statement and according to the different case hard code the jsp names and return that to your href.
Regards
20 years ago
JSP
Hi
My servlet code
request.setAttribute("myVector",vSimpleVector); // I'm setting a vector object to the request object
rd = ctx.getRequestDispatcher("/sample.jsp"); // and dispatching it to a jsp page...
in the jsp page I'm looping through the vector...
but I want to display some fixed records at a time..and when user clicks next I want to loop through the vector again...without actually calling the servlet again....... is there a way to get this working..........
Regards
20 years ago
JSP
Hi
I'm having a frames page, once logout link on the topframe is clicked, I'm sending a request to the controllerServlet to invalide the session (session.invalidate()). This is working fine, but if I click browser back button and refresh the page, I'm getting all the data irrespective of non valid session, though I'm checking for valid session before displaying the data in the respective frames.
Please help
Push
21 years ago

Originally posted by Basavaraju Banakar:

Did u try refreshing the entire page.. then the unload method of the header is called.. which might end the user session??


When the unload method is called, first it opens a new window using javascript before actually getting self closed.
The newly opened browser will call the servlet on onLoad event, and the servlet will take care of the rest like session killing....
21 years ago

Originally posted by Sonny Gill:
Hmmm..
Only problem that I can think of at the moment is, that some smartarse user might look at the page source, and access the main page directly without going through the frameset page. In that case, the page with javascript is never loaded...or unloaded. But if I rely on the user making a request every 10 sec(say) , and he tries to go around it, the monitor thread running at server will still log him out. That is a bit far-fetched but..never trust the end user
!


What you can do is, make the window size very small may be 1 px width & height, and minimize the window dynamically, so that the user don't even reconize that some window has been popped up or something is happening after he has closed the window.
And when you are done with your session kiiling, dynamically close the window.
For me it worked fine, I didn't had any problem, but as you know if the end user wants to make it fail he can do it anywayz
Regards
Push
21 years ago
<listener>
<listener-class>
listener-class-to-bind
</listener-class>
</listener>
21 years ago
As you said I also had faced the similar problem.
I have found a easiest way to do the needful, but doesn't know how effiecient it is.
Assuming that its a frame based web application
In any of the html pages under different frames(top,left or main), which will be loaded for sure at the time of a browser closes.
For eg: The topframe's page which is usually be static. onUnload() event of that page call a javascript which opens a new page, within that page, onLoad event call a javascript function which calls a servlet, and tell your servlet that if the request comes from this page then user is closing the window, then the servlet should take care deleting the required stuff like session or persistent data from the database. After few seconds you can close the window which has been opened dynamically, even if the user closes the window manually, as the request will be sent already, that won't affect anything.
This worked for me, you can try it!!!
21 years ago
As you said I also had faced the similar problem.
I have found a easiest way to do the needful, but doesn't know how effiecient it is.
Assuming that its a frame based web application
In any of the html pages under different frames(top,left or main), which will be loaded for sure at the time of a browser closes.
For eg: The topframe's page which is usually be static. onUnload() event of that page call a javascript which opens a new page, within that page, onLoad event call a javascript function which calls a servlet, and tell your servlet that if the request comes from this page then user is closing the window, then the servlet should take care deleting the required stuff like session or persistent data from the database.
This worked for me, you can try it!!!
21 years ago