• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

JSP - Servlet: package does not exist

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67695
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic