Wrox Programmer Forums
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2007, 10:52 PM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help me pls

hai,

   While i complie an struts enabled java file. i get the following error msg.

C:\apache-tomcat-6.0.13\webapps\register\WEB-INF\classes\app>javac RegisterForm.
java
RegisterForm.java:2: package org.apache.struts.action does not exist
import org.apache.struts.action.*;
^
RegisterForm.java :3: cannot find symbol
symbol: class ActionForm
public class RegisterForm extends ActionForm {
                                  ^
2 errors

C:\apache-tomcat-6.0.13\webapps\register\WEB-INF\classes\app>javac RegisterActio
n.java
RegisterAction.java:2: package org.apache.struts.action does not exist
import org.apache.struts.action.*;
^
RegisterAction.java :5: cannot find symbol
symbol: class Action
public class RegisterAction extends Action {
                                    ^
RegisterAction.java:6: cannot find symbol
symbol : class ActionMapping
location: class app.RegisterAction
public ActionForward perform (ActionMapping mapping,
                              ^
RegisterAction.java:7: cannot find symbol
symbol : class ActionForm
location: class app.RegisterAction
ActionForm form,
^
RegisterAction.java:6: cannot find symbol
symbol : class ActionForward
location: class app.RegisterAction
public ActionForward perform (ActionMapping mapping,
       ^
RegisterAction.java :11: cannot find symbol
symbol : class RegisterForm
location: class app.RegisterAction
RegisterForm rf = (RegisterForm) form;
^
RegisterAction.java:11: cannot find symbol
symbol : class RegisterForm
location: class app.RegisterAction
RegisterForm rf = (RegisterForm) form;
                   ^
RegisterAction.java:19: cannot find symbol
symbol : variable UserDirectory
location: class app.RegisterAction
UserDirectory.getInstance().setUser(username,passw ord1);
^
RegisterAction.java:21: cannot find symbol
symbol : class UserDirectoryException
location: class app.RegisterAction
} catch (UserDirectoryException e) {
         ^
9 errors

C:\apache-tomcat-6.0.13\webapps\register\WEB-INF\classes\app>

If i rum my normal java file its working fine.

my web.xml file looks llike this:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>

  <display-name>Struts Application Template</display-name>


  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>


  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>


  <welcome-file-list>
    <welcome-file>register.jsp</welcome-file>
  </welcome-file-list>


  <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>

<taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
  </taglib>


</web-app>

I hv my file in C: apache tomcat\webapps\register\WEB-INF\classes\app

i can my compile my normal servlets n java program. i get error while running my struts enabled java program only...







Similar Threads
Thread Thread Starter Forum Replies Last Post
pls help me.. nilusharief003 ASP.NET 2.0 Professional 5 December 4th, 2008 08:05 AM
Pls help me!! hoailing22 ASP.NET 1.0 and 1.1 Basics 4 June 10th, 2005 11:24 PM
Pls help me hoailing22 ASP.NET 1.0 and 1.1 Basics 3 May 24th, 2005 11:08 AM
Pls!!! I need your Help!!! Ariel ASP.NET 1.0 and 1.1 Basics 3 May 9th, 2005 06:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.