I'm trying to build a basic servlet with scala, but I can't seem to figure out how to get it running under tomcat. I think my scala class is okay, and I included all the libs in scala-2.6.x-final-blah.tgz to my tomcat lib directory, but I still get the odd, generic error below.
Can anyone tell me what's going on?
javax.servlet.ServletE...
What is the lifecycle of a Controller in Spring MVC?
When is the controller created, when destroyed? Is it shared among multiple threads? Can it be in use simultaneously by more than one request.
...
I am trying to make a mail application through apache james, but I could not really get all the
things, please give suggestions how to use it. MOreover, I could not figure it how to use jsp and servlet for james. Please help.
...
Hi, when I run my scala application under tomcat, I am unable to do basic string concatenation, and I get an error stating that no class definition was found for StringBuilder. I'm running under windows 7 (development) and ubuntu (production), and I don't believe that java 1.4.x JDK or JRE has ever been insalled on either system.
Any id...
Hi, I've written a html form to retrieve password and user name from users:
<form action="prueba-registro" method=get enctype=multipart/form-data>
<h3>
User information
</h3>
User name: <INPUT TYPE=TEXT NAME="realname"><BR>
Password: <INPUT TYPE=PASSWORD NAME="mypassword">
<P><INPUT TYPE=SUBMIT VALUE="Register">
</form>
This informati...
I want to use the Model-View-Controller template while writing my Web App. The problem is, the Model part of the code has already been written in Swing. The Model code also must require the container to call its main method before any interaction with its servlets. So is there a way for me to specify the location of the main method in th...
I'm following this example to get Spring up & running: http://static.springsource.org/docs/Spring-MVC-step-by-step/part2.html
What they do is move all .jsp files inside the WEB-INF, to stop users accessing them directly... so far so good. However the servlet has a welcome page of index.jsp, and when this is moved inside the WEB-INF dir ...
Hi,
We've a web-based application wherein there is an option for Users to upload documents / files into our database. Before uploading any document / file, we want to send the file for free online virus scanning offered by few websites like http://virusscan.jotti.org/en, get the scan status from them. Only if the response status is O...
I have a servlet which handles a multipart form post. The post is actually being made by a Flash file upload component embedded in the page. In some browsers, the Flash-generated POST doesn't include the JSESSIONID which is making it impossible for me to load certain information from the session during the post.
The flash upload compon...
I'm finding it difficult to embrace a Java MVC framework, when it looks as if Servlets, JSPs and a lightweight DAO will do just about everything you need it to do in order to decouple the controllers/views/models. For PHP I can see the necessity since there are no built in constructs like servlets, but do Java MVC frameworks really give ...
How can i make sure my file serving is reliable and scalable? How many parallel request it can handle?
I am thinking beyond the hardware capability and band width.
i am following http://stackoverflow.com/questions/55709/streaming-large-files-in-a-java-servlet
...
After checking the database the incorrect password should be displayed on the same login page.
I have used servlet and forwarded that to the login page but i couldn't add the message "incorrect password".
RequestDispatcher rd = getServletContext().getRequestDispatcher("/register.jsp");
if(dbpwd.equals(null)) {
pw.println("Not a ...
I am writing a servlet jsp under Glassfish to download a file from a website, do some processing and display the result in webpage.
When I deploy the servlet, it gave me:
java.io.IOException: Server returned HTTP response code: 503 for URL: www.websitename.com error.
I check the status code 503 out and it turns out to be a server ove...
I have been writing a pure java web server specifically customized for a website I'm making. I've grown tired of reinventing the wheel though, and am now investigating moving over to java servlets. Basically I just want to run server side java code while leveraging the servlet technology to avoid writing http protocol specific code.
I...
Hi,
I currently have a web-app where I have Servlets reading and writing to the ServletContext attributes and I have "working" Threads (Daemon threads) which get initialized on startup and currently hold as a member the ServletContext object.
For a couple of reasons I'm thinking of moving to "implement Runnable" instead and I'm kind of s...
I have the servlet name ExampleServlet.java which have only init method with HttpServletRequest and HttpServletResponse parameters. I will forward the request to another servlet named ForwardedServlet.java which will display some text on the web page. But when i am trying to execute the ExampleServlet http://localhost:8080/Sample/Example...
Hi all,
I have a small application with 3-4 servlets and a basic module that provide me authentication like:
public class Authentication {
public boolean isUserAuthenticated(){
....
}
}
Is there a way to check the authentication using my class BEFORE every other servlet calls, without have to add code in each of them? I'...
Is there a recommended way to synchronize Tomcat Servlet instances that happen to be competing for the same resource (like a file, or a database like MongoDB that isn't ACID)?
I'm familiar with thread synchronization to ensure two Java threads don't access the same Java object concurrently, but not with objects that have an existence ou...
I need to access some files on servers from servlet. They have different paths on my development machine and on the deployment server. I would like to put some config file (with paths) somewhere (like shared dir in capistrano deployment) so application could read it. Or maybe set some property on the application server or anything like t...
I'm trying to add to every row of a HTML table a "delete" and a "modify" button.
If I use this method, the value of the "id" is alawys the value of id from the first row, even if I pressed the button from the rows 2-n.
<% if (listx.size() > 0)
{
int j = 0;
for (int i = 0; i < listx.size(); i++)
{
...