The moose likes Servlets and the fly likes Java SDK and Jrun Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Java SDK and Jrun" Watch "Java SDK and Jrun" New topic

Java SDK and Jrun


Joined: Apr 20, 2001
Posts: 8
I am new to JSP and I have installed JAVA SDK 2 Enterprise Edition from sun site and I have no idea to do the setup for environment variables but I did made changes in userconfig.bat i.e. set java_home etc besides that do I need to change any other files to do the environment settings.
If yes then please let me know.
If no then my questions are:
1)Where to put the classes if I am working with JAVA SDK 2 Enterprise Edition?
2)Why my this code does not get executed?
<b>import javax.servlet.jsp.JspWriter;</b>
public class classA
rest of the code....
It gives error on the line import javax.servlet.jsp.JspWriter;
Any idea what's going on?
I am stuck any help will be greatly appreciated.
Florence Cheung

Joined: Mar 18, 2001
Posts: 24
I am not quite sure which web container you are using and what is your operating system.I used Tomcat.
First of all, find out where is your web server stored, let's say it's in c:\your_web_server_root_directory
Then follow this:
In Win98:
c:>notepad autoexec.bat

this opens this batch file, then in this batch file, try to set path and classpath like this:
SET PATH=C:\your_web_server_root_directory\bin;%PATH%
SET CLASSPATH=.;C:\your_web_server_root_diretory\lib;%CLASSPATH%
Generally bin and lib locate directly in your_web_server_root_directory, if this still doesn't work, try to manually write jar files in your classpath , ie (in one line):
If your OS is NT or Win 2000, right click your "MyComputer" icon, click "properties", click "environment variables", set your path and classpath there.
I think you'd better read "readme" file, there should be installation instructions in it.
One more thing is that even if you successfully installed and configured SDK, when you want to " start up " your web server, it maybe give you "out of environment space" message. If this happens,open your MS-DOS prompt, open "MS-DOS prompt properties", click "memory" tab, increase initial environment of conventional memory from auto to at least 3072.
I'm not sure this solves your problem.Hope this could give you a bright start.Good Luck!
Florence Cheung

Joined: Mar 18, 2001
Posts: 24
One more thing about your code.I think if you want to import some packages in jsp,the syntax should be:
<@page import="javax.servlet.jsp.JspWriter" %>
And I wonder why you want to do this,because in jsp, you can write HTML code directly,why you bother to have a JspWriter do output?
Secondly,I don't think you can declare a class in jsp.Are you writing a servlet or a tag for jsp?
Florence Cheung

Joined: Mar 18, 2001
Posts: 24
One typo,the syntax should be:
<%@page import="javax.servlet.jsp.JspWriter" %>
I agree. Here's the link:
subject: Java SDK and Jrun
It's not a secret anymore!