Shikha Dhawan

Greenhorn
+ Follow
since Jun 07, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Shikha Dhawan

I'm using struts2-jquery grid.

gridmodel in my action class is getting updated correctly. But, nothing is getting displayed on the grid.

struts.xml



userList.jsp



ListUsers.java



I did refer to the solution on http://stackoverflow.com/questions/6411589/struts2-jquery-grid-data-not-load?answertab=active#tab-top

But that solution did not work. Instead of data getting displayed on the grid, it prompted to save the file & that file contained the following info:

{"JSON":"success","gridModel":[{"email":"user1@email.com","fullName":"User ABC","id":1,"userName":"user1"},{"email":"user2@email.com","fullName":"User DEF","id":1,"userName":"user2"}],"page":0,"record":2,"rows":0,"sidx":null,"sord":null,"total":2147483647}

As per my understanding row & page are automatically handled by the plugin. But as per the json data above they are not getting incremented. Hard-coded them to the size of the gridmodel and the json data I got is:

{"JSON":"success","allApplicationData":"success","gridModel":[{"email":"user1@email.com","fullName":"User ABC","id":1,"userName":"user1"},{"email":"user2@email.com","fullName":"User DEF","id":1,"userName":"user2"}],"page":1,"record":2,"rows":2,"sidx":null,"sord":null,"total":1}

Thanks,
Shikha
12 years ago

debraj mallick wrote:since i am having text boxes of same name, so in action i will get a String array with same name.



Hi,
Your solution worked. But got a better way around.

While declaring the iterator :


Try . It worked.

Thanks Shikha
12 years ago

Hi,

I'm using <sj:datepicker> tag as follows :



My pom.xml declares the related dependency as:


But, the calender/date picker is not getting displayed. Instead it is being displayed as a textfield on the browser.

What could be the issue?

Thanks,
Shikha
12 years ago
Hi,

When I run my web application (struts2) , the index page is displayed correctly. When I click the button on the index page, the following error occurs:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:500)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:434)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.35 logs.

I'm not able to understand the reason. I'm new to web app development, please help..

Struts.xml :



POM.xml:





Thanks,
Shikha

12 years ago

William Brogden wrote:The information you need is in the window that opened and then closed when an error was thrown.

Change the last executable line of startup bat to use "run" instead of "start" - this will execute the catalina.bat in the same window so you can see the error.

Bill



Hi Bill,

Thanks

I changed the exectable's last statement.

Got the following information:
java.util.logging.ErrorManager: 4: Unable to create [C:\apache-tomcat-7.0.23" -D
catalina.home=C:\apache-tomcat-7.0.23"\logs]
java.util.logging.ErrorManager: 4: Unable to create [C:\apache-tomcat-7.0.23" -D
catalina.home=C:\apache-tomcat-7.0.23"\logs]
java.util.logging.ErrorManager: 4: Unable to create [C:\apache-tomcat-7.0.23" -D
catalina.home=C:\apache-tomcat-7.0.23"\logs]
java.util.logging.ErrorManager: 4: Unable to create [C:\apache-tomcat-7.0.23" -D
catalina.home=C:\apache-tomcat-7.0.23"\logs]
Jan 21, 2012 11:09:59 AM org.apache.catalina.startup.Bootstrap initClassLoaders
SEVERE: Class loader creation threw exception
java.io.IOException: The filename, directory name, or volume label syntax is inc
orrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:396)
at java.io.File.getCanonicalPath(File.java:559)
at java.io.File.getCanonicalFile(File.java:583)
at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(Clas
sLoaderFactory.java:171)
at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.jav
a:150)
at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java
:91)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:227)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

Issue was CATALINA_HOME was set to C:\apache-tomcat-7.0.23\bin & not to C:\apache-tomcat-7.0.23.

Thanks.

//Shikha
12 years ago

debraj mallick wrote:hi Shikha Dhawan,

i didn't find any good solution yet, at present what i am doing is - in action i have

once the user hits the submit button, i am getting all the values which solves my problem but still don't know how to retrieve / get the lists bean.



HI Debraj,

You mean the name is of type String & an attribute of Student. Still it maps with the String[] name;

Thanks,
Shikha
12 years ago
Hi,

I am also facing the same issue. Is there any other way of doing this?

Thanks,
Shikha
12 years ago
Hi,


I'm using Windows 7 64 bit machine & having Java 1.6.

I am not able to start tomcat. I just downloaded the tomcat, unzipped the file & set the environment variables.

When I run startup.bat from command prompt, it shows the following on my command prompt:


C:\apache-tomcat-7.0.23\bin>startup.bat
Using CATALINA_BASE: "C:\apache-tomcat-7.0.23\"
Using CATALINA_HOME: "C:\apache-tomcat-7.0.23\"
Using CATALINA_TMPDIR: "C:\apache-tomcat-7.0.23\\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.6.0_25\"
Using CLASSPATH: "C:\apache-tomcat-7.0.23\\bin\bootstrap.jar;C:\apache-tom
cat-7.0.23\\bin\tomcat-juli.jar"

The Tomcat window opens for a few milliseconds n get closed. No information is being logged.

Please guide me. I am not able to figure out whats missing. Let me know if any other information is required.
12 years ago
Hi,

M new to web application development.

Could any1 please tell me d difference between a web-server & application server citing examples from real world?
13 years ago