Hi,
I get this exception when I try to use html:options with
collection="dbCategories".
This is what I am doing
index.jsp
Article
my struts-config.xml
Template.jsp
...
...
My ArticlePreviewAction.java
dbCategories = dbBean.getCategoriesForArticle(myConnection);
reques
Hi,
I get this exception when I try to use html:options with
collection="dbCategories".
This is what I am doing
index.jsp
Article
my struts-config.xml
Template.jsp
...
...
My ArticlePreviewAction.java
dbCategories = dbBean.getCategoriesForArticle(myConnection);
reques
t set your collection of records as request attribute and off
it goes to JSP!
ATTA
On Mon, 27 Dec 2004 17:01:16 +0530, uma.k <[EMAIL PROTECTED]> wrote:
> Hi,
> I wanted to fetch some records from the database and show it to the user
in
> a JSP. Do I need ActionForm or DynaActionForm clas
Hi,
I have a problem with html:link tag. I need to pass dynamic param value with
the same key.This is what I am doing
Vector cats = (Vector)request.getAttribute("categories");
HashMap params = new HashMap();
for(int x=0; x < cats.size(); x++)
{
params.put("category", (String)cats.get(x))
Hi,
I wanted to fetch some records from the database and show it to the user in
a JSP. Do I need ActionForm or DynaActionForm class?
What if I dont use any of these classes? Will there be any problem?
Uma
-
To unsubscribe, e-ma
Hi,
I get the following exception
"java.lang.NoClassDefFoundError: articles/create_cat/CreateCategoryAction
(wrong name: create_cat/CreateCategoryAction)"
This is my struts-config.xml file
Whats wrong with this?
Uma
--
g same to you on your personal ID.
-Original Message-
From: uma.k [mailto:[EMAIL PROTECTED]
Sent: Friday, December 24, 2004 10:20 AM
To: 'Struts Users Mailing List'
Subject: DB Connection Best practice
Hi,
I wanted to insert a record into the database or
update a record in the d
class and let it return data in form of some bean and use that in action.
In this way you'll be isolating Controller from Business model.
uma.k wrote:
>Hi,
>I wanted to insert a record into the database or
>update a record in the database or
>get a record from the database.
>
Hi,
I wanted to insert a record into the database or
update a record in the database or
get a record from the database.
Where do I make my database connection? Is it in the Action class? Can I
make a single java class handle all of that for me?
If the above are wrong. Please let me know which is
t a blank page?
Uma
-Original Message-
From: Sunny [mailto:[EMAIL PROTECTED]
Sent: Friday, December 24, 2004 9:17 AM
To: Struts Users Mailing List
Subject: Re: NullPointerException
Hey Uma,
Kindly attach your logs when you face any exceptions. That'll really
help in debugging.
regards,
Sunny.
of ActionErrors e.g. ActionErrors errors =
new ActionErrors();
Dennis
"uma.k" <[EMAIL PROTECTED]>
12/23/2004 07:40 AM
Please respond to
"Struts Users Mailing List"
To
"'Struts Users Mailing List'"
cc
Subject
NullPointerException
I g
I get NullPointerException in validate() at this line
errors.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage("error.text.required"));
This is my ApplicationResources.properties file with this line
error.text.required=Text is required
What could be the reason for NullPointerException?
Uma
, 2004 10:52 AM
To: uma.k
Cc: Struts Users Mailing List
Subject: Re: html:file value
Hi, Uma,
Let's start over. Forget about anything but telling me from a user's
point of view what you want to do. You have a user using a browser
and wanting to do something with files. If the file is o
Yes Jack, You are right. I have ActionForm but do not want to use it.
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 22, 2004 10:56 AM
To: Struts Users Mailing List; Shiva Narayana
Subject: Re: Passing information to Action class
I may be wrong,
Hi,
How to pass information to Action class directly? i.e. I don't want to write
a ActionForm class.
Edit
And my struts-config.xml will look like this
in my .java execute method, I am writing
String theFile = request.getParameter("fileAbsPath");
Any ideas?
Uma
--
Hi,
Why do I get this error
org.apache.jasper.compiler.ParseException: /upload/display.jsp(23,70) Attribute
image_path has no value
when I use
" />
but this works fine
when I use
" />
Any ideas?
Uma
-
To unsubscribe, e-ma
Hi Jack,
Thanks for the replies. I basically wanted to write a test programme where
in I have few
text fields and 3 html:file inputs. Before I send the "text" information and
"images" to the
server, I wanted to show a preview to the user.
What I am planning to do is, pass the values to the bean fo
n which "references" an action class, usually something
like "uploadAction.do".
Jack
On Mon, 20 Dec 2004 19:38:23 +0530, uma.k <[EMAIL PROTECTED]> wrote:
> How do I get html:file value in Action class without using javascript?
>
>
>
> Uma
>
>
How do I get html:file value in Action class without using javascript?
Uma
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
().getServletContext().getRealPath(java.io.File.separator)
+ upload + File.separator + images + File.separator;
There are other ways, too.
Jack
On Mon, 20 Dec 2004 16:18:00 +0530, uma.k <[EMAIL PROTECTED]> wrote:
> Hi Sunny,
> It creates a file in "C:\Documents and Settings\uma.k\Star
Hi Sunny,
It creates a file in "C:\Documents and Settings\uma.k\Start
Menu\Programs\Apache Tomcat 4.0" and its path is virtual and maps to
D:\tomc only. But I wanted to upload to "images" directory where my app
is running. e.g. "D:\Program Files\Apache Tomcat
4.0\w
code to create a File object and write to it.
try {
File serverFile = new File(fileName); // Here you should specify the path
serverFile.createNewFile();
FileOutputStream os = new FileOutputStream(serverFile);
os.write(fileData);
os.close();
}
catch(Exception ex) {
System.out.println("ERROR
:[EMAIL PROTECTED]
Sent: Sunday, December 19, 2004 3:53 PM
To: Struts Users Mailing List
Subject: RE: file upload problem
May be you need setup the full path of your file ,as below
File f = new File(filePath);
f.mkdirs();
"uma.k" <[EMAIL PROTECTED]> wrote:
Hi Jay,
I tried this w
iginal Message -
From: "uma.k" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>; "'Jay Chandran'"
<[EMAIL PROTECTED]>
Sent: Sunday, December 19, 2004 12:32 PM
Subject: RE: file upload problem
> Hi Jay,
Hi Jay,
I tried this way too, but I am actually getting FileNotFoundException. This
is the modified code
String filePath = theForm.getFilePath();
System.out.println("filePath:"+filePath);
String fileName2 = filePath+fileName;
System.out.println("fileName2:"+fileName2);
//byte[]
I need to upload the file to the server.
Any ideas?
-Original Message-
From: Jay Chandran [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 18, 2004 3:57 PM
To: Struts Users Mailing List
Subject: Re: file upload problem
include the below and check
- Original Message -----
Fr
Hi,
I am modifying the upload files given by struts and trying to upload the
file to server without the user entering any path.
I have modified the upload.jsp with
Its means I am trying to upload to the same context in which the jsp is
running (webapps/test/upload/images)
I have modified the Up
it without touching the server, so much the better I
figure.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
uma.k wrote:
> Hi,
> I have a form where the user is given the option to select a file to
> upload(normally gif or jpg) before the use
ECTED]
Sent: Friday, December 17, 2004 10:54 PM
To: Struts Users Mailing List
Subject: Re: Preview of an Image and text
From: "uma.k" <[EMAIL PROTECTED]>
> I have a form where the user is given the option to select a file to
> upload(normally gif or jpg) before the user sub
Hi,
I have a form where the user is given the option to select a file to
upload(normally gif or jpg) before the user submits the file to the server,
I wanted to show him a preview of his message and image.
How do I do that? Where do I store the image temporarly?
Any solutions?
Uma
04 21:18:18 +0530, uma.k <[EMAIL PROTECTED]> wrote:
> It doesn't make any difference as the same works in another context.
>
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> Sent: Thursday, December 16, 2004 9:12 PM
> T
e two servlet mappings for the
ActionServlet. You should only have one of these.
uma.k wrote:
> This is my web.xml file
>
>
>
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_
etPrefix(),
PageContext.APPLICATION_SCOPE);
This would seem to indicate that your 'moduleConfig' would be null.
What does your web.xml look like?
uma.k wrote:
> If you look at the error message, I get NullPointer at this line in the
> generated java file
>
>
have something to do with
retrieving your message resources. Make sure you have your
ApplicationResources.properties file located in your WEB-INF/classes.
uma.k wrote:
> I get NullPointerException when I access this index.jsp page. I also have
> ApplicationResources.properties file in w
ariables u r
calling when the action is performed Add
An Article is taking null values. make sure that variables are
not null.
http://www.junlu.com/msg/127812.html
- Original Message -----
From: "uma.k" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'"
If you look at the error message, I get NullPointer at this line in the
generated java file
int _jspx_eval_bean_message_0 = _jspx_th_bean_message_0.doStartTag();
//NULLPOINTER
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apac
I get NullPointerException when I access this index.jsp page. I also have
ApplicationResources.properties file in web-inf/classes folder
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
Add An Article
This is my struts-
Where can I get the best tutorial on struts?
Uma
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
findForward("success");
}
-
jsp:
<[EMAIL PROTECTED] uri = "/WEB-INF/struts-html.tld" prefix="html" %>
..
.
--
struts-config:
.
---
I am putting my jsp's under tomcat\jg1\articles\*.jsp
Uma
-Original Message-
From: S.B. [mailto:[EMAIL PROTECTED]
Sent: Monday, December 13, 2004 7:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Cannot find ActionMappings or ActionFormBeans collection
Where are you putting jsp file?
ank application (struts-blank.war) that's a
boiler-plate web application. That might be a good place to start your own
test.
Good Luck,
Eddie
- Original Message -
From: "uma.k" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL
e got setup.
Have you tried installing the example application? You could tinker with
that to get a feel for the most elementary pieces of Struts and then go from
there. There's also a blank application (struts-blank.war) that's a
boiler-plate web application. That might be a good pla
s-blank.war) that's a
boiler-plate web application. That might be a good place to start your own
test.
Good Luck,
Eddie
- Original Message -
From: "uma.k" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday
Ok, I now executed the test1.do by removing all un necessary codes and I get
this error
The requested resource (Invalid path /test1 was requested) is not available.
Why is the context not found for .do file?
my struts-config.xml file
http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd
)
at java.lang.Thread.run(Thread.java:595)
Is it the problem with Tomcat or struts?
Uma
-Original Message-
From: Sunny [mailto:[EMAIL PROTECTED]
Sent: Monday, December 13, 2004 4:28 PM
To: uma.k
Subject: test this
uma, please paste your tomcat's class path. mail
onServlet itself is not
initialised / not mapped.
uma.k wrote:
>No, Nothing helped me. I still get that error and I cannot call Template.do
>as the tomcat gives error that the file is not found.
>
>
-
To unsubscrib
ActionMappings or ActionFormBeans collection
Are you able to Get other pages working?
e.g. : login.do
This kind of error comes *only* when ActionServlet itself is not
initialised / not mapped.
uma.k wrote:
>No, Nothing helped me. I still get that error and I cannot call Template.do
>
ActionMappings or ActionFormBeans collection
Do following changes:
your struts-config:
your Template.jsp
.
uma.k wrote:
>Hi Bush,
>Its confusing me. How do I call an Action without the Template.jsp form
>being submitted?
Hi Eddie,
Are you saying that put a link to this jsp and pass this jsp through the
controller? Buts its a simple jsp and it doesn't require any Actions. Any
explanation on this please?
> You can't expect Struts to set things up for a page it doesn't know
> you're requesting, and it can't know you'
x27;re
requesting, and it can't know you're requesting the page unless you go
through the controller :-)
Good Luck,
Eddie
- Original Message -
From: "uma.k" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent:
Hi Sunny,
I didn't get you. I am not using any ModuleConfig, Where am I refering it
from and in which file?
Uma
-Original Message-
From: Sunny [mailto:[EMAIL PROTECTED]
Sent: Monday, December 13, 2004 11:41 AM
To: Struts Users Mailing List
Subject: Re: Cannot find ActionMappings or Action
Hi Sunny,
This is my complete error message. Is this the one you are asking for?
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:471)
at org.apache.jsp.Te
List
Subject: RE: Cannot find ActionMappings or ActionFormBeans collection
Is that error at start-up or when you are invoking an action by going to a
Struts *.do action through a URL?
Regards,
David
-Original Message-
From: uma.k [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 12, 2004
";>
uma.k wrote:
>Hello,
>I am new to Struts, my first application is giving me this error. I am
using
>Tomcat 4.0
>and struts 1.2.4. Where did I go wrong? Please help me.
>javax.servlet.ServletException: Cannot find ActionMappings or
>
Hello,
I am new to Struts, my first application is giving me this error. I am using
Tomcat 4.0
and struts 1.2.4. Where did I go wrong? Please help me.
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection
Here are my files
-Template.jsp
<%@ taglib uri="/WE
55 matches
Mail list logo