Solved

server problem or my coding is wrong...   plz help...

Posted on 2004-04-16
5
198 Views
Last Modified: 2010-04-01
i am using linux redhat and installed tomcat.

i tried to test my server, thus i wrote a little simple jsp

<%@ page language = "java" import = "java.util.*, java.lang.*"%>
<%
out.println("test");
%>

however, it does not work...
u can see the result at
http://207.218.249.233:8080/vcclient/test.jsp

however, when i input a wrong url, tomcat logo actually shows up
http://207.218.249.233:8080/vcclient/test/

thus, i am not sure if my code is wrong or i did not install the tomcat, right??


Please Help
0
Comment
Question by:bionicblakey
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 10847193
what is it u see?
0
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 10851844
your folder must be contain a folder called web-inf and then be deployed in tomcat..did you do that?
Ghost
0
 

Author Comment

by:bionicblakey
ID: 10881997
i move the jsp into web-inf, but it still did not work...

it just print out my jsp code...

0
 
LVL 1

Expert Comment

by:KartikShah
ID: 10919145
Try to split the following line:

-----
<%@ page language = "java" import = "java.util.*, java.lang.*"%>
-----

<%@page language = "java"%>
<%@import = "java.util.*, java.lang.*"%>

and try .. and also .. the JSP file needs to be outside the WEB-INF dir ... i.e. at the same level as that of WEB-INF or in a directory structure .. that is at the same level as that of WEB-INF
0
 
LVL 13

Accepted Solution

by:
copyPasteGhost earned 500 total points
ID: 10919326
>bionicblakey

there is no need to split this line.
<%@ page language = "java" import = "java.util.*, java.lang.*"%>

your  jsp page must not be in the web-inf folder
it must be at the same level
if you have class files that you wish to import or have some jar files that you want to include in your project then you place those files in the web-inf folder
it's like this, I'll try to draw you a directory sturcture of what I mean..

--jsp Files
--WEB-INF
      --classes
           --your .class java files that you wish to import (note these must be in package as of tomcat 5.x)
      --lib
           --your .jar files that you wish to include into your project
      --tlib
           --your custom tags that you want to have in your project

I hope that's clear,
if you don't understand what I mean let me know
Cheers,
Ghost
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
spring AOP 6 88
gZip compression filter 2 174
HTML5 vs JSP - REST based application development 4 1,192
Unhandled exception type Exception 18 42
Some of the SEO trends we might expect in 2017.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question