tomcat6

Java compilation gives errors about servlet libraries

 ̄綄美尐妖づ 提交于 2019-12-25 03:39:35
问题 I am trying to compile a simple class that imports some servlet libraries. Since I have not added the tomcat directory to the classpath, what is the good practice way to let the system know where to look for the servlet libraries which are found in the tomcat/lib folder? Currently, the system just gives errors like this: ackage javax.servlet does not exist [javac] import javax.servlet.ServletException; 回答1: If you want to use only the java-provided tools, you will have to look at the JavaDocs

running struts+tomcat6 application in linux+openJDK error

不羁岁月 提交于 2019-12-25 03:02:33
问题 I get the following exception when trying to run my application in eclipse. Caused by: Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl File: AbstractPlainSocketImpl.java Method: connect Line: 158 - java/net/AbstractPlainSocketImpl.java:158:-1 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) at org.apache.struts2.dispatcher

HTTP Status 404 after deploying a web application with a custom realm to Tomcat 6

耗尽温柔 提交于 2019-12-24 12:12:32
问题 I develop a web application for Tomcat 6, and I'm face to face with a problem I don't know how to resolve. Let's consider the following small scenario. Imagine that it's required to authenticate users not just by user and password, the authentication is only granted if some extra conditions are true (e.g. user, password, and his IP address matches). As far I understood, Tomcat introduced the concept of realms. A simple JDBCRealm was enough for the application, because the user and password

tomcat does not pick the context.xml, it is getting coopied to CATALINA_HOME> conf>Catalina>localhost though

好久不见. 提交于 2019-12-24 11:26:48
问题 My context.xml (in META_INF) folder looks like this: <?xml version="1.0" encoding="UTF-8"?> <Context path="MY_CONTEXT_NAME" docBase="${catalina.home}/webapps/MY_APP_NAME" debug="0" privileged="true"> </Context> The problem is, context.xml is getting copied to the CATALINA_HOME> conf>Catalina>localhost folder when I deploy my application war via tomcat manager. However, it is somehow still deploying from default context, that is , app_war_name. Earlier, it was not even getting copied to

deployment issue with multiple url-patterns?

前提是你 提交于 2019-12-24 10:51:07
问题 I have a application which is deployed on tomcat with servlet version 2.4, and its working nicely. When i tried to deploy the same application on websphere, deployment failed. I found that multiple url-patterns causing the issue. example code:- <filter> <filter-name>ABCD</filter-name> <filter-class>com.x.y.filters.ABCD</filter-class> </filter> <filter-mapping> <filter-name>ABCD</filter-name> <url-pattern>/A/*</url-pattern> <url-pattern>/B/*</url-pattern> <url-pattern>/C/*</url-pattern> <url

Eclipse Juno Tomcat 6 Remote Host Not Supported

霸气de小男生 提交于 2019-12-24 10:30:30
问题 I am trying to add a tomcat 6 server in my eclipse juno but I am getting this error: The currently selected server type does not support remote hosts Before juno I had galileo on the same machine and I was able to add tomcat 6 successfully in it without any problems. I searched on the internet before asking but the only relevant link i got was this: Eclipse Tomcat7 Server Doesnt support Remote Host and it doesn't help much. Pls help Thanks 回答1: I had the same problem with Tomcat 7 and I

Why doesn't commenting a dependency in the pom.xml (with m2eclipse) delete the jar in the tomcat server deploy directory?

泄露秘密 提交于 2019-12-24 09:18:10
问题 I started using Maven 2.2.1 and downloaded the latest m2eclipse plugin version 0.12.0. I am using Eclipse 3.5.1 and Tomcat 6.0.26. I checked out the mvc-ajax project (in eclipse: File>New>Project>SVN>Project from SVN) and when I ran the server, I came upon the following exception: org.apache.jasper.JasperException: Unable to read TLD "META-INF/c.tld" from JAR file "file:/tomcatDeployDirectory/mvc-ajax/WEB-INF/lib/jstl-1.2.jar" which required deleting the jsp-api2.1.jar (as I found out from

Broken UTF-8 URI Encoding in JSPs

a 夏天 提交于 2019-12-24 07:38:52
问题 I got a strange issue with wrong URI Encoding and would appreciate any help! The project uses JSPs, Servlets, Jquery, Tomcat 6. Charset in the JSPs is set to UTF-8, all Tomcat connectors use URIEncoding=UTF-8 and I also use a character encoding filter as described here. Also, I set the contentType in the meta Tag and my browser detects it correctly. In Ajax calls with Jquery I use encodeURIComponent() on the terms I want to use as URL Parameters and then serialize the whole parameter set with

[IOErrorEvent type=“ioError” bubbles=false cancelable=false eventPhase=2 text=“Error #2032”]

左心房为你撑大大i 提交于 2019-12-24 02:39:08
问题 I am trying to display database details in a Flex datagrid and connected using HTTP Service. It was able to display details without any issue when I was working in the FlashBuilder 4.5, however, I deployed the bin-debug part in the Tomcat webserver to access it globally. I am experiencing this error message when I am trying to access the swf file " HTTP request error Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: http://localhost:8084

JSP: new Socket (“www”, 80); stopped working after years of working OK

萝らか妹 提交于 2019-12-24 02:23:35
问题 In a JSP app, in Tomcat, the following code used to produce the whole address of the page (from this answer): String myUrl = "no network"; try { Socket s = new Socket("www", 80); myUrl = "http://"+s.getLocalAddress().getHostAddress()+":"+request.getLocalPort()+request.getRequestURI(); s.close(); } catch (Exception ex) { } finally { } After that miUrl would have the folowing value (not the real IP addr): http://111.101.101.2:8080/mypage.jsp It has been working for several years. A week ago