It's not a secret anymore!
The moose likes BEA/Weblogic and the fly likes Struts Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Struts Help" Watch "Struts Help" New topic

Struts Help

srinivasM Reddy

Joined: May 23, 2005
Posts: 5
Hi all,

if you have any url for Deploying struts application in Weblogic please
send me the Link

Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Where are you stuck? Are you new to struts or weblogic?

If you've got a weblogic domain set up you can drop one of the struts example war files into the applications directory.
srinivasM Reddy

Joined: May 23, 2005
Posts: 5
Hi , i am trying to deploy a sample application using struts in weblogic
The file details are as follows:
IF u can help me , i need to run this files in weblogic,
can u tell me what should i do to run this files..

FIle Name :
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<head><title>Submit example</title></head>

<h3>Example Submit Page</h3>


<html:form action="">
Last Name: <html:text property="lastName"/><br>
Address: <html:textarea property="address"/><br>
Sex: <html:radio property="sex" value="M"/>Male
<html:radio property="sex" value="F"/>Female<br>
Married: <html:checkbox property="married"/><br>
Age: <html:select property="age">
<html ption value="a">0-19</html ption>
<html ption value="b">20-49</html ption>
<html ption value="c">50-</html ption>

file ;; SubmitAction

package aaaa;

import javax.servlet.http.*;
import org.apache.struts.action.*;

public final class SubmitAction extends Action {

public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {

SubmitForm f = (SubmitForm) form; // get the form bean
// and take the last name value
String lastName = f.getLastName();
// Translate the name to upper case
//and save it in the request object
request.setAttribute("lastName", lastName.toUpperCase());

// Forward control to the specified success target
return (mapping.findForward("success"));

file name : SubmitForm

package aaaa;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

public final class SubmitForm extends ActionForm {

/* Last Name */
private String lastName = "Hansen"; // default value
public String getLastName() {
return (this.lastName);
public void setLastName(String lastName) {
this.lastName = lastName;

/* Address */
private String address = null;
public String getAddress() {
return (this.address);
public void setAddress(String address) {
this.address = address;

/* Sex */
private String sex = null;
public String getSex() {
return (;
public void setSex(String sex) { = sex;

/* Married status */
private String married = null;
public String getMarried() {
return (this.married);
public void setMarried(String married) {
this.married = married;

/* Age */
private String age = null;
public String getAge() {
return (this.age);
public void setAge(String age) {
this.age = age;


file struts config file..

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"


<!-- ========== Form Bean Definitions ================= -->

<form-bean name="submitForm"


<!-- ========== Action Mapping Definitions ============ -->

<action path="/submit"
<forward name="success" path="/submit.jsp"/>
<forward name="failure" path="/submit.jsp"/>


Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Sorry, I'm not going to carefully read through 150 lines of code/configuration when you don't say what problem you are having with it today.

In your duplicate posts from yesterday, Struts forum - problem with struts in weblogic and BEA/Weblogic Forum - weblogic and struts usage error you were getting an exception with this message:

cannot resolve '/WEB-INF/struts-html.tld' into a valid tag library

Are you still having this problem? Are the struts tld files in WEB-INF and the jars in WEB-INF/lib?
I agree. Here's the link:
subject: Struts Help
It's not a secret anymore!