Rupal Rshah

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

Recent posts by Rupal Rshah

Did you get any solution for it? If so, please do the favor of posting the solution.
12 years ago
I want to create an applet that shows a message in Gujarat(Indain Local language). I tried with the unicode characters and changed the font for the gujarati script. But it is not showing the result. Can any one help me to do the same.
12 years ago
I want to know how do i know the type of component on the requst object. That means if i have an HTML page with textbox, button and few other components, if on submitting this form i call i servlet. Then in a servlet how do i know the type of the compenent.
12 years ago
Thank you all....My problem got solved
I am using Tomcat 7. I have not created .war file for this application
Hello Frits,

Have done that, but it does not work. Actually have changed the package after the first post, so it was the earlier version.
The error is that it could not deploy my application. It gives message like SEVERE: Error listenerStart

package myPkg;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
public class InitialCompanyNameListener implements ServletContextListener {
private static final String DEFAULT_NAME = "MISSING-COMPANY-NAME";

public void contextInitialized(ServletContextEvent event) {

ServletContext context = event.getServletContext();
setInitialAttribute(context,"companyName",DEFAULT_NAME);
setInitialAttribute(context,"formerCompanyName","");

}
public void contextDestroyed(ServletContextEvent event) {}


private void setInitialAttribute(ServletContext context,String initParamName,String defaultValue)
{
String initialValue = context.getInitParameter(initParamName);
if (initialValue != null) {
context.setAttribute(initParamName, initialValue);
}
else
{
context.setAttribute(initParamName, defaultValue);
}
System.out.println(initialValue+"PARAM: " + initParamName);
}
}



This file is within WEB-INF/classes/myPkg;
My web.xml is in WEB-INF


Hello Friends,

When i add the tag for listener in the web.xml, it makes the startup fails of my application. Below is my web.xml file.
Please help....

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<context-param>
<param-name>companyName</param-name>
<param-value>not-dot-com.com</param-value>
</context-param>

<context-param>
<param-name>formerCompanyName</param-name>
<param-value>hot-dot-com.com</param-value>
</context-param>

<listener>
<listener-class>coreservlets.listeners.InitialCompanyNameListener</listener-class>
</listener>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

</web-app>

Yes, I restarted the tomcat service. IT completely did not accepted the user name and password and showed the same modal window to enter user name and password.
13 years ago
Hello everyone,

I configured Tomcat 7.0.6 and could not open the manager\html to manage my applications.
My conf\tomcat-users.xml has been modified to the following
The username and password i am using is admin & admin

<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui,tomcat,role1"/>
</tomcat-users>

Thanks
Rupal
13 years ago
Yes I do have all the four tlds in the META-INF/TLD folder. SO then what shall i write in the web.xml . My web.xml is as under


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

<web-app>
<display-name>Struts Blank Application</display-name>

<!-- Standard Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>


<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  <init-param>
  :  :<param-name>config</param-name>
  :  :<param-value>/WEB-INF/struts-config.xml</param-value>
  :</init-param>
  :<load-on-startup>2</load-on-startup>
</servlet>


<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<taglib>
  :  : <taglib-uri>http://struts.apache.org/tags-logic</taglib-uri>;
  :  :<taglib-location>/WEB-INF/libstruts-logic.tld</taglib-location>
</taglib>



<!-- The Usual Welcome File List -->
<welcome-file-list>
  :  :<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>
14 years ago
I have my struts-taglib-1.3.10.jar, struts-core-1.3.10.jar and few other jar files in lib forlder of WEB-INF. I have set my classpath to this lib folder...but its giving the error as above mentioned.
14 years ago
I am not able to get any tld files from my lib of Web-INF. Please elaborate
14 years ago
None of these tlds are present. But i have a jar file in lib of WEB-INF. Do I need these tlds. From where can i get?
14 years ago
Hello,

I am novice to the struts. I have downloaded a blank application from apache.struts.org for struts 1.3.10. After extracting it when i try to call it in browser i am getting the above error. There are no tld files in the WEb-INF folder. I have also set the classpath to struts-taglib-1.3.10.jar;

Please help me
14 years ago