I'm trying to deploy an application to Tomcat 7 on a Windows server. I have a local copy set up and have tested with Eclipse without any trouble, but on the production server I get IncompatibleClassChangeError messages.
This had been a problem on the local server when there were problems with the classpath, but I configured the correct...
This is driving me bonkers. I'm writing a web app in Java and all I want to do is verify the existence of an image that's saved to an /images folder right under the web root.
The 1,000,000 google searches I did seemed to indicate that the File.exists(path) method is the way to go. But for obvious reasons, I don't want to hard code the p...
I wrote Front Controller Pattern and ran the test. Somehow request.getPathInfo() is returning null when it should return the path info.
1. HTML that calls servlet
<a href="tmp.do">Test link to invoke cool servlet</a>
2. Map the servlet in DD.
Anything that has .do extension (ex tmp.do) will invoke the servlet "Redirector"
<!-- SERVL...
Probably a repeat! I am using Tomcat as my server and want to know what is best way to spawn threads in the servlet with deterministic outcomes. I am running some long running updates from a servlet action and would like for the request to complete and the updates to happen in the background. Instead of adding a messaging middleware like...
I need to write a small Java class that will enable me to add to and read from the current user session.
Everything I see refers to Servlets but I'd ideally like to just use a plain old class.
Can anyone please help this Java Newbie?
Thanks
...
I need to list files under a folder of a different web application. Is there a way to get this done without having to provide the actual path in a properties file?
Webapps
- WebApp1
-MyFolderOfInterest
- WebApp2
- WEB-INF
- Classes
- MyClasstoListFiles
TIA
...
I'd like to use the following filter to open and close persistence managers.
public final class PersistenceFilter implements Filter {
private static final PersistenceManagerFactory persistenceManagerFactory
= JDOHelper.getPersistenceManagerFactory("transactions-optional");
private static PersistenceManagerFactory factor...
I have a C API that talks to hardware and I want to ultimately make calls to that API from a browser. Thinking some to the c++ servlet lib's are too complicated, as is JNI, I thought I could prove the concept like this:
A java servlet gets a simple string message via HTTP.
The servlet opens a socket to pass along data via UDP.
C process...
Hi,
is there any equivalent to FacesContext, but in servlet environment?
I have some DAOSessionManager that handles transaction to my database. I can use the FacesContext to identify the current http request when the current page is written using JSF, but what about servlet ones ?
I can't find any way to get the current Servlet conte...
Hello experts,
We recently switched to Servlet 2.4 and JSP 2 on a project and our custom tags no longer work.
We have tags like:
<myTags:someTag value="${x}" />
and once in the tag we evaluated x bean and went from there. Now the evaluation happens directly in the JSP and we get a String (apparently x.toString()) set for the value at...
I am attempting to have my android phone connect to my servlet and send it a certain image. The way I figured I would do this, is to use the copyPixelsToBuffer() function and then attempt to send this to the servlet through some output stream(similar to how I would do it in a normal stand alone java application). Will this way work? If s...
I am building a site which submits a url to a servlet for analysis purposes. On the client side, I submit the url as a parameter that is encoded. For example...
Submit: http://www.site.com
Goes to: http://localhost/myservlet/?url=http%3A%2F%2Fwww.site.com
On the server side, I have my servlet request the parameter like so...
String u...
javax.servlet.jsp.JspTagException: 'begin' < 0
Once in a while you run into an error and you say: What the WHAT?? tagexception begin < 0. Seen this wonder before??
...
how to send an email from jsp/servlet?
...
During the test phase of my maven build I ave the following code in one @test method:
request.clearAttributes();
response.reset();
String story_uuid = qit.getQI().getStory_uuid();
assertNotNull(story);
request.setParameter("story_uuid", story_uuid);
request.setParameter("activity", "ge...
I have a Java web-app using standard web.xml and servlets. At the moment, I'm using the <context-param> tags in web.xml to define the database configuration (JDBC url, username, password, etc.). These are picked up by a servlet in its init() method.
But I'd like to not include database username/password in my source repository.
For t...
I know it it is easy to read the context-param values from web.xml with a Servlet.
But is it possible to read the value with a normal java class?
...
I am trying to create a tic - tac - toe type of game where two androids can play with each other. I am trying to build this game using eclipse SDK and a servlet written in PHP (or I can use Java if needed). The diagram is attached ( http://www.scorechase.com/tictactoe.PNG ) which depicts one side of the data flow. Here is the problem
1]...
There's a thrird party app that needs to get information via custom http headers, so I wrote a simple test app that creates this headers and then redirects to a page that lists all headers.
The header-generating servlet snippet is:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, I...
Hi,
I would like to get some suggestions on implementing a solution that invokes ejb methods based on the parameters I pass to a servlet.
I have a web project and an ejb 3.0 project. The ejbs are invoked from the servlet in the web project.
The ejbs are invoked based on the parameters I pass to the servlet. For every action I need to ...