Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP - Servlet: package does not exist  RSS feed

 
tomasz brymora
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... another PACKAGE DOES NOT EXIST problem tryint to run a JSP that needs some beans.


THE JSP IN QUESTION: (/java-sumton/)

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

<jsp:useBean id="req" class="JavaTomek_v1.MultipartRequest">
<jsp:setProperty name="req" property="request" value="<%= request %>" />
</jsp:useBean>
<jsp:useBean id="validInput" scope="session" class="JavaTomek_v1.ValidEMail" />
<jsp:useBean id="se" scope="session" class="JavaTomek_v1.SendEMail"></jsp:useBean>

TOP OF THE MultipartRequest servlet: (/java-sumton/WEB-INF/classes/JavaTomek_v1)

package JavaTomek_v1;

import javax.servlet.http.*;
import java.io.*;
import java.util.*;

THE ERROR:

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

An error occurred at line: 2 in the jsp file: /sumton_mail.jsp

Generated servlet error:
[javac] Compiling 1 source file

/var/tomcat4/work/Standalone/localhost/java-sumton/sumton_mail_jsp.java:8: package JavaTomek_v1 does not exist
import JavaTomek_v1.*;

WEB.XML:
<servlet>
<servlet-name>MultipartRequest</servlet-name>
<servlet-class>JavaTomek_v1.Table</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>MultipartRequest</servlet-name>
<url-pattern>/JavaTomek_v1/*</url-pattern>
</servlet-mapping>

-------

I didn't notice the web.xml make much difference except messing up (JSPs become invisible to Tomcat - 404) the whole setup (requiring tomcat reboot) if I do this:
<url-pattern>JavaTomek_v1</url-pattern>

any ideas about what's happening? I promise to post the solution here when this thing gets working

[Bear edit: edited for language]
[ April 21, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two things tomasz:

1) Please watch your language. This is a professional forum.

2) Please use UBB code tags to preserve the formatting of your code. See the CODE button on the reply page.

That said, where are you placing the compiled package hierarchy for package JavaTomek_V1?
[ April 21, 2005: Message edited by: Bear Bibeault ]
 
tomasz brymora
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
QUICK UPDATE:
turns out the initial problem was the fact that I needed to deploy COMPILED servlets, not sources. So much for making the wrong initial assumptions. That stems from an insanely positive experience of using another host service, where all one needs is to drop SOURCES into the appropriate places.

... so now, I've added NetBeans 4.0 to mess and was able to mirror the live projects structure in NetBeans. After compiling and uploading the sources, now I'm getting this Unknow Source error:

org.apache.jasper.JasperException: MultipartRequest
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)

... rest of error printout skept ....

The web.xml file is the same one from yesterday, so do I have a web.xml error or pathing error in the JSP file?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You still didn't answer Bear's previous question:

That said, where are you placing the compiled package hierarchy for package JavaTomek_V1?


What is the layout of your app's directory structure?
[ April 22, 2005: Message edited by: Ben Souther ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!