servlets

Is POJO Servlet ever considered?

POJO is the norm in Spring but also pervasive in JEE world. One non-POJO stronghold is Servlet. i'm wonderring if any open source ever appeals to change. POJO examples: class MyHttpServlet { @Inject void doGet (@HttpServletRequest Request request, @HttpServletResponse Response response) {..} } class MyOtherServlet { @Inje...

Form Submit success response using servlets

HI All , I am submitting a form for file upload to a servlet but i dont know how to send a success event back to java script , actually i need to call a function after the servlet is successfully executed . Please help me to find out possible approach . ...

Multiple select how to capture all selections in java

I am using a multiple options select in my HTML form, when I select more than one option and use the 'GET' method in my form I see this url?Ripples=1.3&Ripples=1.4 As you can see each selection has the same name, when I pass this to my jsp and display the variable I only get this first option which in this case is 1.3. How do I get all...

Redirecting to single frame page from two frame page

I have jsp page which contains two frames: the menu and the content. Once menu is dynamically created for a particular user there is no need to recreate it again during each request, hence I'm using frames. The problem ouccurs when user session expires. Instead of redirecting me to one frame login page, the login page is displayed in the...

how to pass a request of a servlet as a parameter to another helper

Hello to all, I wonder how cn i pass a request parameter of a servlet as a parameter to another java file of my web app that doesm't have POST and GET methods? Thanks in advance Antonis ...

return vector from servlet

I have to do an HTML page with 2 text boxes, one for name and the other one for ammount, then theres a widget that let me choose which type of account im creating, savings or checking, then a send button, this information is going to be sent to the servlet. The servlet have to create an object depending on the type of account, then save ...

Clean URLs using jsp/ servlets?

I am planning to make a CMS using jsp and servlets. Could anyone tell me how to implement clean urls using this technologies? ...

run servlet on iis server

how can i run servlet in IIS server ...

Servlet Parameter Encryption

Hi, Still learning JSP Web Applications here. I have been doing this for a while in my web application but I would like to know a more secured solution. Imagine a Table that displays certain Book Information. When user clicks one of the rows in the table, I basically send the BookID together with the url. Example URL. http://locath...

Java Servlet Static Class.

I'm learning J2EE and migrating my AP.NET project into Java. IN Asp.NET I have Helper class which has methods like encode decode, convert, etc... In ASP.NET I'm initiating public static class Helper as separate cs file and then I'm calling this static class from code behind when ever I need it. Helper.Parse(); Helper.Convert(); et...

Design Patterns web based applications

Hello all, I am designing a simple web based application. I am new to this web based domain.I needed your advice regarding the design patterns like how responsibility should be distributed among Servlets, criteria to make new Servlet, etc. Actually I have few entities on my home page and corresponding to each one of them we have few opt...

Static method from servlet

Hello, I'm writing my Servlet application and would like to use the following static method which will multiply x and y. public class Helper { private Helper() { throw new AssertError(); } public static int mutltiply(int a, int b) { int c = a*b; return c; } } I understand that Servlets are mu...

compilation problems after setting classpath in tomcat 5.5

I have installed Tomcat 5.5 in windows vista home basic. I have set classpath to "C:\program files\apache software foundation\tomcat 5.5\common\lib\servlet-api.jar". now there are two problems. 1. I could not compile my servlets. It says package javax.servlet.* dosenot exist. 2. I could not connect with local host in chrome nor in explo...

Why is contextInitialized() called multiple times?

Hi. I'm running a Stripes web app on Jboss 4.2.3.GA and am trying to call a method when I start JBoss. I created a ServletContextListener like so: public class TimerContextListener implements ServletContextListener { @Inject private TimerManager timerManager; public void contextInitialized(ServletContextEvent servletcont...

PHP posting values to java servlet

Hi, I would like to post some values (for example boolean) from a php file to my Java Servlet. It is basically a notification system which i am trying to implement.The functionality is that a user posts a question to a website (built using php) and when ever he gets an answer to his question,i should be able to pass a boolean value fro...

Error invoking servlet, but other resources get loaded - Flex + Java Application

Hi, I have written a RIA using flex for the front-end and Java servlet for the back end which actually makes calls to a web-service to do some processing. The welcome page is a html page which is served from the web-logic 8.1 server that the app is hosted on. The welcome page loads and the flash content loads. Even a 'xml' file contai...

Properly setting up a simple server-side cache

I'm trying to set up a server-side cache properly and I'm looking for constructive criticism on the setup I have currently. The cache is loaded when the Servlet starts and never changed again, so in effect it's a read-only cache. It obviously needs to stay in memory for the lifetime of the Servlet. Here's how I have it set-up privat...

Android server; login page

Hi all I need help with server and I'm new with it. Got a help from my friend but still can't work. I can't login. There is no error so called 'detected' when running the application. I can't login. Somehow the connection wasn't properly established. This is my java file open in eclipse; package log1.log2; import java.io.ObjectOut...

Ideal error page for J2EE App

I'm having a tough time consolidating errors in my application. Currently, my error.jsp looks like following (part of it): <%@ page isErrorPage="true" %> <%@page contentType="text/html"%> <%@page import="java.util.*"%> <%@page import="javax.servlet.*"%> <%@page import="javax.servlet.http.*"%> <%@page import="java.util.Calendar"%>...

Http Session Management / Alternative Session Management (in Java)

Hi guys, I'll try as best as possible to explain what I'm doing in order to get best possible advice/solution. This is all done in java. My client has a SWING based desktop application that will load using WebStart. I was assigned to create a Session Manager for user account information. My friend suggested to rather use Http Session ...