struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Purcell" <spurc...@vertisinc.com>
Subject Need Help With Action
Date Fri, 25 Feb 2005 21:17:25 GMT
Hello,
 
I have been working on a new struts site for a couple of days now, and I have some issues
that I was hoping to get some resolve on.
 
In my JSP pages. I am using this tag for an action:
<html:form action="login" focus="password">
 
When I source the file, I have this: " <form name="loginForm" method="POST" action="/uniquepear/uniquepear/login">
"
Why is it adding multiple webapp URI's to my actions? My struts-config.xml is below. But all
I am doing is calling the admin.jsp and I get the wierd action.
 
Also, I am using the "  <html:base />"
in my JSP pages. I am new to this, I believe I normally just use a "/" from the webroot.
 
My setup is as follows:
/uniquepear
/stylesheets/my.css
/includes
/images
/WEB-INF/etc.
 
Something new I am running into is the fact when I use a href like this: "/images/myjpg.jpg"
it does not get it. Sometimes I have to access it like "../images/myjpg.jpg"
 
Can anyone try and help me out with these issues. 
 
Thanks,
Scott 
 

 

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
       "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
       " http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>


  <form-beans>
    <form-bean name="loginForm" type="com.skp.form.LoginForm"/>  
  </form-beans>

 <global-exceptions>
    <exception 
   key="global.error.invalidlogin"
     path="/admin.jsp"
     scope="request"
     type="com.skp.user.InvalidLoginException"/>
   </global-exceptions>

  <global-forwards>
    <forward name="welcome" path="/uniquepear/loginpage" />
    <forward name="Main" path="/main.jsp" />
    <forward name="Login" path="/login.jsp" />
    <forward name="SystemFailure" path="/systemerror.jsp" />
    <forward name="SessionTimeOut" path="/sessiontimeout.jsp" />    
  </global-forwards>

  <action-mappings>

  <action
    path="/loginpage"
    type="com.skp.action.LoginAction"
    input="/welcome.jsp">
      <forward name="Success" path="/loggedin.jsp" redirect="true"/>
      <forward name="Failure" path="/admin.jsp" redirect="true"/>
  </action>

  <action
    path="/login"
    type="com.skp.login.LoginAction"
    scope="request"
    name="loginForm"
    validate="true"
    input="/admin/menu.jsp">
  </action>


  </action-mappings>

  <controller
    contentType="text/html;charset=UTF-8"
    debug="3"
    locale="true"
    nocache="true"/>

  <message-resources parameter="globalResources" null="false"/>


</struts-config>


 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message