wood burning stoves 2.0*
The moose likes Struts and the fly likes please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "please help" Watch "please help" New topic
Author

please help

daisy patrick
Greenhorn

Joined: Apr 24, 2005
Posts: 3
Hi All,
I have written a very simple login application on WSAD5.0.,
after deploying the related beans and running the application..
when i click on submit button..
I m gettin the exception :


[4/24/05 13:47:52:069 EDT] 2620157b WebGroup I SRVE0180I: [LogInWebPrj] [/LogInWebPrj] [Servlet.LOG]: /login/jsp/userLogIn.jsp: init
[4/24/05 13:47:56:806 EDT] 2620157b OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /userLogIn has not been defined

i have written my application on struts..and in the struts-config the mapping are as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>

<!-- Data Sources -->
<data-sources>
</data-sources>

<!-- Form Beans -->
<form-beans>
<form-bean name="logInActionForm" type="loginwebprj.forms.LogInActionForm">
</form-bean>
</form-beans>

<!-- Global Forwards -->
<global-forwards>
<forward name="login" path="/login/jsp/userLogIn.jsp" />
<forward name="error" path="/onlinestore/jsp/userErrorPage.jsp" />
</global-forwards>

<!-- Action Mappings -->
<action-mappings>
<action
path="/userLogIn"
name="logInActionForm"
scope="session"
type="loginwebprj.JavaSource.action.LogInAction" >
<forward name="SUCCESS"
path="/login/jsp/userSuccess.jsp" />
<forward name="FAILURE"
path="/login/jsp/userFailure.jsp" />
</action>

</action-mappings>

</struts-config>



and the web.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp">
<display-name>LogInWebPrj</display-name>

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class&g t;
<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>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>loginwebprj.resources.ApplicationResources</param-value&g t;
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>OSStartup</servlet-name>
<display-name>OSStartup</display-name>
<servlet-class>common.OSStartup</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

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

<servlet-mapping>
<servlet-name>OSStartup</servlet-name>
<url-pattern>/OSStartup</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/application-1.0</taglib- uri>
<taglib-location>/WEB-INF/lib/application.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/page-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/page.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/request-1.0</taglib-uri& gt;
<taglib-location>/WEB-INF/lib/request.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/response-1.0</taglib-uri >
<taglib-location>/WEB-INF/lib/response.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/session-1.0</taglib-uri& gt;
<taglib-location>/WEB-INF/lib/session.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>jspsql</taglib-uri>
<taglib-location>/WEB-INF/lib/jspsql.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/i18n-1.0</taglib-uri>
<taglib-location>/WEB-INF/lib/i18n.jar</taglib-location>
</taglib>
</web-app>



and the login jsp is as follows..



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>

<HEAD>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="../../theme/Master.css" rel="stylesheet"
type="text/css">
<TITLE>userLogIn.jsp</TITLE>
</HEAD>
<form method="POST" action="/userLogIn">
<BODY>
<table cellpadding="0" cellspacing="0" class="pageContent">
<tr>
<td width="182" valign="top">
Users LogIn Screen
</td>

</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td>
<label style="vertical-align:middle;">Enter UserName</label>
</td>
<td>
<input type="text" name="user_name" >
</td>
</tr>

<tr>
<td>
<label style="vertical-align:middle;">Enter Password</label>
</td>
<td>
<input type="text" name="user_pwd" >
</td>
</tr>
<tr>
<td>
<input name="submit" type="submit" value="submit">


</td>
<td>
<input name="reset" type="reset" value="reset">
</td>
</tr>

<P></P>
</BODY>
</form>
</HTML>



and my virtualhosts.xml:

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:host="http://www.ibm.com/websphere/appserver/schemas/5.0/host.xmi">
<xmi ocumentation>
<contact>{Your Contact Info}</contact>
</xmi ocumentation>
<host:VirtualHost xmi:id="VirtualHost_1" name="default_host">
<mimeTypes xmi:id="MimeEntry_1" type="application/SLA">
<extensions>STL</extensions>
<extensions>stl</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_2" type="application/STEP">
<extensions>STEP</extensions>
<extensions>STP</extensions>
<extensions>step</extensions>
<extensions>stp</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_3" type="application/acad">
<extensions>DGW</extensions>
<extensions>dgw</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_4" type="application/clariscad">
<extensions>CCAD</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_5" type="application/drafting">
<extensions>DRW</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_6" type="application/dxf">
<extensions>DXF</extensions>
<extensions>dxf</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_7" type="application/i-deas">
<extensions>UNV</extensions>
<extensions>unv</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_8" type="application/iges">
<extensions>IGES</extensions>
<extensions>IGS</extensions>
<extensions>iges</extensions>
<extensions>igs</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_9" type="application/octet-stream">
<extensions>bin</extensions>
<extensions>class</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_10" type="application/oda">
<extensions>oda</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_11" type="application/pdf">
<extensions>pdf</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_12" type="application/postscript">
<extensions>PS</extensions>
<extensions>ai</extensions>
<extensions>eps</extensions>
<extensions>ps</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_13" type="application/pro_eng">
<extensions>PRT</extensions>
<extensions>prt</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_14" type="application/set">
<extensions>SET</extensions>
<extensions>set</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_15" type="application/solids">
<extensions>SOL</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_16" type="application/vda">
<extensions>VDA</extensions>
<extensions>vda</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_17" type="application/vnd.lotus-1-2-3">
<extensions>123</extensions>
<extensions>wk1</extensions>
<extensions>wk3</extensions>
<extensions>wk4</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_18" type="application/vnd.lotus-approach">
<extensions>apr</extensions>
<extensions>vew</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_19" type="application/vnd.lotus-freelance">
<extensions>pre</extensions>
<extensions>prz</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_20" type="application/vnd.lotus-organizer">
<extensions>or2</extensions>
<extensions>or3</extensions>
<extensions>org</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_21" type="application/vnd.lotus-screencam">
<extensions>scm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_22" type="application/vnd.lotus-wordpro">
<extensions>lwp</extensions>
<extensions>sam</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_23" type="application/x-bcpio">
<extensions>bcpio</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_24" type="application/x-bsh">
<extensions>bsh</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_25" type="application/x-cpio">
<extensions>cpio</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_26" type="application/x-csh">
<extensions>csh</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_27" type="application/x-dvi">
<extensions>dvi</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_28" type="application/x-freelance">
<extensions>prs</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_29" type="application/x-gtar">
<extensions>gtar</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_30" type="application/x-hdf">
<extensions>hdf</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_31" type="application/x-javascript">
<extensions>js</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_32" type="application/x-ksh">
<extensions>ksh</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_33" type="application/x-netcdf">
<extensions>cdf</extensions>
<extensions>nc</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_34" type="application/x-pcl">
<extensions>pcl</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_35" type="application/x-rtf">
<extensions>rtf</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_36" type="application/x-sh">
<extensions>sh</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_37" type="application/x-shar">
<extensions>shar</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_38" type="application/x-sv4cpio">
<extensions>sv4cpio</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_39" type="application/x-sv4crc">
<extensions>sv4crc</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_40" type="application/x-tcl">
<extensions>tcl</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_41" type="application/x-tex">
<extensions>tex</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_42" type="application/x-texinfo">
<extensions>texi</extensions>
<extensions>texinfo</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_43" type="application/x-troff">
<extensions>roff</extensions>
<extensions>t</extensions>
<extensions>tr</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_44" type="application/x-troff-man">
<extensions>man</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_45" type="application/x-troff-me">
<extensions>me</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_46" type="application/x-troff-ms">
<extensions>ms</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_47" type="application/x-wais-source">
<extensions>src</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_48" type="application/x-x509-ca-cert">
<extensions>der</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_49" type="audio/basic">
<extensions>au</extensions>
<extensions>snd</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_50" type="audio/x-aiff">
<extensions>aif</extensions>
<extensions>aifc</extensions>
<extensions>aiff</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_51" type="audio/x-wav">
<extensions>wav</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_52" type="image/bmp">
<extensions>bmp</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_53" type="image/cmu-raster">
<extensions>ras</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_54" type="image/gif">
<extensions>gif</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_55" type="image/ief">
<extensions>ief</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_56" type="image/jpeg">
<extensions>JPE</extensions>
<extensions>JPEG</extensions>
<extensions>JPG</extensions>
<extensions>jpe</extensions>
<extensions>jpeg</extensions>
<extensions>jpg</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_57" type="image/tiff">
<extensions>tif</extensions>
<extensions>tiff</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_58" type="image/x-portable-anymap">
<extensions>pnm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_59" type="image/x-portable-bitmap">
<extensions>pbm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_60" type="image/x-portable-graymap">
<extensions>pgm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_61" type="image/x-portable-pixmap">
<extensions>ppm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_62" type="image/x-rgb">
<extensions>rgb</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_63" type="image/x-xbitmap">
<extensions>xbm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_64" type="image/x-xpixmap">
<extensions>xpm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_65" type="image/x-xwindowdump">
<extensions>xwd</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_66" type="mulitpart/x-gzip">
<extensions>gz</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_67" type="multipart/x-tar">
<extensions>tar</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_68" type="multipart/x-ustar">
<extensions>ustar</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_69" type="multipart/x-zip">
<extensions>zip</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_70" type="text/css">
<extensions>css</extensions>
<extensions>s</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_71" type="text/html">
<extensions>htm</extensions>
<extensions>html</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_72" type="text/plain">
<extensions>C</extensions>
<extensions>c</extensions>
<extensions>cc</extensions>
<extensions>com</extensions>
<extensions>conf</extensions>
<extensions>cxx</extensions>
<extensions>def</extensions>
<extensions>f90</extensions>
<extensions>for</extensions>
<extensions>h</extensions>
<extensions>hh</extensions>
<extensions>java</extensions>
<extensions>list</extensions>
<extensions>log</extensions>
<extensions>lst</extensions>
<extensions>m</extensions>
<extensions>mar</extensions>
<extensions>sdml</extensions>
<extensions>txt</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_73" type="text/richtext">
<extensions>rtx</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_74" type="text/tab-separated-values">
<extensions>tsv</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_75" type="test/x-asm">
<extensions>asm</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_76" type="text/x-setext">
<extensions>etx</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_77" type="text/x-ssi-html">
<extensions>htmls</extensions>
<extensions>shtml</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_78" type="text/x-uil">
<extensions>uil</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_79" type="application/x-latex">
<extensions>latex</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_80" type="text/x-uuencode">
<extensions>uu</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_81" type="video/mpeg">
<extensions>MPE</extensions>
<extensions>MPEG</extensions>
<extensions>MPG</extensions>
<extensions>mpe</extensions>
<extensions>mpeg</extensions>
<extensions>mpg</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_82" type="video/quicktime">
<extensions>mov</extensions>
<extensions>qt</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_83" type="video/x-motion-jpeg">
<extensions>mjpg</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_84" type="video/x-msvideo">
<extensions>avi</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_85" type="video/x-sgi-movie">
<extensions>movie</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_86" type="www/mime">
<extensions>mime</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_87" type="www/unknown">
<extensions>*</extensions>
<extensions>*.*</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_88" type="x-world/x-vrml">
<extensions>wrl</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_89" type="text/xml">
<extensions>xml</extensions>
<extensions>dtd</extensions>
</mimeTypes>
<mimeTypes xmi:id="MimeEntry_90" type="application/xml">
<extensions>xsl</extensions>
</mimeTypes>
<aliases xmi:id="HostAlias_1" hostname="*" port="9080"/>
<aliases xmi:id="HostAlias_2" hostname="*" port="80"/>
<aliases xmi:id="HostAlias_3" hostname="*" port="9443"/>
</host:VirtualHost>
</xmi:XMI>



i 'm unable to figure out the problem..
as the mapping seem to be correct to me..
I have tried to serch on the internet..but not found anything helping me out
May be I'm missing some unlearnt point..
I wud be very greatful..if somebody can help me out of it..
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
you're missing the .dohhhhhhhh!
<form method="POST" action="/userLogIn.do">

if you are calling the action from the old HTML form tag, you must specify the full action name (and path). if you use html:form, struts appends the suffix for you.

i HIGHLY recommend using the struts-html library to build your forms. it will come back to haunt you later if you don't, especially in time of pre-population upon validation and when you run into indexed properties (among other useful struts features).
[ April 25, 2005: Message edited by: alan do ]

-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please help
 
Similar Threads
problem with struts1.1 please help me...
VirtualHost/Webgroup not defined error
Cannot retrieve mapping for action /Login
PLGN0021E: Servlet Request Processor Exception
JSP context problem