process 1 « Development « JSP-Servlet Q&A





1. Disable JSP extension processing    stackoverflow.com

I have a JavaEE 1.4 web application running on WebSphere Application Server 6.0. In web.xml, there is a servlet configured to intercept all server requests:

<servlet-mapping>
 <servlet-name>name</servlet-name>
 <url-pattern>/*</url-pattern>
</servlet-mapping>
This works fine until I ...

2. Servlet long processing cancelation when browser closes    stackoverflow.com

I have a servlet which processes a request for a long time. It suppose to keep doing stuff in the loop inside doPost and send data through response's out writer. Effectively that continuously ...

3. processing json objects in jsp    stackoverflow.com

i have a JSON object sent from the browser to the jsp page. how do i receive that object and process it in jsp. do i need any specific parsers? i ...

4. Most effective way to process a string containing XML, in JAVA    stackoverflow.com

I have a String which contains XML nodes within it, and am seeking to use DOM parsing to process this string to extract node values and store them in local variables. The ...

5. Running linux process from servlet useing Runtime.exec()    stackoverflow.com

Is it good idea to run linux process in multi user environment. Ex: Runtime rt = Runtime.getRuntime(); ...

6. IllegalAccessError when calling ant script from maven-antrun-plugin    stackoverflow.com

I just updated Maven from 2.0.9 to 2.2.1 and I'm getting the following exception when running a maven build:

INFO] [antrun:run {execution: precompile-jsp}]
[INFO] Executing tasks

default:

jspc:
    [mkdir] Created dir: C:\builds\trunk\webapps\vyre_portlets\WEB-INF\jsp_src
[INFO] ...

7. How to stop processing a JSP early?    stackoverflow.com

I've got a JSP page, which calls a function and checks its return value. If the return value is not null, the JSP page goes on to use it. If the ...

8. Inside a JSP: Merge two Images and let the user print the result    stackoverflow.com

I'm just stuck with another programming problem. Within a JSP Web Page I have two urls. From two images, one is a Tiff and the other one is a PNG. The one ...

9. Limit the number of parallel processing of a servlet    stackoverflow.com

We have a servlet which occupies more virtual memory on the server as it downloads files . For this reason, we would like to limit the concurrent requests to this server ...





10. Finishing a HttpServletResponse but continue processing    stackoverflow.com

I have a situation that seems to fit the Async Servlet 3.0 / Comet situation but all I need to do is return a 200 response code (or other) after accepting ...

11. Asynchronous Processing = Spanning Threads = Valid?    stackoverflow.com

am I allowed (without any sideeffects) to create and start a new Thread() from within a doGet() Method of a servlet? Or does this somehow leak ressources? Is it valid to also ...

12. Background process in Servlet    stackoverflow.com

I have a question. Is it possible to implement a background process in a servlet!? Let me explain. I have a servlet that shows some data and generate some reports. The generation of the report ...

13. Processing XML data for JSP    stackoverflow.com

I have a form/calculator, which posts to itself some data, this data is then calculated by dispatching a servlet and the results are output as xml. The dispatcher code is shown ...

14. What is the best way to edit those 1 pixel background images?    stackoverflow.com

I got my colleague's web page together with and the css files and many images. I need to apply part of it to my jsp page. I have to admit that ...

15. forward()/redirect() usage for a signup process?    stackoverflow.com

I'm trying to finalize a signup process for my webapp, but am getting confused with servlet forwarding/redirects (again). The flow looks like this:

// /signup/index.jsp
<form action='/user/signup'>
</form>
<% 
if (request.getAttribute("msg") != null) {
  ...

16. Java Servlets command line processing    stackoverflow.com

I have a command line and i want to convert this into a servlet request in a bash script.How can i do this? For example: >>Command arguments the http servlet request shud be ...





17. Javascript groups development process    stackoverflow.com

We as a group develop Javascript/JSP web application, and the problem is we are developing the webapps based on customer requests, while another team (core team) develops the "core" webapp product. In other ...

18. Video encoding by servlet with MEncoder    stackoverflow.com

I was developing an application for video encoding on the server and got a problem with encoding video with MEncoder. This decoder doesn't work correctly when runned by a command line ...

20. Creating BufferedImage from PApplet contents    stackoverflow.com

In my Java servlet that uses Processing, I want it to render the contents of the PApplet to a BufferedImage and produce from it a PNG image. What's the way ...

21. How to keep the servlet continously running?    stackoverflow.com

I m using java.I want to keep the servlet contineously running in my application. i m not getting how to do it.Actually my servlet has a method which gives counts of the ...

22. Informing the user that the file is being generated in a download servlet    stackoverflow.com

I have a download servlet wich generates a ZIP with some files, one of them pretty big, and then sends the generated file in the response for download. The problem is that ...

23. Can I save the image    stackoverflow.com

I have coded a JSP that will show the image on the browser. But I also want to save this image in the server-side. I have searched the answer but I still don't ...

24. How do I kill a long-running servlet process from another servlet?    stackoverflow.com

I have a Java servlet that runs a database query that may take several minutes to run before attempting to write to the response stream. During the database query the user ...

25. Background timer task in JSP/Servlet web application    stackoverflow.com

I want to retrieve from subscription and store feeds to DB from subscription after every 6 hours. I want to have a timer thread in background to accomplish this task. What's the ...

26. Error in processing uploaded file    stackoverflow.com

I'm trying to read an uploaded file and save it in DB using JSP.

<%@ page import="java.io.*,java.sql.*,java.util.*,java.text.*,java.text.SimpleDateFormat" %>
<html>


<%
int val =0;
String contentType = request.getContentType();

if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
DataInputStream in ...

27. Is it dangerous to store HttpServletRequest objects in a queue for later processing?    stackoverflow.com

So, I'm in a situation where I want to queue up a bunch of HttpServletRequest objects for asynchronous processing. Put aside for the moment whether or not this is a ...

28. In JSP, want to use pageContext.forward and process the result    stackoverflow.com

I'm trying to inject a JSP page into an unnamed enterprise web-application to get the value of a SSO token provided by a servlet. The goal is to redirect back to ...

29. How to get WebLogic to process certain files as JSP    stackoverflow.com

I am migrating a java web application from OC4J to WebLogic 11g. The application contains the following servlet mapping:

<servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*_dyn.txt</url-pattern>
</servlet-mapping>
This works in OC4J for ...

30. Suggestions for simple ways to do Asynchronous processing in Grails    stackoverflow.com

Let's say I have a simple controller like this:

class FooController {

  def index = {
     someVeryLongCompution() //e.g crawl a set of web pages
    ...

31. Firefox processing response from servlet    stackoverflow.com

I have a javascript which receives info from a servlet using jQuery:

$.get("authenticate", {badge:$('input#badge').val()}, function(data) {
        console.log("xml: "+data);   
     ...

32. How to call a servlet from a batch program?    stackoverflow.com

I have a situation where I have a series of similar JSPs, each of which is called from a servlet based upon an option entered by a user. However, I would like ...

33. How to setup an intermediate (waiting/processing) page while the servlet finishes its work    stackoverflow.com

We are using Java JSP / Servlet technology. When a user submits a form on our website, the form is processed by a servlet, which takes 5 to 15 seconds to ...

34. Servlet processing exception    stackoverflow.com

A newbie user question. I have defined a class like this: ...

    public class ConceitosSelecionados implements Serializable {

        private static final long ...

35. processing as a servlet but displaying as a jsp    stackoverflow.com

To avoid lots of out.println() for writing html to a page is there any way in which most logic can be written as a servlet and the html can be sent ...

36. Download process is not visible while servlet is downloading pdf    stackoverflow.com

I m using content-disposition to download pdf . When I click the download button, the complete pdf file is downloaded first and then browser shows the dialog box to save the ...

37. How can i get an immediate response from a long running process in j2ee?    stackoverflow.com

I can't seem to find a solid answer anywhere. I THINK i found one with respect to JMS but it was confusing.

38. Error while processing the servlet    stackoverflow.com

I have the following JSP File and Servlet file

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        ...

39. Getting a Blank Screen while processing servlet    stackoverflow.com

I am getting a blank screen while processing the servlet. Earlier It was giving me some errors but after code fixing it stopped giving me error and started giving me a ...

40. Stop JSP processing on page close    stackoverflow.com

I have this page:

<%@page language="java"%>
<html>
     <head></head>
     <body>
         <% while(true) System.out.println("foo"); %>
   ...

41. org.apache.jasper.JasperException: An exception occurred processing JSP page    forums.netbeans.org

benmie Joined: 04 Jun 2009 Posts: 1 Location: Denmark Posted: Thu Jun 04, 2009 8:16 am Post subject: org.apache.jasper.JasperException: An exception occurred processing JSP page Hi, I am ...

42. JSP Processing Error, while clicking on Upload button.    jmeter.512774.n5.nabble.com

I have a scenario where in, i need to navigate to a particular page and click "Upload file." This opens a popup where i need to browse and select the file to be uploaded. This scenario works fine when navigated manually. However when i record it using Jmeter, the popup window shows error saying "JSP Processing error". It happens only while ...

43. out-of-process servlet    coderanch.com

I'm using Tomcat 4.1.12 on a Win2K server to host a servlet which uses JNI to call a DLL. I would like to run multiple instances of this servlet calling separate instances of the DLL. That part is no problem simply by giving each instance a unique name (both servlet class and DLL). However, I'd like to run each instance in ...

44. Problems processing .jsp: Invalid Cursor State    coderanch.com

Hi, I've got a problem processing .jsp. All I want to do is a database query with the help of an html form. But every time I send the request to the browser I get an error code like this: "javax.servlet.ServletException: Exception thrown processing JSP page. java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(Unknown ...

45. Processing a large data file(55Mb)    coderanch.com

At one point in my program, I performing calculations on number of rows(~600,000). I use JSP & JAVA. Here are some things I noticed. 1. It's very slow! :-) 2. Initially, the cpu monitor shows a high level of cpu utilisation, but this slowly drops off with a blip every second or so. Basically, things slow down as the process chugs ...

46. Can I Process rtf file    coderanch.com

Actually, I have an app that output a dynamic RTF document, and I'd show it to you except it's broken at the moment (converting over to Struts). For a simple JSP approach, you could compose the boilerplate in WORD, output to RTF, take the RTF and add JSP functionality (note especially to set the content-type and content-disposition headers!) and embed scriptlets ...

47. real-time process handling    coderanch.com

48. Login/Registration Process    coderanch.com

I am working on a website, they want to provide login, registeration, and mailing back to user info on different offers which he checks at the time of registeration. Can anybody suggest me any artical or resource which provide me guidelines that how can it be done. Thanks in advance. Kind regards Rashid Ali

49. Help in Estimating process time and make a progress bar    coderanch.com

Hi Folks I am developing a web-based product.we are using jsp1.1,Dhtml,Jdk1.3,Sevlet2.3 (Jakarta with struts1.1 )and Db2 as database. I need to generate a pop-up dialogue box as wait or progress indicators for processes(such as opening a file from database,Saving to database) that take more than 7 seconds.Is there any way to do that in Java?I am concerning about estimating the time ...

50. display a processing page after submitting a jsp    coderanch.com

HI guys, i need to display a processing.jsp(popup window) when i click submit button in form.jsp Upon successful i will display success.jsp and processing.jsp should close. How can be done .....any one please help me. i tried in Javascript like window.open(process.jsp). but i couldnt close this window when success.jsp is loaded.... thanks sathish

51. Large process.    coderanch.com

52. Unbalanced process load ?? one java process is locked to highest CPU load ??    coderanch.com

I am using resin 2.1.6 on RedHat 7.3 on a P4-2G box with 1GB RAM. We all know that resin will 'fork' a lot of java process to handle JSP/servlet requests. Generally , these process have similar CPU load , each about lower than 5% of CPU load, and no process will always occupy highest CPU load, for example : 5:29pm ...

53. Display Status Of Processing    coderanch.com

54. How to show the progress of a processing jsp page?    coderanch.com

I have a JSP page doing a lot of processing, and hence requires the client to wait for a long time, say 15 mins, while it processes. I need a way of letting the client monitor the process. Let's say the JSP page needs to process 500 records. I will process these 500 records in batches of 100. Now.. my question: ...

55. HELP! Exception Processing ErrorPage    coderanch.com

56. Display Animation While Processing    coderanch.com

57. How to automate the login process?    coderanch.com

58. jsp process cycle    coderanch.com

59. background processing    coderanch.com

k, you do it this way, Let us assume we have page1 , page2 and you are moving from page1 to page2 and in the mean while as this is a time taking process you want to show a please wait page. Let us assume that the page with please wait is called "interim". now when you click on submit dont ...

60. server side processing error    coderanch.com

When I start tomcat server and run sample code. I find error: The requested resource (/servlet/donow.RecordingServlet) is not available. web.xml: RainForest App Basic web application action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml debug 3 2 JSPG0123E: Unable to locate tag attribute info for tag attribute lang. Root Cause:com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /adduser.jsp: /adduser.jsp(7,1) --> JSPG0123E: Unable to locate tag attribute info for tag attribute lang.at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateCustomTagAttributeValues(ValidateVisitor.java:1649)at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitCustomTagStart(ValidateVisitor.java:289)at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:267)at ...

78. registeration process logic    coderanch.com

Hello All I am doing registeration process there is 2 tables 1. client 2. serial (has a field with last client no.) I want to add new client in client table , its number is last client no. +1 what i already did as follows 1. html form for user information 2. jsp confirmation page (gets data from the previous page) ...

81. Processing a login page not working    coderanch.com

I have a very simple login page that's not working as expected. The idea is that if a user tries to access "premium content", he'll be redirected back to a login page. Currently, this page is just testing and not using any DB lookups: Here's the login page code in the JSP: <% if (( request.getParameter("userName") != null) && (request.getParameter("password")!= null) ...

82. File download Process    coderanch.com

83. scriptlet processing query in JSP    coderanch.com

Hello, I am having a requirement from the client. The requirement is : I have a link.On clicking of the link,a session is opened for the user and I have to create a temp table for the current session.Then I have to insert data into it based on certain request parameters and then I need to select data from the temp ...

85. regarding JSP Processing Error --Illegal constant pool index    coderanch.com

hi Jeanne ., Thanks for your immediate response.Now I have resolved the problem.But I did nothing.Last day, I shutdown my system after getting the error and today I have executed again. Now it is working fine. But I am again telling ,I didn`t do any thing. If it is possible ,could you please trace the problem where went wrong. Thank u ...

86. To stop JSP Processing    coderanch.com

88. servlet process_delete    coderanch.com

90. Servlet Processing    coderanch.com

For any process that takes a lot of time, you should consider doing it outside the servlet Thread. Your servlet can start the process and report to the user that it has been started. The object conducting the process can be attached to the session or maybe just have some sort of identifier attached to the session. The immediate response HTML ...

92. file processing on the servlet --urgent--    coderanch.com

U can have the object stored in a common place, namely ServletContext. This will enable u to share the object between threads. But then u have to make sure that this object is thread safe becoz if u use the setAttribute() nethod with a constant key, the Server will crash. Instead use a unique key (say e.g. hashCode of the object) ...

93. Processing input files with Servlets    coderanch.com

Hi all you Servlet gurus! I am hosting a website which runs purely on Servlet, JSP and JDBC technology, but I've little experience with Servlets accepting and processing input files from the user. Ok. I have no experience of it I would appreciate any suggestions. Essentially, I need to accept a simple text file from the client and use it to ...

96. asynchronous processing in a servlet    coderanch.com

Hey there, I had to do the same thing a couple of projects ago. What I adopted was the "Orbitz" model. In my case we were not using JMS but manually handling it via java threading. Here are the steps: 1. Process initial request 2. Spawn thread to do long task 3. Forward user to page with flashing/filling/rotating 'processing' image. 4. ...

97. browser attempts to save servlet rather than process it?    coderanch.com

I had Tomcat5.5 working great last week and was working through examples, processing my practice servlets, when suddenly, after I compiled a new example (a whole new app with a new WEB-INF), my Firefox pulled up a prompt saying: "you have chosen to open ListenTest.do which is a: .DO file... What should Firefox do with this file?... Open with [do_auto_file default] ...

100. Create a process from Servlet    coderanch.com