• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Tiles don't show Struts form

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have this layout/tile definitions:

<definition name="aux.layout" path="/auxLayout.jsp">
<put name="title" value="Aux Layout"/>
<put name="security.bar" value=""/>
<put name="options.bar" value=""/>
<put name="work.bar" value=""/>
</definition>

<definition name="login.page" extends="aux.layout">
<put name="title" value="User Login"/>
<put name="security.bar" value="/publicBar.jsp"/>
<put name="options.bar" value="/publicOptions.jsp"/>
<put name="work.bar" value="/loginBar.jsp"/>
</definition>

The layout is auxLayout.jsp (contains <tiles:...> tags) and rest of pages are plain jsp pages, except loginBar.jsp. It contains <html:...> tags to render a form.

The loginBar.jsp is something like this:

<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<html:errors/>
<html:form action="/login">
<html:text property="userName" size="25" maxlength="30"/>
<html assword property="passwd" size="25" maxlength="30"/>
<a class="action_link" href="javascript:validate();">Submit</a>
</html:form>
</body>
</html>


The login.do definition is this:

<action
path="/login"
type="action.loginAction"
name="loginForm"
scope="request"
validate="true"
input="login.page"/>


When I call login.do, the complete page load into browser, but form tags doesn't appear. Instead, the <html:...> remains in the source code.

I tried changing
<put name="work.bar" value="/loginBar.jsp"/>
to
<put name="work.bar" value="/loginBar.do"/>

and adding a global foward like

<forward name="loginBar" path="/loginBar.jsp"/>

but now the login page load all except all contents of loginBar.jsp.


Can somebody tell me what's going on with this?

Thanks,
Herman.
reply
    Bookmark Topic Watch Topic
  • New Topic