tomcat

How to make a REST call in JSP?

Hi, everyone, I want to ask a question about the JSP and REST call. I am making a JSP page and need to mark a REST call and receive the REST call in JSON format. The JSP (.war) is running on the tomcat server. Like the following: JSP(REST call) -> server -> JSON format(REST respond) However, I don't know how to make the call and respo...

How do Application Servers support multi-threading?

I am looking for information regarding how application servers like Tomcat, Websphere, IIS etc support multi-threading to handle client requests. Is there a comparative analysis on how each of them support/handle concurrent requests? Thank you ...

Java Web Application - Servlet Problem

I have servlet that does the following: public class LoginServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); request.getAttribute("u...

Cannot connect to remote mysql through tomcat

Hi, I am able to connect to mysql through a gui workbench but when i try to connect with my applications datasource (which runs on tomcat) i get: Access denied for user 'dbuser'@'192.168.100.231' (using password: YES) i have tried all the options in the mysql reference guide but none worked. any ideas? ...

Tapestry5 application not running on WTP Tomcat server

My Tapestry 5 application is running fine with a maven "tomcat:run" build, but not when I use a Tomcat WTP server. I.E: I created a tapestry 5 project based on the tapestry 5 quickstart maven archetype. At the beginning, it works fine with both servers. After playing a little bit with the dependencies (i.e. adding and then removing t...

Large portlet war takes up memory causing performance issues?

I have heard a few people say that deploying a portlet war file (or perhaps any war) that includes a lot of large jars can cause performace issues because all those jars get loaded into memory. If you have several wars, all of which include a ton of large jar files, your system will get bogged down. I'm trying to get my head around why...

Empty page instead of custom tomcat error page

My setting: Apache 2.2 + Tomcat 6.0 @ Windows 2008 R2 64bit static webpages: / servlet: /foo tomcat and apache are connected by mod_jk 404.jsp is placed in tomcat\webapps\ROOT tomcat\conf\web.xml: <error-page> <error-code>404</error-code> <location>/404.jsp</location> </error-page> apache\conf\extra\httpd-ssl.conf: JkMount /foo...

Why is Tomcat manager using my LoginModule?

Hello, I'm running Tomcat 6.0.29 and created a realm and loginmodule of my own. They are defined in server.xml like so: <Realm className="mycompany.tomcat.MyRepositoryRealm" appName="My_Realm" userClassNames="mycompany.tomcat.IdentityPrincipal" roleClassNames="mycompany.tomcat.RolePrincipal" useContextClassLoader="true"/> I have adde...

client to Apache via HTTPS. Apache to tomcat via HTTP but want the response from apache to the client as HTTPS

Scenario: Client connects to apache via HTTPS. Apache has a BalancerMember which connects via HTTP to a tomcat. Problem. the response from tomcat to apache and then to the client browser is HTTP. Would want this to be HTTPS since the client connected via HTTPS. Not sure how to do this. Any tips/guidance would be appreciated. ...

servlets and classpath

I apologize for the crummy subject line. I started at a new company last week and was thrown into the lion's den immediately. We had a application on the verge of going into production... One of my guys had the app running and QA'ed so I didn't delve too much into the details of what he was doing. We had this: ../legacy/ROOT/ ..........

JBoss Connection Reset

Hi all,I'm used JBoss Application Server for running my web application.After I accessed again.I receive this errors : WicketMessage: Can't instantiate page using constructor public com.app.web.common.MainPage() Root cause: java.sql.SQLException: Io exception: Connection reset at oracle.jdbc.driver.DatabaseError.throwSqlException(Data...

TomCat Issue: tomcat as windows service makes sql authentication to fail whereas if tomcat is run normally conn to db is successful

we hav a java app running on tomcat backend is sql server configured for windows authentication we are runnning tomcat as a windows service we are not able to connect to sql db bcoz tomcat is used as windows service. guess, its taking different userid and pass for which sql server windows authentication fails. however, if we run tomcat ...

Apache Forward JSP pages to tomcat

I have Apache Server, in which my website running, but there is some jsp pages in my website. I have to forward my jsp pages and servlet to tomcat. Kindly help me so that I can make it possible. Sorry for my bad English. ...

How to remote debug Tomcat (JPDA) when server has multiple virtual hosts running

Im trying to remote debug Tomcat (JPDA) on a server that is running two virtual hosts using the same Tomcat container. How do I ensure the debugger connects to virtual host A and not B. Thanks! ...

Call a JSON file in the server in JSP

Hi, everyone, I want to ask some questions about the JSP and JSON file. I have a JSON format file which put in the tomcat server. And I use the JSP to write the web application. When the user types the URL and open the JSP page, the JSP page will get the file in the tomcat server (e.g. it can assume the file in the "c://location"). Aft...

Stuck with apache,mod-ajp weird redirection

hi all i have a redirection problem with mod ajp, that it always adds the application name before the desired page, for example: if i requested the page: http://myapp.com/mypage it is converted to http://myapp.com/myapp/mypage, and i get a 404 error i don't know why such behaviour occurs, this is the configuration: <Proxy *> AddDef...

Java: I lose the session: Would it be a problem from using "<a href >"?

Hi! I am having problems in Java while managing sessions. All works perfect(I create and get/set values in the session), until I redirect with a link (the link is in a JSP). Then, the session is lost. My server is Tomcat, and my browser is a Firefox browser. I am using Struts 2. Thanks for your time ;-) ...

Can't see JMX entries in jconsole when using Tomcat JDBC Connection Pool

Hi, we're evaluating switching over from the C3P0 connection pool to the Tomcat JDBC Connection Pool (as described here). It appears to work as a connection pool but I can't seem to see any JMX entries for it when I run jconsole. Out of the box C3P0 gives lots of operations and attributes via JMX, the Tomcat JDBC Connection Pool gives ...

Deployment from URL

Is it possible to deploy a remote war file automatically when my tomcat (6) boots? I am thinking about pointing my context.xml to http://myrepos/myapp.war, but could not find a example of this, what is the corret attribute to set? ...

How can I move my SSL cert from Tomcat to Apache

I am moving my site from a tomcat only instance to an apache httd/ apache tomcat setup. I'm trying to set up the ssl with mod_ssl on apache httpd. But I don't know how to convert my tomcat keystoreFile/keystorePass to the apache httpd SSLCertificateFile/SSLCertificateKeyFile format. I am pouring over the openssl man pages with no luck...