get is not supported

2005-08-24 Thread Christian Stalp
Hello out there,
I working on a new servlet and it is very simple so far. But I cannot start 
it!?!
I get this error dumped on my browser:
[quote]
HTTP Status 405 - HTTP method GET is not supported by this URL

type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested 
resource (HTTP method GET is not supported by this URL).
Apache Tomcat/5.5.9
[/quote]

The sourcecode is very simple so far...
[code]
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.softwareag.tamino.db.api.accessor.TAccessLocation;


public class Dialog extends HttpServlet {
   
   public void doGet ( HttpServletRequest req, HttpServletRequest res ) throws 
ServletException, IOException
   {
  res.setContentType ( text/html );
  PrintWriter out = res.getWriter();
  
  String name= req.getParameter( name );
  String vorname = req.getParameter( vorname );
  
  out.println( HTML);
  out.println( HEADTITLEAntwort/TITLE/HEAD );
  out.println( BODY);
  out.println( Name  + vorname +   + name );
  out.println( /BODY/HTML);
   }

}
[/code]

and the service-descriptor:
[code]
?xml version=1.0 encoding=UTF-8?
!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
  display-nameEingabe Ihrer Daten/display-name
  servlet
servlet-namehello/servlet-name
servlet-classDialog/servlet-class
  /servlet
  servlet-mapping
servlet-namehello/servlet-name
url-pattern/hello/url-pattern
  /servlet-mapping
/web-app
[/code]

Its really not complex so far, but I cannot find the problem.
Can anybody help me?

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat and Apache

2005-07-11 Thread Christian Stalp
Hello together,
I still have some trouble running Apache and Tomcat together in one host.
I heard that I have to write a  j_secutiry_check into apache.conf or 
httpd.conf. Where exactly I have to write this, and with which syntax. What 
else I have to consider while running Apache and Tomcat together.

Important: Tomcat is not embedded in Apache in my case. It has its own 
process!!!

Thank you...

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and Apache

2005-07-11 Thread Christian Stalp
Am Montag, 11. Juli 2005 13:34 schrieb Ivan Rodriguez:
 I don t know details about your problem but  i can answer that

 j_secutiry_check is not a way of integrating tomcat into apache. It is an
 authentition scheme defined by J2EE specs.

 What you need is the jk_mount apache module, to let your Apache install
 bypass the dynamic calls to tomcat, and then to serve only static content
 with apache.

 Details of configuration can be found at:

 http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/

No this isn't the solution. Tomcat and Apache are full independent. They don't 
cooperate together nor they communicate. Apache listens at port 80 and Tomcat 
at port 8180 ( its the Debian Solution ). 
But I cannot run tomcat under these configuration. I get an error dump each 
time:
[quote]
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:432)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.access$000
(ApplicationFilterChain.java:51)
at org.apache.cata.
..
[/quote]

Apache works fine and makes no trouble.

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



what is wrong with this tomcat-users.xml?

2005-06-24 Thread Christian Stalp
Hello, I still have this strange Problem with my Debian Tomcat installation:
I make some entrys in my tomcat-users.xml:
[code]
?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  role rolename=manager/
  role rolename=admin/
  user username=Adminstrator password=blablabla roles=manager,admin/
  user username=tomcat password=tomcat roles=tomcat/
  user username=both password=tomcat roles=tomcat,role1/
  user username=role1 password=tomcat roles=role1/
/tomcat-users
[/code]

And get this as result on my browser:
[quote]
HTTP Status 404 - /admin/j_security_check

type Status report

message /admin/j_security_check

description The requested resource (/admin/j_security_check) is not available.
Apache Tomcat/4.1
[/quote]

But I installed all the debian tomcat packages, including the tomcat4-admin 
package. Is the Debian-Tomcat packages not recommendet at the moment?
Should I install the packages from the catalina-homepage?

Gruss Christian
 
-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: got an error for a admi-entry

2005-06-21 Thread Christian Stalp
Am Montag, 20. Juni 2005 20:20 schrieb Steve Ochani:
 Hi,

 You don't have the admin rolename defined.


Yes, this it was. Thank you.
But I have now another Problem. Now I can login as a 'manager' but still 
cannot login as an admin. I have changed the tomcat-user.xml this way:
[code]
?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  role rolename=manager/
  role rolename=admin/
  user username=Adminstrator password=blablabla roles=manager,admin/
  user username=tomcat password=tomcat roles=tomcat/
  user username=both password=tomcat roles=tomcat,role1/
  user username=role1 password=tomcat roles=role1/
/tomcat-users
[/code]

And I got this dumped:
[quote]
HTTP Status 404 - /admin/j_security_check

type Status report

message /admin/j_security_check

description The requested resource (/admin/j_security_check) is not available.
Apache Tomcat/4.1
[/quote]

But I really installed the tomcat4-admin-Packages of Debian.  What is the 
problem now?

Gruss Christian


-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



got an error for a admi-entry

2005-06-20 Thread Christian Stalp
)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)

Apache Tomcat/4.1[/quote]

Can anybody help me out? 
Thank you very much.

Gruss Christian


-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: starting a binary by calling a servlet

2005-06-17 Thread Christian Stalp

 Excuse me for a moment. Now I have the trouble that I cannot restart Tomcat
 and so I had to reboot the whole system. Now tomcat start while the
 bootprocess but cannot be accessed over the browser. And I don't have a
 process called catalina nor tomcat !?!?!

 Gruss Christian

Im now back again. Now I have time to fix the tomcat-problem. But first I have 
another problem: I cannot start tomcat!!! 

I got this from my latest logfile: catalina_2005-06-17.log
This is of course only a small part of it. Is this caused by a mistaken entry 
in the catalina.policy? 

[quote]
Using Security Manager
Created MBeanServer with ID: 4aa0ce:10489ba2bdb:-8000:gandalf:1
Jun 17, 2005 11:56:17 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
Jun 17, 2005 11:56:17 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in 
prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.u.
[/quote]


But the weired thing is, my own entry into the catalina.policy is gone, is 
erased!!! And this happens everytime I reboot my system. 
Each time I edit the cataline.policy I cannot restart tomcat again. So I 
choose the windows(tm) solution and reboot the whole system! But when the 
system is up and running again. Tomcat cannot start at all. AND my entry in 
the catalina.policy is gone

Gruss Christian


-- 
Christian Stalp
Institut fr Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universitt Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: starting a binary by calling a servlet

2005-06-14 Thread Christian Stalp
Am Montag, 13. Juni 2005 16:24 schrieb Markus Schönhaber:
 Am Montag, 13. Juni 2005 16:01 schrieb Christian Stalp:
  But at the Moment I get an error that this is not allowed for a Servlet
  which seems logical to me. So I have to change the catalina.policy.
 
  The question is now: how?
  What I have to do, to enable my servlet to start binarys on my host?

 Have you even tried to use the policy-entries I posted as an answer to the
 very same question you asked on pug-talk? If so, what went wrong?

Hey Markus,
nice to meet you here at the tomcat-mailing list. 
I really didn't read your answer. My Problem is, Im a student and a programer 
50/50 and work for 4 projects in our institute. So sometimes you loose the 
overview :-\ 

 ---snip---

 Ein grant-Eintrag im Policy-File könnte dann so aussehen:

 grant codeBase file:${catalina.home}/webapps/my_exec/- {
     permission java.io.FilePermission Pfad zum aszuführenden Programm,
 execute;
 };

 Oder wenn Du Deiner WebApp vertraust:

 grant codeBase file:${catalina.home}/webapps/my_exec/- {
         permission java.security.AllPermission;
 };

 ---snap---

 Regards
   mks


I'll check this in the afternoon. ;-) 

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: starting a binary by calling a servlet

2005-06-14 Thread Christian Stalp


 Ein grant-Eintrag im Policy-File könnte dann so aussehen:

 grant codeBase file:${catalina.home}/webapps/my_exec/- {
     permission java.io.FilePermission Pfad zum aszuführenden Programm,
 execute;
 };

And the /my_exec/-, is that the context-path?
That means I can call my Servlet whatever I want, but I have to put it into a 
package called my_exec.WAR ? Is that correct?

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: starting a binary by calling a servlet

2005-06-14 Thread Christian Stalp
.CoyoteAdapter.service(CoyoteAdapter.java:152)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Thread.java:534)

Apache Tomcat/4.1
[/quote]
What went wrong, any small detail?

Thank you...

Gruss Christian


-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: starting a binary by calling a servlet

2005-06-14 Thread Christian Stalp

 Is the path really correct? Is the webapp's directory really named
 my_exec?

 Try to use the absolute pathname of your webapp's directory, i. e.
 something like
 grant codeBase file:/opt/tomcat-4.1/webapps/my_exec_or_whatever/- ...

 Is the file really executable for the account tomcat runs under?

 Regards
   mks

Excuse me for a moment. Now I have the trouble that I cannot restart Tomcat 
and so I had to reboot the whole system. Now tomcat start while the 
bootprocess but cannot be accessed over the browser. And I don't have a 
process called catalina nor tomcat !?!?! 

Gruss Christian

P.S. Tomorrow Im on university again, sh 

  
-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



starting a binary by calling a servlet

2005-06-13 Thread Christian Stalp
Hello out there,
I want to start a process, a program by calling a servlet.
The servlet itself is creating a runtime on its vm.
It looks something like this:
[code]
String cmd1 = /usr/bin/myproc;
Runtime rt = Runtime.getRuntime(); 
Process myproc = rt.exec( cmd1 ); 
rueck_gabe = myproc.waitFor();
[/code]

But at the Moment I get an error that this is not allowed for a Servlet which 
seems logical to me. So I have to change the catalina.policy.

The question is now: how?
What I have to do, to enable my servlet to start binarys on my host?

Can anybody help me?

Thank you very much!

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat-error

2005-06-03 Thread Christian Stalp
Hello together,
I have a problem, concerning the normal call of the Tomcat-Startpage. Each 
time I call the localhost:8180 ( 8180 is my port for tomcat, debian-tomcat )  
I get this weired output on my Browser. I don't understand this, the servelt 
were not compiled in runtime like a PHP or Perl-script!?!

This is it:

[quote]
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file



 at 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
 at 
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
 at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
 at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
 at org.apache.catalina.core.ApplicationFilterChain.access$000
(ApplicationFilterChain.java:51)
 at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:129)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:125)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Thread.java:534)

Apache Tomcat/4.1

[/quote]
Can anybody help me?

Thank you

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]