Search Results

Search found 48 results on 2 pages for 'gigapr'.

Page 1/2 | 1 2  | Next Page >

  • How to populate a drop down list in Spring MVC

    - by GigaPr
    Hi, would like to populate a drop down list on a jsp page i have my page that looks like <form:form method="POST" action="addRss.htm" commandName="addNewRss" cssClass="addUserForm"> <div class="floatL"> <div class="padding5"> <div class="fieldContainer"> <strong>Title:</strong>&nbsp; </div> <form:errors path="title" cssClass="error"/> <form:input path="title" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Description:</strong>&nbsp; </div> <form:errors path="description" cssClass="error"/> <form:input path="description" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Language:</strong>&nbsp; </div> <form:errors path="language" cssClass="error"/> <form:select path="language" cssClass="textArea" /> </div> </div> <div class="floatR"> <div class="padding5"> <div class="fieldContainer"> <strong>Link:</strong>&nbsp; </div> <form:errors path="link" cssClass="error"/> <form:input path="link" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Url:</strong>&nbsp; </div> <form:errors path="url" cssClass="error"/> <form:input path="url" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Url</strong>&nbsp; </div> <form:errors path="url" cssClass="error"/> <form:input path="url" cssClass="textArea" /> </div> </div> <input type="submit" class="floatR" value="Add New Rss"> </form:form> and my controller public class AddRssController extends BaseController { private static final String[] LANGUAGES = { "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WV", "WI", "WY" }; public AddRssController() { setCommandClass(RSS.class); setCommandName("addNewRss"); } @Override protected Object formBackingObject(HttpServletRequest request) throws Exception { RSS rantForm = (RSS) super.formBackingObject(request); // rantForm.setVehicle(new Vehicle()); return rantForm; } @Override protected Map referenceData(HttpServletRequest request) throws Exception { Map referenceData = new HashMap(); referenceData.put("language", LANGUAGES); return referenceData; } @Override protected ModelAndView onSubmit(Object command, BindException bindException) throws Exception { RSS rss = (RSS) command; rssServiceImplementation.add(rss); return new ModelAndView(getSuccessView()); } } and my BaseController public class BaseController extends SimpleFormController implements Controller { public UserServiceImplementation userServiceImplementation; public UserServiceImplementation getUserServiceImplementation() { return userServiceImplementation; } public void setUserServiceImplementation(UserServiceImplementation userServiceImplementation) { this.userServiceImplementation = userServiceImplementation; } public RssServiceImplementation rssServiceImplementation; public RssServiceImplementation getRssServiceImplementation() { return rssServiceImplementation; } public void setRssServiceImplementation(RssServiceImplementation rssServiceImplementation) { this.rssServiceImplementation = rssServiceImplementation; } } But it doesn t work Any suggestion?

    Read the article

  • Object Oriented database development jobs

    - by GigaPr
    Hi, i am a software engineering student currently looking for a job as developer. I have been offered a position in a company which implements software using object oriented databases. these are something completely new for me as at university we never worked on it, just some theory. my questions are do you think is a good way to start my career as developer? what is the job market for this type of developemnt? are these skills requested? what markets this technology touches? thanks

    Read the article

  • Entity Relationship diagram - Composition

    - by GigaPr
    Hi, I am implementing a small database(university Project) and i am facing the following problem. I created a class diagram where i have a class Train {Id, Name, Details} And a class RollingStock which is than generalized in Locomotive and FreightWagon. A train is Composed by multiple RollingStock at a certain time(on different days the rolling stock will compose a different train). I represented the relationship train - rolling stock as a diamond filled (UML) but still I have a many to many relationship between the two tables. so i guess i have to create an additional table to solve the many to many relationship train_RollingStock. but how do i represent the Composition? Can i still use the filled diamond? If yes on which side? Thanks

    Read the article

  • URL rewriting IIS6

    - by GigaPr
    Hi i was using HttpModule to Perform Extension-Less URL Rewriting as explained at http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx Approach 3: works perfectly in IIS7, now i just published the solution to the live environment it doesnt work. the reason seems to be the fact that they are running IIS6 the question is does anyone now any quick solution to make it work in IIS6 without having to change all the code? thanks

    Read the article

  • CMS for .Net web applications

    - by GigaPr
    Hi, i am working on a web application that now requires a CMS. Could you suggest me a product that grant integration with my existing application. The latter is implemented using .Net framework 3.5 Linq to sql and SQL Server 2008 I may consider even not open source product (affordable price) Thanks

    Read the article

  • Oracle Warning: execution completed with warning

    - by GigaPr
    Hi I have two tables Orders (ID,ORDERDATE,DELIVERYDATE,GOODID,QUANTITY,COLLECTIONFROM,DELIVERYTO,NOTES) and ROLLINGSTOCK_ORDER(ORDERID,ROLLINGSTOCKID,DEPARTUREDATE,DELIVERYDATE,ROUTEID) i have created a trigger to update the DELIVERYDATE in ROLLINGSTOCK_ORDER when DELIVERYDATE is updated in Orders CREATE OR REPLACE TRIGGER TRIGGER_UpdateDeliveryDate BEFORE UPDATE OF DELIVERYDATE ON Orders FOR EACH ROW BEGIN then UPDATE LOCOMOTIVE_DRIVER ld set ld.DELIVERYDATE = :new.DELIVERYDATE where ld.orderid = :new.id end if; END; When i run it i get the following message Warning: execution completed with warning TRIGGER TRIGGER_UpdateDeliveryDate Compiled. The warning does not give me any information so How can i see the details of the warning? The trigger seems ok to me can you spot the problem? Thanks

    Read the article

  • Error Creating RSS Feed XML file - Java

    - by GigaPr
    Hi, i am trying to create an RssFeed using java this is the class i use import com.rssFeed.domain.RSS; import com.rssFeed.domain.RSSItem; import java.io.FileOutputStream; import java.util.Iterator; import javax.xml.stream.XMLEventFactory; import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.Characters; import javax.xml.stream.events.EndElement; import javax.xml.stream.events.StartDocument; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; public class RssBuilder { private static String XML_BLOCK = "\n"; private static String XML_INDENT = "\t"; public static void BuildRss(RSS rss, String xmlfile) throws Exception { XMLOutputFactory output = XMLOutputFactory.newInstance(); XMLEventWriter writer = output.createXMLEventWriter(new FileOutputStream(xmlfile)); try { XMLEventFactory eventFactory = XMLEventFactory.newInstance(); XMLEvent endSection = eventFactory.createDTD(XML_BLOCK); StartDocument startDocument = eventFactory.createStartDocument(); writer.add(startDocument); writer.add(endSection); StartElement rssStart = eventFactory.createStartElement("", "", "rss"); writer.add(rssStart); writer.add(eventFactory.createAttribute("version", "2.0")); writer.add(endSection); writer.add(eventFactory.createStartElement("", "", "channel")); writer.add(endSection); createNode(writer, "title", rss.getTitle()); createNode(writer, "description", rss.getDescription()); createNode(writer, "link", rss.getLink()); createNode(writer, "dateCreated", rss.getDateCreated().toString()); createNode(writer, "language", rss.getLanguage()); createNode(writer, "pubDate", rss.getPubDate().toString()); createNode(writer, "dateModified", rss.getDateModified().toString()); createNode(writer, "dateModified", rss.getDateModified().toString()); createNode(writer, "pubDate", rss.getPubDate().toString()); createNode(writer, "lastBuildDate", rss.getLastBuildDate().toString()); createNode(writer, "language", rss.getLanguage().toString()); createNode(writer, "rating", rss.getRating().toString()); Iterator<RSSItem> iterator = rss.getRssItems().iterator(); while (iterator.hasNext()) { RSSItem entry = iterator.next(); writer.add(eventFactory.createStartElement("", "", "item")); writer.add(endSection); createNode(writer, "title", entry.getTitle()); createNode(writer, "description", entry.getDescription()); createNode(writer, "link", entry.getLink()); createNode(writer, "dateCreated", entry.getDateCreated().toString()); createNode(writer, "pubDate", entry.getDateModified().toString()); writer.add(eventFactory.createEndElement("", "", "item")); writer.add(endSection); } writer.add(endSection); writer.add(eventFactory.createEndElement("", "", "channel")); writer.add(endSection); writer.add(eventFactory.createEndElement("", "", "rss")); writer.add(endSection); writer.add(eventFactory.createEndDocument()); writer.close(); } catch(Exception e) { writer.close(); } } private static void createNode(XMLEventWriter eventWriter, String name, String value)throws XMLStreamException { XMLEventFactory eventFactory = XMLEventFactory.newInstance(); XMLEvent endSection = eventFactory.createDTD(XML_BLOCK); XMLEvent tabSection = eventFactory.createDTD(XML_INDENT); StartElement sElement = eventFactory.createStartElement("", "", name); eventWriter.add(tabSection); eventWriter.add(sElement); Characters characters = eventFactory.createCharacters(value); eventWriter.add(characters); EndElement eElement = eventFactory.createEndElement("", "", name); eventWriter.add(eElement); eventWriter.add(endSection); } } But i get the following error type Exception report message descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.xml.stream.XMLStreamException: Can not write DOCTYPE declaration (DTD) when not in prolog any more (state 2; start element(s) written) root cause javax.xml.stream.XMLStreamException: Can not write DOCTYPE declaration (DTD) when not in prolog any more (state 2; start element(s) written) what does it mean?

    Read the article

  • How to avoid an asp:Multiview to load all the views

    - by GigaPr
    Hi I have a multiview control on my page and a menu to create a tab control <asp:Menu ID="tabMenu" Orientation="Horizontal" StaticMenuItemStyle-CssClass="tab" StaticSelectedStyle-CssClass="selectedTab" CssClass="tabs" OnMenuItemClick="Menu1_MenuItemClick" runat="server"> </asp:Menu><asp:MultiView ID="multiViewTab" ActiveViewIndex="0" runat="server"> <asp:View ID="viewDetails" runat="server"> <uc:ViewDetails runat="server" ID="ucViewDetails" /> </asp:View> <asp:View ID="viewJobs" runat="server"> <uc:ViewJob ID="ucViewJob" runat="server" /> </asp:View> <asp:View ID="viewJobList" runat="server"> <uc:ViewJobList ID="ucViewJobList" runat="server" /> </asp:View> </asp:MultiView> and i set the current view as follow protected void Menu1_MenuItemClick(object sender, MenuEventArgs e) { int index = Int32.Parse(e.Item.Value); if (index != 0) { tabMenu.FindItem("0").Selected = false; } multiViewTab.ActiveViewIndex = index; } it works well ... the only problem is that each time i click on a view all the views are loaded.while i would like to load only the one which is active Do you know any way to avoid the loading of all the views?

    Read the article

  • Execute javascript from link

    - by GigaPr
    Hi, i am just trying to create a link which execute some JavaScript in stead to redirect the user to a particular page I tried the following but it doesn t work <a href="#" onclick="javascript:location.replace('http://http://stackoverflow.com/questions/ask');">www.google.com</a><br /> <a href="javascript:location.replace('http://stackoverflow.com/questions/ask');">www.google.com</a> I am not trying to do anything illegal whit the redirect, just an exercise for a university module (Internet Security) Thanks

    Read the article

  • url rewriting asp .htaccess file

    - by GigaPr
    I i just moved my website (asp.net) to the live environment. i realized they are running IIS 6 so all my nice and clean url rewriting doesn t work anymore. i was trying to implemente url rewriting using the .htaccess file i want to rewrite www.amicobio.co.uk/Menu.aspx as www.amicobio.co.uk/Food-Menu so in the .htaccess i set CaseInsensitive On Options +FollowSymlinks RewriteEngine On RewriteRule ^Food-Menu$ Menu.aspx but it doesn t work it says The requested URL /a/m/amicobio.co.uk/public/Menu.aspx was not found on this server. obviously yhe path is wrong but what is /a/m/ ? and how do i fix it? all the files in amicobio.co.uk/public/ thanks

    Read the article

  • file extension .csp

    - by GigaPr
    Hi I found few web pages with the .csp extension. http://demo.e-dendrite.com/csp/bstent/frontpages/bdsrfront.csp http://demo.e-dendrite.com/CSP/ivf/Frontpages/ivrfront.csp what is it? what is it used for? thanks

    Read the article

  • Spring MVC handle button event in list

    - by GigaPr
    Hi, i created a list of Users <div class="usersList"> <c:forEach items="${users}" var="user"> <div class="listElementAction"> <c:out value="${user.id}"/> </div> <div class="listElement"> <c:out value="${user.firstName}"/> </div> <div class="listElement"> <c:out value="${user.lastName}"/> </div> <div class="listElement"> <c:out value="${user.username}"/> </div> <div class="listElementAction"> <input type="button" name="Edit" title="Edit" value="Edit" /> </div> <div class="listElementAction"> <input type="image" src="images/delete.png" name="image" value="${user.id}" alt="Delete" onclick="return confirm('Do you want to delete ${user.username}?')" > </div> <br /> </c:forEach> </div> and my controler looks like this public class UsersController implements Controller { private UserServiceImplementation userServiceImplementation; public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ModelAndView modelAndView = new ModelAndView("users"); modelAndView.addObject("users", this.userServiceImplementation.get()); return modelAndView; } public UserServiceImplementation getUserServiceImplementation() { return userServiceImplementation; } public void setUserServiceImplementation(UserServiceImplementation userServiceImplementation) { this.userServiceImplementation = userServiceImplementation; } } How can i handle the delete and edit button event?

    Read the article

  • Retrieve data using Dynamic Query and Linq to SQL

    - by GigaPr
    Hi I have a really complicated dynamic query that i want to use to retrieve data from the database I am working in .net 3.5 sql server 2008 i created a stored procedure that accepts a varchar(max) as input parameter and does execute (@SqlQuery) it executes but does not return anything I really would like to use LINQ as all my project is implemented using linq Any Idea how to do it what is the problem?

    Read the article

  • Avoid flickering on mouse over

    - by GigaPr
    Hi I have a simple link in a menu <a id="Home" href="Amico-Bio-Home-Page"></a> to which i apply the following style #Home{ background-image:url(../Images/Menu/home.png); background-repeat:no-repeat; border:none; display:block; height:70px; text-decoration:none; width:78px; float:left; padding:0 7px; } #Home:hover { background-image: url(../Images/Menu/homeOn.png); } when i go over the link the images are swapped. while swapping the images the link disappear for an instant. Do you know any way to avoid it? thanks

    Read the article

  • Object Oriented Database - why most of the companies do not use them

    - by GigaPr
    Hi, I am pretty new to programming(just finished University). I have been thought in the last 4 years about Object Oriented development and the numerous advantages of this approach. My question is Isn't it easier to use a pure Object Oriented database in development applications? Why Object Oriented database are not as much diffuse as relational? From my point of view makes sense to use OO database, the latter will avoid the numerous construction necessary for the mapping of complex objects on the tables.

    Read the article

  • Why i can not acces the protected properties in my web application

    - by GigaPr
    Hi i have a web application which has a Base class in which i define all the properties common to the web pages. The base class extends System.Web.UI.Page Furthermore i have a Base User control class where are defined all the properties common to the user controls. the Base User Control extends System.Web.UI.UserControl all the properties in both base classes are protected. All the web pages extends the base class . All the controls extends the base user control class. The problem is i can not access the properties defined in the base class from the user controls and I can not extend two classes in the base user controls The question is how can i access the properties defined in the Base class from within the user controls? I hope i have been clear Thanks

    Read the article

  • Oracle Database Enforce CHECK on multiple tables

    - by GigaPr
    I am trying to enforce a CHECK Constraint in a ORACLE Database on multiple tables CREATE TABLE RollingStocks ( Id NUMBER, Name Varchar2(80) NOT NULL, RollingStockCategoryId NUMBER NOT NULL, CONSTRAINT Pk_RollingStocks Primary Key (Id), CONSTRAINT Check_RollingStocks_CategoryId CHECK ((RollingStockCategoryId IN (SELECT Id FROM FreightWagonTypes)) OR (RollingStockCategoryId IN (SELECT Id FROM LocomotiveClasses))) ); ...but i get the following error: *Cause: Subquery is not allowed here in the statement. *Action: Remove the subquery from the statement. Can you help me understanding what is the problem or how to achieve the same result?

    Read the article

  • Input not firing in jsp page

    - by GigaPr
    Hi, i have been using the spring mvc frameworks lately for a university project. Could you tell me why this work <FORM METHOD=POST ACTION="SaveName.jsp"> <input type="image" class="floatR marginTMinus10" src="images/delete.png" name="image" value="${rssItem.id}" alt="Delete"/> </FORM> while this not <input type="image" class="floatR marginTMinus10" src="images/delete.png" name="image" value="${rssItem.id}" alt="Delete"/> does it mean a button has to be in a form to work? Can i use a button? if yes how do i handle the event in the controller? thanks

    Read the article

  • Rss Feed Java MVC

    - by GigaPr
    Hi, i would like to create some RSS Feeds for my website. I managed to crate the XML file but How do i display it in a nice format like http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml and how do i crate the little icon in the url box? by the way my XML file looks like <?xml version='1.0' encoding='UTF-8'?> <rss version="2.0"> <channel> <title>title</title> <description>desciption</description> <link>LINK</link> <dateCreated>2010-05-31 00:00:00.0</dateCreated> <language>Italian</language> <item> <title>pojpoj</title> <description>pojpojpoj</description> <link>ojpojpoj</link> <dateCreated>2010-06-03 00:00:00.0</dateCreated> <pubDate>2010-06-03 00:00:00.0</pubDate> </item> <item> <title>dfojp</title> <description>pojpojpoj</description> <link>pojpoj</link> <dateCreated>2010-06-03 00:00:00.0</dateCreated> <pubDate>2010-06-03 00:00:00.0</pubDate> </item> </channel> </rss> Thanks

    Read the article

  • Multiple select statement in stored procedure

    - by GigaPr
    Hi, i have a stored procedure that has to retrieve data from multiple tables something like SELECT [AppointmentId] ,[ContactId] ,[Date] ,[BookedBy] ,[Details] ,[Status] ,[Time] ,[Type] ,[JobId] ,[AppointmentFor] ,(Select PersonFirstName from Person where Person_Id = [AppointmentFor]) As UserFirstName ,(Select PersonLastName from Person where Person_Id = [AppointmentFor]) As UserLastName ,(Select PersonFirstName from Person where Person_Id = [ContactId]) As ContactFirstName ,(Select PersonLastName from Person where Person_Id = [ContactId]) As ContactLastName FROM [dbo].[Appointments] my question is there is any other more efficient way to do this? Or is this the right approach? I am working on a Sql server 2008 Thanks

    Read the article

  • Help with Hibernate mapping

    - by GigaPr
    Hi i have the following classes public class RSS { private Integer id; private String title; private String description; private String link; private Date dateCreated; private Collection rssItems; private String url; private String language; private String rating; private Date pubDate; private Date lastBuildDate; private User user; private Date dateModified; public RSS() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public void setDescription(String description){ this.description = description; } public String getDescription(){ return this.description; } public void setLink(String link){ this.link = link; } public String getLink(){ return this.link; } public void setUrl(String url){ this.url = url; } public String getUrl(){ return this.url; } public void setLanguage(String language){ this.language = language; } public String getLanguage(){ return this.language; } public void setRating(String rating){ this.rating = rating; } public String getRating(){ return this.rating; } public Date getPubDate() { return pubDate; } public void setPubDate(Date pubDate) { this.pubDate = pubDate; } public Date getLastBuildDate() { return lastBuildDate; } public void setLastBuildDate(Date lastBuildDate) { this.lastBuildDate = lastBuildDate; } public Date getDateModified() { return dateModified; } public void setDateModified(Date dateModified) { this.dateModified = dateModified; } public Date getDateCreated() { return dateCreated; } public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; } public Collection getRssItems() { return rssItems; } public void setRssItems(Collection rssItems) { this.rssItems = rssItems; } } public class RSSItem { private RSS rss; private Integer id; private String title; private String description; private String link; private Date dateCreated; private Date dateModified; private int rss_id; public RSSItem() {} public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getLink() { return link; } public void setLink(String link) { this.link = link; } public Date getDateCreated() { return dateCreated; } public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; } public Date getDateModified() { return dateModified; } public void setDateModified(Date dateModified) { this.dateModified = dateModified; } public RSS getRss() { return rss; } public void setRss(RSS rss) { this.rss = rss; } } that i mapped as <hibernate-mapping> <class name="com.rssFeed.domain.RSS" schema="PUBLIC" table="RSS"> <id name="id" type="int"> <column name="ID"/> <generator class="native"/> </id> <property name="title" type="string"> <column name="TITLE" not-null="true"/> </property> <property name="lastBuildDate" type="java.util.Date"> <column name="LASTBUILDDATE"/> </property> <property name="pubDate" type="java.util.Date"> <column name="PUBDATE" /> </property> <property name="dateCreated" type="java.util.Date"> <column name="DATECREATED" not-null="true"/> </property> <property name="dateModified" type="java.util.Date"> <column name="DATEMODIFIED" not-null="true"/> </property> <property name="description" type="string"> <column name="DESCRIPTION" not-null="true"/> </property> <property name="link" type="string"> <column name="LINK" not-null="true"/> </property> <property name="url" type="string"> <column name="URL" not-null="true"/> </property> <property name="language" type="string"> <column name="LANGUAGE" not-null="true"/> </property> <property name="rating" type="string"> <column name="RATING"/> </property> <set inverse="true" lazy="false" name="rssItems"> <key> <column name="RSS_ID"/> </key> <one-to-many class="com.rssFeed.domain.RSSItem"/> </set> </class> </hibernate-mapping> <hibernate-mapping> <class name="com.rssFeed.domain.RSSItem" schema="PUBLIC" table="RSSItem"> <id name="id" type="int"> <column name="ID"/> <generator class="native"/> </id> <property name="title" type="string"> <column name="TITLE" not-null="true"/> </property> <property name="description" type="string"> <column name="DESCRIPTION" not-null="true"/> </property> <property name="link" type="string"> <column name="LINK" not-null="true"/> </property> <property name="dateCreated" type="java.util.Date"> <column name="DATECREATED"/> </property> <property name="dateModified" type="java.util.Date"> <column name="DATEMODIFIED"/> </property> <many-to-one class="com.rssFeed.domain.RSS" fetch="select" name="rss"> <column name="RSS_ID"/> </many-to-one> </class> </hibernate-mapping> But when i try to fetch an RSS I get the following error Exception occurred in target VM: failed to lazily initialize a collection of role: com.rssFeed.domain.RSS.rssItems, no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.rssFeed.domain.RSS.rssItems, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97) at org.hibernate.collection.PersistentSet.size(PersistentSet.java:139) at com.rssFeed.dao.hibernate.HibernateRssDao.get(HibernateRssDao.java:47) at com.rssFeed.ServiceImplementation.RssServiceImplementation.get(RssServiceImplementation.java:46) at com.rssFeed.mvc.ViewRssController.handleRequest(ViewRssController.java:20) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:619) < what does it mean? Thanks

    Read the article

  • Java Mvc And Hibernate

    - by GigaPr
    Hi i am trying to learn Java, Hibernate and the MVC pattern. Following various tutorial online i managed to map my database, i have created few Main methods to test it and it works. Furthermore i have created few pages using the MVC patter and i am able to display some mock data as well in a view. the problem is i can not connect the two. this is what i have My view Looks like this <%@ include file="/WEB-INF/jsp/include.jsp" %> <html> <head> <title>Users</title> <%@ include file="/WEB-INF/jsp/head.jsp" %> </head> <body> <%@ include file="/WEB-INF/jsp/header.jsp" %> <img src="images/rss.png" alt="Rss Feed"/> <%@ include file="/WEB-INF/jsp/menu.jsp" %> <div class="ContainerIntroText"> <img src="images/usersList.png" class="marginL150px" alt="Add New User"/> <br/> <br/> <div class="usersList"> <div class="listHeaders"> <div class="headerBox"> <strong>FirstName</strong> </div> <div class="headerBox"> <strong>LastName</strong> </div> <div class="headerBox"> <strong>Username</strong> </div> <div class="headerAction"> <strong>Edit</strong> </div> <div class="headerAction"> <strong>Delete</strong> </div> </div> <br><br> <c:forEach items="${users}" var="user"> <div class="listElement"> <c:out value="${user.firstName}"/> </div> <div class="listElement"> <c:out value="${user.lastName}"/> </div> <div class="listElement"> <c:out value="${user.username}"/> </div> <div class="listElementAction"> <input type="button" name="Edit" title="Edit" value="Edit"/> </div> <div class="listElementAction"> <input type="image" src="images/delete.png" name="image" alt="Delete" > </div> <br /> </c:forEach> </div> </div> <a id="addUser" href="addUser.htm" title="Click to add a new user">&nbsp;</a> </body> </html> My controller public class UsersController implements Controller { private UserServiceImplementation userServiceImplementation; public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ModelAndView modelAndView = new ModelAndView("users"); List<User> users = this.userServiceImplementation.get(); modelAndView.addObject("users", users); return modelAndView; } public UserServiceImplementation getUserServiceImplementation() { return userServiceImplementation; } public void setUserServiceImplementation(UserServiceImplementation userServiceImplementation) { this.userServiceImplementation = userServiceImplementation; } } My servelet definitions <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <!-- the application context definition for the springapp DispatcherServlet --> <bean name="/home.htm" class="com.rssFeed.mvc.HomeController"/> <bean name="/rssFeeds.htm" class="com.rssFeed.mvc.RssFeedsController"/> <bean name="/addUser.htm" class="com.rssFeed.mvc.AddUserController"/> <bean name="/users.htm" class="com.rssFeed.mvc.UsersController"> <property name="userServiceImplementation" ref="userServiceImplementation"/> </bean> <bean id="userServiceImplementation" class="com.rssFeed.ServiceImplementation.UserServiceImplementation"> <property name="users"> <list> <ref bean="user1"/> <ref bean="user2"/> </list> </property> </bean> <bean id="user1" class="com.rssFeed.domain.User"> <property name="firstName" value="firstName1"/> <property name="lastName" value="lastName1"/> <property name="username" value="username1"/> <property name="password" value="password1"/> </bean> <bean id="user2" class="com.rssFeed.domain.User"> <property name="firstName" value="firstName2"/> <property name="lastName" value="lastName2"/> <property name="username" value="username2"/> <property name="password" value="password2"/> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property> <property name="prefix" value="/WEB-INF/jsp/"></property> <property name="suffix" value=".jsp"></property> </bean> </beans> and finally this class to access the database public class HibernateUserDao extends HibernateDaoSupport implements UserDao { public void addUser(User user) { getHibernateTemplate().saveOrUpdate(user); } public List<User> get() { User user1 = new User(); user1.setFirstName("FirstName"); user1.setLastName("LastName"); user1.setUsername("Username"); user1.setPassword("Password"); List<User> users = new LinkedList<User>(); users.add(user1); return users; } public User get(int id) { throw new UnsupportedOperationException("Not supported yet."); } public User get(String username) { return null; } } the database connection occurs in this file <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org.hsqldb.jdbcDriver"/> <property name="url" value="jdbc:hsqldb:hsql://localhost/rss"/> <property name="username" value="sa"/> <property name="password" value=""/> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" > <property name="dataSource" ref="dataSource" /> <property name="mappingResources"> <list> <value>com/rssFeed/domain/User.hbm.xml</value> </list> </property> <property name="hibernateProperties" > <props> <prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop> </props> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <bean id="userDao" class="com.rssFeed.dao.hibernate.HibernateUserDao"> <property name="sessionFactory" ref="sessionFactory"/> </bean> </beans> Could you help me to solve this problem i spent the last 4 days and nights on this issue without any success Thanks

    Read the article

1 2  | Next Page >