Solved

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

Posted on 2004-04-16
5
188 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Note: This is the second blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   Every month t…
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now