You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Koscak <fu...@yahoo.com> on 2000/11/10 06:23:47 UTC

Problems with the most Basic Hello servlet and jsp.

I have encountered some problems setting up Tomcat on
my Windows98 system. If anyone could throw up some
suggestions I would be most appreciative.

Here are the steps I have taken.

Downloaded the latest stable version of Tomcat  -->
jakarta-tomcat.zip 2.26MB (2,372,384 bytes).

I have run WinZip and extracted tomcat to C:\

The resultant directory structure is

C:\jakarta-tomcat	\bin
                	\conf
		        \doc
	        	\lib
		        \src
		        \webapps

I have set JAVA_HOME to C:\jdk1.3 
Root directory of java installation

I have set the PATH to include C:\jdk1.3\bin	
The directory that holds executables for javac, java,
javadoc etc

I have set TOMCAT_HOME to C:\jakarta-tomcat	
The root installation directory

This is the result attempting to start tomcat.

C:\jakarta-tomcat\bin>TOMCAT.BAT start
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Starting tomcat in new window
Using classpath: C:\jakarta-tomcat\classes
C:\jakarta-tomcat\bin>

Here is the result attempting to run tomcat.

C:\jakarta-tomcat\bin>TOMCAT.BAT run
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Using classpath: C:\jakarta-tomcat\classes
Exception in thread "main"
java.lang.NoClassDefFoundError: org/apache/tomcat/sta
rtup/Tomcat
C:\jakarta-tomcat\bin>

When I use my browser IE5.0 to open the simple test
example located at
C:\jakarta-tomcat\doc\appdev\sample\web\index.html

My browser opens this html page ok, howerver when
running the jsp I manage to retrieve some html output
and gif image back to my browser window but values for
the following text labels all come back
blank/null/empty.

Context Path:
Path Information: 
Query String: 
Request Method:
Servlet Path:

Also from
C:\jakarta-tomcat\doc\appdev\sample\web\index.html 

If I choose to run the servlet, IE explorer comes back
with a standard error page saying that the page could
not be found.


Thank-you for your consideration and any suggestions
you may have.

Regards


Mark Koscak


=====
The morality of an action
stems from the motive from which we act.



__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/

Re: Problems with the most Basic Hello servlet and jsp.

Posted by Kent Lau Chee Yong <st...@hotmail.com>.
I have set JAVA_HOME to C:\jdk1.3 
Root directory of java installation
    set to c:\jdk1.3\bin

I have set the PATH to include C:\jdk1.3\bin 
The directory that holds executables for javac, java,
javadoc etc

I have set TOMCAT_HOME to C:\jakarta-tomcat 
The root installation directory
    set to c:\jakarta-tomcat\bin

This is the result attempting to start tomcat.

C:\jakarta-tomcat\bin>TOMCAT.BAT start
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Starting tomcat in new window
Using classpath: C:\jakarta-tomcat\classes
C:\jakarta-tomcat\bin>

Here is the result attempting to run tomcat.

C:\jakarta-tomcat\bin>TOMCAT.BAT run
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Using classpath: C:\jakarta-tomcat\classes
Exception in thread "main"
java.lang.NoClassDefFoundError: org/apache/tomcat/sta
rtup/Tomcat
C:\jakarta-tomcat\bin>

When I use my browser IE5.0 to open the simple test
example located at
C:\jakarta-tomcat\doc\appdev\sample\web\index.html


type this http://localhost/sample/web/index.html

My browser opens this html page ok, howerver when
running the jsp I manage to retrieve some html output
and gif image back to my browser window but values for
the following text labels all come back
blank/null/empty.

Context Path:
Path Information: 
Query String: 
Request Method:
Servlet Path:

Also from
C:\jakarta-tomcat\doc\appdev\sample\web\index.html 

If I choose to run the servlet, IE explorer comes back
with a standard error page saying that the page could
not be found.


Thank-you for your consideration and any suggestions
you may have.

Regards


Mark Koscak

Re: Problems with the most Basic Hello servlet and jsp.

Posted by Jim Richards <gr...@cyber4.org>.
>C:\jakarta-tomcat\bin>TOMCAT.BAT start
>Out of environment space
>Out of environment space
>Out of environment space
>Out of environment space
>Out of environment space

To fix this you'll need to edit your c:\config.sys and either add, or modify
this entry

	SHELL=C:\COMMAND.COM C:\ /P /E:4096

You've run out of environment space within your DOS shell. This will
increase it to 4096 bytes, so when the CLASSPATH gets set, there
is space for it.



--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html

Posted by Choo Yew Beng <ye...@cnpr.nus.edu.sg>.
Hi Gurus In Jakarta Project,
I had the following question:
1.jsp
<form name="1a" action="1.jsp">
  .... .... ....
  .... .... ....
  .... .... ....
 <jsp:forward page="2.jsp" flush="true" />
</form>
2.jsp
<form name="2a" action="2.jsp">
  .... .... ....
  .... .... ....
  .... .... ....
 <jsp:forward page="3.jsp" flush="true" />
</form>
3.jsp
<form name="3a" action="3.jsp">
  .... .... ....
  .... .... ....
  .... .... ....
 <jsp:forward page="1.jsp" flush="true" />
</form>
When I tried to get back to 1.jsp, response error occur.
Writer or outputstream has been committed blah blah blah.

I tried response.getWriter().close() and response.getOutputStream().close().
I even tried out.close but none work.
Can someone please advice on the above and how to go about resolving the
problems?
Thx n look forward to a favorable reply if any?
Choo Yew Beng

Application framework ...

Posted by Jim Richards <gr...@cyber4.org>.
I've been looking at several application frameworks over the last few days,
and was wondering what people were using?

In general I'd like to have my servlet generate XML output (perhaps using
ECS?) that is picked up by an XSLT engine (perhaps Cocoon?) for display
to the user to keep the content apart from the system. So far I've come across

	Turbine 		Quite well developed but requires a large amount of initial 
			knowledge to get your head around (although that's *my*
			opinion). I understand the model, but I want to use EJB for the 
			database connectivity, and Cocoon for front end processing
			which AFAIK has not been integrated fully yet (unless the
			docs haven't been updated).

	Enhydra	A full enterprise application environment. Also has the same
			problem as Turbine; large system with lots of work done
			on it. It uses a process where your HTML pages use
			<span id=""></span> tags that are replaced by the content.
			Which doesn't seem as flexible as I want. (Although there
			is a good separation between business/display/database.)

	Struts		A smaller project, designed with news models in mind. Although
			not fully developed I don't know if Cocoon XML transformation
			will work with it.

Any ideas?

thanks ...
			

--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html