Using Tomcat in Eclipse?
Hi,
Can you tell me how to use Tomcat using Eclipse?
Whether we have to plug-in Tomcat in Eclipse?
I'm using Eclipse3.1.1 Version.
Thanks,
Hari
you can use "com.sysdeo.eclipse.tomcat_3.1.0" plugin. Just download the zip file and expand it in plugin folder of eclipse. I am using it on ecipse 3.1.2 it works fine.
By the way you need to set certain parameters in Eclispe.
GO to windows-preferences-java
Installed JREs - add the path of your j2sdk1.4.(eg.c:j2sdk1.4.2_11)
then Go to windows--preferences--tomcat-
advanced - fill your tomcat base
JVMSettings - JRE drop down box select the j2sdk you added
JVMSettings - classpath - add tools.jar from your j2sdk lib folder
JVMSettings - Boot ClassPath - add rt.jar from your jre lib folder
SourcePath
Select your java project you are working with
Then click ok.
Try to run eclipse in clear mode.
Please let me know if this worked. I also did the same procedure and It is working fine.
Meena
Similar Messages
-
Cannot make .war file using tomcat with eclipse and ant
i have made all necesary configuration for deploying application using eclipse and ant for the tomcat server.
when i start the server by clicking the tomcat icon on eclipse toolbar, the message is prompted that "missing application web.xml and using defaults". i have placed the web.xml file in the web/WEB-INF directory of the source project directory.
also when i use ant by right-clicking on the build.xml file and choose Run as ant.. the process creates a desired .war file in webapps folder of the tomcat server but that war file does not works.
where is the error i cannot figure out.
am attaching the code of build.xml for reference.
please help.
build.xml:-
<project name="BecilCTI" default="compile" basedir=".">
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<property name="app.name" value="BecilCTI"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value="0.1-dev"/>
<property name="build.home" value="${basedir}/build"/>
<property name="catalina.home" value="c:/Tomcat_5.5"/> <!-- UPDATE THIS! -->
<property name="dist.home" value="${basedir}/dist"/>
<property name="docs.home" value="${basedir}/docs"/>
<property name="manager.url" value="http://localhost:8080/manager"/>
<property name="src.home" value="${basedir}/src"/>
<property name="web.home" value="${basedir}/web"/>
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<!--<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>-->
<path id="compile.classpath">
<!-- Include all elements that Tomcat exposes to applications -->
<pathelement location="${catalina.home}/common/classes"/>
<fileset dir="${catalina.home}/common/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="${catalina.home}/common/lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${catalina.home}/shared/classes"/>
<fileset dir="${catalina.home}/shared/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="all" depends="clean,compile"
description="Clean build and dist directories, then compile"/>
<target name="clean"
description="Delete old build and dist directories">
<echo message="Cleaning all dirs."/>
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<target name="compile" depends="prepare"
description="Compile Java sources">
<!-- Compile Java classes as necessary -->
<mkdir dir="${build.home}/WEB-INF/classes"/>
<javac srcdir="${src.home}"
destdir="${build.home}/WEB-INF/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
<!-- Copy application resources -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="${src.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="dist" depends="compile"
description="Create binary distribution">
<!-- Copy documentation subdirectories
<mkdir dir="${dist.home}/docs"/>
<copy todir="${dist.home}/docs">
<fileset dir="${docs.home}"/>
</copy> -->
<!-- Create application JAR file -->
<jar jarfile="${catalina.home}/webapps/${app.name}.war"
basedir="${build.home}"/>
<!-- Copy additional files to ${dist.home} as necessary -->
</target>
<target name="install" depends="compile"
description="Install application to servlet container">
<deploy url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"
localWar="file://${build.home}"/>
</target>
<target name="list"
description="List installed applications on servlet container">
<list url="${manager.url}"
username="${manager.username}"
password="${manager.password}"/>
</target>
<target name="prepare">
<!-- Create build directories as needed -->
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/WEB-INF"/>
<mkdir dir="${build.home}/WEB-INF/classes"/>
<!-- Copy static content of this web application -->
<copy todir="${build.home}">
<fileset dir="${web.home}"/>
</copy>
<mkdir dir="${build.home}/WEB-INF/lib"/>
</target>
<target name="reload" depends="compile"
description="Reload application on servlet container">
<reload url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"/>
</target>
<target name="remove"
description="Remove application on servlet container">
<undeploy url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"/>
</target>
</project>So is context.xml actually overwriting the settings found in server.xml?I think so. The way I understand it is the the context.xml file saves you from having to edit server.xml. It is preferred for each web app to do its own config, rather than lumping them all together in server.xml.
And what would be the best way to create the war file? IAt its heart, a WAR is just a zip file with its contents laid out in according to the specification of a web application directory structure.
So the simplest way to make a war file is to zip up your directory structure with a tool like winzip, and rename it to be myApp.war.
Regarding ant, I would recommend you take a look through [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
]this tutorial. It explains the basics of website layout, configuration and deployment.
On [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/source.html] this page in particular, it includes a link to a basic ant file that you can use as a starting point.
Cheers,
evnafets -
Debug applet embedded in jsp using tomcat and eclipse
I am trying to debug applet embeded in jsp. I have deployed my application on tomcat.
The steps I followed
1. Added JVM rumtime parameters in Java plugin control panel
-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8000,suspend=n
2. Added JPDA_ADDRESS = localhost:8000 and JPDA_TRANSPORT=dt_socket to catlina.bat
3. I start my server from commandline prompt "catalina.bat JPDA start"
4.I have made a new configuration for remote debug in eclipse debug>new> connection type (socket attach) >port 8000
5. when I open my application url in browser browser closes and command prompt displays "*Debugger failed to attach , timeout before handshake*"
Any help on this ?
Thanks in advancePersonally, I have no knowledge about Applet but have you checked this link?
[http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101|http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101] -
Problem when using Logger with Tomcat and eclipse
Hi, Iam using Tomcat 5.5.7 and my IDE is eclipse.Iam using java.util.logging.Logger class for logging.Iam putting the properties file in Appname/WEB-INF directory.The properties file is not identified.The error Iam getting is Error initialising log file java.lang.NullPointerException and java.io.FileNot FoundException
The content of my logging.properties file is
java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=SEVERE java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level=ALL java.util.logging.FileHandler.pattern=%h/javalogs%u.log java.util.logging.FileHandler.append=true java.util.logging.FileHandler.count=1
My servlet is
import java.io.*;
import java.util.logging.*;
import java.util.logging.Logger;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorldServlet extends HttpServlet
public void init(ServletConfig config) throws ServletException
try
String file=getServletConfig().getInitParameter("java.util.logging.config.file");
InputStream is = getServletContext().getResourceAsStream(file);
LogManager.getLogManager().reset();
LogManager.getLogManager().readConfiguration(is);
catch(Exception e)
System.out.println("Error initialising log file"+e);
public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
final Logger fLogger =
Logger.getLogger(HelloWorldServlet.class.getName());
PrintWriter out;
String title = "Simple Servlet Output";
// set content type and other response header fields first
// then write the data of the response
response.setContentType("text/html");
fLogger.finest("this is finest");
fLogger.finer("this is finer");
fLogger.fine("this is fine");
fLogger.config("this is config");
fLogger.info("this is info");
fLogger.warning("this is a warning");
fLogger.severe("this is severe");
out = response.getWriter();
out.println("<P>This is output from SimpleServlet!!!!!!!!.");
}My web.xml file is
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<init-param>
<param-name>java.util.logging.config.file</param-name>
<param-value>/WEB-INF/classes/logging1.properties</param-value>
</init-param>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloWorldServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>Can anybody help me out.Hi, Iam using Tomcat 5.5.7 and my IDE is eclipse.Iam using java.util.logging.Logger class for logging.Iam putting the properties file in Appname/WEB-INF directory.The properties file is not identified.The error Iam getting is Error initialising log file java.lang.NullPointerException and java.io.FileNot FoundException
The content of my logging.properties file is
java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=SEVERE java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level=ALL java.util.logging.FileHandler.pattern=%h/javalogs%u.log java.util.logging.FileHandler.append=true java.util.logging.FileHandler.count=1
My servlet is
import java.io.*;
import java.util.logging.*;
import java.util.logging.Logger;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorldServlet extends HttpServlet
public void init(ServletConfig config) throws ServletException
try
String file=getServletConfig().getInitParameter("java.util.logging.config.file");
InputStream is = getServletContext().getResourceAsStream(file);
LogManager.getLogManager().reset();
LogManager.getLogManager().readConfiguration(is);
catch(Exception e)
System.out.println("Error initialising log file"+e);
public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
final Logger fLogger =
Logger.getLogger(HelloWorldServlet.class.getName());
PrintWriter out;
String title = "Simple Servlet Output";
// set content type and other response header fields first
// then write the data of the response
response.setContentType("text/html");
fLogger.finest("this is finest");
fLogger.finer("this is finer");
fLogger.fine("this is fine");
fLogger.config("this is config");
fLogger.info("this is info");
fLogger.warning("this is a warning");
fLogger.severe("this is severe");
out = response.getWriter();
out.println("<P>This is output from SimpleServlet!!!!!!!!.");
}My web.xml file is
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<init-param>
<param-name>java.util.logging.config.file</param-name>
<param-value>/WEB-INF/classes/logging1.properties</param-value>
</init-param>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloWorldServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>Can anybody help me out. -
How to start tomcat in eclipse
Hello,
I have install tomcat on Linux in /usr/tomcat
and i can start ant stop tomcat as root without prolem
I have install eclipse in /home/MyUser/eclipse
and I set the mode for the tomcat directory chmod 777 tomcat
and install the plugIn for tomcat .in eclipse I create a Tomcat Project and try to start tomcat
but I becom always an Exception
Error initializing endpoint
java.net.BindException: Address already in use:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
what is to change to start tomcat from eclipse ???
thanksi think the problem here is not your configuration so much as you already have a tomcat instance running. kill the first instance of tomcat and THEN try running from eclipse
that said, if you truly want 2 instances of tomcat running, then i guess you'll have to change the port/config -
Trinidad in Tomcat and Eclipse
Hi,
I would like to know if there is any getting started guide in using trinidad in eclipse and tomcat. Im already using the adf faces in the project. I want to explore how this works.Hi,
the open cource community is responsible for Trinidad documentation. This is not povided by Oracle.
Here's the open source mailing list: http://wiki.apache.org/myfaces/adf_mails
Frank -
JSP problem when running Tomcat in Eclipse
Hello,
Eclipse newbie here.
I just started using Eclipse and I have installed the Tomcat plugin. When I run Tomcat within Eclipse, http://localhost:8080 works fine, but when I tried to access a JSP that I've created, I'm getting this error:
HTTP Status 404 - /JSPDemo.jsp
type Status report
message /JSPDemo.jsp
description The requested resource (/JSPDemo.jsp) is not available.
Using Eclipse version 3.1.2
Tomcat Plugin = sysdeo 3.1
Tomcat version 5.0.28
JDK + JRE = 1.4.2_08
I was just following this tutorial:
http://plato.acadiau.ca/courses/comp/dsilver/2513/EclipseAndTomcatTutorial/
Thanks in advance.why not use Web Tools Project of Eclipse, it comes with all plugins necessary for J2EE and Web development
http://www.eclipse.org/webtools/
it's much easier to use -
Remote Server Debugging with Tomcat and Eclipse
Hi ,
I am using Tomcat 4.0, Jdk1.3 and eclipse 2.1 ,Windows 2000
I am trying for past 5 days, Remote Server Debugging.
But I can't acheive.Please help in this tough situation.
I have configured Tomcat to run in debug mode by the following steps:
1) In catalina.bat, SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
2) Then I set the JAVA_HOME AND TOMCAT_HOME in the environment mode.
3) Then I clicked the startup.bat in the bin directory.
In Eclipse side , I followed as,
1) Run/Debug/Remote Java Application/New/
In the connect tab, I gave host:localhost and port:8000
2) Then I clicked Debug button.
I didn't use any plugin.
But it producing "Failed to connect to Remote VM.Connection refused."
So I gave host:localhost and port:8080 in eclipse side,
but this I am getting errorin eclipse side as "Failed to connect to Remote VM".In server side, I am getting error as,
java.lang.NullPointerException
at org.apache.catalina.connector.http.HttpResponseStream.checkHead(HttpR
esponseStream.java:253)
at org.apache.catalina.connector.http.HttpResponseStream.<init>(HttpResp
onseStream.java:104)
at org.apache.catalina.connector.http.HttpResponseImpl.createOutputStrea
m(HttpResponseImpl.java:220)
at org.apache.catalina.connector.ResponseBase.getOutputStream(ResponseBa
se.java:725)
at org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBas
e.java:469)
at org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpRes
ponseBase.java:236)
at org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(Ht
tpResponseImpl.java:288)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1039)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1107)
at java.lang.Thread.run(Thread.java:484)
Please do the needful
If you have anwser, Please mail to [email protected]Well, once you're already using MyEclipse, I have it set up even simpler than that. Go to Window/Preferences/MyEclipse/Application Servers/Tomcat4/Launch and set the launch mode to debug.
This works if the project is successfully setup as a webproject in MyEclipse.
My problem is that I have a project that was not developed with MyEclipse and for some reason does not work when I set it up as a web project in MyEclipse. MyEclipse seem to do something funny with it when I establish the project. Now, if I set it up simply as a java project (as oppposed to Web Project) in myEclipse, then MyEclipse does not give me an option of deploying it.
Any ideas about how I would go about debugging a project that's not set up as a Web Project in my eclipse? -
Developing SOAP based Webservice using Axis 2 Eclipse plugin
Hi,
I want to develop a SOAP based Webservice which connects to the PostgreSQL DB , by fetching the data for the employeeId entered and display the results in the browser. I'm using using JDK 1.6, Tomcat 6.0, Axis 2.0 , with Axis 2 Eclipse Plugin. Please send me a sample code of how to build it, i am able find some examples on the internet, but none of them are related to connecting to the DB and fetching the data. It will be great if you guys can provide the sample application which does have the same functionality as mine. Please do respond as this is urgent. Thanks in advance..
Thanks,
RithuThanks Adhir Mehtaji, This is what i have come up with, developing a webservices based on SAAJ and deploying that in Tomcat server, here is the Webservice and the other related files:-
public class EmployeeService {
* This method returns the Employee Name
* @param empId String
public void getEmployeeName(SOAPEnvelope req, SOAPEnvelope resp) throws javax.xml.soap.SOAPException {
System.out.println("Inside the getEmployeeName in Employee Service");
IEmployeeDAO employeeDAO= null;
employeeDAO = new EmployeeDAOImpl();
SOAPBody body = resp.getBody();
String empId = null;
NodeList empIdNodeList = req.getBody().getElementsByTagName("empId");
for( int i=0; i < empIdNodeList.getLength(); i++ ) {
Element empIdElementElement = (Element) empIdNodeList.item(i);
Node empIdNode = empIdElementElement.getChildNodes().item(0);
empId = empIdNode.getNodeValue();
System.out.println("the empId in the employee service is:::"+empId);
addNode(body,"empName",employeeDAO.getEmployeeName(empId));
//addNode(body,"segmentName1",custSegmentDAO.getSegmentName(ZipCode));
private static void addNode(SOAPBody body,String nodeName,String nodeValue) throws SOAPException{
body.addChildElement(nodeName).addTextNode(nodeValue);
This Service is exposed as a Webservice which connects to the DAO and get the response for the EmpId.
This is the client file:-
public class GetEmployeeNameClient {
public static void main(String[] args) throws Exception {
// Invoking the Webservice endpoint which is hosted (deployed) in Tomcat by passing the SOAP Message request
// Get the SOAP Message response , which contains the employee name for the empId 100
// Parse the SOAP Message response to get the employee name (response from the WS)
String[] nodeNames = { "empId" };
String[] nodeValues = { "100" };
SOAPMessage message = GetEmployeeNameClient.getMessageFactory(
"getEmployeeName", nodeNames, nodeValues);
SOAPConnection conn = SOAPConnectionFactory.newInstance()
.createConnection();
SOAPMessage response = conn.call(message,
"http://localhost:8080/axis/services/EmployeeService");
// If the response is not null then everything is fine with the WS.
System.out.println("the response is what???"+response);
System.out.println("\n Soap response:\n");
System.out.println("\nXML response\n");
// Create transformer
TransformerFactory tff = TransformerFactory.newInstance();
Transformer tf = tff.newTransformer();
// Get reply content
Source sc = response.getSOAPPart().getContent();
// Set output transformation
StreamResult result = new StreamResult(System.out);
tf.transform(sc, result);
System.out.println();
// For these to work we need to connect to the DB - jdbc:oracle:thin:@ora-b2cd:6473:b2cd to get the segment name
SOAPBody soapBody = response.getSOAPBody();
System.out.println("the soapBody is what???"+soapBody);
NodeList empNameNodeList = soapBody.getElementsByTagName("empName");
System.out.println("the empNameNodeList.getLength is::"+empNameNodeList.getLength());
for (int i = 0; i < empNameNodeList.getLength(); i++) {
System.out.println("inside the loop");
Element empNameElement = (Element) empNameNodeList.item(i);
System.out.println("the empNameElement is what???"+empNameElement);
Node empNameNode = empNameElement.getChildNodes().item(0);
System.out.println("the empNameNode is what???"+empNameNode);
System.out.println("Employee Name For empId is ...... "
+ empNameNode.getNodeValue());
// Construct the SOAP Message request by passing the empId 100(should come from UI)
private static SOAPMessage getMessageFactory(String methodName,
String[] nodeNames, String[] nodeValues) throws SOAPException {
SOAPMessage message = null;
try {
System.out.println("Inside the getMessageFactory");
MessageFactory messageFactory = MessageFactory.newInstance();
message = messageFactory.createMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
SOAPElement bodyElement = body.addChildElement(envelope
.createName(methodName));
for (int index = 0; index < nodeNames.length; index++) {
bodyElement.addChildElement(nodeNames[index]).addTextNode(
nodeValues[index]);
message.saveChanges();
// View input
System.out.println("\n Soap request:\n");
message.writeTo(System.out);
System.out.println();
} catch (Exception e) {
e.printStackTrace();
return message;
This client will send a SOAPMessage with EmpId (100) as a request and get the response from the Webservice as SOAPMessage , which
contains the empname for the respective empid which is passed.
I tested this service in the browser, it is up and running through the URL : http://localhost:8080/axis/services
But when i try to access the webservice to get the response from my client program, i am getting the following SOAP Fault string:-
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><soapenv:Fault>
<faultcode>
soapenv:Server.userException
</faultcode>
<faultstring>
org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler
</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">
user-15bbc0db6e
</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
My client path contains :-
axis.jar;
jaxrpc.jar;
saaj.jar;
commons-logging.jar;
commons-discovery.jar;
wsdlj4.jar;
axis-ant.jar;
log4j-1.2.4.jar
xerces.jar
activation.jar
mail.jar
Similary the in the d:/tomcat/webapps/axis/WEB-INF/lib,contains the same as that in client path.
I am using Tomcat 6.0 , JDK 1.6, I have googled and found that the expection is due to "Xerces.jar" not in Tomcat/webapps/axis/WEB-INF/lib.
I have copied xerces.jar in the said path, still the error persists. Please do provide a solution to this. Where i have gone wrong.
I have one more query, If i have to rest a "list" as a response from the server (webservice), how i can add the list into the SOAPMessage? Whether i need to parse it and add the values one by one in the SOAPMessage? like
<empname> xxxx</empname> <empage>25</empage>
<empname> yyyy</empname> <empage>26</empage>
Please answer these queries.
Thanks,
Rithu -
How could i run the tomcat in eclipse?
If you want to run tomcat in eclipse for sure you need some additional plug-in. I use eclipse for writing wtp appications that use web-services - because of that I use very reach in plug-ins version of eclipse:
wtp-all-in-one-0.7
You can find it here:
http://download.eclipse.org/webtools/downloads/drops/R-0.7-200507290654/
With this you can write wtp applications, write web-services using axis and - of course - run tomcat.
ania -
Hallo
I have install tomcat on Linux in /usr/tomcat
and i can start ant stop tomcat as root without prolem
I have install eclipse in /home/MyUser/eclipse
and I set the mode for the tomcat directory chmod 777 tomcat
and install the plugIn for tomcat .in eclipse I create a Tomcat Project and try to start tomcat
but I becom always an Exception
Error initializing endpoint
java.net.BindException: Address already in use:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
[/cod]
what is to change to start tomcat from eclipse ???
thankssorry the complete qustion
I have install tomcat on Linux in /usr/tomcat
and i can start ant stop tomcat as root without prolem
I have install eclipse in /home/MyUser/eclipse
and I set the mode for the tomcat directory chmod 777 tomcat
and install the plugIn for tomcat .in eclipse I create a Tomcat Project and try to start tomcat
but I becom always an Exception
Error initializing endpoint
java.net.BindException: Address already in use:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
[/cod]
what is to change to start tomcat from eclipse ???
thanks -
Toplink cache synchronization between two nodes using tomcat
Hi,
In our appcation we have two nodes. Using websphere we used to synchronize toplink cache between two nodes. Can we do same thing using tomcat.Yes, TopLink implements cache synchronization using JMS or RMI easily, which are not dependent on the server being used - though it JMS especially does require a JMS provider that is accessible from each node. Cache synchronization is now cache coordination, and is described using JPA properties here:
http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination
the Toplink cache synchronization/coordination with JMS | EMBARCADEROS seems to be a good read for cache coordination over JMS, but is more aimed at TopLink's sessions.xml configuration.
Best Regards,
Chris -
Viewing Excel Files using Tomcat - Problem with caching
Hi all,
A small part of an application I'm writing has links to Excel files for users to view/download. I'm currently using Tomcat v5 as the web/app server and have some very simple code (an example is shown below) which calls the excel file.
<%@ page contentType = "application/vnd.ms-excel" %>
<%
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
response.sendRedirect("file1.xls");
%>
This all works except but I'm having one big problem.
The xls file (file1.xls) is updated via a share on the server so each month, the xls file is overwritten with the same name but with different contents. I'm finding that when an update is made to the xls file and the user then attempts to view the new file in the browser they recieve only the old xls file. It's caching the xls file and I don't want it to. How can I fix this so that it automatically gives the user the new updated file.
The only way I've managed to get Tomcat to do this is to delete the work directory and delete the file from my IE temp folder and then restart Tomcat - this is a bit much!
Any help would be greatly appreciated.
Thanks.I'd a problem with caching a few years back, for a servlet request which returned an SVG file.
As a workaround, I ended up putting appending "#" and a timestamp / random number after it. The browser assuming each request was new, and didn't use the cache.
Eg.
http://myserver/returnSVG.do#1234567
where 1234567 is a timestamp / random.
Not sure whether you can do this on a file based URL... but maybe worth a shot...
regards,
Owen -
Debugging Multiple instances of Tomcat in Eclipse
Hi,
Is it possible to configure multiple instances of tomcat in eclipse. or atleast debug apps that are running in separate instances.
Any pointers would be great. Is there a way to debug such a configuration?
thanks
MYes, you can run multiple instances of tomcat in eclipse:
Go to window->preferences. Set the tomcat home & config file for the 1st instance.
Start tomcat. Once it's started
Go to window->preferences. Set the tomcat home & config file for the 2nd instance (which should be a different directory)
Start tomcat again. Now you should have 2 versions of tomcat running.
It's that simple--but I'm not sure if debugging will work, you'll have to try it out by putting breakpoints -
Problem setting Unicode (utf-8) in http header using tomcat
Hi:
I am trying to set a file name in utf-8 to http header using the following code:
response.setContentType("text/html; charset=utf-8");
response.setHeader("Content-disposition", "attachment; filename=解決.zip");
// I actually has file name in utf-8 here to set to the header, and I know that the name is correctly
// and I also looked into the response object MimeHeaders object and saw the head is correctly there
then write the content of zip file using ServletOutputStream.
The problem I have is that the file name is not displayed correctly when prompted to save or open in the pop up window next. I found out using Fiddler that the request header is wrong:
Content-disposition: attachment; filename=�zn��.zip
I am using Tomcat 5.0.28. Any idea how to get this working?
Thanks in advance!You are setting the charset for the content to be UTF-8. (That is why the method is called setContentType.) But HTTP headers are not part of the content and so that has no effect on the header.
The original specification for HTTP only allowed US-ASCII characters in headers. It is possible that more recent versions have features that allow for non-ASCII header data, but I don't know if that is the case or how you would use those features if they exist.
Maybe you are looking for
-
I am trying to edit my music list and then sync it to my iPhone 5 so I don't run out of storage space. However, I see the check marks on the iTunes library but am unable to uncheck them? How do I manually edit what will be synced to my phone? (the ch
-
Subscription NOT WORKING AND TIME WASTING
I bought Skype premium subscription but still not able to call anyone.. . It says I don't have skype credit ? Does it require activation?? It say its active
-
Can Same IDOC be sent to same Receiver with two different Message Mappings
Hello Experts, Wierd doubt but want to confirm from you people. Scenario: One R/3 Sender SAP XI : One external Receiver : IDOC is sent from R/3 to external receiver via SAP XI. One interface has already been developed for the above scenario. Now clie
-
IPhone 6 Plus Verizon shipping/delivery
Has anybody that ordered their iPhone 6 Plus through Verizon actually gotten their phone yet? or even got a shipping confirmation email and tracking number? i pre ordered my 6 Plus 64gb Space grey on 9/17 and have a ship date of 10/31, my status on v
-
Part of page "image" overlaps the page when printed. How do I fix this?
When printing from Acrobat 10.1.5, part of the contents of the page prints on top of the page itself. In my most recent case, the page is landscape. The portion of the page that overprinted is from the bottom center about 1 inch wide and 4 inches t