servlets

Convert Applet to Servlet (Apache)

I currently have a java applet sitting on my Apache server (in the htdocs directory). The applet is a web crawler and takes a very long time to process before delivering results (I guess applets get very limited resources). I would like to push the crawling work onto the server but I don't have any idea how to do this. I know that I...

Is it possible to view the source code of a servlet?

I'm trying to get all of the courses for a college though: http://ohiostate.bncollege.com/webapp/wcs/stores/servlet/TBDropDownView?jspStoreDir=ohiostate&deptId=&campusId=30747395&catalogId=10001&dojo.transport=xmlhttp&termId=44357427 And I was wondering if there was a way I could do this, like can I search the sourc...

get the war file name in jboss

Hi, How can I get the deployed war file name inside jboss. For example, when I am inside a servlet and I want to know the which war file name that I am in. Thanks, Son Nguyen ...

Tomcat 6 conversion to Glassfish v3: servlet-api, el-api jars

Hello I used ant when building my web app from eclipse to deploy to Tomcat 6 and referred to servlet-api.jar and el-api.jar within the Tomcat 6 release tree rather than pulling them in to my deployed library folder. I am trying to deploy to Glassfish v3. I've pulled the jars from the www.java2s.com website. Was this the right place ...

How do I know what version of servlet-api.jar I have?

Hello I downloaded a copy of servlet-api.jar from java2s.com. How do I know what version it is? There's no reference on the site. EDIT Ah. Apologies. I should have listed the content of the wordpad output when I double clicked on the MANIFEST.MF file in the jar I got: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.5 Created-By...

Spring-WS : specifying the Content-Type

Hello ! I have a Spring Webservice based on AbstractJDomPayloadEndpoint. This service works fine, except that my client needs the HTTP header Content-Type to be set to the right charset (utf-8 in my case). I cant find where I can configure that. I tried writing a simple servlet Filter : chain.doFilter(request, response); HttpServletRe...

RequestDispatcher for remote server?

I am trying to create a HttpServlet that forwards all incoming requests as is, to another serlvet running on a different domain. How can this be accomplished? The RequestDispatcher's forward() only operates on the same server. Edit: I can't introduce any dependencies. ...

How to forward to a servlet in a different server?

Possible Duplicate: RequestDispatcher for remote server? I have a servlet which does some processing. Based on some request parameters, I would need to forward the request to another servlet in a different server for additional processing and then return to the initial servlet. What's the best way to do this? I've read that ...

Will calling HttpServletResponse.reset() reset the OutputStream so it can be obtained again?

Here is a situation. Custom servlet obtains writer and it is going to do some work, however exception happens, so control is taken by some servlet framework. The framework has capability to report problem directly in a browser. So it resets current response and obtains outputstream to report problem in. Since a Writer is already taken fr...

How to access managed bean and session bean from Servlet

Here is how my commandLink work <p:dataTable value="#{myBean.users}" var="item"> <p:column> <h:commandLink value="#{item.name}" action="#{myBean.setSelectedUser(item)}" /> </p:column> </p:dataTable> then in myBean.java public String setSelectedUser(User user){ this.selectedUser = user; return "Pro...

JSP/servlet read parameters from properties file?

My JSP pages need to display different information depending on which environment they're in (dev, production, sandbox, etc). I want to have a properties file for each of these environments that contain all the parameters they might need. How can I reference the properties from this file in a JSP page? My thoughts are: Have a servle...

How do I keep Struts2 from appending jsessionid to the URL (on redirects)?

I want to keep the jsessionid parameter out of the URLs generated by Struts, but can't seem to find a configuration parameter or similar. To be honest, I don't even know exactly at which level this is handled. Specifically, Struts (or the servlet engine) puts a sessionid in the URL when it's redirecting with a 302 and the session has no...

Use standard jsp/servlet inside struts app

Hi, is it possible to embed a "standard" jsp and its associated servlet in a struts 1.X app ? (It uses no action form nor bean). If so, is there any special tweak needed ? Thanks ...

Problems with <jsp:setProperty .../>

I wrote next jsp: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <h1>Monster Calculator</h1> <FORM METHOD="POST" ACTION="Controller"> N1: <input type ="text" name="nr1" value="0...

Validating signed request: signature_invalid

I'm trying to validate an OpenSocial 0.7 signed request, using the sample Java code on that page. I think it should work this way, but I still get a signature_invalid error. Main validation code: // NOTE: req = HttpServletRequest // check for hyves if (!"hyves.nl".equals(req.getParameter("oauth_consumer_key"))) { throw new Runtim...

Help in getting a database management system running.

http://projectabstracts.com/406/java-based-online-shopping.html This project is about "Online Shopping". It uses Java as front-end implementing applets, servlets and JDBC as the connecting link to the back-end which is implemented using SQL. The problem is that I'm a newbie in all this stuff and I don't understand how to get this projec...

Content unparsed through Glassfish 3 though deployment descriptors appear correct

Hello I have dropped a war into the autodeploy of a Glassfish 3 domain and it has exploded fine, showing a subdirectory tree domain1>applications>myApp under which is a WEB-INF>classes>myApp folder tree which stores the classes for myApp. The app originally used JSF1.2 and facelets (1.1.15) and was deployed to tomcat 6, but I'm now try...

Java+JSP: Query String handling

Hi, How the best way to handle query strings in Java JSP? The method request.getQueryString() returns only a strings, how can I get the value of a specific string? Should I parse that string? thanks ...

servlet stores list in servlet context

hello, Moment the main servlet is deployed, it needs to perform calculations and prepare a list. this list needs to be accessed by the other servlet which are called subsequently. the calculation needs to run only once. could some one please explain how to go about doing that. thanks ...

how can i keep jsp form fields values in the form after submit thr form?

after making submit to my data in html from ,servlet add these data to my db and forword a result msg to jsp page , i want to keep the values in the form after adding these info , is it sensible to make object in servlet and add all the parameters i recieve into and send it with request to jsp ?is there another better way ? ...